Search Results

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

Page 97/260 | < Previous Page | 93 94 95 96 97 98 99 100 101 102 103 104  | Next Page >

  • How to call a scalar function in a stored procedure

    - by Luke101
    I am wacking y head over the problem with this code. DECLARE @root hierarchyid declare @lastchild hierarchyid SELECT @root = NodeHierarchyID from NodeHierarchy where ID = 1 set @lastchild = getlastchild(@root) it says it does not recognize getlastchild function. What am I doing wrong here

    Read the article

  • Check if cookie exists if not create it.

    - by Ozaki
    TLDR: Want to check if cookie exists, if it doesn't create it. Am using jquery1.4.2 and jquery cookie, I know this is probably very simple but I just cant get my head right at the moment. I want to: Check to see if a cookie with name of "query" exists If so nothing. If not create a cookie "query" with a value of 1. But only if it doesn't already exist. Thanks in advance

    Read the article

  • extra vertical space within <li> in IE7

    - by powerboy
    The test case is in below. Or you can view it in jsbin: http://jsbin.com/uxagi. <!DOCTYPE html> <html> <head> <style type="text/css"> body {margin: 20px; } #main {border: 1px solid red;} img {float: left; height: 100px; padding: 0 10px 10px 0;} ul {margin: 0; padding: 0; list-style-type: none;} </style> </head> <body> <div id="main"> <ul> <li> <img src="http://upload.wikimedia.org/wikipedia/en/thumb/0/07/CranebyLinson1894.jpg/100px-CranebyLinson1894.jpg" /> <div class="content">"The Open Boat" is a short story by American author Stephen Crane. First published in 1897, it was based on Crane's experience of having survived a shipwreck off the coast of Florida earlier that year while traveling to Cuba to work as a newspaper correspondent. Crane was stranded at sea for thirty hours when his ship, the SS Commodore, sank after hitting a sandbar. He and three other men were forced to navigate their way to shore in a small boat; one of the men, an oiler named Billie Higgins, drowned. Crane subsequently adapted his report into narrative form, and the short story "The Open Boat" was published in Scribner's Magazine. The story is told from the point of view of an anonymous correspondent, Crane's fictional doppelgänger, and the action closely resembles the author's experiences after the shipwreck. A volume titled The Open Boat and Other Tales of Adventure was published in the United States in 1898. Praised for its innovation by contemporary critics, the story is considered an exemplary work of literary Naturalism. One of the most frequently discussed works in Crane's canon, it is notable for its use of imagery, irony, symbolism, and exploration of themes including survival, solidarity, and the conflict between man and nature. H. G. Wells considered "The Open Boat" to be "beyond all question, the crown of all [Crane's] work".</div> </li> </ul> </div> </body> </html> Note that in standards-compliant browsers and IE8, there is no vertical space between the red border and the text. But there is vertical space in IE7 (haven't tested in IE6).

    Read the article

  • WPF: Disable ListBox, but enable scrolling

    - by Matt Briggs
    Been banging my head against this all morning. Basically, I have a listbox, and I want to keep people from changing the selection during a long running process, but allow them to still scroll. Solution: All the answers were good, I went with swallowing mouse events since that was the most straight forward. I wired PreviewMouseDown and PreviewMouseUp to a single event, which checked my backgroundWorker.IsBusy, and if it was set the IsHandled property on the event args to true.

    Read the article

  • jquerymobile conflict with autocomplete : $this.attr("href") is undefined

    - by sweets-BlingBling
    When I use jquery ui autocomplete version 1.8.5 with jquery mobile alpha 2. I get an error when I click an item from the autocomplete list: $this.attr("href") is undefined. Does anyone know any fix for it? EDITED: <html> <head> <link rel="stylesheet" type="text/css" href="css/ui-lightness/jquery-ui-1.8.custom.css"> <link rel="stylesheet" type="text/css" href="css/autocomplete.css"> </head> <body> <div id="formWrap"> <form id="messageForm" action="#"> <fieldset> <label id="toLabel">select:</label> <div id="friends" class="ui-helper-clearfix"> <input id="to" type="text"> </div> </fieldset> </form> </div> <script type="text/javascript" src="js/jquery-1.4.2.min.js"></script> <script type="text/javascript" src="js/jquery.mobile-1.0a2.js"></script> <script type="text/javascript" src="js/jquery-ui-1.8.custom.min.js"></script> <script type="text/javascript"> $(function(){ var availableTags = [ "ActionScript", "AppleScript", "Asp", "BASIC", "C", "C++", "Clojure", "COBOL", "ColdFusion", "Erlang", "Fortran", "Groovy", "Haskell", "Java", "JavaScript", "Lisp", "Perl", "PHP", "Python", "Ruby", "Scala", "Scheme" ]; //attach autocomplete $("#to").autocomplete({ source:availableTags , //define select handler select: function(e, ui) { var contact = ui.item.value; createSpan(contact); $("#to").val("").css("top", 2); return false; } }); }); function createSpan(contact){ //create formatted friend span = $("<span>").text(contact) //add contact to contact div span.insertBefore("#to"); } </script> </body> </html>

    Read the article

  • Xcode acting strange

    - by Moshe
    I am typing code from Head First iPhone Development (O'reilly) and Xcode will build and run fine once and then, without any modification to the code, the second build will fail. Why?(I'm using command+R)

    Read the article

  • What defines writing PHP?

    - by cdburgess
    When writing PHP code for any given project, do you find you can write code off the top of your head? Or do you make multiple round trips to php.net? If it is the later, can you still be considered a good coder. This is a legitimate question as I find I have difficulty always remembering all of the functions that are available to me so I find I use php.net as a crutch. Is there anyway to improve this?

    Read the article

  • Why Hire Programmers?

    - by editorial photography
    You might keep pondering over this question a million times in your head. When there are so many softwares available that can make the work easy, why to hire web programmer. There is a difference. Building a website on your own and seeking the help of professionals can create a major impact on your business.

    Read the article

  • setTimeout stack over flow..

    - by user344862
    Untitled 1 $(document).ready(function(){ counterFN(); var theCounter = 1; function counterFN() { $(".searchInput").val(theCounter); theCounter++; setTimeout(counterFN(),1000); } }); </script> </head> <body> <input type="text" class="searchInput" /> </body>

    Read the article

  • How to write this JavaScript code without eval?

    - by karlthorwald
    How to write this JavaScript code without eval? var typeOfString = eval("typeof " + that.modules[modName].varName); if (typeOfString !== "undefined") { doSomething(); } The point is that the name of the var that I want to check for is in a string. Maybe it is simple but I don't know how. Edit: Thank you for the very interesting answers so far. I will follow your suggestions and integrate this into my code and do some testing and report. Could take a while. Edit2: I had another look at the could and maybe itis better I show you a bigger picture. I am greatful for the experts to explain so beautiful, it is better with more code: MYNAMESPACE.Loader = ( function() { function C() { this.modules = {}; this.required = {}; this.waitCount = 0; this.appendUrl = ''; this.docHead = document.getElementsByTagName('head')[0]; } function insert() { var that = this; //insert all script tags to the head now! //loop over all modules: for (var modName in this.required) { if(this.required.hasOwnProperty(modName)){ if (this.required[modName] === 'required') { this.required[modName] = 'loading'; this.waitCount = this.waitCount + 1; this.insertModule(modName); } } } //now poll until everything is loaded or //until timout this.intervalId = 0; var checkFunction = function() { if (that.waitCount === 0) { clearInterval(that.intervalId); that.onSuccess(); return; } for (var modName in that.required) { if(that.required.hasOwnProperty(modName)){ if (that.required[modName] === 'loading') { var typeOfString = eval("typeof " + that.modules[modName].varName); if (typeOfString !== "undefined") { //module is loaded! that.required[modName] = 'ok'; that.waitCount = that.waitCount - 1; if (that.waitCount === 0) { clearInterval(that.intervalId); that.onSuccess(); return; } } } } } }; //execute the function twice a second to check if all is loaded: this.intervalId = setInterval(checkFunction, 500); //further execution will be in checkFunction, //so nothing left to do here } C.prototype.insert = insert; //there are more functions here... return C; }()); var myLoader = new MYNAMESPACE.Loader(); //some more lines here... myLoader.insert();

    Read the article

  • Using JSON Data to Populate a Google Map with Database Objects

    - by MikeH
    I'm revising this question after reading the resources mentioned in the original answers and working through implementing it. I'm using the google maps api to integrate a map into my Rails site. I have a markets model with the following columns: ID, name, address, lat, lng. On my markets/index view, I want to populate a map with all the markets in my markets table. I'm trying to output @markets as json data, and that's where I'm running into problems. I have the basic map displaying, but right now it's just a blank map. I'm following the tutorials very closely, but I can't get the markers to generate dynamically from the json. Any help is much appreciated! Here's my setup: Markets Controller: def index @markets = Market.filter_city(params[:filter]) respond_to do |format| format.html # index.html.erb format.json { render :json => @market} format.xml { render :xml => @market } end end Markets/index view: <head> <script type="text/javascript" src="http://www.google.com/jsapi?key=GOOGLE KEY REDACTED, BUT IT'S THERE" > </script> <script type="text/javascript"> var markets = <%= @markets.to_json %>; </script> <script type="text/javascript" charset="utf-8"> google.load("maps", "2.x"); google.load("jquery", "1.3.2"); </script> </head> <body> <div id="map" style="width:400px; height:300px;"></div> </body> Public/javascripts/application.js: function initialize() { if (GBrowserIsCompatible() && typeof markets != 'undefined') { var map = new GMap2(document.getElementById("map")); map.setCenter(new GLatLng(40.7371, -73.9903), 13); map.addControl(new GLargeMapControl()); function createMarker(latlng, market) { var marker = new GMarker(latlng); var html="<strong>"+market.name+"</strong><br />"+market.address; GEvent.addListener(marker,"click", function() { map.openInfoWindowHtml(latlng, html); }); return marker; } var bounds = new GLatLngBounds; for (var i = 0; i < markets.length; i++) { var latlng=new GLatLng(markets[i].lat,markets[i].lng) bounds.extend(latlng); map.addOverlay(createMarker(latlng, markets[i])); } } } window.onload=initialize; window.onunload=GUnload;

    Read the article

  • How to detect a click outside an element?

    - by Sergio del Amo
    I have some html menus, which i show completely when a user clicks on the head of these menus. I would like to hide these elements when the user clicks outside the menus area. Is something like this possible with jquery? $("#menuscontainer").clickOutsideThisElement(function() { // hide the menus });

    Read the article

  • Problems with contenteditable in Firefox

    - by Jonathan
    Hello, I am working on a Javascript WYSIWYG editor in Firefox. I am using a div with the contenteditable attribute set to true in order to accomplish this (I cannot use a contenteditable iframe for this particular project). This contenteditable div is nested in another div that is not contenteditable. I am encountering the following two problems when using execCommand to apply formatting, including font style and size, as well as bold, italic, and underline: When all text in the div is selected, execCommand simply does not work. execCommand works fine when only part of the text is selected, but does nothing when all of the text is selected. Applying formatting with no text selected yields unexpected results. For example, when calling execCommand('bold') with no text selected and then typing results in bold text being typed until a spacebar is inserted, at which point the bold formatting is lost (until another space is inserted, interestingly enough; then the text becomes bold again). To see what I mean, please try running the following HTML code in Firefox 3: <html> <head><title></title></head> <body> <button onClick="execCommand('bold', false, null);">Bold</button> <div style="width: 300px; border: 1px solid #000000;"> <div contenteditable="true">Some editable text</div> </div> </body> </html> Please try the following: Select the word "Some" only. Click the Bold button. This will make the text bold, as expected. Select the entire phrase "Some editable text" (either manually or using CTRL-A). Click the Bold button. Nothing happens. This demonstrates the first bug shown above. Hit the backspace key to clear the div. Click the Bold button and begin typing. Type a few words with spaces. This will demonstrate the second bug. Any ideas on what could be causing these problems and how to work around them would be greatly appreciated!

    Read the article

  • need to get the context value in top of page, where the context value will be set only at the bottom

    - by Mahadevan Alagar
    <script runat="server"> protected void Page_Load(object sender, EventArgs e) { Response.Write("Page Load:"); } public string setContext(string sName, string sVal) { HttpContext.Current.Items[sName] = sVal; return sVal; } public string getContext(string sName) { string sVal = "default"; if (HttpContext.Current.Items[sName] != null) sVal = HttpContext.Current.Items[sName].ToString(); else sVal = "empty"; return sVal; } </script> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>Get Context in TOP ???</title> </head> <body> <div> <div id="divDest" name="divDest"> Top Content: Get1 :<%= getContext("topcontent") %> // returns "empty", BUT I Need "value to set" </div> <br /> Set1 : <%= setContext("topcontent", "value to set")%> <br /> // set the value <br /> Get2 : <%= getContext("topcontent") %><br /> // returns "value to set" <br /> <script language="javascript"> var elval = getElementVal("divTest"); document.getElementById("divDest").innerHTML = elval; //alert(elval); function getElementVal(elemid) { var elemval = document.getElementById(elemid); return elemval.innerHTML; } </script> </body> </html> I need to get the context value in top of page, where the context value will be set at the bottom of the page. Get context value == "empty", BUT need "something" Set context value to "something" Get context value == "something" I may use JS/AJAX, where the page source the value won't be present. BUT I need the TEXT in the View Source of the page too. Is there a way to wait for the context to set and then get, I have tried with User Control, prerender and render methods too. But I can't able to get it right. Any idea?

    Read the article

  • not getting a page reload when submitting a form on a page

    - by Bob Walsh
    When showing a project, the user can add a decision via a form_for and its partial. Is there some way of avoiding reloading the page and just creating the record silently? In the controller method (adddecision) I have: respond_to do |format| if @decision.save format.html { redirect_to(@project) } format.xml { head :ok } else format.html { render :action => "show" } format.xml { render :xml => decision.errors, :status => :unprocessable_entity } end I've tried redirect_to(:back) etc - still getting a page reload.

    Read the article

  • JQuery autocomplete: is not working asp.net

    - by Abu Hamzah
    is that something wrong in the below code? its not firing at all edit <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="HostPage.aspx.cs" Inherits="HostPage" %> <!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>Untitled Page</title> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js"></script> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.min.js"></script> <link rel="stylesheet" href="http://dev.jquery.com/view/trunk/plugins/autocomplete/jquery.autocomplete.css" type="text/css" /> <script type="text/javascript" src="http://dev.jquery.com/view/trunk/plugins/autocomplete/jquery.autocomplete.js"></script> </head> <body> <form id="form1" runat="server"> <script type="text/javascript"> $(document).ready(function() { $("#<%=txtHost.UniqueID %>").autocomplete("HostService.asmx/GetHosts", { dataType: 'json' , contentType: "application/json; charset=utf-8" , parse: function(data) { var rows = Array(); debugger for (var i = 0; i < data.length; i++) { rows[i] = { data: data[i], value: data[i].LName, result: data[i].LName }; } return rows; } , formatItem: function(row, i, max) { return data.LName + ", " + data.FName; } }); }); </script> <div> <asp:Label runat="server" ID='Label4' >Host Name:</asp:Label> <asp:TextBox ID="txtHost" runat='server'></asp:TextBox> <p> </div> </form> </body> </html>

    Read the article

  • jQuery - draggable images on iPad / iPhone - how to integrate event.preventDefault();?

    - by Tim
    Hello! I use jQuery, jQuery UI and jQuery mobile to build a web application for iPhone / iPad. Now I create images and they should be draggable, so I did this: <!DOCTYPE html> <html> <head> <meta http-equiv="Content-type" content="text/html; charset=utf-8"> <title>Drag - Test</title> <link rel="stylesheet" href="http://code.jquery.com/mobile/1.0a2/jquery.mobile-1.0a2.min.css" /> <script src="http://code.jquery.com/jquery-1.4.4.min.js"></script> <script src="http://code.jquery.com/mobile/1.0a2/jquery.mobile-1.0a2.min.js"></script> <script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.7/jquery-ui.min.js"></script> </head> <body> <div> <div style="width:500px;height:500px;border:1px solid red;"> <img src="http://upload.wikimedia.org/wikipedia/en/thumb/9/9e/JQuery_logo.svg/200px-JQuery_logo.svg.png" class="draggable" alt="jQuery logo" /> <img src="http://upload.wikimedia.org/wikipedia/en/a/ab/Apple-logo.png" class="draggable" alt="Apple Inc. logo" /> </div> </div> </body> <script type="text/javascript"> $(document).ready(function() { $(".draggable").draggable(); }); </script> </html> Here you can see the live example: http://jsbin.com/igena4/ The problem is, that the whole page want to scroll. I searched in Apple's HTML5 examples and found this to prevent the scrolling of the page, so that the image is draggable: ... onDragStart: function(event) { // stop page from panning on iPhone/iPad - we're moving a note, not the page event.preventDefault(); ... } But the problem is for me, how can I include this into my jQuery? Where do I get event? Best Regards.

    Read the article

  • How to learn about Threads, Especially in Java.

    - by Javed Ahamed
    I have always been kind of confused by threads, and my class right now makes heavy use of them. We are using java.util.concurrent but I don't even really get the basics. UpDownLatch, Futures, Executors; these words just fly over my head. Can you guys suggest any resources to help learn what I need from the ground up? Thanks a lot in advance!

    Read the article

  • inline block ie7 on h2

    - by Andy
    I think im going to kill someone high up in microsoft very very soon: Please can someone help me get my head around this bug: http://www.yellostudio.co.uk/tm/selection.html# I'd like the top h2 to display inline block alongside the help icons on the right. The issue only exists in ie7 and its doing my sweed in... Any help would be very very much appreciated

    Read the article

< Previous Page | 93 94 95 96 97 98 99 100 101 102 103 104  | Next Page >