Daily Archives

Articles indexed Monday April 5 2010

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

  • Deploying only changed portions of a war to Tomcat

    - by Marty Pitt
    I'm deploying my application to Tomcat, which currently involves uploading a ~40MB war file to a remote server. Often the changes within the war only affect jars and static content which account for maybe 2 - 3MB's. Is there some tooling I can integrate with my Ant script that can accurately detect the changes to the war and give me a smaller subset to upload?

    Read the article

  • question/problem regarding assigning an array of char *

    - by Fantastic Fourier
    Hi I'm working with C and I have a question about assigning pointers. struct foo { int _bar; char * _car[MAXINT]; // this is meant to be an array of char * so that it can hold pointers to names of cars } int foofunc (void * arg) { int bar; char * car[MAXINT]; struct foo thing = (struct foo *) arg; bar = arg->_bar; // this works fine car = arg->_car; // this gives compiler errors of incompatible types in assignment } car and _car have same declaration so why am I getting an error about incompatible types? My guess is that it has something to do with them being pointers (because they are pointers to arrays of char *, right?) but I don't see why that is a problem. when i declared char * car; instead of char * car[MAXINT]; it compiles fine. but I don't see how that would be useful to me later when I need to access certain info using index, it would be very annoying to access that info later. in fact, I'm not even sure if I am going about the right way, maybe there is a better way to store a bunch of strings instead of using array of char *?

    Read the article

  • Schema Inheritance in BizTalk Server

    - by newbtdev
    Hi, I just wondering if anyone has already tried of doing something like schema inheritance in BizTalk schemas? I am using WCF Adapter and using 'consume adapter service' to generate a schema automatically, what I wanted is instead of always generating a schema and since most of my schema is the same then I want to have something like a base schema. I have this scenario that I'm testing flat file debatching, for debatching I need to set maxoccur property of the schema to '1' but for batch processing it should be '*', instead of creating a two different schemas I want just to create a base schema and inherit from it and then change the maxoccur property in the derived schema. Any help would be appreciated. Many Thanks

    Read the article

  • Why do people have to use multiple versions of jQuery on the same page?

    - by reprogrammer
    I have noticed that sometimes people have to use multiple versions of jQuery in the same page (See question 1 and question 2). I assume people have to carry old versions of jQuery because some pieces of their code is based on an older version of jQuery. Obviously, this approach causes inefficiency. The ideal solution is to refactor the old code to use the newer jQuery API. I wonder if there are tools that automate the process of upgrading a piece of code to use a newer version of jQuery. I've never written programs in in either Javascript or jQuery. So, I'd like to hear from programmers experienced in these language about their opinion on this issue. In particular, I'd like to know the following. How much of problem it is to have to load multiple versions of jQuery? Have you ever had to load multiple versions of any other library in the same page? Do you know of any refactoring tools that helps you migrate your code to use the updated API? Do you think such a refactoring tool is useful? Are you willing to use it?

    Read the article

  • Workaround for stopping propagation with live()?

    - by bobsoap
    I've run into the problem that has been addressed here without a workaround: I can't use stopPropagation() on dynamically spawned elements. I've tried creating a condition to exclude a click within the dimensions of the spawned element, but that doesn't seem to work at all. Here is what I got: 1) a large background element ("canvas") that is activated to be "sensitive to clicks on it" by a button 2) the canvas, if activated, catches all clicks on it and spawns a small child form ("child") within it 3) the child is positioned relative to the mouse click position. If the mouse click was on the right half of the canvas, the child will be positioned 200 pixels to the left of that spot. (On the right if the click was in the left half) 4) every new click on the canvas removes the existing child (if any) and spawns a new child at the new position (relative to the click) The problem: Since the spawned child element is on top of the canvas, a click on it counts as a click on the canvas. Even if the child is outside of the boundaries of the canvas, clicking on it will trigger the action as described in 4) again . This shouldn't happen. =========== CODE: The button to activate the canvas: $('a#activate').click(function(event){ event.preventDefault(); canvasActive(); }); I referenced the above to show you that the canvas click-catching is happening in a function. Not sure if this is relevant... This is the function that catches clicks on the canvas: function canvasActive() { $('#canvas').click(function(e){ e.preventDefault(); //get click position relative to canvas posClick = { x : Math.round(e.pageX - $(this).offset().left), y : Math.round(e.pageY - $(this).offset().top) }; //calculate child position if(posClick.x <= $canvas.outerWidth(false)/2) { posChild = { x: posClick.x + 200, //if dot is on the left side of canvas y: posClick.y }; } else { posChild = { x: posClick.x - 600, //if dot is on the right y: posClick.y }; } $(this).append(markup); //markup is just the HTML for the child }); } I left out the unimportant stuff. The question is: How can I prevent a click inside of a spawned child from executing the function? I tried getting the child's dimensions and doing something like "if posClick is within this range, don't do anything" - but I can't seem to get it right. Perhaps someone has come across this dilemma before. Any help is appreciated.

    Read the article

  • Possible to InvalidateVisual() on a given region instead of entire WPF control?

    - by Scott Bilas
    I have a complex WPF control that draws a lot of primitives in its OnRender (it's sort of like a map). When a small portion of it changes, I'd only like to re-issue render commands for the affected elements, instead of running the entire OnRender over. While I'm fine with my OnRender function's performance on a resize or whatever, it's not fast enough for mouse hover-based highlighting of primitives. Currently the only way I know how to force a screen update is to call InvalidateVisual(). No way to send in a dirty rect region to invalidate. Is the lowest granularity of WPF screen composition the UI element? Will I need to do my renders of primitives into an intermediate target and then have that use InvalidateVisual() to update to the screen?

    Read the article

  • Question about how to use strong typed dataset in N-tier application for .NET

    - by sb
    Hello All, I need some expert advice on strong typed data sets in ADO.NET that are generated by the Visual Studio. Here are the details. Thank you in advance. I want to write a N-tier application where Presentation layer is in C#/windows forms, Business Layer is a Web service and Data Access Layer is SQL db. So, I used Visual Studio 2005 for this and created 3 projects in a solution. project 1 is the Data access layer. In this I have used visual studio data set generator to create a strong typed data set and table adapter (to test I created this on the customers table in northwind). The data set is called NorthWindDataSet and the table inside is CustomersTable. project 2 has the web service which exposes only 1 method which is GetCustomersDataSet. This uses the project1 library's table adapter to fill the data set and return it to the caller. To be able to use the NorthWindDataSet and table adapter, I added a reference to the project 1. project 3 is a win forms app and this uses the web service as a reference and calls that service to get the data set. In the process of building this application, in the PL, I added a reference to the DataSet generated above in the project 1 and in form's load I call the web service and assign the received DataSet from the web service to this dataset. But I get the error: "Cannot implicitly convert type 'PL.WebServiceLayerReference.NorthwindDataSet' to 'BL.NorthwindDataSet' e:\My Documents\Visual Studio 2008\Projects\DataSetWebServiceExample\PL\Form1.cs". Both the data sets are same but because I added references from different locations, I am getting the above error I think. So, what I did was I added a reference to project 1 (which defines the data set) to project 3 (the UI) and used the web service to get the DataSet and assing to the right type, now when the project 3 (which has the web form) runs, I get the below runtime exception. "System.InvalidOperationException: There is an error in XML document (1, 5058). --- System.Xml.Schema.XmlSchemaException: Multiple definition of element 'http://tempuri.org/NorthwindDataSet.xsd:Customers' causes the content model to become ambiguous. A content model must be formed such that during validation of an element information item sequence, the particle contained directly, indirectly or implicitly therein with which to attempt to validate each item in the sequence in turn can be uniquely determined without examining the content or attributes of that item, and without any information about the items in the remainder of the sequence." I think this might be because of some cross referenceing errors. My question is, is there a way to use the visual studio generated DataSets in such a way that I can use the same DataSet in all layers (for reuse) but separate the Table Adapter logic to the Data Access Layer so that the front end is abstracted from all this by the web service? If I have hand write the code I loose the goodness the data set generator gives and also if there are columns added later I need to add it by hand etc so I want to use the visual studio wizard as much as possible. thanks for any help on this. sb

    Read the article

  • Firefox "auto-complete" is very slow

    - by netvope
    Firefox version: 3.6 My places.sqlite is rather big (114MB, after being optimized by SpeedyFox.) If I turn on auto-complete, it may take 1 or 2 seconds for Firefox to accept a newly typed URL. To reproduce the issue: Type a URL into the URL bar, press enter. Nothing happens, and Firefox consumes 100% CPU (actually 50% of 2 cores) for 1 to 2 seconds Then Firefox start the network connection and load the webpage. Since it consumes 100% CPU, I don't think the bottleneck is the disk. I have some experience with SQLite and I know a 100MB DB is very small. To achieve the delay Firefox must be doing some expensive processing or inefficient queries. The issue does not appear if: auto-complete is turned off, or the URL is frequently used, or a new profile with no history is used Does anyone have any idea how to solve the problem? Should I file this as a bug? I don't want to give up my 100MB history, but I don't want to give up auto-complete either :)

    Read the article

  • How to get SVN to ignore a directory inside an externals definition

    - by NerdStarGamer
    I'm using subversion to host my own repository for a WordPress installation. I've got it set up so that all of the core WordPress files are in their own directory (called wordpress) and set up to use svn:externals to link to the WordPress repository. I then have my own copy of the wp-content directory (located outside of the wordpress directory) which does not use svn:externals. This is all working fine. When I update my repository, the WordPress core gets updated. Since the WordPress repository contains it's own wp-content directory, it also updates that directory. So my file structure ends up looking something like this: / --/wordpress/ (wordpress repo) -----/wp-admin/ -----/wp-content/ --/wp-content/ (my local repo) I end up having two separate versions of the wp-content folder (one from my repo and one from the WordPress repo). I don't want the one from the WordPress repo (or at least not in that location). Is there a way for me to set svn to ignore the wordpress/wp-content directory while still using externals definition?

    Read the article

  • Using a datanase class in my user class?

    - by Josh
    In my project I have a database class that I use to handle all the MySQL stuff. It connects to a database, runs queries, catches errors and closes the connection. Now I need to create a members area on my site, and I was going to build a users class that would handle registration, logging in, password/username changes/resets and logging out. In this users class I need to use MySQL for obvious reasons... which is what my database class was made for. But I'm confused as to how I would use my database class in my users class. Would I want to create a new database object for my user class and then have it close whenever a method in that class is finished? Or do I somehow make a 'global' database class that can be used throughout my entire script (if this is the case I need help with that, no idea what to do there.) Thanks for any feedback you can give me.

    Read the article

  • bash: assign grep regex results to array

    - by Ryan
    Hello everyone, I am trying to assign a regular expression result to an array inside of a bash script but I am unsure whether that's possible, or if I'm doing it entirely wrong. The below is what I want to happen, however I know my syntax is incorrect: indexes[4]=$(echo b5f1e7bfc2439c621353d1ce0629fb8b | grep -o '[a-f0-9]\{8\}') such that: index[1]=b5f1e7bf index[2]=c2439c62 index[3]=1353d1ce index[4]=0629fb8b Any links, or advice, would be wonderful :)

    Read the article

  • Servlet xxx is not available

    - by hguser
    In the web.xml of my web app I have configed the server as following: The web.xml However when I request this servlet ,I got a error which tells me "Servlet SOS is not available",but I am sure this servlet do exist in the WEB-INFO/lib/sos.jar. And I have seen the initialization work under the servelt from the logs. I wonder why can not tomcat find the sevlet?

    Read the article

  • Can not parse tabular information from html document.

    - by Harikrishna
    I am parsing many html documents.I am using html agility pack And I want to parse the tabular information from each document. And there may be any number of tables in each document.But I want to extract only one table from each document which has column header name NAME,PHONE NO,ADDRESS.And this table can be anywhere in the document,like in the document there is ten tables and from ten table there is one table which has many nested tables and from nested table there may be a table what I want to extract means table can be anywhere in the document and I want to find that table from the document by column header name.If I got that table then I want to then extract the information from that table. Now I can find the table which has column header NAME,PHONE NO,ADDRESS and also can extract the information from that.I am doing for that is, first I find the all tables in a document by foreach (var table in doc.DocumentNode.Descendants("table")) then for each table got I find the row for each table like, var rows = table.Descendants("tr"); and then for each row I am checking that row has that header name NAME,ADDRESS,PHONENO and if it is then I skip that row and extract all information after that row foreach (var row in rows.Skip(rowNo)) { var data = new List<string>(); foreach (var column in row.Descendants("td")) { data.Add(properText); } } Such that I am extracting all information from almost many document. But now problem is sometimes what happened that in some document I can not parse the information.Like a document in which there are like 10 tables and from these 10 tables 1 table is like there are many nested tables in that table. And from these nested tables I want to find the table which tabel has column header like NAME,ADDRESS,PHONE NO.So if table may be anywhere in the document even in the nested tables or anywhere it can be find through column header name.So I can parse the information from that table and skip the outer tabular information of that table.

    Read the article

  • php class extend - run something before running parent function

    - by Patrick
    Hi, say I have this class: class animal { function noise() { print 'woof'; } function move() { print 'moved'; } } class dog extends animal { } What I would like to do is when i run $dog-noise() or $dog-move(), it would run something first prior to calling animal class's noise/move. Is this doable? Like maybe logging the function call. If not with class extend, what else can I use to achieve this? Thank you!

    Read the article

  • Detecting Asymptotes in a Graph

    - by nasufara
    I am creating a graphing calculator in Java as a project for my programming class. There are two main components to this calculator: the graph itself, which draws the line(s), and the equation evaluator, which takes in an equation as a String and... well, evaluates it. To create the line, I create a Path2D.Double instance, and loop through the points on the line. To do this, I calculate as many points as the graph is wide (e.g. if the graph itself is 500px wide, I calculate 500 points), and then scale it to the window of the graph. Now, this works perfectly for most any line. However, it does not when dealing with asymptotes. If, when calculating points, the graph encounters a domain error (such as 1/0), the graph closes the shape in the Path2D.Double instance and starts a new line, so that the line looks mathematically correct. Example: However, because of the way it scales, sometimes it is rendered correctly, sometimes it isn't. When it isn't, the actual asymptotic line is shown, because within those 500 points, it skipped over x = 2.0 in the equation 1 / (x-2), and only did x = 1.98 and x = 2.04, which are perfectly valid in that equation. Example: In that case, I increased the window on the left and right one unit each. My question is: Is there a way to deal with asymptotes using this method of scaling so that the resulting line looks mathematically correct? I myself have thought of implementing a binary search-esque method, where, if it finds that it calculates one point, and then the next point is wildly far away from the last point, it searches in between those points for a domain error. I had trouble figuring out how to make it work in practice, however. Thank you for any help you may give!

    Read the article

  • Java web services client

    - by Bill
    I want to build a web services client that takes wsdl link as the input and generates java classes. I know we can do this directly using Netbeans IDE where we provide the wsdl location during project setup. But I want the wsdl location to be provided when the client starts running. How do I do this?

    Read the article

  • Find all records in database that are within a certain distance of a set of lat and long points

    - by Mike L
    I've seen all the examples and here's what I got so far. my table is simple: schools (table name) - School_ID - lat - long - county - extrainfo here's my code: <?php $con = mysql_connect("xxx","xxx","xxx"); if (!$con) { die('Could not connect: ' . mysql_error()); } else {} mysql_select_db("xxx", $con); $latitude = "36.265541"; $longitude = "-119.207153"; $distance = "1"; //miles $qry = "SELECT *, (3958.75 * ACOS(SIN(" . $latitude . " / 57.2958)*SIN(lat / 57.2958)+COS(" . $latitude . " / 57.2958)*COS(lat / 57.2958)*COS(long / 57.2958 - " . $longitude . " / 57.2958))) as distance FROM schools WHERE (3958.75 * ACOS(SIN(" . $latitude . " / 57.2958)*SIN(lat / 57.2958)+COS(" . $latitude . " / 57.2958)*COS(lat / 57.2958)*COS(long / 57.2958 - " . $longitude . " / 57.2958))) <= " . $distance; $results = mysql_query($qry); if (mysql_num_rows($results) > 0) { while($row = mysql_fetch_assoc($results)) { print_r($row); } } else {} mysql_close($con); ?> but I get this error when I try to run it: Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource

    Read the article

  • Secure Delete PCI-DSS Windows Environment

    - by Brennan Mann
    Hello, I have been reviewing a number of applications for securing deleting files. I understand the concepts of overwriting the file several times with zeros and random characters; however, I don't understand the concept of renaming the file up to thirty times before actually deleting the file. Any feedback would greatly be appreciated. I am currently working on a PCI DSS project. URL - SDELETE by Sysinternals http://technet.microsoft.com/en-us/sysinternals/bb897443.aspx Thanks, Brennan

    Read the article

  • PIC 18 controller as serial to ethernet bridge

    - by Surjya Narayana Padhi
    Hi Geeks, I am planning to use PIC18F6*** serial microntroller for my project serial-ethernet converter. Once I will put my hex code in PIC micro-controller for send recieve serial port data I will use the windows hyper-terminal and for checking the ethernet data is there any application in windows? If my question is not clear I am ready to explain it better... please let me know.....

    Read the article

  • Issue with org.apache.commons.net.ftp.FTPClient listFiles()

    - by James P.
    The listFiles() method of org.apache.commons.net.ftp.FTPClient works fine with Filezilla server on 127.0.0.1 but returns null on the root directory of public FTP servers such as belnet.be. There is an identical question on the link below but enterRemotePassiveMode() doesn't seem to help. http://stackoverflow.com/questions/2339855/apache-commons-ftpclient-listfiles Could it be an issue with list parsing? If so, how can go about solving this?

    Read the article

  • How can I create a MethodInfo from an Action delegate

    - by Michael Meadows
    I am trying to develop an NUnit addin that dynamically adds test methods to a suite from an object that contains a list of Action delegates. The problem is that NUnit appears to be leaning heavily on reflection to get the job done. Consequently, it looks like there's no simple way to add my Actions directly to the suite. I must, instead, add MethodInfo objects. This would normally work, but the Action delegates are anonymous, so I would have to build the types and methods to accomplish this. I need to find an easier way to do this, without resorting to using Emit. Does anyone know how to easily create MethodInfo instances from Action delegates?

    Read the article

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