Search Results

Search found 6478 results on 260 pages for 'hippy head'.

Page 126/260 | < Previous Page | 122 123 124 125 126 127 128 129 130 131 132 133  | Next Page >

  • XSLT Select all nodes containing a specific substing

    - by Mike
    I'm trying to write an XPath that will select certain nodes that contain a specific word. In this case the word is, "Lockwood". The correct answer is 3. Both of these paths give me 3. count(//*[contains(./*,'Lockwood')]) count(BusinessLetter/*[contains(../*,'Lockwood')]) But when I try to output the text of each specific node //*[contains(./*,'Lockwood')][1] //*[contains(./*,'Lockwood')][2] //*[contains(./*,'Lockwood')][3] Node 1 ends up containing all the text and nodes 2 and 3 are blank. Can some one please tell me what's happening or what I'm doing wrong. Thanks. <?xml version="1.0" encoding="UTF-8"?> <?xml-stylesheet type="text/xsl" href="XPathFunctions.xsl"?> <BusinessLetter> <Head> <SendDate>November 29, 2005</SendDate> <Recipient> <Name Title="Mr."> <FirstName>Joshua</FirstName> <LastName>Lockwood</LastName> </Name> <Company>Lockwood &amp; Lockwood</Company> <Address> <Street>291 Broadway Ave.</Street> <City>New York</City> <State>NY</State> <Zip>10007</Zip> <Country>United States</Country> </Address> </Recipient> </Head> <Body> <List> <Heading>Along with this letter, I have enclosed the following items:</Heading> <ListItem>two original, execution copies of the Webucator Master Services Agreement</ListItem> <ListItem>two original, execution copies of the Webucator Premier Support for Developers Services Description between Lockwood &amp; Lockwood and Webucator, Inc.</ListItem> </List> <Para>Please sign and return all four original, execution copies to me at your earliest convenience. Upon receipt of the executed copies, we will immediately return a fully executed, original copy of both agreements to you.</Para> <Para>Please send all four original, execution copies to my attention as follows: <Person> <Name> <FirstName>Bill</FirstName> <LastName>Smith</LastName> </Name> <Address> <Company>Webucator, Inc.</Company> <Street>4933 Jamesville Rd.</Street> <City>Jamesville</City> <State>NY</State> <Zip>13078</Zip> <Country>USA</Country> </Address> </Person> </Para> <Para>If you have any questions, feel free to call me at <Phone>800-555-1000 x123</Phone> or e-mail me at <Email>[email protected]</Email>.</Para> </Body> <Foot> <Closing> <Name> <FirstName>Bill</FirstName> <LastName>Smith</LastName> </Name> <JobTitle>VP of Operations</JobTitle> </Closing> </Foot> </BusinessLetter>

    Read the article

  • In ASP.NET MVC, How do I make a partial view available to all controllers?

    - by Quakkels
    In ASP.NET MVC, How do I make a partial view available to all controllers? I want to create navigation that is common across the entire site, but when I place the Html.Action into my master page, it only works on views associated with 1 controller. Right now, I have a controller action defined like this: // GET: GetCategoriesPartial [ChildActionOnly] public ActionResult GetCategoriesPartial() { var category = CategoriesDataContext.GetCategories(); return PartialView(category); } And I've created my partial view like this: <%@ Import Namespace="wopr.Models" %> <%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl" %> <ul> <% foreach (var cat in Model as IEnumerable<Category>) { %> <li><a href="/categories/Details/<%=cat.catID%>"><%=cat.catName%></a></li> <% } %> </ul> My Master Page looks like this: <%@ Import Namespace="wopr.Models" %> <%@ Master Language="C#" Inherits="System.Web.Mvc.ViewMasterPage" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" > <head runat="server"> <title><asp:ContentPlaceHolder ID="TitleContent" runat="server" /></title> <link type="text/css" rel="Stylesheet" href="/Content/Site.css" /> </head> <body> <div class="wrap-all"> <div style="text-align:right;"> <a href="/">Home</a> | <a href="/games/">Games</a> | <a href="/games/Index2/1">Games <em>(paginated)</em></a> | <a href="/categories/">Categories</a> | <a href="/upload/">Upload</a> </div> <asp:ContentPlaceHolder ID="MainContent" runat="server"> </asp:ContentPlaceHolder> <!--This errors on any non-CategoryController page.--> <%= Html.Action("GetCategoriesPartial")%> <!----> </div> </body> </html> This code works as long as I'm viewing something handled by the CategoriesController. If I go to any view handled by a different controller, I get the exception: System.Web.HttpException: A public action method 'GetCategoriesPartial' was not found on controller 'wopr.Controllers.GamesController'. How do I make this partial view available to all the site's controllers? Thanks for any help. Quakkels

    Read the article

  • Why isn't this javascript with else if working?

    - by Uni
    I'm sorry I can't be any more specific - I have no idea where the problem is. I'm a total beginner, and I've added everything I know to add to the coding, but nothing happens when I push the button. I don't know at this point if it's an error in the coding, or a syntax error that makes it not work. Basically I am trying to get this function "Rip It" to go through the list of Dewey decimal numbers, change some of them, and return the new number and a message saying it's been changed. There is also one labeled "no number" that has to return an error (not necessarily an alert box, a message in the same space is okay.) I am a total beginner and not particularly good at this stuff, so please be gentle! Many thanks! <!DOCTYPE html> <html> <head> <script type="text/javascript"> function RipIt() { for (var i = l; i <=10 i=i+l) { var dewey=document.getElementById(i); dewey=parseFloat(dewey); if (dewey >= 100 && 200 >= dewey) { document.getElementById('dewey'+ 100) } else if (dewey >= 400 && 500 >= dewey) { document.getElementById('dewey'+ 200) } else if (dewey >= 850 && 900 >= dewey) { document.getElementById('dewey'-100) } else if (dewey >= 600 && 650 >= dewey) { document.getElementById('dewey'+17) } } } </script> </head> <body> <h4>Records to Change</h4> <ul id="myList"> <li id ="1">101.33</li> <li id = "2">600.01</li> <li id = "3">001.11</li> <li id = "4">050.02</li> <li id = "5">199.52</li> <li id = "6">400.27</li> <li id = "7">401.73</li> <li id = "8">404.98</li> <li id = "9">no number</li> <li id = "10">850.68</li> <li id = "11">853.88</li> <li id = "12">407.8</li> <li id = "13">878.22</li> <li id = "14">175.93</li> <li id = "15">175.9</li> <li id = "16">176.11</li> <li id = "17">190.97</li> <li id = "18">90.01</li> <li id = "19">191.001</li> <li id = "20">600.95</li> <li id = "21">602.81</li> <li id = "22">604.14</li> <li id = "23">701.31</li> <li id = "24">606.44</li> <li id = "25">141.77</li> </ul> <b> </b> <input type="button" value="Click To Run" onclick="RipIt()"> <!-- <input type="button" value="Click Here" onClick="showAlert();"> --> </body> </html>

    Read the article

  • Function calls not working in my page

    - by Vivek Dragon
    I made an select menu that works with the google-font-Api. I made to function in JSBIN here is my work http://jsbin.com/ocutuk/18/ But when i made the copy of my code in a html page its not even loading the font names in page. i tried to make it work but still it is in dead end. This is my html code <!DOCTYPE html> <html> <head> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"> </script> <meta charset=utf-8 /> <title>FONT API</title> <script> function SetFonts(fonts) { for (var i = 0; i < fonts.items.length; i++) { $('#styleFont') .append($("<option></option>") .attr("value", fonts.items[i].family) .text(fonts.items[i].family)); } } var script = document.createElement('script'); script.src = 'https://www.googleapis.com/webfonts/v1/webfonts?key=AIzaSyB8Ua6XIfe-gqbkE8P3XL4spd0x8Ft7eWo&callback=SetFonts'; document.body.appendChild(script); WebFontConfig = { google: { families: ['ABeeZee', 'Abel', 'Abril Fatface', 'Aclonica', 'Acme', 'Actor', 'Adamina', 'Advent Pro', 'Aguafina Script', 'Akronim', 'Aladin', 'Aldrich', 'Alegreya', 'Alegreya SC', 'Alex Brush', 'Alfa Slab One', 'Alice', 'Alike', 'Alike Angular', 'Allan', 'Allerta', 'Allerta Stencil', 'Allura', 'Almendra', 'Almendra Display', 'Almendra SC', 'Amarante', 'Amaranth', 'Amatic SC', 'Amethysta', 'Anaheim', 'Andada', 'Andika', 'Angkor', 'Annie Use Your Telescope', 'Anonymous Pro', 'Antic', 'Antic Didone', 'Antic Slab', 'Anton', 'Arapey', 'Arbutus', 'Arbutus Slab', 'Architects Daughter', 'Archivo Black', 'Archivo Narrow', 'Arimo', 'Arizonia', 'Armata', 'Artifika', 'Arvo', 'Asap', 'Asset', 'Astloch', 'Asul', 'Atomic Age', 'Aubrey', 'Audiowide', 'Autour One', 'Average', 'Average Sans', 'Averia Gruesa Libre', 'Averia Libre', 'Averia Sans Libre', 'Averia Serif Libre', 'Bad Script', 'Balthazar', 'Bangers', 'Basic', 'Battambang', 'Baumans', 'Bayon', 'Belgrano', 'Belleza', 'BenchNine', 'Bentham', 'Berkshire Swash', 'Bevan', 'Bigelow Rules', 'Bigshot One', 'Bilbo', 'Bilbo Swash Caps', 'Bitter', 'Black Ops One', 'Bokor', 'Bonbon', 'Boogaloo', 'Bowlby One', 'Bowlby One SC', 'Brawler', 'Bree Serif', 'Bubblegum Sans', 'Bubbler One', 'Buda', 'Buenard', 'Butcherman', 'Butterfly Kids', 'Cabin', 'Cabin Condensed', 'Cabin Sketch', 'Caesar Dressing', 'Cagliostro', 'Calligraffitti', 'Cambo', 'Candal', 'Cantarell', 'Cantata One', 'Cantora One', 'Capriola', 'Cardo', 'Carme', 'Carrois Gothic', 'Carrois Gothic SC', 'Carter One', 'Caudex', 'Cedarville Cursive', 'Ceviche One', 'Changa One', 'Chango', 'Chau Philomene One', 'Chela One', 'Chelsea Market', 'Chenla', 'Cherry Cream Soda', 'Cherry Swash', 'Chewy', 'Chicle', 'Chivo', 'Cinzel', 'Cinzel Decorative', 'Clicker Script', 'Coda', 'Coda Caption', 'Codystar', 'Combo', 'Comfortaa', 'Coming Soon', 'Concert One', 'Condiment', 'Content', 'Contrail One', 'Convergence', 'Cookie', 'Copse', 'Corben', 'Courgette', 'Cousine', 'Coustard', 'Covered By Your Grace', 'Crafty Girls', 'Creepster', 'Crete Round', 'Crimson Text', 'Croissant One', 'Crushed', 'Cuprum', 'Cutive', 'Cutive Mono']} }; (function() { var wf = document.createElement('script'); wf.src = ('https:' == document.location.protocol ? 'https' : 'http') + '://ajax.googleapis.com/ajax/libs/webfont/1/webfont.js'; wf.type = 'text/javascript'; wf.async = 'true'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(wf, s); })(); $("#styleFont").change(function (){ var id =$('#styleFont option' +':selected').val(); $("#custom_text").css('font-family',id); }); </script> <style> #custom_text { font-family: Arial; resize: none; margin-top: 20px; width: 500px; } #styleFont { width: 100px; } </style> </head> <body> <select id="styleFont"> </select><br> <textarea id="custom_text"></textarea> </body> </html> How can i make it work. Whats the mistake i am making here.

    Read the article

  • Why only one video shows up in ASP.NET Video panel ?

    - by user284523
    It is possible to have multiple videos with Flowplayer http://flowplayer.org/demos/installation/multiple-players.html To do so in ASP.NET DYNAMICALLY, one has to use a Panel (see http://idevwebs.com/Default.aspx?id=25): <%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <!-- A minimal Flowplayer setup to get you started --> <!-- include flowplayer JavaScript file that does Flash embedding and provides the Flowplayer API. --> <script type="text/javascript" src="flowplayer-3.1.4.min.js"></script> <!-- page title --> <title>Minimal Flowplayer setup</title> </head><body> <form id="form1" runat="server"> <div id="page"> <h1>Minimal Flowplayer setup</h1> <p>View commented source code to get familiar with Flowplayer installation.</p> <!-- this A tag is where your Flowplayer will be placed. it can be anywhere --> <!-- player #1 --> <asp:Panel ID="panelVideo" runat="server"> </asp:Panel> <!-- this will install flowplayer inside previous A- tag. --> <script type="text/javascript"> flowplayer("player", "flowplayer-3.1.5.swf"); </script> <!-- after this line is purely informational stuff. does not affect on Flowplayer functionality --> <p> If you are running these examples <strong>locally</strong> and not on some webserver you must edit your <a href="http://www.macromedia.com/support/documentation/en/flashplayer/help/settings_manager04.html"> Flash security settings</a>. </p> <p class="less"> Select "Edit locations" &gt; "Add location" &gt; "Browse for files" and select flowplayer-x.x.x.swf you just downloaded. </p> <h2>Documentation</h2> <p> <a href="http://flowplayer.org/documentation/installation/index.html">Flowplayer installation</a> </p> <p> <a href="http://flowplayer.org/documentation/configuration/index.html">Flowplayer configuration</a> </p> <p> See this identical page on <a href="http://flowplayer.org/demos/example/index.htm">Flowplayer website</a> </p> </div> </form> </body></html> and then add video anchor dynamically public partial class _Default : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { this.panelVideo.Controls.Add(new LiteralControl("<a href=\"" + "http://blip.tv/file/get/" + "KimAronson-TwentySeconds58192" + ".flv\" style=\"display:block;width:388px;height:230px\" id=\"player\"></a>")); this.panelVideo.Controls.Add(new LiteralControl("<a href=\"" + "http://blip.tv/file/get/" + "KimAronson-TwentySeconds67463" + ".flv\" style=\"display:block;width:388px;height:230px\" id=\"player\"></a>")); } } But it works only partially as the first video shows up not both. And all html below doesn't show up either.

    Read the article

  • Installing Office 2010 through group policy without an msi

    - by Ri Caragol
    I have been breaking my head for several days now trying to install Microsoft office 2010 through group policy. Unfortunately Microsoft decided it would be fun to release office without an MSI and so I either Need to create an msi for it or Need to install it through a logon script that would run the setup.exe from a network location. Any advise would be greatlly appreciated. I tried to create a script but even though I double click it and it runs properly, it does not seem to kick in when users log in or when the machine is turned on. Also is there an easy way to create an msi?

    Read the article

  • Add options to select box without Internet Explorer closing the box?

    - by Paul Colby
    Hi, I'm trying to build a web page with a number of drop-down select boxes that load their options asynchronously when the box is first opened. This works very well under Firefox, but not under Internet Explorer. Below is a small example of what I'm trying to achieve. Basically, there is a select box (with the id "selectBox"), which contains just one option ("Any"). Then there is an onmousedown handler that loads the other options when the box is clicked. <html> <head> <script type="text/javascript"> function appendOption(select,option) { try { selectBox.add(option,null); // Standards compliant. } catch (e) { selectBox.add(option); // IE only version. } } function loadOptions() { // Simulate an AJAX request that will call the // loadOptionsCallback function after 500ms. setTimeout(loadOptionsCallback,500); } function loadOptionsCallback() { var selectBox = document.getElementById('selectBox'); var option = document.createElement('option'); option.text = 'new option'; appendOption(selectBox,option); } </script> </head> <body> <select id="selectBox" onmousedown="loadOptions();"> <option>Any</option> </select> </body> </html> The desired behavior (which Firefox does) is: the user see's a closed select box containing "Any". the user clicks on the select box. the select box opens to reveal the one and only option ("Any"). 500ms later (or when the AJAX call has returned) the dropped-down list expands to include the new options (hard coded to 'new option' in this example). So that's exactly what Firefox does, which is great. However, in Internet Explorer, as soon as the new option is added in "4" the browser closes the select box. The select box does contain the correct options, but the box is closed, requiring the user to click to re-open it. So, does anyone have any suggestions for how I can load the select control's options asynchronously without IE closing the drop-down box? I know that I can load the list before the box is even clicked, but the real form I'm developing contains many such select boxes, which are all interrelated, so it will be much better for both the client and server if I can load each set of options only when needed. Also, if the results are loaded synchronously, before the select box's onmousedown handler completes, then IE will show the full list as expected - however, synchronous loading is a bad idea here, since it will completely "lock" the browser while the network requests are taking place. Finally, I've also tried using IE's click() method to open the select box once the new options have been added, but that does not re-open the select box. Any ideas or suggestions would be really appreciated!! :) Thanks! Paul.

    Read the article

  • How do I return a message if $_GET is null or does not match any database entries?

    - by CT
    I am working on designing an IT Asset database. Here I am working on a page used to view details on a specific asset determined by an asset id. Here I grab $id from $_GET["id"]; When $id is null, the page does not load. When $id does not match any entry within the database, the page loads but no asset table is printed. In both these cases, I would like to display a message like "There is no database entry for that Asset ID" How would this be handled? Thank you. <?php /* * View Asset * */ # include functions script include "functions.php"; $id = $_GET["id"]; ConnectDB(); $type = GetAssetType($id); ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="stylesheet" type="text/css" href="style.css" /> <title>Wagman IT Asset</title> </head> <body> <div id="page"> <div id="header"> <img src="images/logo.png" /> </div> </div> <div id="content"> <div id="container"> <div id="main"> <div id="menu"> <ul> <table width="100%" border="0"> <tr> <td width="15%"></td> <td width="30%%"><li><a href="index.php">Search Assets</a></li></td> <td width="30%"><li><a href="addAsset.php">Add Asset</a></li></td> <td width="25%"></td> </tr> </table> </ul> </div> <div id="text"> <ul> <li> <h1>View Asset</h1> </li> </ul> <br /> <?php switch ($type){ case "Server": $result = QueryServer($id); $ServerArray = GetServerData($result); PrintServerTable($ServerArray); break; case "Desktop"; break; case "Laptop"; break; } ?> </div> </div> </div> <div class="clear"></div> <div id="footer" align="center"> <p>&nbsp;</p> </div> </div> <div id="tagline"> Wagman Construction - Bridging Generations since 1902 </div> </body> </html>

    Read the article

  • python Requests login to website returns 403

    - by Jeff
    I'm trying to use requests to login to a website but as you can guess I'm having a problem here's the the code that I'm using import requests EMAIL = '***' PASSWORD = '***' URL = 'https://portal.bitcasa.com/login' client = requests.session(config={'verbose': sys.stderr}) login_data = {'username': EMAIL, 'password': PASSWORD,} r = client.post(URL, data=login_data, headers={"Referer": "foo"}) print r and if I print out r.text I get <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html lang="en"> <head><script type="text/javascript">var NREUMQ=NREUMQ||[];NREUMQ.push(["mark","firstbyte",new Date().getTime()])</script> <meta http-equiv="content-type" content="text/html; charset=utf-8"> <meta name="robots" content="NONE,NOARCHIVE"> <title>403 Forbidden</title> <style type="text/css"> html * { padding:0; margin:0; } body * { padding:10px 20px; } body * * { padding:0; } body { font:small sans-serif; background:#eee; } body>div { border-bottom:1px solid #ddd; } h1 { font-weight:normal; margin-bottom:.4em; } h1 span { font-size:60%; color:#666; font-weight:normal; } #info { background:#f6f6f6; } #info ul { margin: 0.5em 4em; } #info p, #summary p { padding-top:10px; } #summary { background: #ffc; } #explanation { background:#eee; border-bottom: 0px none; } </style> </head> <body> <div id="summary"> <h1>Forbidden <span>(403)</span></h1> <p>CSRF verification failed. Request aborted.</p> </div> <div id="explanation"> <p><small>More information is available with DEBUG=True.</small></p> </div> <script type="text/javascript">if(!NREUMQ.f){NREUMQ.f=function(){NREUMQ.push(["load",new Date().getTime()]);var e=document.createElement("script");e.type="text/javascript";e.src=(("http:"===document.location.protocol)?"http:":"https:")+"//"+"d1ros97qkrwjf5.cloudfront.net/42/eum/rum.js";document.body.appendChild(e);if(NREUMQ.a)NREUMQ.a();};NREUMQ.a=window.onload;window.onload=NREUMQ.f;};NREUMQ.push(["nrfj","beacon-1.newrelic.com","0e859e0620",778660,"ZAZRbUcHWBAHURFYX11MdUxbBUIKCVxKVVpSDVRWGwtfBwJeAEZRQQYdWkYUUFklQRdXZloGRHRcAlIPA0UEQ1UdE0FWVgNFEDlEDFRH",0,7,new Date().getTime(),"","","","",""])</script></body> </html> They're using a combination of django and pyramid. I've been playing around with this for about two days now but, obviously, have gotten nowhere. Thanks for your help.

    Read the article

  • View Body not showing in Spring 3.2

    - by Dennis Röttger
    I'm currently trying to get into Java Web Development in general in Spring more specifically. I've set up my project as follows - hello.jsp: <html> <head> <title>Spring 3.0 MVC Series: Hello World - ViralPatel.net</title> </head> <body> <p>ABC ${message}</p> </body> </html> HelloWorldController.java: package controllers; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.servlet.ModelAndView; @Controller public class HelloWorldController { @RequestMapping("/hello") public ModelAndView helloWorld() { String message = "Hello World, Spring 3.0!"; System.out.println(message); return new ModelAndView("hello", "message", message); } } web.xml: <?xml version="1.0" encoding="UTF-8"?> <web-app xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" version="2.5"> <display-name>Spring3MVC</display-name> <welcome-file-list> <welcome-file>index.jsp</welcome-file> </welcome-file-list> <servlet> <servlet-name>spring</servlet-name> <servlet-class> org.springframework.web.servlet.DispatcherServlet </servlet-class> <load-on-startup>1</load-on-startup> </servlet> <servlet-mapping> <servlet-name>spring</servlet-name> <url-pattern>*.html</url-pattern> </servlet-mapping> </web-app> spring-servlet.xml: <?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:p="http://www.springframework.org/schema/p" xmlns:context="http://www.springframework.org/schema/context" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd"> <context:component-scan base-package="controllers" /> <bean id="viewResolver" class="org.springframework.web.servlet.view.UrlBasedViewResolver"> <property name="viewClass" value="org.springframework.web.servlet.view.JstlView" /> <property name="prefix" value="/WEB-INF/jsp/" /> <property name="suffix" value=".jsp" /> </bean> </beans> I can start up the Server just fine and navigate to hello.html, which is resolved by the servlet to give me hello.jsp, the title of the .jsp shows (Spring 3.0 MVC Series: etc. etc.), alas, the body does not. Not the JSTL-Variable and not the "ABC" either. I've implemented jstl-1.2 in my lib-folder.

    Read the article

  • Craziest JavaScript behavior I've ever seen

    - by Dan Ray
    And that's saying something. This is based on the Google Maps sample for Directions in the Maps API v3. <html> <head> <meta name="viewport" content="initial-scale=1.0, user-scalable=no"/> <meta http-equiv="content-type" content="text/html; charset=UTF-8"/> <title>Google Directions</title> <script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"></script> <script type="text/javascript"> var directionDisplay; var directionsService = new google.maps.DirectionsService(); var map; function initialize() { directionsDisplay = new google.maps.DirectionsRenderer(); var myOptions = { zoom:7, mapTypeId: google.maps.MapTypeId.ROADMAP } map = new google.maps.Map(document.getElementById("map_canvas"), myOptions); directionsDisplay.setMap(map); directionsDisplay.setPanel(document.getElementById("directionsPanel")); } function render() { var start; if(navigator.geolocation) { navigator.geolocation.getCurrentPosition(function(position) { start = new google.maps.LatLng(position.coords.latitude,position.coords.longitude); }, function() { handleNoGeolocation(browserSupportFlag); }); } else { // Browser doesn't support Geolocation handleNoGeolocation(); } alert("booga booga"); var end = '<?= $_REQUEST['destination'] ?>'; var request = { origin:start, destination:end, travelMode: google.maps.DirectionsTravelMode.DRIVING }; directionsService.route(request, function(response, status) { if (status == google.maps.DirectionsStatus.OK) { directionsDisplay.setDirections(response); } }); } </script> </head> <body style="margin:0px; padding:0px;" onload="initialize()"> <div><div id="map_canvas" style="float:left;width:70%; height:100%"></div> <div id="directionsPanel" style="float:right;width:30%;height 100%"></div> <script type="text/javascript">render();</script> </body> </html> See that "alert('booga booga')" in there? With that in place, this all works fantastic. Comment that out, and var start is undefined when we hit the line to define var request. I discovered this when I removed the alert I put in there to show me the value of var start, and it quit working. If I DO ask it to alert me the value of var start, it tells me it's undefined, BUT it has a valid (and accurate!) value when we define var request a few lines later. I'm suspecting it's a timing issue--like an asynchronous something is having time to complete in the background in the moment it takes me to dismiss the alert. Any thoughts on work-arounds?

    Read the article

  • Input string was not in the correct format using int.Parse

    - by JDWebs
    I have recently been making a login 'representation' which is not secure. So before answering, please note I am aware of security risks etc., and this will not be on a live site. Also note I am a beginner :P. For my login representation, I am using LINQ to compare values of a DDL to select a username and a Textbox to enter a password, when a login button is clicked. However, an error is thrown 'Input string was not in the correct format', when using int.Parse. Front End: <%@ Page Language="C#" AutoEventWireup="true" CodeFile="Login_Test.aspx.cs" Inherits="Login_Login_Test" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"> <title>Login Test</title> </head> <body> <form id="LoginTest" runat="server"> <div> <asp:DropDownList ID="DDL_Username" runat="server" Height="20px" DataTextField="txt"> </asp:DropDownList> <br /> <asp:TextBox ID="TB_Password" runat="server" TextMode="Password"></asp:TextBox> <br /> <asp:Button ID="B_Login" runat="server" onclick="B_Login_Click" Text="Login" /> <br /> <asp:Literal ID="LI_Result" runat="server"></asp:Literal> </div> </form> </body> </html> Back End: using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; public partial class Login_Login_Test : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { Binder(); } } private void Binder() { using (DataClassesDataContext db = new DataClassesDataContext()) { DDL_Username.DataSource = from x in db.DT_Honeys select new { id = x.UsernameID, txt = x.Username }; DDL_Username.DataValueField = "id"; DDL_Username.DataTextField = "txt"; DDL_Username.DataBind(); } } protected void B_Login_Click(object sender, EventArgs e) { if (TB_Password.Text != "") { using (DataClassesDataContext db = new DataClassesDataContext()) { DT_Honey blah = new DT_Honey(); blah = db.DT_Honeys.SingleOrDefault(x => x.UsernameID == int.Parse(DDL_Username.SelectedValue.ToString())); if (blah == null) { LI_Result.Text = "Something went wrong :/"; } if (blah.Password == TB_Password.Text) { LI_Result.Text = "Credentials recognised :-)"; } else { LI_Result.Text = "Error with credentials :-("; } } } } } I am aware this problem is very common, but none of the help I have found online is useful/relevant. Any help/suggestions appreciated; thank you for your time :-).

    Read the article

  • Error loading page

    - by blay
    i have this script on my jquery mobile page that calls an insert script(untitled.asp) for data insertion, but when i press the submit buttom it tells me error loading page and it doesn't work <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <link rel="stylesheet" href="http://code.jquery.com/mobile/1.3.0-beta.1/jquery.mobile-1.3.0-beta.1.min.css" /> <script src="http://code.jquery.com/jquery-1.8.3.min.js"></script> <script src="http://code.jquery.com/mobile/1.3.0-beta.1/jquery.mobile-1.3.0-beta.1.min.js"></script> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Untitled Document</title> </head> <body> <form action="" method="POST" name="form1" id="form1"> <table width="327" border="0"> <tr> <td width="88">Item</td> <td width="185"><label for="item_name"></label> <input type="text" name="item_name" id="item_name" /></td> </tr> <tr> <td>Quantity</td> <td><label for="quantity"></label> <input type="text" name="quantity" id="quantity" /></td> </tr> <tr> <td>Price</td> <td><label for="price"></label> <input type="text" name="price" id="price" /></td> </tr> <tr> <td colspan="2">&nbsp; <input type="submit" value="Submit" /></td> </tr> </table> </form> <script> $(document).ready(function(){ $("form").on('submit',function(event){ event.preventDefault(); data = $(this).serialize(); $.ajax({ type: "POST", url: "untitled.asp", data: data }).done(function( msg ) { alert( "Data Saved: " + msg ); }); }); }); </script> </body> </html> it works fine on the website but when putting it into a mobile app it pops up this error

    Read the article

  • Set maximum requests per IP in IIS7

    - by Maxim V. Pavlov
    I have a web site deployed to IIS 7. One page it is has 15+ .js files linked to it. Last two files referenced in <head> tag (loaded last) get 403 forbidden response from server. I have enabled FailedRequestTracing and have been able to see a detailed error code which is 403.502. I suppose over a very short period of time I am just pulling to much and the IIS blocks me. Is there a way I can configure the limit to enable larger number of requests and get rid of 403.502 error?

    Read the article

  • How come my form input sometimes moves when I refresh the page?

    - by samoz
    On a page that I'm designing I have a form with one input of type text. Normally, this form and input render properly in my browser, Chrome, but occasionally, it renders about 20 pixels to the left of where it is supposed to be. When I refresh the page, it goes back to the original, correct place. I have only tested in Chrome so far, so this isn't a cross-browser issue (it happens in the same browser). Is there anything wrong with my code below? Here's my HTML code: <!DOCTYPE htmls> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <link rel="stylesheet" href="style.css" type="text/css" /> <title>Test Site</title> </head> <body > <div id="supercontainer" class="style1"> <img class="floater" src="top.jpg" alt="Top" /> <img class="floater" src="left.jpg" alt="Left" /> <div id="content"> <p id="theText"> Welcome. Please type a username. </p> <form id="prompt"> <div><input type="text" name="promptLine" autocomplete="off" id="promptLine" onkeypress="return submitenter(event);" value="% " /></div> </form> </div> <img class="floater" src="right.jpg" alt="Right" /> <img class="floater" src="bottom.jpg" alt="Bottom" /> </div> Here's my CSS code: #supercontainer { margin: 0 auto; width: 900px; display: block; } img.floater { display: inline; float: left; } #content { background-color:black; display: inline; float: left; padding-left:5px; padding-right:5px; min-height:458px; max-height:458px; min-width: 803px; max-width: 803px; color: lime; } #theText { text-align:left; margin-bottom:0; margin-top:0; line-height: 0.3; font-family:"Courier New", Courier, monospace; } #prompt { position: fixed; top: 470px; } #promptLine { width: 100%; background-color: black; color: lime; border: none; outline:none; }

    Read the article

  • Provision storage in SAN encironment

    - by wildchild
    hi,.. Can somebody help in understanding how Lun Provisioning is done in clariion based on client requirement. Say, a client needs one 50 GB space on the host( for application) ,two -350 GBs ( for DB and stuff) on the same host and i have 4 raid groups with space of 200 GB in one 50 GB in second and 400 GB and 400GB in rest two all having 5 disks. And , I 'm using Raid 5 only. How do i provision keeping performance in mind( so that performance hit is not there)?..And i need to understand the concept of meta head as well. Please help me by elaborating the above scenario..I am learning to provision storage in non productive environment( b'fore going ahead and working on client prod server) and i have been learning a lot from SF ...I request the seniors here to help me understand it better. Thanks for reading

    Read the article

  • Sftp via shell - how is it possible?

    - by Tomasz Zielinski
    (Moved from StackOverflow: http://stackoverflow.com/questions/4589725/sftp-via-shell-how-it-is-possible) How is it possible for tools like http://mysecureshell.sourceforge.net/ to provide SFTP access by merely specifying them as shell by typing: usermod -s /bin/MySecureShell myuser ? I'm on Debian Lenny, with default sshd/OpenSSH. Is this e.g. a feature of SSH protocol that allows user shell to handle sftp commands? I can't wrap my head around this because usually OpenSSH needs sftp-server module (or the internal one in newer versions) - and this makes me think that sftp commands don't even hit the shell and are handled earlier or by different code path..

    Read the article

  • Windows 7 trying to turn off UAC every time Windows starts

    - by Mehper C. Palavuzlar
    I have strange problem on my HP laptop. This began to happen recently. Whenever I start my machine, Windows 7 Action Center displays the following warning: You need to restart your computer for UAC to be turned off. I never disable UAC, but obviously some process or virus (I'm not sure, only guessing) causes this. As soon as I get this warning, I head for the UAC settings, and re-enable UAC to dismiss this warning. This is a bothersome situation as I really don't know what causes the problem. I have run a full scan on the computer for any probable virus activity, but TrendMicro OfficeScan said that no viruses have been found. There are no other strange incidents on the machine. Everthing works fine except this bizarre incident. How can I learn what process is trying to turn off UAC? What way should I follow to overcome this problem?

    Read the article

  • Styling definition lists - IE clear:both bug

    - by Andrea
    Hi guys, I'm trying to style a definition list properly. So far I've got the style that I wanted in Firefox 3.5 and IE 8 but I couldn't get IE6 and IE7 to behave properly... I've already tried any kind of hack and trickery I could possibly think of. It seems like the "clear:both" on the dt doesn't work in IE<=7... Below is the "test page" that I'm using. The markup of the definition list is built on purpose: I wanna test different scenarios such as multiple definitions or empty one. Check it in Firefox 3.5 to see how it should look like. Cheers!!! <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title></title> <style type="text/css"> body { font-family: Arial; font-size: 62.5%; } * { margin: 0; padding: 0; } #main { font-size: 1.4em; } dt { font-weight: bold; } hr { clear: both; } dl.aligned { width: 300px; } .aligned dt { clear: both; float: left; margin: 0 0 0.5em 0; width: 100px; } .aligned dd { clear: right; float: right; margin: 0 0 0.5em 10px; width: 190px; } </style> </head> <body> <div id="main"> <dl class="aligned"> <dt>First title</dt> <dd>1.1 definition</dd> <dd>1.2 definition - very long to test wrapping</dd> <dd>1.3 definition</dd> <dt>Second title</dt> <dd></dd> <dd></dd> <dt>Third title</dt> <dd>3.0 definition</dd> <dt>Fourth title - very long to test wrapping</dt> <dt>Fifth title</dt> <dt>Sixth title</dt> <dd>6.0 definition</dd> </dl> </div> </body> </html>

    Read the article

  • 100% CPU Runaway Processes (NCurses?)

    - by BCable
    This is a problem I've had for years, but just haven't posted anywhere about it until now. I'm running GRML, a Debian squeeze based Linux distro, and occasionally certain processes will runaway and cause 100% CPU usage. The only way I can usually know is when my thermal meter on my statusbar will turn yellow. Sometimes I run fullscreen applications when it happens, though, so I sometimes don't catch it, leaving my computer wasting away at my CPU. The processes that I can think of off the top of my head are these: abook, aumix, hnb, wyrd. They are all NCurses based console applications, and there are others that are also NCurses based. Is there a bug in NCurses somewhere that I need patched or something? This also happened on the same distro with the same applications on a different laptop with the same configurations. Any ideas? Thanks!

    Read the article

  • C - circular character buffer w/ pthreads

    - by Matt
    I have a homework assignment where I have to implement a circular buffer and add and remove chars with separate threads: #include <pthread.h> #include <stdio.h> #define QSIZE 10 pthread_cond_t full,/* count == QSIZE */ empty,/* count == 0 */ ready; pthread_mutex_t m, n; /* implements critical section */ unsigned int iBuf, /* tail of circular queue */ oBuf; /* head of circular queue */ int count; /* count characters */ char buf [QSIZE]; /* the circular queue */ void Put(char s[]) {/* add "ch"; wait if full */ pthread_mutex_lock(&m); int size = sizeof(s)/sizeof(char); printf("size: %d", size); int i; for(i = 0; i < size; i++) { while (count >= QSIZE) pthread_cond_wait(&full, &m);/* is there empty slot? */ buf[iBuf] = s[i]; /* store the character */ iBuf = (iBuf+1) % QSIZE; /* increment mod QSIZE */ count++; if (count == 1) pthread_cond_signal(&empty);/* new character available */ } pthread_mutex_unlock(&m); } char Get() {/* remove "ch" from queue; wait if empty */ char ch; pthread_mutex_lock(&m); while (count <= 0) pthread_cond_wait(&empty, &m);/* is a character present? */ ch = buf[oBuf]; /* retrieve from the head of the queue */ oBuf = (oBuf+1) % QSIZE; count--; if (count == QSIZE-1) pthread_cond_signal(&full);/* signal existence of a slot */ pthread_mutex_unlock(&m); return ch; } void * p1(void *arg) { int i; for (i = 0; i < 5; i++) { Put("hella"); } } void * p2(void *arg) { int i; for (i = 0; i < 5; i++) { Put("goodby"); } } int main() { pthread_t t1, t2; void *r1, *r2; oBuf = 0; iBuf = 0; count=0; /* all slots are empty */ pthread_cond_init(&full, NULL); pthread_cond_init(&empty, NULL); pthread_mutex_init(&m, NULL); pthread_create(&t1, NULL, p1, &r1); pthread_create(&t2, NULL, p2, &r2); printf("Main"); char c; int i = 0; while (i < 55) { c = Get(); printf("%c",c); i++; } pthread_join(t1, &r1); pthread_join(t2, &r2); return 0; } I shouldn't have to change the logic much at all, the requirements are pretty specific. I think my problem lies in the Put() method. I think the first thread is going in and blocking the critical section and causing a deadlock. I was thinking I should make a scheduling attribute? Of course I could be wrong. I am pretty new to pthreads and concurrent programming, so I could really use some help spotting my error.

    Read the article

  • multiple vlans routed on one nic? trunk?General? or Access?

    - by Aceth
    ok for the last week I've tried racking my head around this... I have a SRW208P with 802.1q support, and a virtual endian appliance. I would like to be able to have 3 vlans having everything routed through the endian appliance.. i.e. The Virtual server has 2 bridged NIC's to the switch. This is where I'm getting confused .. On the 8 port switch I've got the 3 vlans set up ok (all being untagged as they are not going to be vlan aware), it's the port I'm connecting the endian firewall to the switch I'm having trouble with (second nic goes to the adsl modem and NAT'd) Is it meant to be a trunk, "Genereal" or "Access" then untagged or tagged? the end goal is to have vlan traffic routing through the single NIC and have endian route vlan traffic according to the rules. Any one have any ideas on the cisco small business stuff? Thanks

    Read the article

  • Yet another bug of JSF?

    - by Nitesh Panchal
    Hello, Again i see that the @PostConstruct is firing every time even though no binding attribute is used. See this code :- <?xml version='1.0' encoding='UTF-8' ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xmlns:h="http://java.sun.com/jsf/html" xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:c="http://java.sun.com/jsp/jstl/core"> <h:head> <title>Facelet Title</title> </h:head> <h:body> <h:form> <c:forEach var="item" items="#{TestBean.listItems}"> <h:outputText value="#{item}"/> </c:forEach> <h:commandButton value="Click" actionListener="#{TestBean.actionListener}"/> </h:form> </h:body> </html> And this is the simplest possible bean in JSF :- package managedBeans; import java.io.Serializable; import java.util.ArrayList; import java.util.List; import javax.annotation.PostConstruct; import javax.faces.bean.ManagedBean; import javax.faces.bean.ViewScoped; @ManagedBean(name="TestBean") @ViewScoped public class TestBean implements Serializable { private List<String> listItems; public List<String> getListItems() { return listItems; } public void setListItems(List<String> listItems) { this.listItems = listItems; } public TestBean() { } @PostConstruct public void init(){ System.out.println("Post Construct fired!"); listItems = new ArrayList<String>(); listItems.add("Mango"); listItems.add("Apple"); listItems.add("Banana"); } public void actionListener(){ System.out.println("Action Listener fired!"); } } Do you see any behaviour that should cause postconstruct callback to fire each time? I think JSF 2.0 is highly unstable. If it has to fire PostConstruct each and every time what purpose does @ViewScoped serve. Why not to use @RequestScoped only? I thought i have made some mistake in my application. But when i created this simplest possible in JSF, i still get this error. Am i not understanding the scopes of JSF? or are they not testing it properly? Further, if you remove c:forEach and replace it with ui:repeat, then it works fine. Waiting for replies to confirm whether it is bug or it is intentional to stop the programmers from using jstl?

    Read the article

  • Clear float issue

    - by Jason
    I have a page with the standard navigation bar on the left and the content area taking up the rest of the horizontal area to its side. For modern browsers I am using table-row and table-cell values for the display attribute. However, for IE7 I included a conditional stylesheet that tries to float the nav bar. This works fine except when the content area itself has floated elements and I try to use clear. My goal is to displayed the clear element right after the content area floats but instead it gets shoved down below the nav area. The following demo code shows this issue. My goal is to get the table to display right below the "leftThing" and "rightThing" but instead there is a large gap between them and the table. <html> <head> <title>Float Test</title> <style type="text/css"> #body { background: #cecece; } #sidebar { background: #ababab; float: left; width: 200px; } #content { background: #efefef; margin-left: 215px; } #leftThing { background: #456789; float: left; width: 100px; } #rightThing { background: #654321; float: right; width: 100px; } table { clear: both; } </style> </head> <body> <div id="body"> <div id="sidebar"> <ul> <li>One</li> <li>Two</li> <li>Three</li> </ul> </div> <div id="content"> <div style="position: realtive;"> <div id="leftThing"> ABCDEF </div> <div id="rightThing"> WXYZ </div> <table> <thead> <th>One</th> <th>Two</th> </thead> <tr> <td>Jason</td> <td>45</td> </tr> <tr> <td>Mary</td> <td>41</td> </tr> </table> <p>Exerci ullamcorper consequat duis ipsum ut nostrud zzril, feugait feugiat duis dolor feugiat commodo, accumsan, duis illum eum molestie luptatum nisl iusto. Commodo minim ullamcorper blandit, nostrud feugiat blandit esse dolore, consequat vulputate augue sit ad. Facilisi feugait luptatum eu minim wisi, facilisis molestie wisi in in amet vero quis.</p> </div> </div> </div> </body> </html> Thank you for your help.

    Read the article

  • What's the problem of this piece of JavaScript code?

    - by Yousui
    Hi guys, The following piece of JavaScript code is a cross browser way to add/remove event handler. It will save a deleting method as a property of an HTML element object. Now it works well in FireFox but not in IE6. I can't find out why so I came here for help. Great thanks. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html> <head> <meta http-equiv="Content-type" content="text/html; charset=utf-8" /> <title>pop</title> </head> <body> <input type="text" name="input1" id="input1" value="" /> <div id="result"> </div> <div id="result2" style="width:200px;height:100px;border:1px solid red;"> </div> <button id="stop" name="stop">click me</button><button id="stop2" name="stop2">click me</button> <script type="text/javascript" charset="utf-8"> function handler(e){ e = e || window.event; var key_code = e.keyCode || e.charCode || e.which, source = e.srcElement || e.target; document.getElementById("result").innerHTML = "" + key_code; } function handler2(e){ e = e || window.event; var key_code = e.keyCode || e.charCode || e.which, source = e.srcElement || e.target; document.getElementById("result2").innerHTML = e.button; } function add_event(o, event_type, callback, capture){ o = typeof o === "string" ? document.getElementById(o) : o; if(document.addEventListener){ add_event = function(o, event_type, callback, capture){ o = typeof o === "string" ? document.getElementById(o) : o; capture = typeof(capture) === "undefined" ? false : true; o.addEventListener(event_type, callback, capture); o.removes = o.removes || {}; o.removes[event_type] = function(){ o.removeEventListener(event_type, callback, capture); }; if(!o.remove_event){ o.remove_event = function(type){ if(typeof type === "undefined"){ return; } o.removes[type](); } } } }else if(document.attachEvent){ add_event = function(o, event_type, callback, capture){ o = typeof o === "string" ? document.getElementById(o) : o; capture = typeof(capture) === "undefined" ? false : true; o.attachEvent(event_type, callback); o.removes = o.removes || {}; o.removes[event_type] = function(){ o.detachEvent(event_type, callback); } if(!o.remove_event){ o.remove_event = function(type){ if(typeof type === "undefined"){ return; } o.removes[type](); } } } } add_event(o, event_type, callback, capture); } add_event("input1", "keyup", handler); add_event("input1", "click", handler2); add_event("stop", "click", function(){ document.getElementById("input1").remove_event("keyup"); }); add_event("stop2", "click", function(){ document.getElementById("input1").remove_event("click"); }); </script> </body> </html>

    Read the article

< Previous Page | 122 123 124 125 126 127 128 129 130 131 132 133  | Next Page >