Daily Archives

Articles indexed Thursday March 18 2010

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

  • Consuming and Provide webservice to client

    - by Jason
    Hi, I got a requirement to implement a website in java which will utilize another web service. Here is the scenario I am providing the product compare results to client and assume i am using amazon and other web services. Initially client invoke our web service and then we fetch results from merchants. I don't want complete solution just look for consuming and create web service in java example. I searched on google but couldn't found relevant example. I prefer if example is using eclipse :) Thanks

    Read the article

  • Zend routing, throws resource not found

    - by bluedaniel
    Ive got a url: http://dev.local/foodies/view?id=bluedaniel and ive got in my bootstrap: protected function _initRoute() { $config = new Zend_Config_Ini(APPLICATION_PATH . '/configs/routes.ini', 'production'); $router = new Zend_Controller_Router_Rewrite(); $router->addConfig($config, 'resources'); } and ive also got in my routes.ini: [production] resources.router.routes.foodies_view.route = ":foodies/:id" resources.router.routes.foodies_view.defaults.module = "foodies" resources.router.routes.foodies_view.defaults.controller = "view" resources.router.routes.foodies_view.defaults.action = "index" so http://dev.local/foodies/bluedaniel should work right? I get a Resource 'foodies:bluedaniel' not found error however with this setup

    Read the article

  • How do I pipe in FileMerge as a diff tool with git on OSX?

    - by doug
    I'm new to git, on OSX, using it via command line. I come from the world of Tortoise SVN and Beyond Compare on Windows. I want to be able to pipe in diffs to happen via FileMerge which I have installed already. I was able to do this with TextMate simply by using: git diff | mate But I'm not sure how to get that set up so I can use FileMerge instead?

    Read the article

  • aspnet membeship logon page and https redirect

    - by DefSol
    Hello, I have a gridview control that has on onclick event bound to every cell. Once a user clicks on a cell it directs them to a booking confirmation page and passes 3 url variables. This booking page is behind a aspnet membership and thus if the user is not logged in they are served the login page. The login page has a redirect to https connection in the onload event using the IsSecure property. The issue is once the user logs in, then is returned to the booking confirmation page I lose 2 of the url vars. If I remove the https redirect, everything works fine, but the user logs on on a http connection, which is not cool. Appreciate and help thanks Reuben

    Read the article

  • Common and useful Graph functions?

    - by Nazgulled
    Hi, I'm implementing a simple Graph library for my uni project and since this is the first time I'm dealing with graphs, I would like to know which functions you guys consider to be most common and useful for Graph implementations... So far, I have this: graphInitialize() graphInsertVertex() graphRemoveVertex() graphGetVertex() graphGetVertexValue() (not implemented yet, not sure if I'll need it) graphInsertEdge() graphRemoveEdge() graphLinkVertices() (this calls graphInsertEdge twice for bidirectional graph) graphUnlinkVertices() (this calls graphRemoveEdge twice for bidirectional graph) graphDestroy() I know I'm missing a function do determine the shortest path, but I'm leaving that for last... Do you think I'm missing any common/useful function?

    Read the article

  • Segmentation fault on MPI, runs properly on OpenMP

    - by Bellman
    Hi, I am trying to run a program on a computer cluster. The structure of the program is the following: PROGRAM something ... CALL subroutine1(...) ... END PROGRAM SUBROUTINE subroutine1(...) ... DO i=1,n CALL subroutine2(...) ENDDO ... END SUBROUTINE SUBROUTINE subroutine2(...) ... CALL subroutine3(...) CALL subroutine4(...) ... END SUBROUTINE The idea is to parallelize the loop that calls subroutine2. Main program basically only makes the call to subroutine1 and only its arguments are declared. I use two alternatives. On the one hand, I write OpenMP clauses arround the loop. On the other hand, I add an IF conditional branch arround the call and I use MPI to share the results. In the OpenMP case, I add CALL KMP_SET_STACKSIZE(402653184) at the beginning of the main program and I can run it with 8 threads on an 8 core machine. When I run it (on the same 8 core machine) with MPI (either using 8 or 1 processors) it crashes just when makes the call to subroutine3 with a segmentation fault (signal 11) error. If I comment subroutine4, then it doesn't crash (notice that it crashed just when calling subroutine3 and it works when commenting subroutine4). I compile with mpif90 using MPICH2 libraries and the following flags: -O3 -fpscomp logicals -openmp -threads -m64 -xS. The machine has EM64T architecture and I use a Debian Linux distribution. I set ulimit -s hard before running the program. Any ideas on what is going on? Has it something to do with stack size? Thanks in advance

    Read the article

  • Linux : Forward users mail using exim4 server (newbiw warning)

    - by llazzaro
    Hello, I have a network of linux server, one of them is running exim4 that server could send [email protected]. At exim4 server, I had setup an alias for the users accounts ...for example root : [email protected] But I have other server, if I put the alias email is marked as spam...since they arent using exim4 server. I want to configure the other server to use that exim4 server, in order to dont get the mails mark as spam. Well I know this is really newbie question, but searching at google is difficult since it confuses exim4 server configuration than the client configuration to use exim4 server. Remember, I want root@server1,root@server2,etc mails send via exim4 server!

    Read the article

  • Appropriate to Stateless Autoconfigure a Server?

    - by user31498
    I am setting up a network to support IPv6. Stateless Autoconfiguration seems to be the preferred way to get an IP address on an IPv6 network but is this the preferred way for a server? Other machines outside of the network are going to need to be able to talk to the server. Is it preferable to give the server a static IP address or is there something fancy that can be done with DNS to keep track of the server address?

    Read the article

  • Javascript Certification

    - by Livingston Samuel
    Is there any proper Certification for Javascript, that covers all the advanced topics of Javascript including the DOM (Document Object Model), BOM (Browser Object Model) and CSS Object Model, that can really evaluate the skills? I've no idea how to scale myself on my JS skills, so any suggestions would be beneficial.

    Read the article

  • Attching a Behaviour to a dynamically created table in Doctrine

    - by Cesare Contini
    How do I programmatically attach a Doctrine Behaviour programmatically to a table dynamically created through $conn->export->createTable('MyTable', $definition)? For example, if I have the following code: $definition = array( 'id' => array( 'type' => 'integer', 'primary' => true, 'autoincrement' => true ), 'name' => array( 'type' => 'string', 'length' => 255 ) ); $conn->export->createTable('MyTable', $definition) ; At this point I would need to attach a doctrine typical behaviour like Timestampable or Versionable to the newly created 'MyTable' table. Is it possible at all?

    Read the article

  • Database design in blogging systems

    - by Peter
    As a learning exercise I'm trying to put myself a blogging system. The goal is to code something that will let me create multiple blogs, like blogger.com or wordpress.com, but much simplified. I would like to ask you, what do you think is best database design for this type of script. Is it better to have one big table, containing posts from all blogs of all users (like friendfeed) or would it be better to create separate table for each blog's posts? Big thanks in advance for your help, Peter.

    Read the article

  • MySQL field type for a comments field or text area

    - by Derek
    As the title says, I'm after a good field type for a comments field I have in a table. It will store many characters (as users can continuously add to it) so it's definitely over 255. I looked at longtext but wasn't sure...Also how do I change the field type to accept different characters such as apostrophies. Thanks.

    Read the article

  • Advanced Java book in the lines of CLR via c# or C# in Depth?

    - by devoured elysium
    I want to learn about how things work in depth in Java. Coming from a c# background, there were a couple of very good books that go really deep in c# (C# in depth, CLR via c#, just to name the most popular). Is there anything like that in Java? I searched it up on amazon but nothing seemed to go that deep in Java as the two above go in c#. I don't want to know more about specific classes, or how to use this library or that other library, I want to learn how the objects are created on memory, how they get created on the stack, heap, etc. A more fundamental knowledge, let's say. I've read some chapters of Effective Java and The Java Programming Language but they don't seem to go so deep as I'd want them to go. Maybe there are other people that know both c# and Java that have read any of the referred books and know any that might be useful? Thanks

    Read the article

  • Sharepoint create site navigation through programming

    - by Sachin
    Hi All, I have a requirement in sharepoint where I want to Create the top link navigation based on excel file. Means The site navigation structure (along with parent site subsite under parent site) is mention in excel file. I need to read that structure and based on modify the navigation in sharepoint. Please can any one tell me is it possible to configure navigation in such a way. If yes then please tell me how to achive it. FYI: I am using MOSS 2007. thanks in advance sachin katkar

    Read the article

  • Any great books of algorithm puzzles to practice whiteboard coding with?

    - by jboxer
    I'm looking to get some practice coding solutions to algorithm puzzles on a whiteboard. A friend is going to read puzzles to me (as if he were interviewing me), and I'll solve them on a whiteboard. Does anyone know any great books with algorithm puzzles that would be useful for this? I found a book called Puzzles for Programmers and Pros, but it only has six reviews on Amazon, so I'm not sure how good it really is. If anyone has any recommendations, I'd really appreciate it. Thanks a bunch.

    Read the article

  • Printer Redirection from 2003 Terminal Server to 2008 Terminal Server

    - by xmaveric
    Our environment is a terminal server cluster (Win2003 servers) that everyone connects to do do their work. I have set up a new Win2008 R2 machine with the intention of using it to publish our main application to the TS farm. The idea was to keep this server dedicated to one application to avoid driver/dll conflicts with other software. I created a RemoteApp on the new server and made an .rdp file and placed it on the desktop of our TS farm servers. The problem I am running into is that when I connect to the RemoteApp, it doesn't show the printers that are installed on the TS server I am connecting from. We have over 20 printers installed on our TS servers, each with different drivers and permissions. I really do not want to reinstall all of these on the RemoteApp server so I was hoping Printer Redirection would handle this. It would appear that because the RDP client for Server 2003 x64 is 6.0, that version doesn't support the Easy Print feature (requires 6.1). I can't find any newer version on the MS site to download for Win2003 x64. How can I get the printers on the TS farm machine to redirect so they are viewed by the RemoteApp machine?

    Read the article

  • Clear command line output from Python [Eclipse]

    - by Tomas Lycken
    I'm using Eclipse for writing Python, and I want to be able to easily clear the screen. I've seen this question, and tried (among other things suggested there) the following solution import os def clear(): os.system('cls' if os.name == 'nt' else 'clear') but it doesn't entirely solve my problem. Instead of clearing the screen, the routine prints a small square (as if wanting to print an unknown character) to the command output window in Eclipse. Typing cls in the command line works perfectly fine, as does running a Python script with the above code from command line. But how can I make it look nice in Eclipse as well?

    Read the article

  • Scala Programming for Android

    - by Lemmy
    I have followed the tutorial at Scala and Android with Scala 2.7.3 final. The resulting Android App works but even the most basic application takes several minutes (!) to compile and needs 900 kb compressed, which is a show stopper for mobile applications. Additionally, the IDE runs out of memory every now and then. I assume dex is not made for big libraries like the scala-library. So my question is: Has anyone actually done this and is there any cure for this?

    Read the article

  • Recursion in Java enums?

    - by davidrobles
    I've been trying for 3 hours and I just can't understand what is happening here. I have an enum 'Maze'. For some reason, when the method 'search' is called on this enum it's EXTREMELY slow (3 minutes to run). However, if I copy the same method to another class as a static method, and I call it from the enum 'Maze' it runs in one second! I don't understand why? is there any problem with recursive methods in Java enums?? What am I doing wrong? public enum Maze { A("A.txt"), B("B.txt"); // variables here... Maze(String fileName) { loadMap(fileName); nodeDistances = new int[nodes.size()][nodes.size()]; setNeighbors(); setDistances(); } ... more methods here ... private void setDistances() { nodeDistances = new int[nodes.size()][nodes.size()]; for (int i = 0; i < nodes.size(); i++) { setMax(nodeDistances[i]); // This works!!! TestMaze.search(nodes, nodeDistances[i], i, 0); // This DOESN'T WORK //search(nodes, nodeDistances[i], i, 0); } } public void setMax(int[] a) { for (int i=0; i<a.length; i++) { a[i] = Integer.MAX_VALUE; } } public void search(List<Node> allNodes, int[] distances, int curNodeIndex, int curDist) { if (curDist < distances[curNodeIndex]) { distances[curNodeIndex] = curDist; for (Node n : allNodes.get(curNodeIndex).getNeighbors()) { search(allNodes, distances, n.getNodeIndex(), curDist + 1); } } } } public class TestMaze { public static void search(List<Node> allNodes, int[] distances, int curNodeIndex, int curDist) { if (curDist < distances[curNodeIndex]) { distances[curNodeIndex] = curDist; for (Node n : allNodes.get(curNodeIndex).getNeighbors()) { search(allNodes, distances, n.getNodeIndex(), curDist + 1); } } } }

    Read the article

  • Apache: Setting DocumentRoot to cgi directory results in downloading file instead of executing it.

    - by fastmonkeywheels
    I have a c-compiled CGI application that I need to execute from the DocumentRoot of my Apache server. The CGI file is called index.cgi and is located at /usr/lib/cgi-bin/index.cgi. I have the following Directory definition <Directory "/usr/lib/cgi-bin/"> Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch AllowOverride None Order allow,deny Allow from all DirectoryIndex index.cgi </Directory> I have the following VirtualHost setting: <VirtualHost *:80> ServerAdmin webmaster@localhost DocumentRoot /usr/lib/cgi-bin # ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/ ErrorLog /var/log/apache2/error.log LogLevel warn CustomLog /var/log/apache2/access.log combined </VirtualHost> If I go to 127.0.0.1 or 127.0.0.1/index.cgi I get prompted to download the index.cgi file, however if I enable the ScriptAlias in the vhost configuration block and go to 127.0.0.1/cgi-bin/index.cgi I see the output of my CGI application. I had originally solved this problem with mod_rewrite, however that worked on my test system the target (embedded) doesn't have that module available so I'm looking at another route (again).

    Read the article

  • What's an efficient way of calculating the nearest point?

    - by Griffo
    I have objects with location data stored in Core Data, I would like to be able to fetch and display just the nearest point to the current location. I'm aware there are formulas which will calculate the distance from current lat/long to a stored lat/long, but I'm curious about the best way to perform this for a set of 1000+ points stored in Core Data. I know I could just return the points from Core Data to an array and then loop through that looking for the min value for distance between the points but I'd imagine there's a more efficient method, possibly leveraging Core Data in some way. Any insight would be appreciated. EDIT: I don't know how I missed this on my initial search but this SO question suggests just iterating through an array of Core Data objects but limiting the array size with a bounding box based on the current location. Is this the best I can do?

    Read the article

  • dividing double by double gives weird results - Java

    - by Aly
    Hi, I am trying to do the following 33.33333333333333/100.0 to get 0.333333333333333 however when I run System.out.println(33.33333333333333/100.0); I get 0.33333333333333326 as the output, similarly when I run System.out.println(33.33333333333333/1000.0); I get 0.033333333333333326 as the output. Does anyone know why, and how I can get the correct value (without loss of decimal places). Thanks

    Read the article

  • rewrite rule to switch to subfolder

    - by Midday
    I'm deploying a Wordpress blog, but I don't want to overwrite the current site yet. public_html/. <-- the current site public_html/wp/. <-- the new site How must my .htaccess look like so I can seamlessly switch from the current site to the new one so that http://domain.tld shows the new site like it would be directly in the public_html folder

    Read the article

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