Search Results

Search found 17771 results on 711 pages for 'dhcp option'.

Page 40/711 | < Previous Page | 36 37 38 39 40 41 42 43 44 45 46 47  | Next Page >

  • HOw to deny a particular mac address client not to obtain ip/name from dhcp & dns server..

    - by Deepak Narwal
    Hello Friends... I configures DHCP server on my rhel 5.4 machine.Clients are getting ip from this DHCP server.NO problem upto this.. NOw i want that a particular mac address client do not pick ip from this dhcp server.. Same question is with my DNS server. I want that a particular mac address client do not pick name from this dns server.. PLz discuss in little bit details i am very new in this field.I am learning these things.I hope YOu will give detailed explaiantion.. Thanks IN ADvance friends..

    Read the article

  • How does the fstab 'defaults' option work? Is relatime recommended?

    - by hushs
    I know the fstab defaults option means this: rw,suid,dev,exec,auto,nouser,async. But what if I want to add one more option, for example relatime, should I still add defaults too or they are applied anyway? Is it needed to add at least one option? Some examples: 1. UUID=bfb42838-d866-4233-9679-96e7536356df /media/data ext3 defaults 0 2 2. UUID=bfb42838-d866-4233-9679-96e7536356df /media/data ext3 0 2 3. UUID=bfb42838-d866-4233-9679-96e7536356df /media/data ext3 defaults,relatime 0 2 4. UUID=bfb42838-d866-4233-9679-96e7536356df /media/data ext3 relatime 0 2 Is the (2) correct(no option at all)? Are the (1) and (2) the same? Are the (3) and (4) the same? Furthermore, I read in the Ubuntu Community Documentation that in Ubuntu 8.04 relatime was used as default for linux native file systems. Is it still true for 12.04? If yes, then why do I see this if I use the mount command: /dev/sda2 on / type ext4 (rw,errors=remount-ro) If no, why not? It isn't recommended to use relatime now? I just wanted to apply it to my non system partitions, it is a good idea? EDIT: I found an other command to list the mounted partitions and their options: cat /proc/mounts This is the result of a partition mounted with the defaults option in fstab: /dev/sdb2 /media/adat ext3 rw,relatime,errors=continue,barrier=1,data=ordered 0 0 This is the output of mount for the same partition: /dev/sdb2 on /media/adat type ext3 (rw) And here is both result if the same partition mounted from Nautilus as a non-root user: /dev/sdb2 /media/adat ext3 rw,nosuid,nodev,relatime,errors=continue,barrier=1,data=ordered 0 0 /dev/sdb2 on /media/adat type ext3 (rw,nosuid,nodev,uhelper=udisks) So it looks like relatime is used if we mount an ext partition in 12.04. So it is unneeded to add it manually. So my problem is broadly solved. But I still can't see why the options that should be in the defaults are not listed even with the cat /proc/mounts. Maybe there is a third and even better method to list the partition mount options :)

    Read the article

  • Missing Edit Option on Silverlight 4 DataForm

    - by rip
    I’m trying out the Silverlight 4 beta DataForm control. I don’t seem to be able to get the edit and paging options at the top of the control like I’ve seen in Silverlight 3 examples. Has something changed or am I doing something wrong? Here’s my code: <UserControl x:Class="SilverlightApplication7.MainPage" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d" d:DesignHeight="300" d:DesignWidth="400" xmlns:dataFormToolkit="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Data.DataForm.Toolkit"> <Grid x:Name="LayoutRoot" Background="White"> <dataFormToolkit:DataForm HorizontalAlignment="Left" Margin="10" Name="myDataForm" VerticalAlignment="Top" /> </Grid> </UserControl> public partial class MainPage : UserControl { public MainPage() { InitializeComponent(); this.Loaded += new RoutedEventHandler(MainPage_Loaded); } void MainPage_Loaded(object sender, RoutedEventArgs e) { Movie movie = new Movie(); myDataForm.CurrentItem = movie; } public enum Genres { Comedy, Fantasy, Drama, Thriller } public class Movie { public int MovieID { get; set; } public string Name { get; set; } public int Year { get; set; } public DateTime AddedOn { get; set; } public string Producer { get; set; } public Genres Genre { get; set; } } }

    Read the article

  • jqGrid dynamic select option - beforeEditCell not firing

    - by mango
    I'm creating a jqgrid with one drop down column. I need the options of the drop down columns to change dynamically so I thought I can catch the beforeCellEdit event. however it does not seem to be firing. any idea on what i am doing wrong? there is no error, and i did check that i have included the jqgrid edit js files. var lastsel2; jQuery(document).ready(function(){ jQuery("#projectList").jqGrid({ datatype: 'json', url:'projectDrv.jsp', mtype: 'GET', height: 250, colNames:['Node','Proposal #', 'Status', 'Vendor', 'Actions'], colModel :[ {name:'node', index:'node', width:100, editable:false, sortable:false}, {name:'proposal', index:'proposal', width:100, editable:false, resizable:true }, {name:'status', index:'status', width:100, resizable:true, sortable:false, editable:false }, {name:'vendor', index:'vendor', width:100, resizable:true, editable:false, sortable: false }, {name:'actions', index:'actions', width:100, resizable:true, sortable:false, editable: true, edittype:"select" } ], pager: '#pager', rowNum: 10, sortname: 'proposal', sortorder: 'desc', viewrecords: true, onSelectRow: function(id){ if (id && id!==lastsel2){ jQuery('#projectList').jqGrid('restoreRow',lastsel2); jQuery('#projectList').jqGrid('editRow',id,true); lastsel2 = id; } }, beforeEditCell: function(rowid, cellname, value, irow, icol) { alert("before edit here " + rowid); // set editoptions here } });

    Read the article

  • jqGrid dynamic select option

    - by Jo
    I'm creating a jqgrid with drop down columns and I'm using cell editing. I need the options of the drop down columns to change dynamically and I've tried implementing this by setting the column to be: { name: "AccountLookup", index: "AccountLookup", width: 90, editable: true, resizable: true, edittype: "select", formatter: "select" }, and then in the beforeCellEdit event I have: beforeEditCell: function(id, name, val, iRow, iCol) { if(name=='AccountLookup') { var listdata = GetLookupValues(id, name); if (listdata == null) listdata = "1:1"; jQuery("#grid").setColProp(name, { editoptions: { value: listdata.toString()} }) } }, GetLookupValues just returns a string in the format "1:One;2:Two" etc. That works fine however the options are populated one click behind - ie i click on AccountID in row 1, and the dropdown is empty, however when I then click on AccountID in row 3 the options I set in the row 1 click are shown in the row 3 click. And so on. So always one click behind. Is there another way of achieving what I need? Bacially the dropdown options displayed are always changing and I need to load them as user enters the cell for editing. Perhaps I can somehow get at the select control in the beforeEditCell event and manually enter its values instead of using the setColProp call? If so could I get an example of doing that please? Another thing - if the dropdown is empty and a user doesn't cancel the cell edit, the grid script throws an error. I'm using clientarray editing if that makes a difference. Greatly appreciate any help. Regards, Jo

    Read the article

  • wpf treeview collapse/expand option disappeared

    - by Muhammad Adnan
    I used following code <!-- TreeView --> <Style x:Key="{x:Type TreeView}" TargetType="TreeView"> <Setter Property="OverridesDefaultStyle" Value="True" /> <Setter Property="SnapsToDevicePixels" Value="True" /> <Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Auto"/> <Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto"/> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="TreeView"> <Border Name="Border" CornerRadius="1" Background="{StaticResource WindowBackgroundBrush}" BorderBrush="{StaticResource SolidBorderBrush}" BorderThickness="1"> <ScrollViewer Focusable="False" CanContentScroll="False" Padding="4"> <ItemsPresenter/> </ScrollViewer> </Border> </ControlTemplate> </Setter.Value> </Setter> </Style> <!-- TreeViewItem --> <Style x:Key="TreeViewItemFocusVisual"> <Setter Property="Control.Template"> <Setter.Value> <ControlTemplate> <Border> <Rectangle Margin="0,0,0,0" StrokeThickness="5" Stroke="Black" StrokeDashArray="1 2" Opacity="0"/> </Border> </ControlTemplate> </Setter.Value> </Setter> </Style> <Style x:Key="{x:Type TreeViewItem}" TargetType="{x:Type TreeViewItem}"> <Setter Property="Background" Value="Transparent"/> <Setter Property="HorizontalContentAlignment" Value="{Binding Path=HorizontalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}"/> <Setter Property="VerticalContentAlignment" Value="{Binding Path=VerticalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}"/> <Setter Property="Padding" Value="1,0,0,0"/> <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/> <Setter Property="FocusVisualStyle" Value="{StaticResource TreeViewItemFocusVisual}"/> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="{x:Type TreeViewItem}"> <Grid> <Grid.ColumnDefinitions> <ColumnDefinition Width="Auto"/> </Grid.ColumnDefinitions> <Grid.RowDefinitions> <RowDefinition Height="Auto"/> <RowDefinition/> </Grid.RowDefinitions> <Border Name="Bd" Grid.Column="0" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Padding="{TemplateBinding Padding}"> <ContentPresenter x:Name="PART_Header" ContentSource="Header" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"/> </Border> <ItemsPresenter x:Name="ItemsHost" Visibility="Visible" Grid.Row="1" Grid.Column="0"/> </Grid> <ControlTemplate.Triggers> <MultiTrigger> <MultiTrigger.Conditions> <Condition Property="HasHeader" Value="false"/> <Condition Property="Width" Value="Auto"/> </MultiTrigger.Conditions> <Setter TargetName="PART_Header" Property="MinWidth" Value="75"/> </MultiTrigger> <MultiTrigger> <MultiTrigger.Conditions> <Condition Property="HasHeader" Value="false"/> <Condition Property="Height" Value="Auto"/> </MultiTrigger.Conditions> <Setter TargetName="PART_Header" Property="MinHeight" Value="19"/> </MultiTrigger> <Trigger Property="IsSelected" Value="true"> <Setter TargetName="Bd" Property="Background" Value="{DynamicResource {x:Static SystemColors.HighlightBrushKey}}"/> <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.HighlightTextBrushKey}}"/> </Trigger> <MultiTrigger> <MultiTrigger.Conditions> <Condition Property="IsSelected" Value="true"/> <Condition Property="IsSelectionActive" Value="false"/> </MultiTrigger.Conditions> <Setter TargetName="Bd" Property="Background" Value="{DynamicResource {x:Static SystemColors.ControlBrushKey}}"/> <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/> </MultiTrigger> <Trigger Property="IsEnabled" Value="false"> <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}"/> </Trigger> </ControlTemplate.Triggers> </ControlTemplate> </Setter.Value> </Setter> </Style> </Window.Resources> <Grid> <TreeView> <TreeViewItem Header="Node 1"> <TreeViewItem Header="Node 1.1"> <TreeViewItem Header="Node 1.1.1" /> </TreeViewItem> </TreeViewItem> <TreeViewItem Header="Node 2"> <TreeViewItem Header="Node 2.1"> <TreeViewItem Header="Node 2.1.1" /> </TreeViewItem> <TreeViewItem Header="Node 2.2"> <TreeViewItem Header="Node 2.2.1" /> </TreeViewItem> </TreeViewItem> </TreeView> </Grid> taken from this url... http://stackoverflow.com/questions/1526925/can-i-have-a-treeview-without-the-tree-structure NOW I AM HAVING PROBLEM. I LOST COLLAPSE/EXPAND OPTIONS... HOW CAN I HAVE WITH THIS CODE...

    Read the article

  • ruby script/server not reading RAILS_ENV option

    - by iwan
    Hello, I tried to run ruby script/server RAILS_ENV=production but somehow it always try to read "development" config.. nothings wrong with RAKE XXX RAILS_ENV=production (trying to read production config). Any idea how to troubleshoot? I have my other rails app in the same machine and it works fine. The problem above only happen for redmine rails. Thanks in advance. -iwan

    Read the article

  • Design Patterns Recommendation for Filtering Option

    - by Tarik
    Hi people, I am thinking to create a filter object which filters and delete everything like html tags from a context. But I want it to be independent which means the design pattern I can apply will help me to add more filters in the future without effecting the current codes. I thought Abstract Factory but it seems it ain't gonna work out the way I want. So maybe builder but it looks same. I don't know I am kinda confused, some one please recommend me a design pattern which can solve my problem but before that let me elaborate the problem a little bit. Lets say I have a class which has Description field or property what ever. And I need filters which remove the things I want from this Description property. So whenever I apply the filter I can add more filter in underlying tier. So instead of re-touching the Description field, I can easily add more filters and all the filters will run for Description field and delete whatever they are supposed to delete from the Description context. I hope I could describe my problem. I think some of you ran into the same situation before. Thanks in advance...

    Read the article

  • Show choosen option in a notification Feed, Django

    - by apoo
    Hey I have a model where : LIST_OPTIONS = ( ('cheap','cheap'), ('expensive','expensive'), ('normal', 'normal'), ) then I have assigned the LIST_OPTIONS to nature variable. nature = models.CharField(max_length=15, choices=LIST_OPTIONS, null=False, blank=False). then I save it: if self.pk: new=False else: new=True super(Listing, self).save(force_insert, force_update) if new and notification: notification.send(User.objects.all().exclude(id=self.owner.id), "listing_new", {'listing':self, }, ) then in my management.py: def create_notice_types(app, created_models,verbosity, **kwargs): notification.create_notice_type("listing_new", _("New Listing"), _("someone has posted a new listing"), default=2) and now in my notice.html I want to show to users different sentences based on the options that they have choose so something like this: LINK href="{{ listing.owner.get_absolute_url }} {{listing.owner}} {% ifequal listing.nature "For Sale" %} created a {{ listing.nature }} listing, <a href="{{ listing.get_absolute_url }}">{{listing.title}}</a>. {% ifequals listing.equal "Give Away"%} is {{ listing.nature }} , LINK href="{{ listing.get_absolute_url }}" {{listing.title}}. {% ifequal listing.equal "Looking For"%} is {{ listing.nature }} , LINK href="{{ listing.get_absolute_url }}" {{listing.title}} {% endifequal %} {% endifequal %} {% endifequal %} Could you please help me out with this. Thank you

    Read the article

  • aother option for modified preorder tree traversal algorithm

    - by poldo
    Hi, been searching for a while now and can't seem to find an alternative solution. I need the tree traversal algorithm in such a way that a node can have more than 1 parent, if it's possilbe (found a great article here: Storing Hierarchical Data in a Database). Are there any algorithms so that, starting from a root node, we can determine the sequence and dependencies of nodes (currently reading topological sorting)? thanks in advance!

    Read the article

  • Clean and accesible Other option (Check box and text box)

    - by Svish
    When I have a set of either check boxes or radio buttons I often need to have an Other choice. This check box or radio button is very often accompanied by a text box where the user is supposed to fill out what this Other is. How do you usually handle this set up? What kind of markup do you use? What do you require in your validation? Do you use java script for anything? For example: How do you make the form accessible? Do you use and how do you use the label tag, for example. Do you connect the check box and text box in any way with some javascript? For example, do you activate the text box when the check box is checked? Do you check or uncheck the check box automatically if the text box is filled out or cleared? Do you let validation fail with error messages if the check box is checked but the text box is not filled out, or if the text box is filled out but the check box is not checked? Or do you just consider it not filled out and not checked? Very unsure how to best deal with this issue, so any advice and examples are most welcome c",)

    Read the article

  • understanding P4 describe / diff summary (-ds) option

    - by JavaScriptDude
    Greetings P4 folks, I am trying to understand the P4 describe -ds output. I am assuming that this is the same as the p4 diff -ds output. Here is an example of the "Differences ..." block: ==== //depot/Groups/mygroup/trunk/main/FooBar.java#5 (text) ==== add 7 chunks 13 lines deleted 1 chunks 1 lines changed 16 chunks 92 / 118 lines ~ Now I understand that add and deleted lines are clear but why are there two numbers for the changed lines (92 / 118). Thanks! - JsD

    Read the article

  • Zend_Form_Element_Radio option label should not be escaped

    - by sims
    I want to include some HTML in the labels of the radio buttons so that the user can click a link within that label. For example <label for="value-12"> <input name="value" id="value-12" value="12" checked="checked" type="radio"> Doo Bee Dooo Bee Doooo <a href="somelink">preview this song</a> </label> The html keeps getting escaped. I want to stop that. I read about: array('escape' => false) Somewhere, but I don't know how to use that with $value->setMultiOptions($songs); or $value->addMultiOptions($songs) Any ideas? Thanks all!

    Read the article

  • How do I force fetching of tags if I have the --no-tags option set

    - by douglas.meyer
    Whenever I run git fetch it fetches all the tags from origin. In a project with lots of tags, this can get quite bothersome. So I ran git config remote.origin.tagopt --no-tags so fetching will no-longer fetch tags. However, there are some times when I do want to fetch tags, or a single tag. Does anyone know how to do this? (besides removing that configuration, and running git fetch --no-tags every time) Thanks!

    Read the article

  • How to make a css navigation menu "selected" option still clickable

    - by aslum
    So I have a fairly simple vertical CSS menu based off of UL. <ul class="vertnav"> <li><a href="unselected1.php">Item1</a></li> <li><a href="unselected2.php">Item2</a></li> <li><a href="selected.php" class="vertnavdown">Selected</a></li> </ul> I want three basic colors (say tan for default LI, orange for VERTNAVDOWN, and red for A:HOVER. However I can't seem to get the vertnavdown class to inherit right, and the .vertnav li a:visited overrides it every time. if I use !important to force it through I can't seem to also get the hover to work. Any suggestions? I thought I understood inheritance in CSS but I guess I don't. .vertnav{ list-style: none; margin: 0px; width: 172px; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 11px; padding: 0px 0px 0px 0px; margin: 0px 0px 0px 0px; text-align: left; height: 45px; } .vertnav li{ margin: 0px; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 11px; border-bottom: 0px none; border-right: 0px none; border-top: 1px solid #fff; border-left: 0px none; text-align: left; height: 45px; width: 172px; padding: 0px 0px 0px 0px; margin: 0px 0px 0px 0px; } .vertnav li a{ display: block; text-align: left; color: #666666; font-weight: bold; background-color: #FFEEC1; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 11px; text-decoration: none; padding-top: 10px; padding-right: 0px; padding-bottom: 0px; padding-left: 15px; height: 45px; } .vertnav li a:visited{ display: block; text-align: left; color: #666666; background-color: #FFEEC1; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 11px; font-weight: bold; text-decoration: none; padding-top: 10px; padding-right: 0px; padding-bottom: 0px; padding-left: 15px; height: 45px; } .vertnav li a:hover{ color: white; background-color: #ffbf0c; font-family: Verdana, Arial, Helvetica, sans-serif; height: 45px; text-decoration: none; font-weight: bold; } .vertnavdown a { display:block; color: #FFF; background-color: #ff9000; } .vertnavdown a:hover { background-color: #ffbf0c; } ^^^^^^^^^^^^^ Edited to add CSS. ^^^^^^

    Read the article

  • add new option to dropdownlist after jquery dialog and post

    - by RememberME
    I have a form to enter subcontracts. On this form I have a dropdownlist of all companies in the system. Next to it is a button "Create Company". This button opens a jquery dialog which allows the user to create a new company. Once the dialog closes, the new company needs to be added to the dropdownlist and selected. If I refresh, it's there, but I need to do it without refreshing the form b/c I don't want the user to loose everything that they've entered into the other fields. I'm not sure how to do this b/c I don't have the guid of the new company. My jquery dialog: $('#popupCreateCompany').dialog( { autoOpen: false, modal: true, buttons: { 'Add': function() { var dialog = $(this); var form = dialog.find('input:text, select'); $.post('/company/create', $(form).serialize(), function() { dialog.dialog('close'); }) }, 'Cancel': function() { $(this).dialog('close'); } } }); $("#create-company").click(function() { $('#popupCreateCompany').dialog('open'); }); Company field: <label for="company">Company:</label> <%= Html.DropDownList("company", Model.SelectCompanies, "** Select Company **") %> <%= Html.ValidationMessage("Company", "*") %> <button type="button" id="create-company" >Create Company</button>

    Read the article

  • How to supress Powershell window when using the -File option

    - by guillermooo
    I'm calling Powershell like so: C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -noprofile -noninteractive -nologo -file "C:\Users\dummy\Documents\dev\powershell\samples\test.ps1" I'm calling it from a python script, but the same problem can be observed if called via a shortcut. I thought the -NonInteractive flag would cause Poweshell to execute in a hidden window, but it doesn't. Is there a way of supressing the console window when calling Powershell from an external application? Solution based on Johannes Rössel suggestion st_inf = subprocess.STARTUPINFO() st_inf.dwFlags = st.inf.dwFlags | subprocess.STARTF_USESHOWWINDOW Popen(["notepad"], startupinfo=st_inf)

    Read the article

  • Which option do you like the most?

    - by spderosso
    I need to show a list of movies ordered by the date they were registered in the system and the amount of comments users have made about them. E.g: Title | Register Date | # of comments Gladiator | 02-01-2010 | 30 Matrix | 01-02-2010 | 20 It is a web application that follows MVC. So, I have the object "Movie", there is a MovieManager interface that is used for retrieving/persisting data to the database and a servlet RecentlyAddedMovies.java that forwards to a .jsp to render the list. I will explain my problem by showing an example of how I am doing another similar task: Showing top ranked movies. Regarding the MovieManager: /** * Returns a collection of the x best-ranked movies * @param x the amount of movies to return * @return A collection of movies * @throws SQLException */ public Collection<Movie> getTopX(int x) throws SQLException; The servlet: public class Top5 extends HttpServlet{ @Override protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { MovieManager movManager = JDBCMovieManager.getInstance(); try { req.setAttribute("movies", movManager.getTopX(5)); } catch (SQLException e) { // TODO Auto-generated catch block e.printStackTrace(); } req.getRequestDispatcher("listMovies.jsp").forward(req, resp); } } And the listMovies.jsp has is some place something like: <c:forEach var="movie" items="${movies}"> ... <c:out value="${movie.title}"/> ... </c:forEach> The difference between the top5 problem and the problem I am trying to solve is that with the top5 thing all the data I needed to show in the view where part of the "Movie" object, so the MovieManager simply returned a Collection of Movies. Now, the MovieManager must retrieve an ordered list of (Movie, # of comments). The Movie object has a collection of Comment associated but of course, it lacks an instance variable with the length of that collection. The following things came into my mind: a) Create a MovieView object or something like that, that is only used by the "View" and "Controller" layer of the MVC which is not part of the "Model" in the sense that is used only for easy retrieval and display of information. This MovieView object will have a title, registerDate and # of Comments so the thing would look something like this: /** * Returns a collection of the x most recently added movies * @param x the amount of movies to return * @return A collection of movies * @throws SQLException */ public Collection<Movie2> getXRecentlyAddedMovies(int x) throws SQLException; The .jsp: <c:forEach var="movie2" items="${movies2}"> ... <c:out value="${movie2.title}"/> <c:out value="${movie2.registerDate}"/> <c:out value="${movie2.noOfComments}"/> ... </c:forEach> b) Add to the Collection the movie has, empty Comments (there is no actual need to retrieve all the comment data from the database) so that the comment's collection.size() will show the number of comments that movie has. (This sounds horrible to me) c) Add to the "Movie" object an instance field noOfComments with the setter and getter that will help with this type of cases even if, looking only from the object point of view, it is a redundant field since it already has a Collection that is ".size()"able . d) Make the MovieManager retrieve some structure like a Map or a Collection of a two component array or something like that that will contain both a Movie object and the associated number of comments and with JSLT iterate over it and show it accordingly.

    Read the article

  • Pass data from one form to another on a seperate page

    - by Micanio
    I am building a price/distance calculator with Google Maps API and am trying to pass the info from the calculator to a booking form on a separate page. My first form has 2 submit buttons - one to make the calculation, and one to submit the relevant data to the booking form. I'm stuck trying to make the 2nd button work. Once the API calculation has been made, I get 4 values - From, To, Cost, Distance. I am trying to pass the From, To and Cost values into my booking form by clicking the second button. But I can;t seem to get it to work. I've tried POST and GET but I think I may have been doing something wrong with both. Any help is appreciated. Code for API form: <script type="text/javascript" src="http://maps.google.com/maps?file=api&amp;v=2&amp;key=ABQIAAAAwCUxKrPl8_9WadET5dc4KxTqOwVK5HCwTKtW27PjzpqojXnJORQ2kUsdCksByD4hzcGXiOxvn6C4cw&sensor=true"></script> <script type="text/javascript"> var geocoder = null; var location1 = null; var location2 = null; var gDir = null; var directions = null; var total = 0; function roundNumber(num, dec) { var result = Math.floor(num*Math.pow(10 ,dec))/Math.pow(10,dec); return result; } function from(form) { address1=form.start.options[form.start.selectedIndex].value form.address1.value=address1 form.address1.focus() } function to(form) { address2=form.end.options[form.end.selectedIndex].value form.address2.value=address2 form.address2.focus() } function initialize() { var map = new GMap2(document.getElementById("map_canvas")); map.setCenter(new GLatLng(54.019066,-1.381531),9); map.setMapType(G_NORMAL_MAP); geocoder = new GClientGeocoder(); gDir = new GDirections(map); GEvent.addListener(gDir, "load", function() { var drivingDistanceMiles = gDir.getDistance().meters / 1609.344; var drivingDistanceKilometers = gDir.getDistance().meters / 1000; var miles = drivingDistanceMiles.toFixed(0); //var cost = (((miles - 1) * 1.9) + 3.6).toFixed(2); var meters = gDir.getDistance().meters.toFixed(1); if(miles < 70){ var cost = miles *1.75; } if(miles >70){ var cost = miles *1.2; } document.getElementById('from').innerHTML = '<strong>From: </strong>' + location1.address; document.getElementById('to').innerHTML = '<strong>To: </strong>' + location2.address; document.getElementById('cost').innerHTML = '<span class="fare"><strong>Estimated Taxi FARE:</strong>' + ' £' + cost.toFixed(2) + '</span>'; document.getElementById('miles').innerHTML = '<strong>Distance: </strong>' + miles + ' Miles'; }); } function showLocation() // start of possible values for address not recognized on google search // values for address1 { if (document.forms[0].address1.value == "heathrow" || document.forms[0].address1.value == "Heathrow" || document.forms[0].address1.value == "heathrow airport" || document.forms[0].address1.value == "Heathrow Airport" || document.forms[0].address1.value == "London Heathrow" || document.forms[0].address1.value =="london heathrow" ) { (document.forms[0].address1.value = "Heathrow Airport"); } if (document.forms[0].address2.value == "heathrow" || document.forms[0].address2.value == "Heathrow" || document.forms[0].address2.value == "heathrow airport" || document.forms[0].address2.value == "Heathrow Airport" || document.forms[0].address2.value == "London Heathrow" || document.forms[0].address2.value =="london heathrow" ) { (document.forms[0].address2.value = "Heathrow Airport"); } geocoder.getLocations(document.forms[0].address1.value + document.forms[0].uk.value || document.forms[0].start.value + document.forms[0].uk.value, function (response) { if (!response || response.Status.code != 200) { alert("Sorry, we were unable to find the first address"); } else { location1 = {lat: response.Placemark[0].Point.coordinates[1], lon: response.Placemark[0].Point.coordinates[0], address: response.Placemark[0].address}; geocoder.getLocations(document.forms[0].address2.value + document.forms[0].uk.value, function (response) { if (!response || response.Status.code != 200) { alert("Sorry, we were unable to find the second address"); } else { location2 = {lat: response.Placemark[0].Point.coordinates[1], lon: response.Placemark[0].Point.coordinates[0], address: response.Placemark[0].address}; gDir.load('from: ' + location1.address + ' to: ' + location2.address); } }); } }); } </script> <style> #quote { font-family: Georgia, "Times New Roman", Times, serif; } </style> </head> <body style="background-color: rgb(255, 255, 255);" onUnload="GUnload()" onLoad="initialize()"> <div id="sidebar"> <!--MAPS--> <div id="calc_top"></div> <div id="calc_body"> <div id="calc_inside"> <span style="font-size: 16px; font-weight: bold;">Get A Quote Now</span> <p class="disclaimer">Fares can be calculated using either Area, Exact Address or Postcode, when entering address please include both road name and area i.e. <em>Harrogate Road, Ripon</em>. You can also select a pickup point and destination from the dropdown boxes. </p> <form onSubmit="showLocation(); return false;" action="#" id="booking_form"> <p> <select onChange="from(this.form)" name="start"> <option selected="selected">Select a Pickup Point</option> <option value="Leeds Bradford Airport">Leeds Bradford Airport</option> <option value="Manchester Airport">Manchester Airport</option> <option value="Teesside International Airport">Teeside Airport</option> <option value="Liverpool John Lennon Airport">Liverpool Airport</option> <option value="East Midlands Airport">East Midlands Airport</option> <option value="Heathrow International Airport">Heathrow Airport</option> <option value="Gatwick Airport">Gatwick Airport</option> <option value="Stanstead Airport">Stanstead Airport</option> <option value="Luton International Airport">Luton Airport</option> </select> </p> <p> <input type="text" value="From" name="address1"><br> <p> <select onChange="to(this.form)" name="end"> <option selected="selected">Select a Destination</option> <option value="Leeds Bradford Airport">Leeds Bradford Airport</option> <option value="Manchester Airport">Manchester Airport</option> <option value="Teesside International Airport">Teeside Airport</option> <option value="Liverpool John Lennon Airport">Liverpool Airport</option> <option value="East Midlands Airport">East Midlands Airport</option> <option value="Heathrow International Airport">Heathrow Airport</option> <option value="Gatwick Airport">Gatwick Airport</option> <option value="Stanstead Airport">Stanstead Airport</option> <option value="Luton International Airport">Luton Airport</option> </select> </p> <input type="text" value="To" name="address2"><br> <input type="hidden" value=" uk" name="uk"> <br> <input type="submit" value="Get Quote"> <input type="button" value="Reset" onClick="resetpage()"><br /><br /> <input type="submit" id="CBSubmit" value="Confirm and Book" action=""/> </p> </form> <p id="from"><strong>From:</strong></p> <p id="to"><strong>To:</strong></p> <p id="miles"><strong>Distance: </strong></p> <p id="cost"><span class="fare"><strong>Estimated Taxi FARE:</strong></span></p> <p id="results"></p> <div class="style4" style="width: 500px; height: 500px; position: relative; background-color: rgb(229, 227, 223);" id="map_canvas"></div> </div> </div> Code for Booking Form: <form method="post" action="contactengine.php" id="contact_form"> <p> <label for="Name" id="Name">Name:</label> <input type="text" name="Name" /> <label for="Email" id="Email">Email:</label> <input type="text" name="Email" /> <label for="tel" id="tel">Tel No:</label> <input type="text" name="tel" /><br /><br /> <label for="from" id="from">Pickup Point:</label> <input type="text" name="from" value="" /><br /><br /> <label for="to" id="to">Destination:</label> <input type="text" name="to" value=""/><br /> <label for="passengers" id="passengers">No. of passengers</label> <input type="text" name="passengers" /><br /><br /> <label for="quote" id="quote">Price of journey:</label> <input type="text" name="quote" value="" /><br /><br /> <label for="Message" id="Message">Any other info:</label> <textarea name="Message" rows="20" cols="40"></textarea> <br /> Are you an account holder?<br /> <label for="account" id="yes" /> Yes:</label> <input type="radio" class="radio" value="yes" name="account"> <label for="account" id="yes" /> No:</label> <input type="radio" class="radio" value="no" name="account"> </p> <small>Non-account holders will have to pay a £5 booking fee when confirming thier booking</small> <input type="submit" name="submit" value="Submit" class="submit-button" /> </p> </form> Thanks in advance

    Read the article

  • Jquery getJSON populate select menu question...

    - by Scott
    I am populating a select menu with getJSON. I am wondering if there's a way that I can use jQuery's .each function to bring in these values? Surely there must be an easier way to accomplish this...maybe? PHP file: <?php $queryMonth = "SELECT monthID, month FROM months"; $result = $db->query($queryMonth); while($rowMonth = $db->fetch_assoc($result)) : $data[] = $rowMonth; endwhile; echo json_encode($data); ?> The jQuery: $.getJSON('selectMenus.php', function(data){ $("select.month").append("<option value=" + data[0].monthID + ">" + data[0].month + "</option>"); $("select.month").append("<option value=" + data[1].monthID + ">" + data[1].month + "</option>"); $("select.month").append("<option value=" + data[2].monthID + ">" + data[2].month + "</option>"); $("select.month").append("<option value=" + data[3].monthID + ">" + data[3].month + "</option>"); $("select.month").append("<option value=" + data[4].monthID + ">" + data[4].month + "</option>"); $("select.month").append("<option value=" + data[5].monthID + ">" + data[5].month + "</option>"); $("select.month").append("<option value=" + data[6].monthID + ">" + data[6].month + "</option>"); $("select.month").append("<option value=" + data[7].monthID + ">" + data[7].month + "</option>"); $("select.month").append("<option value=" + data[8].monthID + ">" + data[8].month + "</option>"); $("select.month").append("<option value=" + data[9].monthID + ">" + data[9].month + "</option>"); $("select.month").append("<option value=" + data[10].monthID + ">" + data[10].month + "</option>"); $("select.month").append("<option value=" + data[11].monthID + ">" + data[11].month + "</option>"); }); my json output looks like this: [{"monthID":"1","month":"January"},{"monthID":"2","month":"February"},{"monthID":"3","month":"March"},{"monthID":"4","month":"April"},{"monthID":"5","month":"May"},{"monthID":"6","month":"June"},{"monthID":"7","month":"July"},{"monthID":"8","month":"August"},{"monthID":"9","month":"Septemeber"},{"monthID":"10","month":"October"},{"monthID":"11","month":"November"},{"monthID":"12","month":"December"}]

    Read the article

  • jQuery user intput to control option of one jquery function

    - by Tristan
    Hello, i'd like an input to control that : jQuery.ajax({ type: "get", dataType: "jsonp", url: "http://www.foo.com/something.php", data: {numberInput: "NUMER I WANT TO CONTROL" }, On the HTML side i've <input type="text id="jqueryControl" /> I want when a user enters a number ito the jqueryControl to insert it in the .ajax function and reload the data according to the new value entered. Any idea to do that please ? Thanks

    Read the article

  • Online option calculator like Sitmo.com

    - by baraider
    I'd like to know the best way to create online calculator for stock options such as this site http://www.sitmo.com/live/OptionVanilla.html I can see it uses CGI, and I like to learn what other ways to achieve the same goals using other languages. If anyone has experience building it and can freelance, I'd like to know as well. Our site is running on LAMP.

    Read the article

< Previous Page | 36 37 38 39 40 41 42 43 44 45 46 47  | Next Page >