Search Results

Search found 2672 results on 107 pages for 'michael aquilina'.

Page 70/107 | < Previous Page | 66 67 68 69 70 71 72 73 74 75 76 77  | Next Page >

  • How to manage transaction for database and file system in jee environment?

    - by Michael Lu
    I store file’s attributes (size, update time…) in database. So the problem is how to manage transaction for database and file. In jee environment, JTA is just able to manage database transaction. In case, updating database is successful but file operation fails, should I write file-rollback method for this? Moreover, file operation in EJB container violates EJB spec. What’s your opinion? Thank!

    Read the article

  • Getting a borderless window to receive mouseMoved events (Cocoa OSX)

    - by Michael Minerva
    I have a little popup window used for selecting images sorted by groups, and I would like to add a selection box around whatever image is being hovered over. I am trying to this by overriding the mouseMoved event for the window but it seems that a window that has a border-less style mask receives no mouseMoved events even if you have set setAcceptsMouseMoved events to YES. Is there anyway to make a borderless window receive this events?

    Read the article

  • Using javascript on an HTML table?

    - by Michael McKay
    Hi, few questions, just wondering if anyone can help? I have a table with 1 long row (1000 pixels) and one single column, how do i go about creating a method whereby when the mouse cursor is on the leftmost side of the cell, a variable, lets say X is set to 0, the further right the mouse cursor moves in the cell, the value of X increases. I know that sounds like a strange question but im working on a project where this type of functionality is desired. Is there a javascript method to create this feature? Thanks for any help.

    Read the article

  • Problems with my HTML/CSS

    - by Michael
    Note below is my CSS. This is a three column website. my main content is in the center. The problems that I am having is that my main content does not adjust correctly to IE. It is fine in FF but not in IE. .columns3headers2 #mainContent1 { margin: 0 22% 0 24%; width: 570px; background-color: #DDDDDD; height: 370px; padding: 0, 10, 0, 0; border: groove } .columns3headers2 #mainContent2 { margin: 0 22% 0 24%; width: 570px; background-color: #DDDDDD; height: 190px; border: groove } I do not have much in my main content. <div id="mainContent1"> <h1> Main Content </h1> <div id="cround"> <h3>Absolute Value</h3> <ul> <li>Test 1</li> <li>Test 2</li> <li>Test 3</li> <li>test 4</li> </ul> </p> </div>

    Read the article

  • Need help accessing PHP DOM elements

    - by Michael Pasqualone
    Hey guys, I have the following HTML structure that I am trying to pull information from: // Product 1 <div class="productName"> <span id="product-name-1">Product Name 1</span> </div> <div class="productDetail"> <span class="warehouse">Warehouse 1, ACT</span> <span class="quantityInStock">25</span> </div> // Product 2 <div class="productName"> <span id="product-name-2">Product Name 2</span> </div> <div class="productDetail"> <span class="warehouse">Warehouse 2, ACT</span> <span class="quantityInStock">25</span> </div> … // Product X <div class="productName"> <span id="product-name-X">Product Name X</span> </div> <div class="productDetail"> <span class="warehouse">Warehouse X, ACT</span> <span class="quantityInStock">25</span> </div> I don't have control of the source html and as you'll see productName and it's accompanying productDetail are not contained within a common element. Now, I am using the following php code to try and parse the page. $html = new DOMDocument(); $html->loadHtmlFile('product_test.html'); $xPath = new DOMXPath($html); $domQuery = '//div[@class="productName"]|//div[@class="productDetail"]'; $entries = $xPath->query($domQuery); foreach ($entries as $entry) { echo "Detail: " . $entry->nodeValue) . "<br />\n"; } Which prints the following: Detail: Product Name 1 Detail: Warehouse 1, ACT Detail: 25 Detail: Product Name 2 Detail: Warehouse 2, ACT Detail: 25 Detail: Product Name X Detail: Warehouse X, ACT Detail: 25 Now, this is close to what I want. But I need to do some processing on each Product, Warehouse and Quantity stock and can't figure out how to parse it out into separate product groups. The final output I am after is something like: Product 1: Name: Product Name 1 Warehouse: Warehouse 1, ACT Stock: 25 Product 2: Name: Product Name 2 Warehouse: Warehouse 2, ACT Stock: 25 I can't just figure it out, and I can't wrap my head around this DOM stuff as the elements don't quite work the same as a standard array. If anyone can assist, or point me in the right direction I will be ever appreciative.

    Read the article

  • In Log4Net XML configuration is Priority the same thing as Level?

    - by Michael Levy
    I inherited some code that uses the priority element under the root in its xml configuraiton. This is just like the example at http://iserialized.com/log4net-for-noobs/ which shows: <root> <priority value="ALL" /> <appender-ref ref="LogFileAppender" /> <appender-ref ref="ConsoleAppender"/> </root> However, the log4net configuration examples at http://logging.apache.org/log4net/release/manual/configuration.html always show it using the level element: <root> <level value="DEBUG" /> <appender-ref ref="A1" /> </root> In this type of configuration is <priority> the same as <level> ? Can someone point me to somewhere in the docs where this is explained?

    Read the article

  • Should I add try/catch around when casting on an attribute of JSP implicit object?

    - by Michael Mao
    Hi all: Basically what I mean is like this: List<String[]> routes = (List<String[]>)application.getAttribute("routes"); For the above code, it tries to get an attribute named "routes" from the JSP implicit object - application. But as everyone knows, after this line of code, routes may very well contains a null - which means this application hasn't got an attribute named "routes". Is this "casting on null" good programming practice in Java or not? Basically I try to avoid exceptions such as java.io.InvalidCastException I reckon things like this are more as "heritage" of Java 1.4 when generic types were not introduced to this language. So I guess everything stored in application attributes as Objects (Similar to traditional ArrayList). And when you do "downcast", there might be invalid casts. What would you do in this case? Update: Just found that although in the implicit object application I did store a List of String arrays, when I do this : List<double[]> routes = (List<double[]>)application.getAttribute("routes"); It doesn't produce any error... And I felt not comfortable already... And even with this code: out.print(routes.get(0)); It does print out something strange : [Ljava.lang.String;@18b352f Am I printing a "pointer to String"? I can finally get an exception like this: out.print(routes.get(0)[1]); with error : java.lang.ClassCastException: [Ljava.lang.String; Because it was me to add the application attribute, I know which type should it be cast to. I feel this is not "good enough", what if I forget the exact type? I know there are still some cases where this sort of thing would happen, such as in JSP/Servlet when you do casting on session attributes. Is there a better way to do this? Before you say:"OMG, why you don't use Servlets???", I should justify my reason as this: - because my uni sucks, its server can only work with Servlets generated by JSP, and I don't really want to learn how to fix issues like that. look at my previous question on this , and this is uni homework, so I've got no other choice, forget all about war, WEB-INF,etc, but "code everything directly into JSP" - because the professors do that too. :)

    Read the article

  • what makes a Tomcat5.5 cannot be "aware" of new Java Web Applications?

    - by Michael Mao
    This is for uni homework, but I reckon it is more a generic problem to the Tomcat Server(version 5.5.27) on my uni. The problem is, I first did a skeleton Java Web Application (Just a simple Servlet and a welcome-file, nothing complicated, no lib included) using NetBeans 6.8 with the bundled Tomcat 6.0.20 (localhost:8084/WSD) Then, to test and prove it is "portable" and "auto-deploy-able", I cleaned and built a WSD.war file and dropped it onto my Xampp Tomcat (localhost:8080/WSD). The war extracted everything accordingly and I can see identical output from this Tomcat. So far, so good. However, after I tried to drop to war onto uni server, funny thing happens: uni server Even though I've changed the war permission to 755, it is simply not "responding". I then copied the extracted files to uni server, the MainServlet cannot be recognized from within its Context Path "/WSD", basically nothing works, expect the static index.jsp. I tried several times to stop and restart uni Tomcat, it doesn't help? I wonder what makes this happen? Is there anything I did wrong with my approach? To be frank I paid no attention to a server not under my control, and I am unfortunately not a real active day-to-day Java Programmer now. I understand the fundamentals of MVC, Servelets, JSPs, JavaBeans, but I really feel frustrated by this, as I cannot see why... Or, should I ask, a Java Web Application, after cleaned and built by NetBeans6.8, is self-contained and self-configured so ready to be deployed to any Java Web Container? I know, I can certainly program everything in plain old JSP, but this is soooo... unacceptable to myself... Update : I am now wondering if there is any free Tomcat Hosting so that I would like to see if my war file and/or my web app can go with them without any configuration at all?

    Read the article

  • Saving NSString to file

    - by Michael Amici
    I am having trouble saving simple website data to file. I believe the sintax is correct, could someone help me? When I run it, it shows that it gets the data, but when i quit and open up the file that it is supposed to save to, nothing is in it. - (BOOL)textFieldShouldReturn:(UITextField *)nextField { [timer invalidate]; startButton.hidden = NO; startButton.enabled = YES; stopButton.enabled = NO; stopButton.hidden = YES; stopLabel.hidden = YES; label.hidden = NO; label.text = @"Press to Activate"; [nextField resignFirstResponder]; NSString *urlString = textField.text; NSData *dataNew = [NSData dataWithContentsOfURL:[NSURL URLWithString:urlString]]; NSUInteger len = [dataNew length]; NSString *stringCompare = [NSString stringWithFormat:@"%i", len]; NSLog(@"%@", stringCompare); NSString *filePath = [[NSBundle mainBundle] pathForResource:@"websiteone" ofType:@"txt"]; if (filePath) { [stringCompare writeToFile:filePath atomically:YES encoding:NSUTF8StringEncoding error:NULL]; NSString *myText = [NSString stringWithContentsOfFile:filePath encoding:NSUTF8StringEncoding error:NULL]; NSLog(@"Saving... %@", myText); } else { NSLog(@"cant find the file"); } return YES; }

    Read the article

  • Storing data in HTML, javascript book, articles recommendations.

    - by michael
    I'm looking for articles or books that discuss schemes and techniques adopted by pro javascript developers to store and organize data with html tags. In other words, how to emulate xml data storage with html as semantically as possible. Some various solutions that I've seen mentioned in passing are custom DTD, custom attributes with xhtml, early adoption of html5 and its data- attribute. Now, I'm looking for some tangible material that goes in depth with these concepts.

    Read the article

  • perl ENV value avoid escape

    - by Michael
    In my makefile I have command in variable like this substitute := perl -p -e 's/@([^@]+)@/"$(update_url)"/ge' > output.txt update_url := em:updateURL=\"http:\/\/bla\/update.rdf\"\n this works fine when I run command in target and I have newline, quotes however I need to replace $(update_url)" with environment variable, using expression like this #substitute := perl -p -e 's/@([^@]+)@/defined $$ENV{$$1} ? $$ENV{$$1} : $$1/ge' I am exporting those variables from makefile. This gives me literally em:updateURL=\"http:\/\/bla\/update.rdf\"\n on output file... so how to make the second version to give output like first version?

    Read the article

  • Passing values from UIButton to an UIActionSheet

    - by Michael
    I'm trying to send an ActionSheet a variable from a button. I can't use the tag property because its being used for something else. I've declared myIndexRow as an instance variable and have: NSInteger myIndexRow = indexPath.row; [deleteButton addTarget:self action:@selector(showDeleteSheet:) forControlEvents:UIControlEventTouchUpInside]; deleteButton.myIndexRow = myIndexRow; but I'm getting the 'Request for member 'myRow' is something not a structure or union' There is something obvious I am missing here.

    Read the article

  • Git: How to find all commits in branch A that originated in derived branch B merged back into A?

    - by Michael Ludwig
    In Git, given (1) a branch A and (2) a branch B derived from A at some point in the past and then merged back into A, how can I find all the commits now in A that originated in B? The intent is to identify the changeset of work performed in B now in A to more quickly track down issues. A squash commit would obviously and conveniently pack the entire changeset in one commit for easy reference, but the drawbacks (such as loss of information and individual attributability) make this option undesirable for us. Hence my question.

    Read the article

  • UITableView Reusable cells

    - by Michael
    Can someone explain me the way reusable cells works for single table view? How many reusable cells a datasource should create? So far in all samples I've seen only one. Would one even need more?

    Read the article

  • popup panel that docks to the bottom of the screen

    - by Michael Wiles
    How do I create a pop panel that docks to the bottom of the screen... The way that I'm doing this is by setting the styling as such: bottom: 10px; position: absolute; This will always set the panel to 10 px from the bottom of the browser window. The problem is that gwt (or gwtp for that matter) is insisting on setting the right and the top of the panel and thus overriding my styling. If I use chrome's element explorer and disable the right and top style rules I get the correct behaviour so one way of doing it is somehow disabling gwt setting of the location of the panel on the screen...?

    Read the article

  • "_FILE_AND_LINE_ is not defined in this scope" (compiling RakNet NAT examples in OS X)

    - by Michael F
    Hello! I'm working on a RakNet-based project (using 3.8 on OS X 10.6), and I'm trying to work through the various examples that demonstrate the parts of RakNet I want to use. For the "NatCompleteClient" example, I've imported the source into a command-line project in XCode, along with the UPNP dependency. At compile time I've had a few errors in the UPNP section, though, and I can't find any guidance on this. In UPNPPortForwarder.mm, there are 7 lines that use _FILE_AND_LINE_, and the compiler is not happy; for example on line 232: foundInterfaces.Deallocate(r1,_FILE_AND_LINE_); causes: UPNPPortForwarder.mm:232: error: '_FILE_AND_LINE_' was not declared in this scope Can anyone tell me what this is all about? That variable doesn't seem to get talked about very often... or Google doesn't like to find it.

    Read the article

  • Error Downloading Metadata from ASMX Service

    - by michael.lukatchik
    It should be possible (and it looks like it is), but assume I have the following functions in my ASMX web service: [WebMethod(MessageName = "CreateExternalRpt1")] public bool CreateExternalRpt(int iProductId, int iOrderProductId, DateTime dtReportTime, string strReportTitle, string strReportCategory, string strReportPrintType, out string strSnapshot, string strApplicantFirst, string strApplicantLast, string strApplicantMiddle, string strOwnerLast, string strOwnerMiddle, string strOwnerFirst, bool blnCurrentReport, int iOrderId, bool blnFlag, string strCustomerId, string strUserId) { … } [WebMethod(MessageName = "CreateExternalRpt2")] public bool CreateExternalRpt(int iProductId, int iOrderProductId, DateTime dtReportTime, string strReportTitle, string strReportCategory, string strReportPrintType, string strReportSnapshot, string strApplicantFirst, string strApplicantLast, string strApplicantMiddle, string strOwnerLast, string strOwnerMiddle, string strOwnerFirst, bool blnCurrentReport, int iOrderId, bool blnFlag) { … } With both of these functions defined in my web service, my .NET client app can’t download the metadata and instead throws a generic error message “There was an error downloading…”. With one of the above methods removed, the .NET client app can successfully download the metadata. I’ve read that by decorating the WebMethod with a unique name, both functions should be exposed in the service metadata. This isn’t working. What am I missing?

    Read the article

  • Problems rendering pages in FF and IE

    - by Michael
    I am having a constant trouble with pages not rendering correctly between FF and IE. not my code below. "Select an Account" should be next to the drop down such as: Select an Account Type: "then my form" however my form goes to the next line when I want it next to "Select an Account". In IE it renders correctly in FF it does not. <p><b><strong>Select an Account Type <FORM NAME="myform"> <SELECT NAME="mylist"> <OPTION VALUE="traditional">Traditional Account <OPTION VALUE="paperless">Paperless Account </SELECT> </FORM></b></strong></p>

    Read the article

  • Check my anagram code from a job interview in the past.

    - by Michael Dorgan
    Had the following as an interview question a while ago and choked so bad on basic syntax that I failed to advance (once the adrenalin kicks in, coding goes out the window.) Given a list of string, return a list of sets of strings that are anagrams of the input set. i.e. "dog","god", "foo" should return {"dog","god"}. Afterward, I created the code on my own as a sanity check and it's been around now for a bit. I'd welcome input on it to see if I missed anything or if I could have done it much more efficiently. Take it as a chance to improve myself and learn other techniques: void Anagram::doWork(list input, list &output) { typedef list SortType; SortType sortedInput; // sort each string and pair it with the original for(list<string>::iterator i = input.begin(); i != input.end(); ++i) { string tempString(*i); std::sort(tempString.begin(), tempString.end()); sortedInput.push_back(make_pair(*i, tempString)); } // Now step through the new sorted list for(SortType::iterator i = sortedInput.begin(); i != sortedInput.end();) { set<string> newSet; // Assume (hope) we have a match and pre-add the first. newSet.insert(i->first); // Set the secondary iterator one past the outside to prevent // matching the original SortType::iterator j = i; ++j; while(j != sortedInput.end()) { if(i->second == j->second) { // If the string matches, add it to the set and remove it // so that future searches need not worry about it newSet.insert(j->first); j = sortedInput.erase(j); } else { // else, next element ++j; } } // If size is bigger than our original push, we have a match - save it to the output if(newSet.size() > 1) { output.push_back(newSet); } // erase this element and update the iterator i = sortedInput.erase(i); } }

    Read the article

  • Cakephp Auth Flash Messages losing style

    - by Michael
    My Auth flash messages were working earlier -- a bright green background with text in it, such as "You have successfully logged out". However, I have made quite a few changes to the site since then, and this green background has disappeared. What are the possible causes of this? (I've run my CSS through a validator -- so that doesn't seem to be the issue). Any other ideas? Thanks!

    Read the article

  • PHP While Loops from Arrays

    - by Michael
    I have a table that contains members names and a field with multiple ID numbers. I want to create a query that returns results where any values in the ID fields overlap with any values in the array. For example: lastname: Smith firstname: John id: 101, 103 I have Array #1 with the values 101, 102, 103 I want the query to output all members who have the values 101 or 102 or 103 listed in their id field with multiple ids listed. Array ( [0] => 101 [1] => 102 [2] => 103 ) $sql="SELECT firstname, lastname, id FROM members WHERE id LIKE '%".$array_num_1."%'"; $result=mysql_query($sql); while ($rows=mysql_fetch_array($result)) { echo $rows['lastname'].', '.$rows['firstname'].'-'.$rows['id']; }

    Read the article

< Previous Page | 66 67 68 69 70 71 72 73 74 75 76 77  | Next Page >