Lets say I have a table:
"<table border=1>" +
"<tr width=100%>" +
"<th width=50% align='left'><b>Adapted Preliminary Flood Hazard Information</b>" +
"</tr>" +
"<tr width=100%>" +
"<td id='small-lines' width=20%><p>What is <span class='tooltip'>Adapted Preliminary’" + popup1 + "</span> Hazard Information?</p>" +
"<p><span class='tooltip'>What is my property's flood zone’" + popup2 + "</span> <b>" + graphic.attributes.EFF_FLD_ZN + "</b></p>" +
"<p><span class='tooltip'>What is my property's Post-Storm 1% Elevation’" + popup3 + "</span> <b>" + graphic.attributes.str_con_LPE + " - " + graphic.attributes.str_con_HPE + "</b></p>" +
"<p><span class='tooltip'>Whats my property's Post-Storm 0.2% Elevation’" + popup4 + "</span> <b>" + graphic.attributes.str_con_LPE + "</b></p>" +
"<p><span class='tooltip'>What is my property's observed storm elevation’" + popup5 + "</span> <b>" + graphic.attributes.str_con_HPE + "</b></p>" +
"<p><span class='tooltip'>Was there erosion on my property based on the event’" + popup6 + "</span> <b>Yes</b></p>" +
"<p><span class='tooltip'>Is my property within a 30 year erosion risk area’" + popup8 + "</span> <b>" + graphic.attributes.PARCELID + "</b></p>" +
"<p><span class='tooltip'>Is my property within a 60 year erosion risk area’" + popup9 + "</span> <b>" + graphic.attributes.PARCELID + "</b></p>" +
"<p><span class='tooltip'>View your property's Storm Event Elevation on our <a href='http://portal.nwfwmdfloodmaps.com/' class='tooltip'>Event Web Viewer." + popup10 + "</a></p>" +
"<p>Where can I get <a href='http://portal.nwfwmdfloodmaps.com/' class='tooltip'>GIS Data" + popup11 + "</a> for my property area’</p>" +
"<p></p>" +
"</td > " +
"</tr>" +
"</table>"
The table looks like this:
Lets say I want to control the amount of space between each <p>. Maybe I want to make them tighter together. I assume I need some CSS but I am not sure how to correctly apply it to tighten the space between the default line breaks in my <p> paragraphs. Any suggestions?
use:
p { margin:0 }
This will make them tighten
What is CSS Margin? Click here
You could use p { margin: 5px 0; } where 5px is whatever you actually want the space between paragraphs to be. (First number specifies top/bottom margins, the second specifies left/right margins.)
Related
I am trying to add equations to my code which are quite long. When I do so, R does not quite grasp where the end of the equation is and when I go to the next line filled with whitespace, it puts the cursor to the middle of the line rather than the beginning, as usually.
When I run the code, it ignores the end of the long equation, as one can tell from the console output
+ # 3.b) Initialize ODEs
+ initialstate <- c(
Error: unexpected symbol in:
"# 3.b) Initialize ODEs
initialstate"
-- so using + rather than > -- following this input:
C_PL_s_ss = (Rin_s*(CL_dis_s*T1*T2*V_IS + CL_dis_s*T1*T2*V_PE + CL_dis_s*T1*T2*V_PL + CL_dis_s*T1*T3_s*V_IS + CL_dis_s*T1*T4_s*V_IS + CL_dis_s*T2*T3_s*V_IS + CL_dis_s*T2*T4_s*V_IS + CL_dis_s*T2*T5_s*V_IS + CL_dis_s*T2*T6_s*V_IS + CL_dis_s*T1*T3_s*V_PE + CL_dis_s*T1*T4_s*V_PE + CL_dis_s*T2*T3_s*V_PE + CL_dis_s*T2*T4_s*V_PE + CL_dis_s*T2*T5_s*V_PE + CL_dis_s*T2*T6_s*V_PE + CL_dis_s*T1*T3_s*V_PL + CL_dis_s*T1*T4_s*V_PL + CL_dis_s*T2*T3_s*V_PL + CL_dis_s*T2*T4_s*V_PL + CL_dis_s*T2*T5_s*V_PL + CL_dis_s*T2*T6_s*V_PL + CL_dis_s*T1*T2*V_IS*delta_Rin_s_TI + CL_dis_s*T1*T3_s*V_IS*delta_Rin_s_TI + CL_dis_s*T1*T4_s*V_IS*delta_Rin_s_TI + CL_dis_s*T2*T3_s*V_IS*delta_Rin_s_TI + CL_dis_s*T2*T4_s*V_IS*delta_Rin_s_TI + CL_dis_s*T2*T5_s*V_IS*delta_Rin_s_TI + CL_dis_s*T2*T6_s*V_IS*delta_Rin_s_TI + CL_dis_s*CLup_s^2*V_IS*V_PE*V_VC + CL_dis_s*CLup_s^2*V_IS*V_PL*V_VC + CLup_s^2*T1*V_IS*V_PE*V_PL + CLup_s^2*T2*V_IS*V_PE*V_VC + CLup_s^2*T2*V_PE*V_PL*V_VC + CLup_s^2*T3_s*V_IS*V_PE*V_PL + CLup_s^2*T4_s*V_IS*V_PE*V_PL + CLup_s^2*T5_s*V_IS*V_PE*V_PL + CLup_s^2*T6_s*V_IS*V_PE*V_PL + CLup_s^2*T3_s*V_PE*V_PL*V_VC + CLup_s^2*T4_s*V_PE*V_PL*V_VC + CLup_s^3*V_IS*V_PE*V_PL*V_VC + CL_dis_s*CLup_s*T1*V_IS*V_PE + CL_dis_s*CLup_s*T1*V_IS*V_PL + CL_dis_s*CLup_s*T2*V_IS*V_VC + CL_dis_s*CLup_s*T2*V_PE*V_VC + CL_dis_s*CLup_s*T2*V_PL*V_VC + CL_dis_s*CLup_s*T3_s*V_IS*V_PE + CL_dis_s*CLup_s*T4_s*V_IS*V_PE + CL_dis_s*CLup_s*T5_s*V_IS*V_PE + CL_dis_s*CLup_s*T6_s*V_IS*V_PE + CL_dis_s*CLup_s*T3_s*V_IS*V_PL + CL_dis_s*CLup_s*T4_s*V_IS*V_PL + CL_dis_s*CLup_s*T5_s*V_IS*V_PL + CL_dis_s*CLup_s*T6_s*V_IS*V_PL + CL_dis_s*CLup_s*T3_s*V_PE*V_VC + CL_dis_s*CLup_s*T4_s*V_PE*V_VC + CL_dis_s*CLup_s*T3_s*V_PL*V_VC + CL_dis_s*CLup_s*T4_s*V_PL*V_VC + CLup_s*T1*T2*V_IS*V_PE + CLup_s*T1*T2*V_PE*V_PL + CLup_s*T1*T3_s*V_IS*V_PE + CLup_s*T1*T4_s*V_IS*V_PE + CLup_s*T2*T3_s*V_IS*V_PE + CLup_s*T2*T4_s*V_IS*V_PE + CLup_s*T2*T5_s*V_IS*V_PE + CLup_s*T2*T6_s*V_IS*V_PE + CLup_s*T1*T3_s*V_PE*V_PL + CLup_s*T1*T4_s*V_PE*V_PL + CLup_s*T2*T3_s*V_PE*V_PL + CLup_s*T2*T4_s*V_PE*V_PL + CLup_s*T2*T5_s*V_PE*V_PL + CLup_s*T2*T6_s*V_PE*V_PL + CL_dis_s*CLup_s*T2*V_IS*V_VC*delta_Rin_s_TI + CLup_s*T1*T2*V_IS*V_PE*delta_Rin_s_TI + CLup_s*T1*T3_s*V_IS*V_PE*delta_Rin_s_TI + CLup_s*T1*T4_s*V_IS*V_PE*delta_Rin_s_TI + CLup_s*T2*T3_s*V_IS*V_PE*delta_Rin_s_TI + CLup_s*T2*T4_s*V_IS*V_PE*delta_Rin_s_TI + CLup_s*T2*T5_s*V_IS*V_PE*delta_Rin_s_TI + CLup_s*T2*T6_s*V_IS*V_PE*delta_Rin_s_TI + CLup_s^2*T2*V_IS*V_PE*V_VC*delta_Rin_s_TI))/(CLR_s*CL_dis_s*T1*T2 + CLR_s*CL_dis_s*T1*T3_s + CLR_s*CL_dis_s*T1*T4_s + CLR_s*CL_dis_s*T2*T3_s + CLR_s*CL_dis_s*T2*T4_s + CLR_s*CL_dis_s*T2*T5_s + CLR_s*CL_dis_s*T2*T6_s + CLR_s*CL_dis_s*CLup_s^2*V_IS*V_VC + CL_dis_s*CLup_s^2*Q*V_IS*V_VC + CLR_s*CLup_s^2*T1*V_IS*V_PE + CLR_s*CLup_s^2*T2*V_PE*V_VC + CL_dis_s*CLup_s^2*T1*V_IS*V_PE + CL_dis_s*CLup_s^2*T1*V_IS*V_PL + CL_dis_s*CLup_s^2*T2*V_PE*V_VC + CL_dis_s*CLup_s^2*T2*V_PL*V_VC + CLR_s*CLup_s^2*T3_s*V_IS*V_PE + CLR_s*CLup_s^2*T4_s*V_IS*V_PE + CLR_s*CLup_s^2*T5_s*V_IS*V_PE + CLR_s*CLup_s^2*T6_s*V_IS*V_PE + CLR_s*CLup_s^2*T3_s*V_PE*V_VC + CLR_s*CLup_s^2*T4_s*V_PE*V_VC + CL_dis_s*CLup_s^2*T3_s*V_IS*V_PE + CL_dis_s*CLup_s^2*T4_s*V_IS*V_PE + CL_dis_s*CLup_s^2*T5_s*V_IS*V_PE + CL_dis_s*CLup_s^2*T6_s*V_IS*V_PE + CL_dis_s*CLup_s^2*T3_s*V_IS*V_PL + CL_dis_s*CLup_s^2*T4_s*V_IS*V_PL + CL_dis_s*CLup_s^2*T5_s*V_IS*V_PL + CL_dis_s*CLup_s^2*T6_s*V_IS*V_PL + CL_dis_s*CLup_s^2*T3_s*V_PE*V_VC + CL_dis_s*CLup_s^2*T4_s*V_PE*V_VC + CL_dis_s*CLup_s^2*T3_s*V_PL*V_VC + CL_dis_s*CLup_s^2*T4_s*V_PL*V_VC + CLR_s*CLup_s^3*V_IS*V_PE*V_VC + CL_dis_s*CLup_s^3*V_IS*V_PE*V_VC + CL_dis_s*CLup_s^3*V_IS*V_PL*V_VC + CLup_s^2*Q*T2*V_PE*V_VC + CLup_s^2*Q*T3_s*V_IS*V_PE + CLup_s^2*Q*T4_s*V_IS*V_PE + CLup_s^2*Q*T5_s*V_IS*V_PE + CLup_s^2*Q*T6_s*V_IS*V_PE + CLup_s^2*Q*T3_s*V_PE*V_VC + CLup_s^2*Q*T4_s*V_PE*V_VC + CLup_s^3*Q*V_IS*V_PE*V_VC + CLup_s^2*T1*T2*V_PE*V_PL + CLup_s^2*T1*T3_s*V_PE*V_PL + CLup_s^2*T1*T4_s*V_PE*V_PL + CLup_s^2*T2*T3_s*V_PE*V_PL + CLup_s^2*T2*T4_s*V_PE*V_PL + CLup_s^2*T2*T5_s*V_PE*V_PL + CLup_s^2*T2*T6_s*V_PE*V_PL + CLup_s^3*T1*V_IS*V_PE*V_PL + CLup_s^3*T2*V_PE*V_PL*V_VC + CLup_s^3*T3_s*V_IS*V_PE*V_PL + CLup_s^3*T4_s*V_IS*V_PE*V_PL + CLup_s^3*T5_s*V_IS*V_PE*V_PL + CLup_s^3*T6_s*V_IS*V_PE*V_PL + CLup_s^3*T3_s*V_PE*V_PL*V_VC + CLup_s^3*T4_s*V_PE*V_PL*V_VC + CLup_s^4*V_IS*V_PE*V_PL*V_VC + CLR_s*CL_dis_s*CLup_s*T1*V_IS + CLR_s*CL_dis_s*CLup_s*T2*V_VC + CLR_s*CL_dis_s*CLup_s*T3_s*V_IS + CLR_s*CL_dis_s*CLup_s*T4_s*V_IS + CLR_s*CL_dis_s*CLup_s*T5_s*V_IS + CLR_s*CL_dis_s*CLup_s*T6_s*V_IS + CLR_s*CL_dis_s*CLup_s*T3_s*V_VC + CLR_s*CL_dis_s*CLup_s*T4_s*V_VC + CL_dis_s*CLup_s*Q*T2*V_VC + CL_dis_s*CLup_s*Q*T3_s*V_IS + CL_dis_s*CLup_s*Q*T4_s*V_IS + CL_dis_s*CLup_s*Q*T5_s*V_IS + CL_dis_s*CLup_s*Q*T6_s*V_IS + CL_dis_s*CLup_s*Q*T3_s*V_VC + CL_dis_s*CLup_s*Q*T4_s*V_VC + CLR_s*CLup_s*T1*T2*V_PE + CL_dis_s*CLup_s*T1*T2*V_PE + CL_dis_s*CLup_s*T1*T2*V_PL + CLR_s*CLup_s*T1*T3_s*V_PE + CLR_s*CLup_s*T1*T4_s*V_PE + CLR_s*CLup_s*T2*T3_s*V_PE + CLR_s*CLup_s*T2*T4_s*V_PE + CLR_s*CLup_s*T2*T5_s*V_PE + CLR_s*CLup_s*T2*T6_s*V_PE + CL_dis_s*CLup_s*T1*T3_s*V_PE + CL_dis_s*CLup_s*T1*T4_s*V_PE + CL_dis_s*CLup_s*T2*T3_s*V_PE + CL_dis_s*CLup_s*T2*T4_s*V_PE + CL_dis_s*CLup_s*T2*T5_s*V_PE + CL_dis_s*CLup_s*T2*T6_s*V_PE + CL_dis_s*CLup_s*T1*T3_s*V_PL + CL_dis_s*CLup_s*T1*T4_s*V_PL + CL_dis_s*CLup_s*T2*T3_s*V_PL + CL_dis_s*CLup_s*T2*T4_s*V_PL + CL_dis_s*CLup_s*T2*T5_s*V_PL + CL_dis_s*CLup_s*T2*T6_s*V_PL)
# 3.b) Initialize ODEs
initialstate <- c(*[...some other cade that work unless you add the long equation above...])*
Bizarrely, if I write more than one of these longer equations, it recognises the end of exactly every second one, i.e. it pairs two, which leads to the issue. For the ones that it does not pair, it also has the > rather than + in the respective place in the console. I could get it to work fine for 5 short equations.
As I am exporting the equations from Matlab (as I need to use the symbolics toolbox to find the solution), I checked whether any of
cutting whitespaces out online, incl. equation by equation, so line by line
pasting the many equations into Word to see whether there is a difference in the tabs/new lines etc. between the equations for which the pasting interrupts between equations appropriately versus not (no both are the same)
past into text editor before moving to R, incl. equation by equation, so line by line
using my local version of R studio rather than the R studio workbench I was using previously
would help but they did not.
I have tried for a long time now and would be super grateful for any insight!
R is built with a maximum line length of 4096 characters as shown in this thread. Lines that are longer than that will need to be broken.
TrainAttempt$PriceGuess <- with(TrainAttempt,
0+(LotFrontage*1)+(LotArea*1)+
(MasVnrArea*1)+(BsmtFinSF1*1)+
(BsmtFinSF2*1)+
(BsmtUnfSF*1)+
(TotalBsmtSF*1)+
(GrLivArea*1) +
(BsmtFullBath*1) +
(BsmtHalfBath*1) +
(FullBath*1) +
(HalfBath+0) +
(BedroomAbvGr*1) +
(KitchenAbvGr*1) +
(TotRmsAbvGrd*1) +
(Fireplaces*1) +
(OpenPorchSF*1) +
(GarageArea*1) +
(WoodDeckSF*1) +
(OpenPorchSF+0) +
(EnclosedPorch*1) +
(ScreenPorch*1) +
(PoolArea*1) +
(MiscVal*1))
Following is my code.I have used class in my website.But i am getting error as "Incorrect syntax near ',' ".....can anyone tell me what is wrong in the code..
protected void btnadd_Click(object sender, EventArgs e)
{
s1 = "Update tckt_tbl Set class='" + ddlclass.Text + "',dist=" + lbldist.Text + ",no_of_adults=" + ddladults.Text + ",no_of_senior=" + ddlsenior.Text + ",n1='" + txtn1.Text + "',";
s1 += "n2='" + txtn2.Text + "',n3='" + txtn3.Text + "',n4='" + txtn4.Text + "',n5='" + txtn5.Text + "',n6='" + txtn6.Text + "',";
s1 += "ag1=" + txtag1.Text + ",ag2=" + txtag2.Text + ",ag3=" + txtag3.Text + ",ag4=" + txtag4.Text + ",ag5=" + txtag5.Text + ",ag6=" + txtag6.Text + ",";
s1 += "gen1='" + txtgen1.Text + "',gen2='" + txtgen2.Text + "',gen3='" + txtgen3.Text + "',gen4='" + txtgen4.Text + "',gen5='" + txtgen5.Text + "',gen6='" + txtgen6.Text + "',";
s1 += "cn1='" + txtchn1.Text + "',cn2='" + txtchn2.Text + "',cag1=" + txtcag1.Text + ",cag2=" + txtcag2.Text + ",cgen1='" + txtcgen1.Text + "',cgen2='" + txtcgen2.Text + "' Where userid=" + Session["suser"].ToString() + "";
con.ExecQuery(s1);
Response.Redirect("tcktbook_itckt.aspx");
}
First off, it is a really bad idea to build a query from user input. I suggest you use a parameterized query instead.
Try outputting s1 to see what the query looks like.
Chances are good that you have an unbalanced quote.
On third line there is problem.
s1 += "ag1=" + txtag1.Text + ",ag2=" + txtag2.Text + ",ag3=" + txtag3.Text + ",ag4=" + txtag4.Text + ",ag5=" + txtag5.Text + ",ag6=" + txtag6.Text + ",";
I think here commas and semicoluns are not given properly.
I suggest you use Parameter Query, rather than concatenate everything. But before that, are you sure that you already give all value? Because if you didn't give any value for numeric field, it should show an error, since the query become:
..cag1=,cag2..
if ($("#ddlRateCode").next().val() != "MYKL GROSS") {
$("#compRecord tbody").remove();
$("#compRecord tbody").append("<tr class='compensationRecords'>" +
"<td class='tdCompRateCode table_td'>" + $("#ddlRateCode").next().val() + "</td>" +
"<td class='tdCompRate table_td'>" + $("#txtCompRate").val() + "</td>" +
"<td class='tdCompPercent table_td'>" + $("#txtCompPercent").val() + "</td>" +
"<input type='hidden' value='" + $("#ddlRateCode").val() + "' class='tdRateCodeId' />" +
"<td class='table_td'><button class='edit'>Edit</button>" +
"<button class='btnDelete'>Delete</button></td>" +
"</tr>");
}
$("#compRecord").append("<tbody><tr>...</tr></tbody>");
If that is not what you are looking for, you'll need to describe your problem better. Just the question in the head and some random code without explanation isn't a good question.
I am opening a popup window from javascript using window.open. I want to open this popup window at right corner of the page (height="700px" width="400px"). How can i achieve this
You can call the following method as:
popUpAtMyWish("yourpage","windownamehere",500,600);
function popUpAtMyWish( pageToLoad, winName, width, height)
{
xposition=0; yposition=0;
if ((parseInt(navigator.appVersion) >= 4 )){
xposition = (screen.width - width);
yposition = (screen.height - height);
}
var args = "";
args += "width=" + width + "," + "height=" + height + ","
+ "location=0,"
+ "menubar=0,"
+ "resizable=0,"
+ "scrollbars=0,"
+ "statusbar=false,dependent,alwaysraised,"
+ "status=false,"
+ "titlebar=no,"
+ "toolbar=0,"
+ "hotkeys=0,"
+ "screenx=" + xposition + "," //NN Only
+ "screeny=" + yposition + "," //NN Only
+ "left=" + xposition + "," //IE Only
+ "top=" + yposition; //IE Only
var dmcaWin = window.open(pageToLoad,winName,args );
dmcaWin.focus();
}