Search Results

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

Page 113/260 | < Previous Page | 109 110 111 112 113 114 115 116 117 118 119 120  | Next Page >

  • C#: How to replace "-" with " -" only when it's not preceded by "e"?

    - by MaDDoX
    I imagine I should use Regex for that but I still scratch my head a lot about it (and the only similar question I found wasn't exactly my case) so I decided to ask for help. This is the input and expected output: Input: "c-0.68219,-0.0478 -1.01455-0.0441 0.2321e-4,0.43212" Output:"c -0.68219,-0.0478 -1.01455 -0.0441 0.2321e-4,0.43212" Basically I need either commas or spaces as value separators, but I can't break the exponential index (e-4). Maybe do two successive replacements?

    Read the article

  • Difference in displaying inner div between IE and Chrome

    - by Gaara
    I have this code that has one "outerDIV" that contains an "innerDIV". On chrome the "innerDIV" size is 491px, whereas on IE it is 425px (same as outerDIV). Hence, on Chrome I can see the first two children of "innerdiv": "My test string #1" and "test2". But for IE I can only see the first child. I am not quite sure what the "right" behavior should be, as firefox does the same as IE. However I would like to have IE do the same as Chrome. I have been experimenting with some css styles (mainly overflow and display), but still can't make it right: IE will expand its height instead of its width to make the elements fit. Can you guys help me figure out a way to change the css so that IE will wraps the div elements inline? As a restriction though, I cannot change the width on the HTML. As a benefit, I am using a css that only loads for IE to patch these kind of IE inconsistencies. The same css will NOT load for chrome, so I don't need to worry about messing with chrome when changing the IE CSS. Thanks in advance! <html> <head> <style type="text/css"> <!-- body { font-family: helvetica; } .myContainer { overflow: hidden; border: 1px solid rgba(0, 0, 0, .5); font-size: 14pt; height: 49px; line-height: 49px; overflow: hidden; display: block; } .myContainer > DIV { float: left; white-space: nowrap; display: block; } .myContainer .item:first-child { padding-left: 10px; } .myContainer .item { float: left; padding-right: 32px; } --> </style> </head> <body> <div id="outerDIV" class="myContainer" style="display: block; width: 425px;"> <div id="innerDIV"> <div class="item"> --------My test string #1-------- </div> <div class="item"> ------test2------- </div> <div class="item"> test </div> </div> </div> </body> </html>

    Read the article

  • Is there any way to get the SHA of a commit from its message?

    - by Benjol
    When doing a git tag, I'm not always great at remembering if HEAD~6 (for example) is inclusive or exclusive. Given that most of my commits are prefixed with an issue number, I wondered if there is some magic command for searching for the commit SHA from part of its message. I know it's easy to do a git log and work from there, but I want more easy :)

    Read the article

  • Retrieve KEYWORDS from META tag in a HTML WebPage using JAVA.

    - by kooldave98
    Hello all, I want to retrieve all the content words from a HTML WebPage and all the keywords contained in the META TAG of the same HTML webpage using Java. For example, consider this html source code: <html> <head> <meta name = "keywords" content = "deception, intricacy, treachery"> </head> <body> My very short html document. <br> It has just 2 'lines'. </body> </html> The CONTENT WORDS here are: my, very, short, html, document, it, has, just, lines Note: The punctuation and the number '2' are ruled out. The KEYWORDS here are: deception, intricacy, treachery I have created a class for this purpose called WebDoc, this is as far as I have been able to get. import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.net.URL; import java.util.Set; import java.util.TreeSet; public class WebDoc { protected URL _url; protected Set<String> _contentWords; protected Set<String> _keyWords public WebDoc(URL paramURL) { _url = paramURL; } public Set<String> getContents() throws IOException { //URL url = new URL(url); Set<String> contentWords = new TreeSet<String>(); BufferedReader in = new BufferedReader(new InputStreamReader(_url.openStream())); String inputLine; while ((inputLine = in.readLine()) != null) { // Process each line. contentWords.add(RemoveTag(inputLine)); //System.out.println(RemoveTag(inputLine)); } in.close(); System.out.println(contentWords); _contentWords = contentWords; return contentWords; } public String RemoveTag(String html) { html = html.replaceAll("\\<.*?>",""); html = html.replaceAll("&",""); return html; } public Set<String> getKeywords() { //NO IDEA ! return null; } public URL getURL() { return _url; } @Override public String toString() { return null; } }

    Read the article

  • $ is not defined in Firefox using jQuery

    - by Alvin
    Hi, Whenever I try to load the following part in <head> tag on firfox browser, I get the message as $ is not define. May I know the reason? I'm trying to load the jquery.js file before loading any custom script after CSS part. <script type="text/javascript" src="jquery.js"></script> <script type="text/javascript"> $(document).ready(function(){

    Read the article

  • Do I need to perform a commit after a rebase?

    - by Benjol
    I've just rebased a feature branch onto another feature branch (in preparation for rebasing everything to the head of my master), and it involved quite a few tricky merge resolutions. Is the rebase automatically saved as a commit somewhere? Just where do those modifications live? I can't see anything in gitk, or git log --oneline. (Same question for when I merge back my branch after rebasing.)

    Read the article

  • Submitting form in php file accessed by Ajax?

    - by dronnoc
    Hi people, I am trying to figure out how to submit a form in a page being accessed by Ajax? here are some code snippets to help demonstrate what i am trying to say. HTML BODY - THIS IS WHAT THE USER WILL SEE. <html> <head> <script language="javascript" src="linktoajaxfile.js"> </head> <body onLoad="gotoPage(0)"> <div id="fillThis"> </div> </body> </html> AJAX FILE var xmlhttp function gotoPage(phase) { xmlhttp=GetXmlHttpObject(); if (xmlhttp==null) { alert ("Your browser does not support AJAX!"); return; } var url="pageofstuffce.php"; url=url+"?stg="+phase; url=url+"&sid="+Math.random(); xmlhttp.onreadystatechange=stateChanged; xmlhttp.open("GET",url,true); xmlhttp.send(null); } function stateChanged() { if (xmlhttp.readyState==4) { document.getElementById("fillThis").innerHTML=xmlhttp.responseText; } } function GetXmlHttpObject() { if (window.XMLHttpRequest) { // code for IE7+, Firefox, Chrome, Opera, Safari return new XMLHttpRequest(); } if (window.ActiveXObject) { // code for IE6, IE5 return new ActiveXObject("Microsoft.XMLHTTP"); } return null; } PAGE OF DATA <?php $stage = $_GET['stg']; if($stage == 0) { echo '<a onClick="gotoPage(1)">click me</a>'; } elseif($stage == 1) { <form> <input type="text" name="name"> <input type="submit" name="submit"> </form> } elseif(somehow can reach here) { show data from form. } ?> Can anyone perhaps help me get past the form and display the data in the same page? Also, i have looked around, and i don't think anything around has what i need... correct me if i'm wrong though :) Thanks in advance, and i hope i didn't put in too much detail :) Dronnoc EDIT Forgot to mention what I've tried; I have tried submitting the form to itself (same file) and that destroyed the ajax link, and opened the page. i have also tried just having the button move the page onto another step, but the $_POST variable is empty... i am at a loss, so does anyone else have any ideas?

    Read the article

  • Make a table start on the same line as header

    - by ripper234
    I am trying to get a table of icons appear on the same line as the header. In the HTML below, the icons appear on a separate line. I tried using 'top' attribute to move the table, but this is not a good solution because then there's an ugly space between the icons table and the rest of the document. How can I fix this? <html> <head> <style type="text/css"> #action-icons { float:right; position:relative; border:0; } </style> </head> <body> <h1 class="edit">Bla bla</h1> <table id="action-icons"> <tbody> <tr> <td><img width="64" height="64"/></td> <td><img width="60" height="60"/></td> </tr> <tr> <td><img width="36" height="36"/></td> <td><img width="36" height="36"/></td> </tr> </tbody> </table> <table width="100%" class="tasksgrid"> <tbody> <tr> <th class='taskcell'>One</th> <th class='taskcell'>Two</th> </tr> </tbody> </table> </body> </html>

    Read the article

  • JavaScript Coding for Finding Shipping Total

    - by user2913279
    I am having a very hard time with this code. I have been working on it for days and cannot seem to figure it out. Please help!! Here are the specific I need for the code: Many companies normally charge a shipping and handling charge for purchases. Create a Web page that allows a user to enter a purchase price into a text box and includes a JavaScript function that calculates shipping and handling. Add functionality to the script that adds a minimum shipping and handling charge of $1.50 for any purchase that is less than or equal to $25.00. For any orders over $25.00, add 10% to the total purchase price for shipping and handling, but do not include the $1.50 minimum shipping and handling charge. The formula for calculating a percentage is price * percent / 100. For example, the formula for calculating 10% of a $50.00 purchase price is 50 * 10 / 100, which results in a shipping and handling charge of $5.00. After you determine the total cost of the order (purchase plus shipping and handling), display it in an alert dialog box. Here is the code I have: <!DOCTYPE> <head> <title>Calculate Shipping</title> <script type="text/javascript"> function parseInt() { var salesPrice = document.salesForm.Price.value; var minCharge = salesPrice + 1.50; var shipping = salesPrice * 10/100; if (salesPrice <= 25) window.alert('Your sales total including shipping is $' + minCharge); else window.alert('Your sales total including shipping is $' + salesPrice + shipping); } </script> </head> <body> <form name="salesForm"> <div > <p>Enter Your Purchase Price</p> <input type="text" name="Price" /><br /><br /> <input type="button" name="Calculate" value="Calculate Shipping" onclick="parseInt ()" /> </div> </form> </body> </html> Everything works except for the math in the alert box. It will show an incorrect total...

    Read the article

  • Git undo last commit.

    - by Justin
    I merged the wrong way between two branches. I then ran the following: git reset --hard HEAD^ I am now back at the previous commit (which is where I want to be). Was that the correct thing to do? The bad commit is still in the repository, is that okay or should I do something else to remove it from the repository? I have not pushed or committed anything else yet.

    Read the article

  • newbie in Jquery (including but no result)

    - by Negin
    I have this code: <html> <head> </head> <body> <form method='post'> <link type="text/css" href="css/themename/jquery-ui-1.8.14.custom.css" rel="Stylesheet" /> <script type="text/javascript" src="js/jquery-1.4.4.min.js"></script> <script type="text/javascript" src="js/jquery-ui-1.8.14.custom.min.js"></script> <style> #feedback { font-size: 1.4em; } #selectable .ui-selecting { background: #FECA40; } #selectable .ui-selected { background: #F39814; color: white; } #selectable { list-style-type: none; margin: 0; padding: 0; width: 60%; } #selectable li { margin: 3px; padding: 0.4em; font-size: 1.4em; height: 18px; } </style> <script> $(function() { $( "#selectable" ).selectable(); }); </script> <div class="demo"> <ol id="selectable"> <li class="ui-widget-content">Item 1</li> <li class="ui-widget-content">Item 2</li> <li class="ui-widget-content">Item 3</li> </ol> </div><!-- End demo --> <div class="demo-description" style="display: none; "> <p>Enable a DOM element (or group of elements) to be selectable. Draw a box with your cursor to select items. Hold down the Ctrl key to make multiple non-adjacent selections. </p> </div><!-- End demo-description --> </form> </body> </html> I downloaded the jquery but it has no result I used this site: http://jqueryui.com/demos/selectable/#event-create what is wrong here?

    Read the article

  • Help with doctype issues

    - by James
    Hi I am having issues making my footer stick to the bottom of the page in all browsers. I have the following document structure: <html> <head> </head> <body> <div id="wrapper"> <div id="header"> <ul> <li>home</li> </ul> </div> <div class="expander"></div> </div> <div id="footer" class="expander"> </div> </body> </html> Relevant CSS is: body { margin: 0; height: 100%; } #wrapper { min-height: 100%; height: auto !important; height: 100%; margin: 0 auto -116px; } .expander { height: 116px; } #footer { width: 100%; } #header ul { list-style: none outside none; clear: both; margin: 0; } #header li { margin: 0; margin-right: 20px; padding: 0; display: inline-block; height: 85px; padding-top: 20px; margin-bottom: -20px; } When used without any doc type, the page renders as I intend it to in Chrome and Firefox. In IE8, however, the list item tabs are on separate lines When I add an XHTML doctype, the page renders correctly in IE8 except the footer is not drawn at the bottom of the page in IE8, Chrome or Firefox, i.e. the footer sits directly below the menu bar. Example doctype: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> What am I doing wrong?

    Read the article

  • How to Automatically Refresh Data on Page Using Ajax on an Interval?

    - by Karnak
    I would like to load an XML file every 30 seconds and display its contents inside an HTML page. So far I know how to load the file, but I don't know how to automatically refresh it and display its updated contents. It would also be great if it did some error checking and if it displayed error.png image when it's not able to load data.xml file. Here is my code: <head> <script> window.XMLHttpRequest { xmlhttp = new XMLHttpRequest(); } xmlhttp.open("GET", "data.xml", false); xmlhttp.send(); loadXMLDoc = xmlhttp.responseXML; f = loadXMLDoc.getElementsByTagName("foo") function buildBar(i) { qux = (f[i].getElementsByTagName("qux")[0].childNodes[0].nodeValue); document.getElementById("displayBar").innerHTML = qux; } </script> </head> <body> <script> document.write("<ul>"); for (var i = 0; i < f.length; i++) { document.write("<li onclick='buildBar(" + i + ")'>"); document.write(f[i].getElementsByTagName("bar")[0].childNodes[0].nodeValue); document.write("</li>"); } document.write("</ul>"); </script> <div id="displayBar"> </div> </body> After searching the internet for a few hours I found many examples on how to do this, but I didn't know how to implement it in my particular case. I am not a programmer, so please be kind. I would really appriciate any help. It would mean a lot.

    Read the article

  • Rails 3 beta 3 -- is it time to start using this for new projects?

    - by TMB
    Is it time to start new projects in Rails 3? I'm nervous about using beta versions but at the same time I really like what they are doing and don't want to deal with legacy 2.3.5 issues with these apps. Is it better to wait these things out, or buckle-up, deal with early adopter issues and get a head start on the future. Thanks for any light you can shed.

    Read the article

  • json data not rendered in backbone view

    - by user2535706
    I have been trying to render the json data to the view by calling the rest api and the code is as follows: var Profile = Backbone.Model.extend({ dataType:'jsonp', defaults: { intuitId: null, email: null, type: null }, }); var ProfileList = Backbone.Collection.extend({ model: Profile, url: '/v1/entities/6414256167329108895' }); var ProfileView = Backbone.View.extend({ el: "#profiles", template: _.template($('#profileTemplate').html()), render: function() { _.each(this.model.models, function(profile) { var profileTemplate = this.template(this.model.toJSON()); $(this.el).append(tprofileTemplate); }, this); return this; } }); var profiles = new ProfileList(); var profilesView = new ProfileView({model: profiles}); profiles.fetch(); profilesView.render(); and the html file is as follows: <!DOCTYPE html> <html> <head> <title>SPA Example</title> <!-- <link rel="stylesheet" type="text/css" href="src/css/reset.css" /> <link rel="stylesheet" type="text/css" href="src/css/harmony_compiled.css" /> --> </head> <body class="harmony"> <header> <div class="title">SPA Example</div> </header> <div id="profiles"></div> <script id="profileTemplate" type="text/template"> <div class="profile"> <div class="info"> <div class="intuitId"> <%= intuitId %> </div> <div class="email"> <%= email %> </div> <div class="type"> <%= type %> </div> </div> </div> </script> </body> </html> This gives me an error and the render function isn't invoking properly and the render function is called even before the REST API returns the JSON response. Could anyone please help me to figure out where I went wrong. Any help is highly appreciated Thank you

    Read the article

  • SQL SERVER 2005 Self Joins output

    - by user301751
    HI I am looking for some help I just can't seem to get my head how self joins work. I have this sql code select Persno'Name',convert(char(20), A_Date , 13)'Logins',acode from atrail as LOGIN where acode = 'LOGIN' OR acode = 'LOGOUT' order by a_date desc Which produces a list of User names and when the have logged in and out. What I am trying to acheive is to get anther column with the LOGOUT date next to the date they logged in date so that it is easyer to see when they logged in and out. Thanks Andy

    Read the article

  • Need Help Figuring Out Why Text Is Overflowing My Page

    - by Brian
    Like the title says, I am having issues with a VERY long string overflowing my page. I tried some overflow techniques, but none seem to work. I had previously posted this as a Primefaces problem, but have since learned that it is not a Primefaces issue. Anyway, if anybody has any suggestions on how I can fix this, I would appreciate it. I will post my HTML below so you can see what I am talking about. Thanks for taking the time to read, and have a great day. :-) <!DOCTYPE html> <html> <head> <title> problem </title> <style type="text/css"> span.troubleSpan { overflow: scroll; } </style> </head> <body> <h4> problem </h4> <div> <table border="1"> <tr> <td> <span>cell</span> </td> <td> <span>&nbsp;</span> </td> <td> <span>cell</span> </td> <td> <span class="troubleSpan">asdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdf</span> </td> <td> <span>&nbsp;</span> </td> </tr> </table> </div> </body> </html>

    Read the article

  • Accessing Custom Configurations in NUnit class

    - by Martin Ongtangco
    I'm really banging my head onto this one. I can't make the Custom Configuration to work with NUnit. It kept on failing to read the configuration file. I followed carefully this article: http://devlicio.us/blogs/derik_whittaker/archive/2006/11/13/app-config-and-custom-configuration-sections.aspx placed the references in the Unit test class App.Config, still everything failed. Is there some sort of a magic setting to do here?

    Read the article

  • 3 divs as background

    - by woody993
    I've been working on this for a couple of hours and can't seem to wrap my head around it. I have three images, below, and I would like the text content to sit on top of these, but how do I do it? The middle image is the image that would need to repeat as the container div expands. Top: Middle repeating: Bottom:

    Read the article

  • Are cookies enough for storing login data? (PHP)

    - by jpjp
    I am reading the Head First PHP/Mysql book and they say to store both the user's username, email into cookies and sessions. Is it safe to assume that everyone know a day has cookies? Or should I store both in sessions and cookies? I am not storing any sensitive data in cookies such as password, etc.

    Read the article

  • Javascript returns Nan in IE, FF ok

    - by user350184
    im very new to javascript, and writing this script to add up a shopping cart and print out subtotals and totals. it works in FF but not in IE. this function is called by onclick of one of three select options with a value of 0-25. it is in a js file called in the head. what it does is get the selected values as variables, parseint them, adds and multiplies, and changes the innerHTML of the table to reflect the subtotals, and total. FF does it great, but IE gives Nan. ive tried rewriting it a number of different ways, and many translations still work in FF but not IE8. ive made sure the variables and form id's arent repeated. function gen_invoice() { var scount = parseInt(document.shopcart.studentcount.value, 10); var ycount = parseInt(document.shopcart.youthcount.value, 10); var fcount = parseInt(document.shopcart.facultycount.value, 10); //html output source is 3 selects like this, with diff ids and names: //<select name="studentcount" id="studentcount"> //<option onclick="gen_invoice()" value="0">0 </option></select> var cardcost = parseInt(document.shopcart.cardprice.value, 10); //cardcost comes from hidden input value: //<input type="hidden" id="cardprice" name="cardprice" value="25"> var totalsum = scount + ycount + fcount; var grandtotal = totalsum * cardcost; document.getElementById('s_price').innerHTML = scount * cardcost; document.getElementById('y_price').innerHTML = ycount * cardcost; document.getElementById('f_price').innerHTML = fcount * cardcost; document.getElementById('grand').innerHTML = grandtotal; //.... } ...after this there are 3 long loops for writing out some other forms, but they dont work in IE either because they depend on the selected values to be an integer. this part happens first and returns Nan, so im sure the problem is here somwhere. I have literally hit my head on the table over this. You can imagine how frustrating it is to be able to write the entire rest of the site beautifully, but then fail at adding 3 numbers together. help please!

    Read the article

  • Beginner question about getting reference to cin

    - by John C
    I'm having problems wrapping my head around this. I have a function void foo(istream& input) { input = cin; } This fails (I'm assuming because cin isn't supposed to be "copyable". however, this works void foo(istream& input) { istream& baz = cin; } Is there a reason that I can get a reference to cin in baz but I cannot assign it to input? Thanks

    Read the article

  • Is there anyway to get the SHA of a commit from its message?

    - by Benjol
    When doing a git tag, I'm not always great at remembering if HEAD~6 (for example) is inclusive or exclusive. Given that most of my commits are prefixed with an issue number, I wondered if there is some magic command for searching for the commit SHA from part of its message. I know it's easy to do a git log and work from there, but I want more easy :)

    Read the article

< Previous Page | 109 110 111 112 113 114 115 116 117 118 119 120  | Next Page >