I cannot exactly figure out how the scroll position is measured.
I have a container with a specific height (400) and some elements (30) in it with specific heights (18). The container displays about 7.2 items in it. The maximum scroll position in firefox is 142. In chrome 141.
If the container can display an exact number of items then the calculation is simple: number-of-items * item-height - container-height.
But how is it calculated if the container displays 7.2 items?
And worse, if the container has padding top and bottom?
I am exploring the best web framework to write a community service like portal. The portal includes components such as Calendar, Membership, Committees,...etc. There are many web frameworks (ASP.net, PHP, Joomla, WordPress, DNN, ...etc). Which is the best web framework/language to write such portal. The website needs to be database driven, secure and easy to maintain. Please give your advise according to your experience.
according to my personal experience i will support for PHP because i heard that SQL cant be Mixed up Java oriented web page..i.e., HTML driven sites..but php it is possible it seems but i dont know how it works..because i only developed the websites using HTML
My vote is for WordPress for what it's worth. It is easier to use than Joomla or Drupal, is database driven, highly customizeable if you can write even a little PHP, HTML or CSS, and a lot of the tedious mind numbing coding is already done so you can concentrate on what you are trying to achieve with the site.
got a big problem ...
We got a task we cant solve (Obviously, if we could i wouldnt ask here).
Our task is:
A page with 2 Textfields and 1 Button.
You shall be able to enter nothing else than numbers in these Textfields (floats or ints, nevermind)
When you enter a value to the last Text Field, there should automatically appear a new Text Field under the others.
So that you can enter as many numbers as you want to.
The button shall sum these numbers.
BUT the sum shall be displayed on another page, and the sum itself shall be calculated on the first page and shall be saved in Beans class.
So, we made 2 pages and one bean.
Numbers.jsp, Sum.jsp and Add (this is the bean)
The Sum.jsp takes the bean and just displays the result.
Thats very easy ...
Our Problem is, we dont know how to write into the bean from dynamically generated textfields and without pressing a button, because the button shall redirect to Sum.jsp.
Right now we have a workaround ... we reload the page and take the "request.getParametersMap()" and write this into the bean.
But we dont like this idea very much ...
So what you want is for us to do your homework for you. That isn't going to happen. You will learn nothing if someone else does this for you.
Make an effort. If you run into problems, post the code specific questions you have here and we'll be more than happy to help.
Well, no i dont want you to do my homework ...
We already spent hours on this task, but we dont find a way to solve it in a proper way.
We just want to know how to save from dynamic generated text fields into a bean.
As far as i know you can use "c:set" just in your HTML-Code.
Server just knows about them if we send a new request, but thats quite "dirty code"
Let me start off by saying that I apologize in advanced if this isn't the correct forum for this question, but there didn't seem to be a forum that exactly matched the question/issue I'm having.
I'm a VB.NET developer and I like to expand by knowledge by trying to program things from scratch that are already implemented ih the.NET framework. My current project is programming a SMTP server using just sockets. I've already read the RFC on SMTP and my company has an Exchange Server (2007) that I was going to use for testing.
The web address of the server is exchange.mycompany.com and I used reverse DNS to get the IP adress. The domain name does have a MX record a well. From the command prompt on my computer (which is running Win7 Professional) I tried using telnet to connect on port 25. I tried using the domain name as well as the IP address, but both times it said it couldn't connect to the server on port 25.
I checked the settings ih Outlook and the port is correct. I then tried connecting on port 110, and some other ones that are sometimes used, and it gave the same error message.
Next I connected to the Exchange server through VPN and tried telnet again on port 25 and this time it worked. However in the SMTP banner it said remote.mycompany.com instead of exchange.mycompany.com. So I disconnected from the VPN and tried the telnet again on all the ports I initially tried but used remote.mycompany.com but again got the same error message. I did an IP address lookup and remote.mycompany.com and exchange.mycompany.com point to the same IP address.
I then used mxtools.com and dnsstuff.com (I think that was the adress) and used their SMTP tools to see of they could connect. I entered mycompany.com as the domain name and they looked up the MX record, which returns exchange.mycompany.com as the SMTP server, and both tools were able to connect with no issues identified.
So my questions: 1) If the MX record list exchange.mycompany.com as the SMTP sever, why does the banner return remote.mycompany.com? 2) Why can't I connect the SMTP server through telnet unless I'm connected through VPN, but the two websites I used to test it the connection worked?
Obviously the server works because because the two websites can connect to it, I can when I'm in VPN, and other servers can because I receive email on my corporate account. What could prevent my computer from connecting to the SMTP server through telnet when I'm not on VPN. I should also mention that I even tried turning off all my anti-virus software to make sure that it wasn't blocking it.
Any help would be greatly appreciated since I assuming if I can't telnet in I most likely wouldn't be able to connect through sockets so I can't start working on my project until I solve this.
It is unlikely that you can connect directly from home to your company server through normal internet, as most company exchange servers do not allow connections from outside their intranet. When you use VPN you are, presumably, going via the company's intranet and thus seen as a valid user.
One of these days I'm going to think of a really clever signature.
I'm not trying to connect to it so I can send an email through the server. What I was trying to understand how to do was to deliver and email to it. For example, if I build an SMTP server and a client which connects to my that SMTP server and I want to send an email to firstname.lastname@example.org (where mycompany.com is hosted on the Exchange server), how would the SMTP server I created connect to the Exchange server in order to deliver the email? Doesn't the Exchange server have to allow some sort of connection from outside the intranet in order to receive emails from other domains (gmail, yahoo, etc.)?
I'm going to have to try and do that, unfortunately the person who set it up is no longer with the company and we just have an outsourced IT company that maintains it and they usually aren't very help fully. However, because the web tools were able to connect to is it reasonable to assume the problem is on my end? I was thinking maybe because I dont have a domain name so if the Exchange server tries to lookup the IP address of my computer there is no MX or PTR record. Is this something SMTP servers look for?
I also found something that I dont know how to explain or how it may affect this. The MX record for the server list exchange.mycompany.com. However, even when I'm on VPN, I can't connect to the SMTP server using that address in telnet or the IP address it points to. I have to use remote.mycompany.com, which is shown in the SMTP banner and points to the SAME IP ADDRESS. Is there a setting in Exchange that makes it script only request coming from this address? If so, how do the online SMTP tools discover this subdomain when I only gave the tools the domain name (mycompany.com) and the MX record only shows exchange.mycompany.com? The address remote.mycomany.com is not located anywhere in the zone file.
Yes, using the Position() function did help but part 2 of this was still a lot more code that had to be added to complete what I needed to and I do not like it.
<b>How do we code for the mininum number of iternations when the input XML has less than the minimum?</b>
The Position did limit the output to the number of iterations we needed to see but it did nothing to fill in if the number of iterations was LESS that what we expected.
In our case the input XML had a length attribute. <pre lang="xml"> <Opt length="1"><Opts>data</Opts></Opt></pre>
So we had to add a bunch of if or choose statements <xls:if test="@length = "1"> ...fill put in 4 output empty values </xls:if> <xls:if test="@length = "2"> ...fill put in 3 output empty values </xls:if>
I haven't done anything like this before but I did a quick bit of hunting around and something like this might do it for you. Please note this is totally untested and is just an idea. I thought about how to do a while or a normal for loop in XSL and then try and find away of checking if the element at position x existed. This is cobbled together from a couple of SO posts and my own take on how to put it together.
From those articles this is what I have cobbled together:
<xsl:templatename="for_loop"><xsl:paramname="num">1</xsl:param> <!-- param has initial value of 1 -->
<xsl:paramname="limit"></xsl:param> <!-- this should be the expected number of opt elements, passed into the template -->
<xsl:iftest="not($num = $limit)"><xsl:choose><xsl:whentest="not(opt[position() = $num)"> <!-- true if the element DOES NOT exist -->
<!-- create your empty xml here -->
<!-- the element exists get the data and output that -->
</xsl:otherwise></xsl:choose><xsl:call-templatename="for_loop"><xsl:with-paramname="num"><xsl:value-ofselect="$num + 1"></xsl:with-param><xsl:with-paramname="limit"><xsl:value-ofselect="$limit"></xsl:with-param></xsl:call-template></xsl:if></xsl:template>