Float problem
why does
float x = (50/200);
print 0.0?
If you are used to VB, if both sides of the division in Java are integer, the result is similar to the VB's operator "\"
Your program is the VB equivalent of:
Dim x As Single
x = 50 \ 200As you can see, if you divide 50 by 200, you get 0, and remainder 50 (as you learned in school).
You must write something like:
float x = 50.0 / 200.0;to make it give the desired result.
Similar Messages
-
Hi All, 10 years since I've been on here (in the days of tables) I have, I'm sure a very basic css float problem in the footer and hopefully someone could take the time to review it for me. I have checked everything but can't find the problem. Thanks in advance;
example of problem here http://davidbrown.ipower.com/template/template.htm
<!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>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Our Jewelry Retail Secrets - Thank You</title>
<link href="../stylesheet/style.css" rel="stylesheet" type="text/css" />
<style type="text/css">
<!--
.H1_black {color: #000000}
p {
font-family: Arial, Helvetica, sans-serif;
font-size: 16px;
line-height: 25px;
font-weight: normal;
color: #000000;
body {
margin-left: 0px;
margin-top: 0px;
margin-right: 0px;
margin-bottom: 0px;
.headlinetxt_colour {color: #FF6600}
.style1 {color: #ff6600}
-->
</style>
</head>
<body>
<div id="wrapper">
<div id="wrapperfix">
<div id="toporange_bg">login</div>
</div>
<div id="wrapperfix_top_grey">
<div id="top_grey_content_wrapper">
<div id="big_logo"></div>
<div id="welcome_user">Welcome "username here"</div>
</div>
</div>
</div>
<div id="main_content">
<p>
<!--main body content goes here -->
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam vel felis velit. Proin a nisl diam, id hendrerit lectus. Nunc eget tortor arcu. Mauris fringilla felis eget mi facilisis vel auctor est lacinia. Sed sit amet dui nibh, in varius metus. Duis malesuada euismod tortor eget lacinia. Donec pretium rutrum nunc, sagittis condimentum elit aliquam in. In eu mauris dui. Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p>
<p> Nam vel felis velit. Proin a nisl diam, id hendrerit lectus. Nunc eget tortor arcu. Mauris fringilla felis eget mi facilisis vel auctor est lacinia. Sed sit amet dui nibh, in varius metus. Duis malesuada euismod tortor eget lacinia. Donec pretium rutrum nunc, sagittis condimentum elit aliquam in. In eu mauris dui. </p>
</div>
<div id="footer_container">
<div id="footer">
<div id="footer_left">Footer Left</div>
<div id="footer_centre">Footer Centre</div>
<div id="footer_right">Footer Right</div></div>
</div>
</body>
</html>
#footer_container {
background-color: #333333;
width: 100%;
top: 0px;
margin: 0px;
padding: 0px;
#footer {
background-color: #666666;
min-width: 1000px;
margin-right: auto;
margin-left: auto;
padding: 0px;
width: 1000px;
height: 150px;
overflow: hidden;
clear: both;
margin-top: 0px;
margin-bottom: 0px;
position: relative;
#footer_left {
float: left;
width: 33%;
margin: 0px;
padding: 0px;
height: 150px;
#footer_centre {
width: 33%;
height: 150px;
margin: 0px;
padding: 0px;
float: left;
#footer_right {
float: left;
width: 33%;
height: 150px;
margin: 0px;
padding: 0px;I still don't see the #footer_left rule in the CSS in the online example at
http://davidbrown.ipower.com/template/template.htm -
Can someone help me with a drop float problem I am having in
the old version of internet explorer? Please see this website:
http://003a17b.netsolhost.com/kwdwebsite/index.html
The green navigation bar should be lined up with the green
bar in the logo (at the top). IE 6.0 is dropping it down lower. Can
anyone help resolve this issue? Thanks![email protected] posted in macromedia.dreamweaver
> Can someone help me with a drop float problem I am
having in the
> old version of internet explorer? Please see this
website:
>
http://003a17b.netsolhost.com/kwdwebsite/index.html
> The green navigation bar should be lined up with the
green bar in
> the logo (at
> the top). IE 6.0 is dropping it down lower. Can anyone
help
> resolve this issue? Thanks!
(My IE6 box finally went to pasture, so I'll look into
installing
multiple IEs on one of my boxes this week)
I would concentrate on creating valid code before trying to
deal with
cross-browser compatibility. You'll often find that that is
all it
takes.
Enter your URL here:
http://validator.w3.org
For instance, you have several redundant, illegal instances
of
<link href="css/KWD.css" rel="stylesheet"
type="text/css">
inside the body element.
It looks as if that might be part of a library item? If so,
take it
out.
Reply back if that doesn't do it for you.
Sidenote:
Your excessive use of META keywords may be considered Meta
tag stuffing
or spamdexing and may not be as useful as you hope. Likewise
for the
double META Description where the second seems excessive. No
links to
back it up at the moment, but you might want to look into it.
Mark A. Boyd
Keep-On-Learnin' :) -
Float problems in Dreamweaver CS3
I am having problems creating a 2-column layout to display my main page content alongside a sidebar containing a simple payment signup form.
I have set up DIVs for each... no problem. I have applied a left float property to the sidebar, but I can't get the main content to appear to the right of the sidebar - it's still beginning where the sidebar ends.
Is there something fundamental I am doing wrong?The live link is http://www.sharpeacademy.co.uk/summerschoolnew.html
Code for the page is as follows:
<!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>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Sharpe Academy - Summer School 2009 - Singing, Acting, Dance, Fitness, Stage Combat</title>
<link href="css/oneColFixCtrHdr.css" rel="stylesheet" type="text/css" />
<script src="SpryAssets/SpryMenuBar.js" type="text/javascript"></script>
<link href="SpryAssets/SpryMenuBarHorizontal.css" rel="stylesheet" type="text/css" />
<link href="SpryAssets/SpryMenuBarVertical.css" rel="stylesheet" type="text/css" />
</head>
<body class="oneColFixCtrHdr">
<div id="containerSummerSchool">
<div id="header"><img src="images/header.png" alt="Welcome to Sharpe Academy" width="1000" height="200" />
<ul id="MenuBar1" class="MenuBarHorizontal">
<li><a href="index.html">HOME</a> </li>
<li><a href="#" class="MenuBarItemSubmenu">ABOUT US</a>
<ul>
<li><a href="history.html">Brief History</a></li>
<li><a href="mission.html">Our Mission</a></li>
<li><a href="venue.html">Venue</a></li>
<li><a href="staff.html">Staff</a></li>
</ul>
</li>
<li><a class="MenuBarItemSubmenu" href="#">CLASSES</a>
<ul>
<li><a href="academyactors.html">Acting</a></li>
<li><a href="starlighters.html">Musical Theatre</a></li>
<li><a href="fees.html">Fees</a></li>
</ul>
</li>
<li><a href="summerschool.html">SUMMER SCHOOL</a> </li>
<li><a href="contact.html">CONTACT US</a></li>
</ul>
</div>
<p> </p>
<div id="leftSidebar">
<div id="PayPalContainer">
<form action="https://www.paypal.com/cgi-bin/webscr" method="post" name="PayPal" target="_blank" id="PayPal">
<input type="hidden" name="cmd" value="_s-xclick" />
<input type="hidden" name="hosted_button_id" value="6106695" />
<table>
<tr>
<td><input type="hidden" name="on0" value="Select which week" />
Select which week</td>
</tr>
<tr>
<td><select name="PayPalWeek" id="PayPalWeek">
<option value="13th - 17th July - Rotherham">13th - 17th July - Rotherham </option>
<option value="20th - 24th July - Rotherham">20th - 24th July - Rotherham </option>
<option value="3rd - 7th August - Harrow">3rd - 7th August - Harrow </option>
</select>
</td>
</tr>
<tr>
<td><input type="hidden" name="on1" value="Enter your childs name" />
Enter your childs name</td>
</tr>
<tr>
<td><input type="text" name="PayPalName" maxlength="60" id="PayPalName" /></td>
</tr>
<tr>
<td><input type="hidden" name="on2" value="Enter your childs age" />
Enter your childs age</td>
</tr>
<tr>
<td><input type="text" name="PayPalAge" maxlength="60" id="PayPalAge" /></td>
</tr>
</table>
<input type="image" src="https://www.paypal.com/en_GB/i/btn/btn_paynowCC_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online." />
<img alt="PayPal payment form" border="0" src="https://www.paypal.com/en_GB/i/scr/pixel.gif" width="1" height="1" />
</form>
</div>
</div>
<div id="summerSchoolContent">
<div class="oneColFixCtrHdr" id="textHeader">
<p><img src="images/summerSchoolType.png" alt="Welcome to Sharpe Academy" width="538" height="40" /> </p>
</div>
<h5>When is Summer School?</h5>
<p> Monday 13th – Friday 17th July – 9am-4pm - Rotherham, South Yorkshire</p>
<p> Monday 20th – Friday 24th July – 9am-4pm - Rotherham, South Yorkshire</p>
<p> Monday 3rd – Friday 7th August – 9am-4pm - Harrow, Greater London</p>
<h5> Who can attend?</h5>
<p> Anyone aged 6 to 16 who lives in the local area can attend summer school. We are always keen to see new faces. You don’t need any experience in any of the subjects as we will teach from the very beginning.</p>
<h5>Can my child come to more than one week of Summer School?</h5>
<p> Children in Rotherham may come to one or both Rotherham weeks as we will be teaching different materials both weeks. We are only doing one week in Harrow this year.</p>
<h5>Who will be teaching at Summer School 2009?</h5>
<p> Our teachers come from a variety of backgrounds. Their pictures and names can be seen on the left hand side. We have West-End performers who will be joining us to do workshops in shows including The Lion King, Chitty Chitty Bang Bang, Cats, Fiddler on the Roof, We Will Rock You and Les Miserables. We are also welcoming teachers from some of the most prestigious performing arts colleges in London including Mountview, Guildford School of Acting and Sylvia Young Stage School.</p>
<h5>Are Teachers CRB Checked?</h5>
<p> Yes, all teachers who teach at Sharpe Academy are CRB police checked. We also have a first aid trained member of staff on site at all times.</p>
<h5>How do I book? </h5>
<p> We have several ways for you to book. You can pay online by debit or credit card by clicking the PAY NOW button above which takes you through to a secure checkout through Paypal. Once payment has been received we will post you out a full registration pack to be completed. Alternatively you may wish to pay by cheque. Please download our booking form leaflet and send this along with your summer school fee to the address on the leaflet.</p>
<h5>What subjects will children learn?</h5>
<p> FITNESS SINGING MUSICAL THEATRE ACTING for the Stage </p>
<p> ACTING for Television & Film MIME JAZZ TAP BALLET </p>
<p> STAGE COMBAT AUDITION TECHNIQUE END OF WEEK SHOWCASE FOR PARENTS</p>
<h5> Where is the Rotherham Summer School being held?</h5>
<p>Rudston Prep School, 59/63 Broom Road, Rotherham, South Yorkshire S60 2SW </p>
<h5>Where is the Harrow Summer School being held?</h5>
<p>Harrow High School, Gayton Road, Harrow, Greater London HA1 2JG.</p>
<h5>How much is Summer School?</h5>
<p> Online booking: £105.00 per child for the full week – Includes a Summer School t-shirt</p>
<p> Standard booking: £120.00 per child for the full week.</p>
<h5> What do the children need to wear?</h5>
<p> Comfortable clothing must be worn (no jeans). Footwear should be trainers, dance shoes or indoor pumps.</p>
<p> Summer School T-shirts will be on sale for £10.00, or FREE if you book online.</p>
<h5> What are the T-shirt Sizes?</h5>
<div class="tshirtSizes">
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<th scope="row">Order Size:</th>
<td>5–6</td>
<td>7–8</td>
<td>9–11</td>
<td>12–13</td>
<td>14–15</td>
<td>Adult S</td>
<td>Adult M</td>
<td>Adult L</td>
</tr>
<tr>
<th scope="row">Height <span class="plainType">(cm)</span>:</th>
<td>116</td>
<td>128</td>
<td>140</td>
<td>152</td>
<td>164</td>
<td>–</td>
<td>–</td>
<td>–</td>
</tr>
<tr>
<th scope="row">Chest <span class="plainType">(inches)</span>:</th>
<td>26/28</td>
<td>30</td>
<td>32</td>
<td>34</td>
<td>36</td>
<td>35/37</td>
<td>38/40</td>
<td>41/43</td>
</tr>
</table>
</div>
</div>
<div class="push"></div>
<!-- end #container --></div>
<div id="footer">
<div class="oneColFixCtrHdr" id="copyright">
<p>
<!-- end #footer -->
© Copyright Sharpe Academy 2009. All rights reserved. Daniel Sharpe trading as Sharpe Academy.</p>
</div>
<div class="oneColFixCtrHdr" id="links">
<p>| <a href="summerschool.html">Home</a> | <a href="starlighters.html">Musical Theatre</a> | <a href="academyactors.html">Acting for Stage & Screen</a><a href="http://www.shapeacademy.co.uk/" target="_blank"></a> | <a href="contact.html">Contact Us</a> |</p>
</div>
</div>
<!-- Start of StatCounter Code -->
<script type="text/javascript">
var sc_project=4366318;
var sc_invisible=1;
var sc_partition=55;
var sc_click_stat=1;
var sc_security="12b1dd37";
</script>
<script type="text/javascript"
src="http://www.statcounter.com/counter/counter.js"></script><noscript><div
class="statcounter"><a title="web analytics"
href="http://www.statcounter.com/" target="_blank"><img
class="statcounter"
src="http://c.statcounter.com/4366318/0/12b1dd37/1/"
alt="web analytics" ></a></div></noscript>
<!-- End of StatCounter Code -->
<script type="text/javascript">
<!--
var MenuBar1 = new Spry.Widget.MenuBar("MenuBar1", {imgDown:"SpryAssets/SpryMenuBarDownHover.gif", imgRight:"SpryAssets/SpryMenuBarRightHover.gif"});
//-->
</script>
<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
try {
var pageTracker = _gat._getTracker("UA-9304732-1");
pageTracker._trackPageview();
} catch(err) {}</script>
</body>
</html> -
I'm just becoming comfortable with using CSS. At least, I
thought I was. I put together a test page and it worked on IE 7.
Then, I downloaded Firefox and Safari to check compatability on
other browsers.
I have a centered page with a top navigation bar, content
area, and a footer (bottomNavBar). Inside the content area I have
two sections, a left section and a right section. In the left there
should be text, some sort of welcome text. In the right some sort
of Flash intro video the user can play when they choose.
The problem: I got the float to work in IE 7 (Sometimes it
wouldn't. It seems tempermental.). However, the floats won't work
on the other 2 browsers. In the other 2 it puts the first div
listed above the second instead of side by side like in IE 7.
Here is the code:To make your contentIndexFlashIntro & contentIndexWelcome
divs sit
side-by-side you have to assign each a width. The combined
total of those
widths must be <=800px.
Walt
"JasonTheAdobeFan" <[email protected]> wrote
in message
news:[email protected]...
> I'm just becoming comfortable with using CSS. At least,
I thought I was. I
> put
> together a test page and it worked on IE 7. Then, I
downloaded Firefox and
> Safari to check compatability on other browsers.
>
> I have a centered page with a top navigation bar,
content area, and a
> footer
> (bottomNavBar). Inside the content area I have two
sections, a left
> section and
> a right section. In the left there should be text, some
sort of welcome
> text.
> In the right some sort of Flash intro video the user can
play when they
> choose.
>
> The problem: I got the float to work in IE 7 (Sometimes
it wouldn't. It
> seems
> tempermental.). However, the floats won't work on the
other 2 browsers. In
> the
> other 2 it puts the first div listed above the second
instead of side by
> side
> like in IE 7.
>
> Here is the code:
>
>
> ***First is the HTML***
>
> <body>
> <div class="header">
> <img src="Logo001.png" />
> </div>
> <div class="container">
> <div class="topNavBar">
> <ul class="topNavBarUL">
> <li class="topNavBarLI"><a
class="topNavBarLinksCurrent"
> href="index.htm">Home</a></li>
> <li class="topNavBarLI"><a
class="topNavBarLinks"
> href="page2.htm">Link2</a></li>
> <li class="topNavBarLI"><a
class="topNavBarLinks"
> href="page3.htm">Link3</a></li>
> <li class="topNavBarLI"><a
class="topNavBarLinks"
> href="page4.htm">Link4</a></li>
> </ul>
> </div>
> <div class="content">
> <div class="contentIndexFlashIntro">
> <script type="text/javascript">
> AC_FL_RunContent(
> 'codebase','
http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#
>
version=9,0,28,0','width','350','height','350','title','IntroVideo','src','Intro
> Video002','quality','high','pluginspage','
http://www.adobe.com/shockwave/downloa
>
d/download.cgi?P1_Prod_Version=ShockwaveFlash','movie','IntroVideo002'
> //end
> AC code
> </script><noscript><object
> classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
> codebase="
http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#ve
> rsion=9,0,28,0" width="350" height="350"
title="IntroVideo">
> <param name="movie" value="IntroVideo002.swf" />
> <param name="quality" value="high" />
> <embed src="IntroVideo002.swf" quality="high"
> pluginspage="
http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Versio
> n=ShockwaveFlash" type="application/x-shockwave-flash"
width="350"
> height="350"></embed>
> </object></noscript>
> </div>
> <div class="contentIndexWelcome">
>
<!--<center><h2>Welcome</h2></center>
> <hr/>-->
> <p class="smallText">Paragraph 1</p>
> <p class="smallText">Paragraph 2</p>
> <hr/>
> <ul><u class="smallText">Unordered
List</u>
> <li><span class="smallText">Item
1</span></li>
> <li><span class="smallText">Item
2</span></li>
> <li><span class="smallText">Item
3</span></li>
> <li><span class="smallText">Item
4</span></li>
> <li><span class="smallText">Item
5</span></li>
> <li><span class="smallText">Item
6</span></li>
> </ul>
> <hr/>
> <p class="smallText">Concluding
Paragraph</p><br />
> </div>
> </div>
> <div class="bottomNavBar">
> <p>© Copyright 2008</p>
> </div>
> </div>
> </body>
>
> *********************************
> ***Next is the external CSS.***
>
> body {
> font-family: Arial, Helvetica, sans-serif;
> background-color: #999999;
> margin: 0px;
> }
>
> .header {
> background-color: #FFFFFF;
> width: 100%;
> margin: 0px;
> padding: 0px 0px 0px 0px;
> top: 0px;
> }
>
> .container {
> background-color: #FFFFFF;
> width: 800px;
> margin-left: auto;
> margin-right: auto;
> margin-bottom: 0px;
> margin-top: 0px;
> }
>
> /* top navigation bar class
> ** I prefer to have a nav bar to the top rather than the
left
> */
> .topNavBar {
> width: 800px;
> height: 22px;
> background-color: #0080EE;
> border: 0px solid #FFFFFF; /* I turned off the pixel
width because I
> didn't
> ** want a border right now. But I left the rest in case
> ** I wanted to change it back to 1px.
> */
> }
>
> /* topNavBar link properties
> ** The idea is to have each link highlight when cursor
comes over any part
> ** of the section, not just the words. Then goes back to
normal when
> cursor
> ** leaves. The current page should have its own link
highlighted always.
> */
> ul.topNavBarUL {
> height: 17px;
> float: left;
> width: 100%;
> padding: 0;
> margin: 0;
> list-style-type: none;
> }
>
> li.topNavBarLI {
> display: inline;
> }
>
> a.topNavBarLinks:link, a.topNavBarLinks:active,
a.topNavBarLinks:visited {
> float: left;
> text-decoration: none;
> color: #FFFFFF;
> background-color: #0080EE;
> padding: 0.15em 0.6em;
> border-right: 1px solid #FFFFFF;
> }
>
> a.topNavBarLinks:hover {
> color: #FFFFFF;
> background-color: #FF9900;
> text-decoration: none;
> }
>
> a.topNavBarLinksCurrent, a.topNavBarLinksCurrent:active,
> a.topNavBarLinksCurrent:visited,
a.topNavBarLinksCurrent:hover {
> float: left;
> text-decoration: none;
> color: #FFFFFF;
> background-color: #00FF33;
> padding: 0.15em 0.6em;
> border-right: 1px solid #FFFFFF;
> }
>
> /* content class
> ** This is the part of the page that the content will go
in.
> ** It should have the full width of the container class
and
> ** stretch in height based on the content with a minimum
> ** height of 500px.
> */
> .content {
> width: 800px;
> min-height: 400px;
> background-color: #FFFFFF;
> font-family: Arial, Helvetica, sans-serif;
> color: #000000;
> }
>
> /* content links
> ** The links in the content area will just be the
regular links.
> ** Navigation links will all be given special classes to
define them.
> */
> a:link, a:active, a:visited {
> color: #0080EE;
> text-decoration: none;
> }
>
> a:hover {
> color: #FF9900;
> text-decoration: underline;
> }
>
> /* content headings, hr
> */
> h1, h2, h3, h4, h5, h6 {
> font-family: Arial, Helvetica, sans-serif;
> color: #00FF33;
> margin-bottom: 2px;
> }
>
> hr {
> color: #0080EE;
> }
>
> p {
> text-indent: 20px;
> margin-top: 4px;
> }
>
> ul {
> margin-top: 4px;
> }
>
> li {
> list-style: square;
> color: #00FF33;
> }
>
> .contentIndexFlashIntro {
> padding-top: 2px;
> padding-right: 2px;
> float: right;
> }
>
> .contentIndexWelcome {
> float: left;
> text-align: justify;
> padding-top: 4px;
> padding-right: 10px;
> padding-bottom: 4px;
> padding-left: 4px;
> }
> -
ColdFusion Verity Search Float Problem
I have a database full of products. One of the fields for each product in the database is a minimum price. I'm trying to create a search that says something like "find all products with a minimum price between X and Y." However, when it returns results, it includes numbers that are out of the range. For instance, if I say between 2 and 3 dollars, it will return the correct results but will include numbers like 25.00 and 245.00, and when I do something like "between 4 and 5 dollars" it returns the correct results with additional numbers like "40.00" and "434.00." So it seems to me that ColdFusion can't process the floating number correctly...It sees a number like "40.00" and assumes its in the range between 4 and 5. Here is my code for the indexing:
<cfquery name="v_qryProductInfo" datasource="#application.DSN#">
SELECT DISTINCT SP.pk_storeProductID,
P.productName,
C.categoryName,
P.prodTimeMin,
P.prodTimeMax,
PD.miniDesc,
PD.keywords,
CONVERT(float, (dbo.getMinPrice(pk_storeProductID))) AS minPrice
FROM tblProduct P
INNER JOIN tblProductDescription PD ON P.pk_productID = PD.fk_productID
INNER JOIN tblStoreProduct SP ON P.pk_productID = SP.fk_productID
INNER JOIN tblProductSubCategory PSC ON SP.pk_storeProductID = PSC.fk_productID
INNER JOIN tblSubCategory SC ON SC.pk_subCategoryID = PSC.fk_subCategoryID
INNER JOIN tblCategory C ON C.pk_categoryID = SC.fk_categoryID
WHERE (SP.blnStoreActive = 1)
AND (SP.fk_storeID = #application.storeID#)
</cfquery>
<cfdump var="#v_qryProductInfo#">
<h1>Indexing data...</h1>
<cfindex
action="refresh"
collection="#application.vcCollection#"
key="pk_storeProductID"
type="custom"
title="productName"
query="v_qryProductInfo"
body="miniDesc, keywords, pk_storeProductID, minPrice"
Custom1="minPrice"
Custom2="prodTimeMin"
Custom3="prodTimeMax"
Custom4="categoryName"
>
My cfsearch tag criteria looks like this:
<cfsearch
criteria="CF_CUSTOM1 >= #priceRangeMin# <AND> CF_CUSTOM1 <= #priceRangeMax#"
name="qryFoundProducts"
collection="#application.vcCollection#">
I've made the Custom1 column for the indexing the "minPrice" which is calculated as a function in my database. I've even tried making sure the number that is being entered in the Custom1 index is a float by using the CONVERT function in my SQL code. Any ideas why ColdFusion can't properly relate a float? It seems like it's trying to compare a string and a float, which isn't working too well.
Any info would be greatly apprecaited.Well, firstly: don't blame Adobe for Verity... Verity is (well: was) a separate product, and I don't think Verity as a company has even existed during Adobe's tenure at the helm (to mix metaphors awkwardly) of CF.
That said, one perhaps can blame Adobe for any disconnect between Verity and CF's support thereof, if Verity does actually support numeric processing, and CF mungs that somehow. I'm not saying this is the case, but who knows?
What Adobe perhaps didn't do is ditch or deprecate Verity earlier than it did. Lucene's been around for ages, and has been solid for ages, so I don't know why they didn't revise their search engine support earlier than they did. Oh well.
Now: your issue.
First thing, this won't work:
<cfset keyList = #Val(ValueList(qryFoundProducts.key))#>
val() returns the value of a number, whereas valueList() returns... a list. So it val() works at all, the result will just be the value of the first number in the list. You also don't need the pound-signs there, but either way, it won't affect your situation.
Second, as CF is loosely typed, it doesn't matter if you pass a numeric string or an actual number to a <cfqueryparam> tag, if you've said the value is supposed to be an integer (CF_SQL_INTEGER), then CF will automatically convert it to an integer if it can. So provided the values in your query column can be expressed as integers, they will convert with no intervention on your part.
So, in that light, I'm not sure your problem is necessarily what you think it is..?
But you say there's a problem in your WHERE clause, but you don't actually say what the problem actually is. Are you getting an error? Or just no records? The wrong records?
What do you see if you dump the query out? If you take the values output by valueList() and execute the query with those values in a different DB client (like MS SQL Studio or whatever), do you get the results you expect?
What sort of data is in the Verity collection btw? Are they documents, or DB data, or a mix, or what? If there are PKs coming out of the collection, it sounds like the data came from a DB in the first place. Can you not use full-text searching in your DB, and leave Verity out of the equation?
Adam -
Hi guys,
I've got a problem with a layout I made using some floats. It works fine in all browsers except for Safari on mac where the 2 main content columns. drift all the way off center.
I uploaded a page to my server: http://quota.victorfreriks.net/ontwerptest/
Can anyone see what's wrong? I've been trying out things for hours and can't seem to find it.
Thanks in advance!OK, found the problem. I was using overflow:hidden in the element containing the 2 floats as an old IE workaround. Removed it and I works fine in Safari AND IE7.
-
Background color and float problems
Hello all,
I am having a problem with the background color and the left
float for a navigation sidebar (also with the background color for
the footer). The body color is set to gray, and the main page is
centered with a white background. I set up the pages using mostly
CSS, with a few tables where they seemed necessary. I set up the
navigation side bar as a div with a green background and a left
float. The footer is set up as a div with a green background. All
text is aligned left.
When I preview in Safari, everything looks as expected.
In Firefox and IE5: The background color of the navigation
sidebar has white showing up behind the type that are not links
(e.g., mailing address and subheads). The div does not float all
the way to the left edge of the page. The background color of the
footer should be green but shows up as white. I validated the code
in DW, and it reports no problems (at least, it checked out after I
made a few corrections).
I am not that concerned about the background color for the
footer -- it is either all there (in Safari) or not there at all
(in Firefox and IE). But I would like to see if I can make it show
up. For the navigation sidebar, would putting it in a table cell
make it work correctly in Firefox and IE?
Regarding the left float issue for the nav sidebar IE5: At
the top of the page, my logo banner (it's placed in a div) shifted
to the right (in IE only). When I added a left float to the banner,
the banner lines up fine with the rest of the page, but a white
margin appears along the left side of the entire page.
None of my pages are uploaded to a web host yet. This is my
first website. I am working in DW8 on a Mac.
Thanks in advance,
Kathy (Daylilybud)Mista,
Here is my home page based on the template I sent previously.
Thanks in advance!
Kathy (Daylilybud)
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "
http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="
http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html;
charset=UTF-8" />
<title>Loon Song Gardens: Home Page</title>
<link href="externalcss/informationcss.css"
rel="stylesheet" type="text/css" />
<style type="text/css">
<!--
a {
font-weight: bold;
-->
</style></head>
<body>
<div id="container">
<div id="banner"><a name="topofpage"
id="topofpage"></a><img
src="graphics/thumbnailsheader/lsgheadergraphic_760x110.jpg" alt=""
width="760" height="110" />
<div id="heading"><img
src="graphics/thumbnailsheader/hotcolorstrip760.jpg" alt=""
width="760" height="76" /></div>
<div id="navsidebar">
<p class="navsidebarnormal">Loon Song Gardens,
LLC<br />
10910 109th Ave N<br />
Champlin MN 55316<br />
763.422.0015</p>
<ul class="ulnavsidebar">
<li class="ulnavsidebarli"><a
href="../donotuse/indextest4.html">Homepage</a></li>
<li class="ulnavsidebarli"><a
href="about_loonsonggardens/aboutus.html">About
Us</a></li>
<li class="ulnavsidebarli"><a
href="about_loonsonggardens/our_daylilies/aboutourintroductions.html">Our
Introductions</a></li>
<li class="ulnavsidebarli">Seedlings</li>
<li class="ulnavsidebarli">Photo Gallery</li>
<li class="ulnavsidebarli"><a
href="pricelist2008/pricelist2008ab2.html">2008 Price
List</a></li>
<li class="ulnavsidebarli"><a
href="pricelist2008/lsgorderform2008website.pdf">Order Form
(PDF)</a></li>
<li class="ulnavsidebarli"><a
href="about_loonsonggardens/shippingandterms.html">Shipping and
Terms</a></li>
<li class="ulnavsidebarli"><a
href="about_loonsonggardens/visitus.html">Visit
Us</a></li>
<li class="ulnavsidebarli"><a
href="mailto:[email protected]">Email Us
</a></li>
</ul>
<p> <span class="navsubheadbold">ABOUT
DAYLILIES</span> </p>
<ul class="ulnavsidebar">
<li class="ulnavsidebarli"><a
href="about_daylilies/howtoplant.html"
class="ulnavsidebarli">How to Plant</a></li>
<li class="ulnavsidebarli"><a
href="about_daylilies/growingtips.html"
class="ulnavsidebarli">Growing Tips</a></li>
<li class="ulnavsidebarli"><a
href="about_daylilies/howtodivideadaylily.html"
class="ulnavsidebarli">How to Divide</a></li>
<li class="ulnavsidebarli"><a
href="about_daylilies/moreaboutdaylilies.html"
class="ulnavsidebarli">More About Daylilies</a></li>
</ul>
<p> <span class="navsubheadbold">OTHER
LINKS</span> </p>
<ul class="ulnavsidebar">
<li class="ulnavsidebarli"><a href="
http://www.daylilies.org"
class="ulnavsidebarli">American Hemerocallis <br />
Society (AHS)</a></li>
<li class="ulnavsidebarli"><a href="
http://www.daylilies.org/ENews.html"
class="ulnavsidebarli">AHS Daylily E-News <br />
(FREE SUBSCRIPTION) </a></li>
</ul>
</div>
<div id ="content">
<h1>Welcome to Loon Song Gardens! </h1>
<ul>
<li class="contentli">We specialize in northern-hardy
daylilies (<em>Hemerocallis</em>).</li>
<li class="contentli">Our daylilies are field
grown.</li>
<li class="contentli">We offer competitive
prices.</li>
<li class="contentli">Loon Song Gardens, LLC, is a
licensed and inspected nursery.</li>
<li class="contentli">We are an American Hemerocallis
Society Display Garden. </li>
<li class="contentli">Visitors are welcome by
appointment.</li>
</ul>
<p>Loon Song Gardens is a specialty daylily nursery
and the home of Mike and Kathy Lamb in Champlin, Minnesota, USDA
hardiness zone 4. We grow over 1,000 named daylily cultivars in a
wide range of colors, sizes, and forms, from classics to cutting
edge. If you are looking for northern-hardy daylilies, check with
us! We will gladly share our growing experiences with you so you
may have the best possible success.Kathy hybridizes daylilies and
has introduced four daylily cultivars to date. For details, see
<a
href="about_daylilies/about_loonsonggardens/our_daylilies/ourintroductionsmain.html">Our
Introductions </a> and <a
href="about_daylilies/about_loonsonggardens/our_daylilies/seedlingsandfutures.html">Seedl ings.</a></p>
<h2>Are you new to the world of daylilies? </h2>
<p>Learn more about daylilies! Use the links in the
left sidebar to find answers to your questions. Check back for
updates. If you have questions, send us an email, and we will try
to help.</p>
<h2>To place your order</h2>
<p class="contentp">Use our on-line <a
href="about_daylilies/pricelist2008/pricelist2008v215ab.htm">2008
Price List </a> to make your selections. We are a small
nursery and quantities are limited, so it is best to confirm your
order via email.</p>
<p class="contentp">To place your order, print the
<a
href="about_daylilies/pricelist2008/lsgorderform2008website.pdf">Order
Form (PDF)</a>, fill it in, enclose payment by check or money
order (payable to Loon Song Gardens, LLC), and mail to:</p>
<blockquote>
<p class="contentp"> Loon Song Gardens<br />
10910 109th Ave N <br />
Champlin MN 55316</p>
</blockquote>
<p>We ship at least a double-fan size plant unless
otherwise noted in our listings, we include a bonus for orders of
at least $35, and we guarantee that our plants are true to
name.</p>
<h2>Visit Loon Song Gardens</h2>
<p>Loon Song Gardens is an official American
Hemerocallis Society (AHS) Daylily Display Garden, open by
appointment. If you will be in the Minneapolis area and would like
to stop by, please contact us to schedule a time. For details,
click on <a
href="about_daylilies/about_loonsonggardens/visitloonsonggardens.html">Visit
Us</a>. </p>
<h2>Join the American Hemerocallis Society
(AHS)</h2>
<p>The AHS website includes lots of great daylily
information, so be sure to take a look. </p>
<p>Join AHS today and take advantage of the voucher
program! New AHS members receive a voucher good for at least $25.00
toward daylilies from participating vendors (a minimum purchase may
apply). To join AHS, go directly to <a href="
http://www.daylilies.org/AHSmemb.html">AHS
Membership</a>.</p>
<p>Kathy is currently on the AHS Board of Directors as
Chair of Publicity and Media Relations. She produces <em>AHS
Daylily E-News,</em> an e-newsletter free for AHS members and
non-members alike. To subscribe, click on <a href="
http://www.daylilies.org/ENews.html">AHS
Daylily E-News</a>. </p>
</div>
<div id="topofpage"><a href="#topofpage">Top of
Page</a></div>
</div>
<div id="footer"><!-- #BeginLibraryItem
"/Library/footer1.lbi" -->
<p class="footer">© 2008 Loon Song Gardens,
LLC. All rights reserved. | Loon Song Gardens, LLC | 10910 109th
Avenue North | Champlin MN 55316<br />
<a href="mailto:[email protected]">Email
us</a>| | 763.422.0015 | Fax 763.422.0131 | This page was
last updated
<!-- #BeginDate format:Am1 -->March 30, 2008<!--
#EndDate -->
</p>
<!-- #EndLibraryItem --></div>
</div>
</body>
</html> -
Does anyone have an idea on how to stop the Spry tabbed panel
from dropping below the right menu on this page in Firefox (works
fine in IE):
http://www.ksu.edu/infotech/training/technologyWatch6.htmlHi,
I tried to find a solution for you design, but I see that are
a lot of containers there that have some properties influencing the
behavior in FF.
The right container, Container Events, forces the tabbed
panel to go down. So, here is an area where you can investigate the
behavior.
I saw that if I delete the "clear: both" property from the
Tabbed Panel widget, the problem changes because from the floats.
did you try also with other element: image, table...has the
same behavior? maybe is from the tabbed panel.
I think that you should retry to redesign the elements layout
in page.
Try to do a simple page whit this situation, maybe will find
exactly what causes this behavior.
Diana -
Please help with column float problem in IE8
Hi there,
Sorry to be so pushy - but I am desperate for help!!
Having serious problems with my site in some PC's showing Internet Explorer 8. My right column floated right is moving down the page underneath the left column..
It shows fine on IE8 on my PC - however on my clients PC (vista with IE8) it is showing up as mentioned above. Is there a fix for this.
Here is my link http://www.dooks.com/pgs/welcome.html
The css is all there! If you need anything please let me know as I need to get this sorted - I have had serious issues with this site that I have never had before with other sites and am starting to think there is a bug in my software. I redid the index page and this one page (linked above) to see what my problems are - so help with query v appreciated.
Many thanks,
KarenLawrence_Cramer wrote:
A point to keep in mind is that IE8 is still in Beta.
Not anymore.
http://www.microsoft.com/Presspass/press/2009/mar09/03-18IE8AvailablePR.mspx
"REDMOND, Wash. — March 18, 2009 — Today Microsoft Corp. announced the availability of Windows Internet Explorer 8, the new Web browser that offers..."
Mark A. Boyd
Keep-On-Learnin' :-) -
I have a FLOATING problem !
Dear Adobe Forum Users, please help!!
I am sure this is quite simple and I have even read in my BIG user manual what the solutions are supposed to be for this problem, but it just doesn't or won't work for me.
PROBLEM:
I want to have a 2 column text layout in the middle of my page using 3 DIVS, a wrapper DIV ( #contentPanel ) and within that a left and right column DIV ( #contentColumn1 and #contentColumn2 ). Depending on the amount of content that goes into the 2 column DIVS, I want the #contentPanel to expand and contract along with these, keeping the white background all the time. BUT as I have the height of the contentPanel set to auto, it doesn't move at all, but the text columns expand (SEE pic1.jpg).
If I was to set the height of the contentPanel to a pixel height I would get the desired look (SEE pic2.jpg), but then it is a fixed height for all pages which I do not want.
I have read that if I am floating 2 DIVS inside a wrapper DIV, I need to just float the wrapper DIV also, but then it is floated left or right, and I need it centred so that doesn't work.
Any help or advice VERY much appreciated in solving this seemingly simple problem.
Below is the CSS for the DIVS in question.
#contentPanel {
width:900px;
height:auto;
margin: 100px auto 50px auto;
padding:30px;
background-color:#FFF;
border-radius:20px;
box-shadow: 0 0 10px #666;
#contentColumn1 {
width:405px;
height:auto;
margin-right:40px;
float:left;
#contentColumn2 {
width:405px;
height:auto;
float:right;
If anyone needs more info just let me know.
Many thanks!Looks like a job for "clearfix". Add the following to the end of your CSS...
.clearfix:after {
clear: both;
display: block;
content: " ";
height: 0px;
visibility: hidden;
.clearfix {
display: inline-block;
* html .clearfix {
height: 1%;
.clearfix {
display: block;
Then place class="clearfix" in the div that isn't expanding right. -
Using css on form buttons to make them pretty
Hello,
I usually use the below css (bottom page) on a page for my
form buttons, it
works nicely in ff and IE, but with regards to the W3C CSS
Validator I get
the following errors.
input.btn attempt to find a semi-colon before the property
name. add it
input.btn Property progid doesn't exist : DXImageTransform
input.btn Parse Error DXImageTransform.Microsoft.Gradient
(GradientType=0,
StartColorStr='#ffffffff', EndColorStr='#ffeeddaa');
input.btn Parse Error }
If any one knows how to make this errorless I would be
grateful, it does
appear as a nice botton etc lol
any way if any one has input I am grateful
regards
k
-~-~-~-~-~-~ the page with botton is below -~-~-~-~-~-~
<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01
Transitional//EN"
http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;
charset=utf-8">
<title>Testing css form button</title>
<style type="text/css">
<!--
input.btn {
color:#050;
font-family: Tahoma, Arial, Verdana, Monaco, sans-serif;
font-size:10px;
font-weight:bold;
background-color:#fed;
cursor:pointer;
border:1px solid;
border-top-color:#B2876A;
border-left-color:#B2876A;
border-right-color:#B2876A;
border-bottom-color:#B2876A;
filter:progid:DXImageTransform.Microsoft.Gradient
(GradientType=0,
StartColorStr='#ffffffff', EndColorStr='#ffeeddaa');
-->
</style>
</head>
<body><form action="" method="post">
<p>
<input name="ahithere" type="submit" class="btn"
id="ahithere"
value="Submit">
</form>
</body>
</html>.oO(Thierry)
>"Michael Fesser" <[email protected]> wrote in message
>news:[email protected]...
>> .oO(Thierry)
>>
>>>Following Micha's advice will make your document
validate, but... this
>>>will
>>>also add a HTTP request.
>>
>> Correct, but only in IE 6. And who really cares
about that?
>>
>> Additionally many modern and sophisticaded layouts
usually need some
>> more workarounds for IE 6 than just a filter here
and an alpha loader
>> there. It makes sense to use a separate stylesheet
for them, because
>> IE-specific hacks in the main stylesheet may cause
even more problems
>> and also affect other browsers.
>
>I used to think that way [1], but I changed my mind...
>imho:
>- keeping rules together facilitate maintenance.
Sure, but some rules are only required for IE. They don't
make sense for
all other browsers and would just clutter up the real CSS,
particularly
if you have to use hacks to apply them to IE only.
>- using CCs for IE may create extra HTTP requests for
that browser only, but
>it adds extra markup for *all* browsers.
Indeed. But how much does it take on each page usually? 50
bytes? 100?
A real example from my own sites with CCs for both IE 6 (CSS
and JS) and
IE 7 (only CSS) is exactly 363 bytes - peanuts.
I also use a lot of 'link' elements for example (next page,
previous,
home, search, etc.) All users have to download them, even
though most
won't recognize them, because only very few browsers support
these meta
navigation links natively. But for those whose browsers
interpret them,
they're a useful addition. And the rest has to download 1KB
more -
doesn't matter.
>- you say who cares about IE6
Hmm, it was not properly worded ... what I meant was more
like this: I
_do_ care about IE 6 (I have to, like most of us), but I
don't really
care if it has to download one or even ten additional files.
In fact on my sites there are some more files for IE 6 only:
a CSS, a
JS, a behaviour file for fixing its PNG issue and maybe some
JPEGs as
replacements where the PNG fix doesn't work. So there are at
least 4
additional files for IE 6 only, but since they're necessary I
don't
worry about these additional HTTP requests.
>but when IE6 is gone for good, you end up
>with unecessary comments in all your documents rather
than useless CSS
>filters in a (few) styles sheets
When IE 6 is dead, it's no problem to remove this single line
from my
page templates. One little change on each site - won't take
long.
And as said, usually there's a bit more than just filters. An
example:
http://static.andreas-pauli.de/css/ie6.css
There's not even a PNG fix in this case. All these rules are
related to
IE's float problems, to give some elements "layout" or to
overcome other
little ugly glitches. Having all these in the main CSS would
make things
much more complicated and almost impossible to remove when IE
6 becomes
obsolete one day.
>- afaik, wellknown IE specific hacks as such as the
*property or _property
>hack are totally safe to use (as long as they are always
followed by a ";")
This is my main problem. No hack is totally safe. If I have
the choice
between a rather ugly, but documented behaviour and a hack, I
definitely
prefer the first one. Even though the common IE hacks are
well-tested
these days and I don't expect real side effects, there's
always a kind
of a negative connotation. I simply don't like them.
Additionally there's the problem that in my case IE 7
requires some
fixes as well, and then things would become really
complicated if you
only want to use hacks. CCs are ugly and pollute the markup a
bit, but
at least they are a reliable way to give each IE the medicine
it needs.
Personally I consider them the only useful & working
feature in IE. ;-)
>fwiw, I'm a strong advocate for markup validation
Me too.
>but I don't care when CSS
>files fail validation (actually I don't expect them to
validate).
Well, I prefer valid CSS too, but don't care too much about
warnings.
For example I usually get tons of warnings when I declare a
foreground
color without a background or the other way round. But this
is by
intention, and since I know what I'm doing (at least in most
cases), I
think I can safely ignore these warnings. But I don't like
errors. And
as said - my main problem are the hacks, which I try to
avoid.
So there's not only technical issues in these cases, but also
a lot of
personal preferences I think. For me CCs are the cleaner way
and much
easier to handle. YMMV, of course.
Micha -
Hi,
I just did a project with Adobe Premiere Elemenets 11, and I have issues with the crop effect:
- In the preview panel, the effect seems to work perfectly. The preview corresponds exactly to the settings I applied to the crop effect.
- But after I publish the video (either local file or Youtube, doesn't make a difference, the bottom crop setting is screwed up)
In Adobe preview:
After publishing:
Any clue of what could happen?stephedi2
We have just gone through this type of matter with another person. He presented floating problems in the export to YouTube. I could not confirm his results.
http://forums.adobe.com/message/5309928
I am not sure what the status of his issue is at the present time.
So let us look at your specific situation.of black borders and floats.
Are you working as NTSC or PAL. It would think PAL.
a. What is your Premiere Elements 11 project preset? Did you set it (File/New/Project) or did you let the program take control to set it. Please look to Edit Menu/Project Settings to determine what project settings are being used by the project.
b. What are the properties of your source media (video and audio compression, frame size, frame rate, interlaced or progressive, pixel aspect ratio, ). If you do not know, then please try to get a properties readout from the free program named MediaInfo.
http://mediainfo.sourceforge.net/en
I see .mov and .mts files in there. And, it looks like the crop was applied to the .mts on Video 5.
Even though you say that it does not matter what your export is (save to file on hard drive or upload to YouTube), please give the specifics settings and related details for either route that left you with the problem. That would seem critical information in the troubleshooting.
Let us start here and then decide what next.
Please indicate if I have misinterpreted any part of your issue.
Thanks.
ATR -
Float type problem helppppppppp
I have a jsp page, which retrieves values from a html page, my problem is that
i can insert the values in database, but the problem is that it does not insert the flot type values...
like 21.21, 242.52. It shows only 21,242
it does not shows in float type.
html form:
<input type="text" name="code" size="5" maxlength="5">
<input type="text" name="Description" size="65">
<input type="text" name="DrAmount" size="12" >
<input type="text" name="CrAmount" size="12" >
<SELECT name="type">
<option value="" selected></option>
<option VALUE="C">C</option>
<option VALUE="O">O</option>
<option VALUE="OI">OI</option>
<option VALUE="OR">OR</option>
<option VALUE="S">S</option>
<option VALUE="SB">SB</option>
<option VALUE="SG">SG</option></select>
<input name="pct" type="text" size="6" maxlength="5" >
jsp page:
<html>
<head>
<%@ page
import = "java.io.*"
import = "java.lang.*"
import = "java.sql.*"
%>
<title></title>
</head>
<body>
<h1></h1>
<%
String Code,Description,Dr_Amount,Cr_Amount,Pct,Type, sql1 ;
ResultSet results;
PreparedStatement sql;
try
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection conn=DriverManager.getConnection("jdbc:odbc:pf","scott","ttlscott");
try
int gl_code;
Float db_amt,cr_amt,gl_pct;
String gl_descr, gl_type;
boolean doneheading = false;
Statement s=conn.createStatement();
Code = request.getParameter("code");
Description = request.getParameter("Description");
Dr_Amount=request.getParameter("DrAmount");
Cr_Amount=request.getParameter("CrAmount");
Type = request.getParameter("type");
Pct=request.getParameter("pct");
PreparedStatement pstmt = conn.prepareStatement(
("INSERT INTO gl_mast VALUES (?, ?, ?, ?, ?,?)"));
pstmt.setInt(1,Integer.parseInt(request.getParameter("Code")));
pstmt.setString(2, request.getParameter("Description"));
pstmt.setFloat(3,Float.parseFloat(request.getParameter("Dr_Amount")));
pstmt.setFloat(4,Float.parseFloat(request.getParameter("Cr_Amount")));
pstmt.setString(5, request.getParameter("Type"));
pstmt.setFloat(6,Float.parseFloat(request.getParameter("Pct")));
pstmt.executeUpdate();
sql = conn.prepareStatement("SELECT * FROM gl_mast WHERE gl_code = '" + Code + "'");
results = sql.executeQuery();
while(results.next())
if(! doneheading)
out.println("<table border=2>");
doneheading = true;
gl_code = results.getInt("gl_code");
gl_descr = results.getString("gl_descr");
db_amt = results.getFloat("db_amt");
cr_amt = results.getFloat("cr_amt");
gl_type = results.getString("gl_type");
gl_pct = results.getFloat("gl_pct");
out.println("<BODY bgColor=blanchedalmond text=#008000 topMargin=0>");
out.println("<P align=center><FONT face=Helvetica><FONT color=fuchsia > <BIG>GL MASTER INFORMATION</BIG></FONT></P>");
out.println("<P align=center>");
out.println("<TABLE align=center border=1 cellPadding=1 cellSpacing=1 width=\"75%\">");
out.println("<TR>");
out.println("<TD>Code No.</TD>");
out.println("<TD>Description</TD>");
out.println("<TD>Dr. Amount</TD>");
out.println("<TD>Cr. Amount</TD>");
out.println("<TD>Type</TD>");
out.println("<TD>Percentage</TD></TR>");
out.println("<tr><td>" + gl_code);
out.println("<td>" + gl_descr);
out.println("<td>" + db_amt);
out.println("<td>" + cr_amt);
out.println("<td>" + gl_type);
out.println("<td>" + gl_pct);
if(doneheading)
out.println("</table>");
else
out.println("No matches for " + Code);
catch (SQLException s)
out.println("Dupliacte Entry<br>");
catch (ClassNotFoundException err)
out.println("Class loading error");
%>
</body>
</html>
error:
HTTP Status 500 -
type Exception report
message
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
org.apache.jasper.JasperException: Unable to compile class for JSP
An error occurred at line: 13 in the jsp file: /gl_master/gl_save.jsp
Generated servlet error:
D:\Program Files\Apache Software Foundation\Tomcat 5.0\work\Catalina\localhost\abhi\org\apache\jsp\gl_005fmaster\gl_005fsave_jsp.java:100: incompatible types
found : float
required: java.lang.Float
db_amt = results.getFloat("db_amt");
^
An error occurred at line: 13 in the jsp file: /gl_master/gl_save.jsp
Generated servlet error:
D:\Program Files\Apache Software Foundation\Tomcat 5.0\work\Catalina\localhost\abhi\org\apache\jsp\gl_005fmaster\gl_005fsave_jsp.java:101: incompatible types
found : float
required: java.lang.Float
cr_amt = results.getFloat("cr_amt");
^
An error occurred at line: 13 in the jsp file: /gl_master/gl_save.jsp
Generated servlet error:
D:\Program Files\Apache Software Foundation\Tomcat 5.0\work\Catalina\localhost\abhi\org\apache\jsp\gl_005fmaster\gl_005fsave_jsp.java:103: incompatible types
found : float
required: java.lang.Float
gl_pct = results.getFloat("gl_pct");
^
3 errors
org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:84)
org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:332)
org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:437)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:497)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:476)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:464)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:511)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:295)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
note The full stack trace of the root cause is available in the Apache Tomcat/5.0.30 logs.
Apache Tomcat/5.0.30Float db_amt,cr_amt,gl_pct;
found : float
required: java.lang.Float
db_amt = results.getFloat("db_amt");The messages are self-explainatory. You are having objects of type Float. and the ResultSet.getFloat() would return float.
Cheers
-P -
Problem with TLF - floating an inline image
I am running the latest version of Flash Builder 4 (4.0.1). The problem that I having:
When I use an InlineGraphicsElement if aTextFlow (in a RichEditableText component), if I set a value for the "float" attribute of an <img> element; the image is not visible. Without the float attribute, I see the image.
Is this a version problem with TLF? How do I know which version of TLF that I'm using? How do I install the correct version of TLF?
Thanks for the help.
Oz
Some code fragments:
The TextFlow string with "float":
<div color="#444444" fontFamily="Times New Roman" fontSize="20" paragraphSpaceAfter="15" textIndent="10">
<p><span color="0xff0000" >Alice, </span><span>really, was </span><span color="0xff0000" >beginning </span><span>to </span><span color="0xff00" >get very </span><span>tired of </span><span color="0xff00" >sitting </span><span>by her </span><span color="0xff00" >sister </span><span>on the </span><span color="0xff00" >bank, </span><span>and of </span><span color="0xff00" >having nothing </span><span>to do: once or twice she had peeped into the book her </span><span color="0xff00" >sister </span><span>was reading, but it had no </span><span color="0x888800" >pictures </span><span>or </span><span color="0xffff" >conversations </span><span>in it, `and what is the use of a book,' thought </span><span color="0xff0000" >Alice `</span><span>without </span><span color="0x888800" >pictures </span><span>or </span><span color="0xff00" >conversation?'</span></p>
<p>
<img float="left" width="100" source="assets/library/alice/images/White Rabbit.png" height="100"/>
<span>So she was </span><span color="0xffff" >considering </span><span>in her own mind</span><span>(</span><span>as well as she could, for the hot day made her feel </span><span color="0xff00" >very </span><span>sleepy and stupid), whether the pleasure of making a daisy-chain would be </span><span color="0x880000" >worth </span><span>the trouble of getting up and picking the daisies, when suddenly a White </span><span color="0xff00" >Rabbit </span><span>with pink eyes ran close by her.</span></p>
</div>
Without "float":
<div color="#444444" fontFamily="Times New Roman" fontSize="20" paragraphSpaceAfter="15" textIndent="10">
<p><span color="0xff0000" >Alice, </span><span>really, was </span><span color="0xff0000" >beginning </span><span>to </span><span color="0xff00" >get very </span><span>tired of </span><span color="0xff00" >sitting </span><span>by her </span><span color="0xff00" >sister </span><span>on the </span><span color="0xff00" >bank, </span><span>and of </span><span color="0xff00" >having nothing </span><span>to do: once or twice she had peeped into the book her </span><span color="0xff00" >sister </span><span>was reading, but it had no </span><span color="0x888800" >pictures </span><span>or </span><span color="0xffff" >conversations </span><span>in it, `and what is the use of a book,' thought </span><span color="0xff0000" >Alice `</span><span>without </span><span color="0x888800" >pictures </span><span>or </span><span color="0xff00" >conversation?'</span></p>
<p>
<img width="100" source="assets/library/alice/images/White Rabbit.png" height="100"/>
<span>So she was </span><span color="0xffff" >considering </span><span>in her own mind</span><span>(</span><span>as well as she could, for the hot day made her feel </span><span color="0xff00" >very </span><span>sleepy and stupid), whether the pleasure of making a daisy-chain would be </span><span color="0x880000" >worth </span><span>the trouble of getting up and picking the daisies, when suddenly a White </span><span color="0xff00" >Rabbit </span><span>with pink eyes ran close by her.</span></p>
</div>
A bit of MXML code:
<s:Group id="myGroup" width="100%" height="100%">
<s:RichEditableText id="myRichText" lineBreak="toFit">
</s:RichEditableText>
<!--- Do not set the height of the RichEditableText - since it seems to prevent the appearance of the vertical scroll bars -->
</s:Group>
And some Actionscript that adds components:
scroller = new SxScroller();
scroller.dx = dxScroller;
scroller.dy = dyScroller;
scroller.addEventListener(FlexEvent.CREATION_COMPLETE,scrollerEvent);
scroller.addEventListener(FlexEvent.UPDATE_COMPLETE,scrollerEvent);
richText = scroller.richText;
richText.editable = false; // textCharacter.enableEdit; // probably false. TODO: support true???
richText.selectable = true; // required
richText.width = dxRichText;
And finally the import of a TextFlow string:
richText.textFlow = TextFlowUtil.importFromString(textFlowString, WhiteSpaceCollapse.PRESERVE);On the TextFlow forum I found the answer:
Use Flash Builder Hero, since it support TLF 2.0 out-of-the-box. The InlineGraphics support several valuable attributes, including float="left" etc.
Beautiful.
Maybe you are looking for
-
March 2015 TechNet Guru Awards! See who's boss in SharePoint 2010! It could be YOU!
The results for March's TechNet Guru competition were posted! http://blogs.technet.com/b/wikininjas/archive/2015/04/17/the-microsoft-technet-guru-awards-march-2015.aspx Below is a summary of the medal winners for December. The last column being a few
-
I want to modify an image in flash without make again the animation. Is it possible. This is my situation: I download a template. But i want to odify, in a flash mvoie, an image.When i try to click on modify in PhotoED a message apear and it says : "
-
How do i download a pdf file from an e-mail? save to computer did not work.
How do i download a pdf file from an email? Save to computer did not work.
-
Hi, How to transform a Logical DG to a standalone (11.2.0.2) Thanks in advance
-
Dynamic invoking web service via uddi regitry server
Hi, I need to call the web service dynamically after searching from the UDDI Registry Server. pls give me some reply that how to call the web service dynamic. Thnx in Advance. [email protected]