Search Results

Search found 9093 results on 364 pages for 'three cups'.

Page 14/364 | < Previous Page | 10 11 12 13 14 15 16 17 18 19 20 21  | Next Page >

  • Creating a row of Three Boxes Seperated

    - by Frank G.
    I am new to css and I have a menu bar that I am working on however I am having a problem with one of the menu ("LINKS") items. If you roll over the Links menu item your notice I have three boxes there that I am trying to separate into there own area. Right now they are over lapping each other. Could you please tell me what I am doing wrong? I have tried margin-left and padding-left and I find that they either move the box further to the right or widen the box more. But they don't space them out. You can find the menu bar here: http://jsfiddle.net/vtjPR/

    Read the article

  • Rails valiation among a three model relationship

    - by Andrew
    I'm working on a three model relationship with one aspect that I'm not sure how to approach. Here's the basic relationship: class Taxonomy has_many :terms # attribute: `inclusive`, default => false end class Term belongs_to :taxonomy has_and_belongs_to_many :photos end class Photo has_and_belongs_to_many :terms end This is pretty straightforward stuff except for one thing: A Taxonomy can be either 'Inclusive' or 'Exclusive'. Exclusive means the terms are mutually exclusive, Inclusive means they're not. So, if a Taxonomy is exclusive ie. taxonomy.inclusive = false, then there can only be one term from that taxonomy attached to a given photo. Now, I can handle this on the client-side without a problem, but I am not quite sure how to set up a validation on Photos (or somewhere else) that says basically: "validate that no more than one term from an exclusive taxonomy is associated with this record." Any ideas on how to do that?

    Read the article

  • algorithm to find the three majority elements in an array

    - by Qiang Li
    Let's say there are three elements in a non-sorted array all of which appear more than one-fourth times of the total number of elements. What is the most efficient way to find these elements? Both for non-online and online versions of this question. Thank you! Edit The non-online version I was referring to is: this array is specified in full. The online version means the array elements are coming one at a time. I require the space in addition to time complexity to be tight. disclaimer: THIS IS NOT HOMEWORK! I consider this as research-level question.

    Read the article

  • Prolog: How to make three lists the same lenght (by adding leading zeros)

    - by sixtyfootersdude
    I am writing a prolog program to solve a problem. The problem takes three lists as input: solve( [L|Lr] , [R|Rr] , [S|Sr] ) :- Unfortunately the lists all need to be equal length for the program to work. So these work: ?- solve( [A, B, C, D] , [1, 3, 5, 6], [E, F, G, H]). ?- solve( [1] , [2], [3]). But these do not: ?- solve( [A, B, C, D], [1], [B, I, T] ). ?- solve( [A], [1, 2], [4, 5]). What I would like to do is write a predicate(?) to pad the smaller lists with leading zeros. So: solve( [A, B, C, D], [1], [B, I, T] ) would become: solve( [A, B, C, D], [0, 0, 0, 1], [0, B, I, T] ) Any points on how to accomplish this would be awesome. I am from a functional background so I am struggling. Is there a way tell the length of a list? I think I could do that recursively, but it seems like a pain. Thanks

    Read the article

  • Creating a WCF ServiceHost object takes three to four minutes on some PCs

    - by Steve
    Hello, I have created a WCF service which does not use the app.config to configure itself. However, it takes three to four minutes on some PCs to construct the ServiceHost object. Thinking there was something wrong with my service, I constructed a simple Hello, World service and tried it with that. I have the same issue. According to the profiler, all this time is spent reading in configuration for the service. So I have two questions really. Is it possible to disable reading config from the XML? More importantly, does anyone have any idea why this might be taking such an inordinate amount of time? Here is the sample service: [ServiceContract] public interface IMyService { [OperationContract] string GetString(); } [ServiceBehavior(InstanceContextMode=InstanceContextMode.Single)] public class MyService : IMyService { public string GetString() { return "Hello, world!"; } } class Program { static void Main(string[] args) { Uri epAddress = new Uri("http://localhost:8731/Test"); Uri[] uris = new Uri[] { epAddress }; MyService srv = new MyService(); ServiceHost host = new ServiceHost(srv, uris); // this line takes 3-4 minutes host.AddServiceEndpoint(typeof(IMyService), new WSHttpBinding(), "Test"); ServiceMetadataBehavior smb = new ServiceMetadataBehavior(); smb.HttpGetEnabled = true; host.Description.Behaviors.Add(smb); host.Open(); return; } } I need for design reasons to create the service and pass it in as an object, rather than passing it in as a type. If there's any more information that can be of use, please let me know. Many thanks.

    Read the article

  • 960 GridSystem, three grid_4 inside one grid_12

    - by Olle
    I've created a 16 column layout with 960gs with a div class="grid_12" and after that a grid_4 (12+4...) Inside that grid_12 I wanted a three column style (3 grid_4). But the grid_4 boxes don't fit inside the grid_12, the last box drop into a second row. Shouldn't the 960gs framework be able to do this layout for me, have i missed anything? Thanks in advance. <div class="container_16"> ... <div id="main" class="grid_12"> <div class="grid_12"> <div class="grid_4"></div> <div class="grid_4"></div> <div class="grid_4"></div> </div> <div id="right" class="grid_4"> </div> </div> ... </div>

    Read the article

  • Oracle Forms on-button-pressed trigger to solve three scenarios

    - by DBase486
    Hello, I'm writing a when-button-pressed trigger on a save button for an Oracle Forms 6i form, and it has to fulfill a couple of scenarios. Here's some background information: the fields we're primarily concerned with are: n_number, alert_id, end_date For all three scenarios we are comparing candidate records against the following records in the database (for the sake of argument, let's assume they're the only records in the database so far): alert_id|| n_number|| end_date ------------------------------------- 1|| 5|| _______ 2|| 6|| 10/25/2009 Scenario 1: The user enters a new record: alert_id 1 n_number 5 end_date NULL Objective: prevent the user from committing duplicate rows Scenario 2: The user enters a new record: alert_id 1 n_number 10 end_date NULL Objective: Notify the user that this alert_id already exists, but allow the user the ability to commit the row, if desired. Scenario 3: The user enters a new record: alert_id 2 n_number 6 end_date NULL Objective: Notify the user that this alert_id has occurred in the past (i.e. it has a not-null end_date), but allow the user to commit the row, if desired. I've written the code, which seems to comply with the first two scenarios, but prevents me from fulfilling the third. Issues: When I enter the third scenario case, I am prompted to commit the record, but when I attempt this, the "duplicate_stop" alert pops up, preventing me. Issues: I'm getting the following error: ORA-01843: not a valid month. While testing the code for the third scenario in Toad (hard-coding the values, etc) things seemed to be fine. Why would I encounter these problems at run-time? Help is very much appreciated. Thank you

    Read the article

  • Hash Code for a group of three fields

    - by Gauranga
    I have three fields namely Number1 Number2 Time I am trying to write a function in java that returns a unique hash value (long needs to be the return type of hash) for the above fields. This hash would then be used to store database rows corresponding to the above mentioned fields in a HashSet. I am new to writing a hash code function, can someone please review what I have. Any help would be appreciated. public class HashCode { private long Number1; private long Number2; String Time; public HashCode(long Number1, long Number2, String Time){ this.Number1 = Number1; this.Number2 = Number2; this.Time = Time; } public long getHashCode() { long hash = 3; hash = 47 * hash + (long) (this.Number1 ^ (this.Number1 >>> 32)); hash = 47 * hash + (long) (this.Number2 ^ (this.Number2 >>> 32)); hash = 47 * hash + (this.Time != null ? this.Time.hashCode() : 0); return hash; } }

    Read the article

  • Three most critical programming concepts

    - by Todd
    I know this has probably been asked in one form or fashion but I wanted to pose it once again within the context of my situation (and probably others here @ SO). I made a career change to Software Engineering some time ago without having an undergrad or grad degree in CS. I've supplemented my undergrad and grad studies in business with programming courses (VB, Java,C, C#) but never performed academic coursework in the other related disciplines (algorithms, design patterns, discrete math, etc.)...just mostly self-study. I know there are several of you who have either performed interviews and/or made hiring decisions. Given recent trends in demand, what would you say are the three most essential Comp Sci concepts that a developer should have a solid grasp of outside of language syntax? For example, I've seen blog posts of the "Absolute minimum X that every programmer must know" variety...that's what I'm looking for. Again if it's truly a redundancy please feel free to close; my feelings won't be hurt. (Closest ones I could find were http://stackoverflow.com/questions/164048/basic-programming-algorithmic-concepts- which was geared towards a true beginner, and http://stackoverflow.com/questions/648595/essential-areas-of-knowledge-which I didn't feel was concrete enough). Thanks in advance all! T.

    Read the article

  • Join with Three Tables

    - by John
    Hello, In MySQL, I am using the following three tables (their fields are listed after their titles): comment: commentid loginid submissionid comment datecommented login: loginid username password email actcode disabled activated created points submission: submissionid loginid title url displayurl datesubmitted I would like to display "datecommented" and "comment" for a given "username," where "username" equals a variable called $profile. I would also like to make the "comment" a hyperlink to http://www...com/.../comments/index.php?submission='.$rowc["title"].'&submissionid='.$rowc["submissionid"].'&url='.$rowc["url"].'&countcomments='.$rowc["countComments"].'&submittor='.$rowc["username"].'&submissiondate='.$rowc["datesubmitted"].'&dispurl='.$rowc["displayurl"].' where countComments equals COUNT(c.commentid) and $rowc is part of the query listed below. I tried using the code below to do what I want, but it didn't work. How could I change it to make it do what I want? Thanks in advance, John $sqlStrc = "SELECT s.loginid ,s.title ,s.url ,s.displayurl ,s.datesubmitted ,l.username ,l.loginid ,s.title ,s.submissionid ,c.comment ,c.datecommented ,COUNT(c.commentid) countComments FROM submission s INNER JOIN login l ON s.loginid = l.loginid LEFT OUTER JOIN comment c ON c.loginid = l.loginid WHERE l.username = '$profile' GROUP BY c.loginid ORDER BY s.datecommented DESC LIMIT 10"; $resultc = mysql_query($sqlStrc); $arrc = array(); echo "<table class=\"samplesrec1c\">"; while ($rowc = mysql_fetch_array($resultc)) { $dtc = new DateTime($rowc["datecommented"], $tzFromc); $dtc->setTimezone($tzToc); echo '<tr>'; echo '<td class="sitename3c">'.$dtc->format('F j, Y &\nb\sp &\nb\sp g:i a').'</a></td>'; echo '<td class="sitename1c"><a href="http://www...com/.../comments/index.php?submission='.$rowc["title"].'&submissionid='.$rowc["submissionid"].'&url='.$rowc["url"].'&countcomments='.$rowc["countComments"].'&submittor='.$rowc["username"].'&submissiondate='.$rowc["datesubmitted"].'&dispurl='.$rowc["displayurl"].'">'.stripslashes($rowc["comment"]).'</a></td>'; echo '</tr>'; } echo "</table>";

    Read the article

  • PHP: Three item validation comparison

    - by DavidYell
    I have 3 featured product panels on the homepage, and I'm writing a CMS page for it. I'm trying to validate the items. They are selected via three <select> elements, featured1, featured2 and featured3. The default is <option value="0" selected>Select an element</option> I need to validate the $_POST to ensure that the user hasn't selected the same product for more than one of the panels. I have worked out that each $_POST needs to be $_POST['featuredN'] > 0 but I can't seem to find a logical way of processing the 7 potential outcomes. Using a logic table, where 1 is a set value. 1 2 3 ------- 0 0 0 1 1 1 1 0 0 0 1 0 0 0 1 1 1 0 0 1 1 If an item is 0, then I will not update it, but I want the user to be able to update a single item if needs be. I cannot find a logical way to see if the item is not 0, and then compare it to another item if that also is not 0. So far my colleague suggested, adding up the values. Which works to see if condition 1 0 0 0 is not met. I have a vague feeling that some form of recursive function might be in order, but I can't quite get my brain to help me on this one! So to the collective brain! :)

    Read the article

  • Finding and marking the largest of three values in a two dimensional array

    - by DavidYell
    I am working on a display screen for our office, and I can't seem to think of a good way to find the largest numerical value in a set of data in a two dimensional array. I've looked at using max() and also asort() but they don't seem to cope with a two dimensional array. I'm returning my data through our mysql class, so the rows are returned in a two dimensional array. Array( [0] => Array( [am] => 12, [sales] => 981), [1] => Array( [am] => 43, [sales] => 1012), [2] => Array( [am] => 17, [sales] => 876) ) I need to output a class when foreaching the data in my table for the AM with the highest sales value. Short of comparing them all in if statements. I have tried to get max() on the array, but it returns an array, as it's look within the dimension. When pointing it at a specific dimension it returns the key not the value. I figured that I could asort() the array and pop the top value off, store it in a variable and then compare against that in my foreach() loop, but that seems to have trouble sorting across two dimensions. Lastly, I figured that I could foreach() the values, comparing them against the previous one each time, untill I found the largest. This approach however means storing every value, luckily only three, but then comparing against them all again. Surely there must be a simpler way to achieve this, short of converting it into a single dimension array, then doing an asort() on that?

    Read the article

  • LINQ Sorting - First three need to be different manufacturers

    - by Rob
    My OM has a 'product' object. Each product has a 'manufacturer id' (property, integer). When I have a list of products to display, the first three are displayed as the 'featured products'. The list is already sorted in a specific sort order, putting the 'featured' products first in the list. However, I now need to ensure the featured products in the listing are from different Manufacturers. I want to have a method to call to do this re-sorting. Trying to utilize LINQ to to the querying of the input 'products' and the 'results' public List<Product> SetFeatures(List<Product> products, int numberOfFeatures) { List<Product> result; // ensure the 2nd product is different manufacturer than the first .... // ensure the 3rd product is a different manufacturer than the first two... // ... etc ... for the numberOfFeatures return result; } Thanks in advance.

    Read the article

  • datagrid height issue in nested datagrid( when using three data grid)

    - by prince23
    hi, i have a nested datagrid(which is of three data grid). here i am able to show data with no issue. the first datagrid has 5 rows the main problem that comes here is when you click any row in first datagrid i show 2 datagrid( which has 10 rows) lets say i click 3 row in 2 data grid. it show further records in third datagrid. again when i click 5 row in 2 data grid it show further records in third datagrid. now all the recods are shown fine when u try to collpase the 3 row in 2 data grid it collpase but the issue is the height what the third datagrid which took space for showing the records( we can see a blank space showing between the main 2 datagrid and third data grid) in every grid first column i have an button where i am writing this code for expand and collpase this is the functionality i am implementing in all the datagrid button where i do expand collpase. hope my question is clear . any help would great private void btn1_Click(object sender, RoutedEventArgs e) { try { Button btnExpandCollapse = sender as Button; Image imgScore = (Image)btnExpandCollapse.FindName("img"); DependencyObject dep = (DependencyObject)e.OriginalSource; while ((dep != null) && !(dep is DataGridRow)) { dep = VisualTreeHelper.GetParent(dep); } // if we found the clicked row if (dep != null && dep is DataGridRow) { DataGridRow row = (DataGridRow)dep; // change the details visibility if (row.DetailsVisibility == Visibility.Collapsed) { imgScore.Source = new BitmapImage(new Uri("/Images/a1.JPG", UriKind.Relative)); row.DetailsVisibility = Visibility.Visible; } else { imgScore.Source = new BitmapImage(new Uri("/Images/a2JPG", UriKind.Relative)); row.DetailsVisibility = Visibility.Collapsed; } } } catch (System.Exception) { } } --------------------------------------- 2 datagrid private void btn2_Click(object sender, RoutedEventArgs e) { try { Button btnExpandCollapse = sender as Button; Image imgScore = (Image)btnExpandCollapse.FindName("img"); DependencyObject dep = (DependencyObject)e.OriginalSource; while ((dep != null) && !(dep is DataGridRow)) { dep = VisualTreeHelper.GetParent(dep); } // if we found the clicked row if (dep != null && dep is DataGridRow) { DataGridRow row = (DataGridRow)dep; // change the details visibility if (row.DetailsVisibility == Visibility.Collapsed) { imgScore.Source = new BitmapImage(new Uri("/Images/a1.JPG", UriKind.Relative)); row.DetailsVisibility = Visibility.Visible; } else { imgScore.Source = new BitmapImage(new Uri("/Images/a2JPG", UriKind.Relative)); row.DetailsVisibility = Visibility.Collapsed; } } } catch (System.Exception) { } } ----------------- 3 datagrid private void btn1_Click(object sender, RoutedEventArgs e) { try { Button btnExpandCollapse = sender as Button; Image imgScore = (Image)btnExpandCollapse.FindName("img"); DependencyObject dep = (DependencyObject)e.OriginalSource; while ((dep != null) && !(dep is DataGridRow)) { dep = VisualTreeHelper.GetParent(dep); } // if we found the clicked row if (dep != null && dep is DataGridRow) { DataGridRow row = (DataGridRow)dep; // change the details visibility if (row.DetailsVisibility == Visibility.Collapsed) { imgScore.Source = new BitmapImage(new Uri("/Images/a1.JPG", UriKind.Relative)); row.DetailsVisibility = Visibility.Visible; } else { imgScore.Source = new BitmapImage(new Uri("/Images/a2JPG", UriKind.Relative)); row.DetailsVisibility = Visibility.Collapsed; } } } catch (System.Exception) { } }**

    Read the article

  • Ray intersection and child camera

    - by lutangar
    I've been playing with three.js for few weeks now and got few inconsistencies on ray casting. Here is a simplified version demonstrating one of the bug I encoutered : http://jsfiddle.net/eMrhb/12/ The camera is added to the sphere mesh for further use of TrackBallControl for example. scene.add(mesh); mesh.add(camera); Clicking a few times on the sphere and opening the console, show us none of the expected intersections between the ray and the mesh. Adding the camera to the scene (http://jsfiddle.net/eMrhb/9/), solves the problem: scene.add(mesh); scene.add(camera); But I could use a much more complex hierarchy between my scene objects and the camera to suit my needs. Is this a limitation? If it is, is there any workarounds I could use?

    Read the article

  • Display cube when overlapped?

    - by lptrung
    Hi all! I have a problem when run animation with three.j. See example: http://jsfiddle.net/5ywdE/13/ When the green cube is rotated to position of the blue cube, the red cube will be rotated. Question: why is the blue cube displayed while the green blue is in front of it. I want the green cube is displayed in front of the blue cube (like so the red cube is displayed in front of all). Can I set the cube which will be displayed in front of other cube in case of overlapped? What am I doing wrong?? Thanks in advance

    Read the article

  • How to calculate an angle from three points?

    - by HelloMoon
    Lets say you have this: P1 = (x=2, y=50) P2 = (x=9, y=40) P3 = (x=5, y=20) Assume that P1 is the center point of a circle. It is always the same. I want the angle that is made up by P2 and P3, or in other words the angle that is next to P1. The inner angle to be precise. It will be always a sharp angle, so less than -90 degrees. I thought: Man, that's simplest geometry maths. But I looked for a formula for like 6 hours now and people talk about most complicated NASA stuff like arcos and vector scalar product stuff. My head feels like in a fridge. Some math gurus here that think this is a simple problem? I think the programing language doesn't matter here but for those who think it does: java and objective-c. need that for both. haven't tagged it for these, though.

    Read the article

  • Join with three tables

    - by John
    Hello, For the join query below, I would like to pull some data from a third MySQL table called "comment." Each s.title has a corresponding s.submissionid. The field "submissionid" is also the in the table "comment." For each "submissionid" in the table "comment," I would like to count a field called "commentid." How can I do this? Thanks in advance, John $sqlStr = "SELECT s.loginid, s.title, s.url, s.displayurl, l.username FROM submission AS s, login AS l WHERE s.loginid = l.loginid ORDER BY s.datesubmitted DESC LIMIT 10";

    Read the article

  • query SQL how to check all records from a three table join share the same value

    - by Stefano
    Hello Since i'm a poor sql developer, i need support to write a sql query for the following scenario (just a simplified example of my situation): i've got 3 tables, say employe table,department table and companybranch table. the dept column , on the employe table is a fk on the department table; the branch column on the department table is a fk on the companybranch table. Finally more employee are "marked" with the same value . There's a way to select all employes with the same "mark" and, in the same query, check that they work in the same company branch ? thank you in advance Stefano

    Read the article

  • Insert <div> outside every three <li>

    - by ignaty
    Hello. I have something like this: function cat_filter() { $.ajax({ type: "POST", url: 'json/cat_filter.aspx', data: "catId=" + "&styleId=" + "&colourId=" + "&sizeId=" + "&minPrice=" + "&maxPrice=", dataType: "json", beforeSend: function () { //load loading cursor }, success: function (data) { var CatItems = ""; for (var x = 0; x < data.PRODUCTS.length; x++) { CatItems += '<li class="jcarousel-item jcarousel-item-horizontal jcarousel-item-' + [x] + ' jcarousel-item-' + [x] + '-horizontal jcarousel-item-placeholder jcarousel-item-placeholder-horizontal"><a class="large_image" href="#"><img src="' + data.PRODUCTS[x].product_img + '" alt="' + data.PRODUCTS[x].product_name + '"></a><h3 class="geo_17_darkbrown">' + data.PRODUCTS[x].product_name + '</h3>'; if (data.PRODUCTS[x].product_onsale == 1) { CatItems += '<img alt="sale" src="assets/images/sale.gif" class="sale"><span class="geo_17_red_linethr">&pound;' + data.PRODUCTS[x].product_retailprice + '</span>&nbsp;&nbsp;<span class="price geo_17_darkbrown">&pound;' + data.PRODUCTS[x].product_webprice + '</span>'; } else { CatItems += '<span class="price geo_17_darkbrown">&pound;' + data.PRODUCTS[x].product_webprice + '</span>'; } if (data.PRODUCTS[x].product_COLOURS) { CatItems += '<span class="colour">'; for (var y = 0; y < data.PRODUCTS[x].product_COLOURS.length; y++) { CatItems += '<span><a href="' + data.PRODUCTS[x].product_COLOURS[y].colours_large + '"><img src="' + data.PRODUCTS[x].product_COLOURS[y].colours_thumb + '" alt="' + data.PRODUCTS[x].product_COLOURS[y].colour_name + '" /></a></span>'; } CatItems += '</span>'; } CatItems += '</li>'; } $('.carousel_00 ul').html(CatItems); }, complete: function () { //remove loading cursor } }); } This code generates this html: <div class="carousel_00"> <ul> <li><a href="#" class="large_image"><img src="assets/images/dress1.gif" alt="image"></a> <h3 class="geo_17_darkbrown">Rachel Dress</h3> <span class="price geo_17_darkbrown">&pound;89.99</span> <span class="colour"> <span><a href="assets/images/big_image_1.gif"><img src="assets/images/black.gif" alt="balck"></a></span> <span><img src="assets/images/brown.gif" alt="brown"></span> <span><img src="assets/images/purple.gif" alt="purple"></span> </span> </li> <li><a href="#"><img src="assets/images/dress2.gif" alt="image"></a> <h3 class="geo_17_darkbrown">Rachel Dress</h3> <span class="price geo_17_darkbrown">&pound;89.99</span> </li> <li><img class="sale" src="assets/images/sale.gif" alt="sale" /><a href="#"><img src="assets/images/dress3.gif" alt="image"></a> <h3 class="geo_17_darkbrown">Rachel Dress</h3> <span class="geo_17_red_linethr">&pound;99.99</span>&nbsp;&nbsp;<span class="price geo_17_darkbrown">&pound;89.99</span> </li> <li><a href="#"><img src="assets/images/dress1.gif" alt="image"></a> <h3 class="geo_17_darkbrown">Rachel Dress</h3> <span class="price geo_17_darkbrown">&pound;59.99</span> </li> <li><a href="#"><img src="assets/images/dress2.gif" alt="image"></a> <h3 class="geo_17_darkbrown">Rachel Dress</h3> <span class="price geo_17_darkbrown">&pound;89.99</span> </li> <li><a href="#"><img src="assets/images/dress3.gif" alt="image"></a> <h3 class="geo_17_darkbrown">Rachel Dress</h3> <span class="price geo_17_darkbrown">&pound;89.99</span> </li> <li><a href="#"><img src="assets/images/dress1.gif" alt="image"></a> <h3 class="geo_17_darkbrown">Rachel Dress</h3> <span class="price geo_17_darkbrown">&pound;89.99</span> </li> <li><a href="#"><img src="assets/images/dress2.gif" alt="image"></a> <h3 class="geo_17_darkbrown">Rachel Dress</h3> <span class="price geo_17_darkbrown">&pound;89.99</span> </li> <li><a href="#"><img src="assets/images/dress3.gif" alt="image"></a> <h3 class="geo_17_darkbrown">Rachel Dress</h3> <span class="price geo_17_darkbrown">&pound;89.99</span> </li> </ul></div> What I need is that every 3 li's will be in div /div. I know that this is not semantic and not right, but this is only for example. (Basically if I will figure put how to do this, I will replace li's on spans and that div that i need outside li's on li). Will be very glad if someone will help me. Because code that I have is already too much for me.

    Read the article

  • Three Silverlight 4 issues

    - by Muhammad Jamal Shaikh
    Silverlight version : 4 Silverlight patter :MVVM Visual Studio template :Silverlight navigation application How do I block main navigation on (mainpage.xaml) as in any silverlight navigation application and block page's controls ( i.e whichever page is it in ) during async webservice calls? Any best practices? How do I deal with the browser's forward and backward buttons, specially during async calls? How do I deal with dialogs on the views ( e.g when using a childwindow to select a color). How should the color's picker control hex be communicated to the viewmodel?

    Read the article

  • how to 'scale' these three tables?

    - by iddqd
    I have the following Tables: Players id playerName Weapons id type otherData Weapons2Player id playersID_reference weaponsID_reference That was nice and simple. Now I need to SELECT items from the Weapons table, according to some of their characteristics that i previously just packed into the otherData column (since it was only needed on the client side). The problem is, that the types have varying characteristics - but also a lot of similar data. So I'm trying to decide on the following possibilities, all of which have their pros and cons. Solution A Kill the Weapons table, and create a new table for each Weapon-Type: Weapons_Swords id bladeType damage otherData Weapons_Guns id accuracy damage ammoType otherData But how will i Link these to the Players ? create Weapons_Swords2Players, Weapons_Guns2Players for each weapon-type? (Will result in a lot more JOINS when loading the player with all his weapons...and it's also more complicated to insert a new player) or add another column to Weapons2Players called WeaponsTypeTable, then do sub-selects to the correct Weapons sub-table (seems easier, but not really right, slightly easier insert i guess) Solution B Keep the Weapons table, and add all the fields i need to it. The Problem is that then there will be NULL fields, since not all Weapon-Types use all fields (can't be right) Weapons id type accuracy damage ammoType bladeType otherData This seems to be pretty basic stuff, but i just can't decide what's best. Or is there a correct Solution C? many thanks.

    Read the article

  • Issue while adding 'Cc' Field in 'TTMessageController' (Three 20)

    - by Deepika
    Hi All I am using the TTMessageController class for compose mail.There is only 'To' recepients Field in this class. I added the Cc Field in it. I have used this code: - (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil { if (self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]) { _fields = [[NSArray alloc] initWithObjects: [[[TTMessageRecipientField alloc] initWithTitle: TTLocalizedString(@"To:", @"") required: YES] autorelease], [[[TTMessageRecipientField alloc] initWithTitle: TTLocalizedString(@"Cc:", @"") required: YES] autorelease], [[[TTMessageSubjectField alloc] initWithTitle: TTLocalizedString(@"Subject:", @"") required: NO] autorelease], nil]; self.title = TTLocalizedString(@"New Message", @""); self.navigationItem.leftBarButtonItem = [[[UIBarButtonItem alloc] initWithTitle: TTLocalizedString(@"Cancel", @"") style: UIBarButtonItemStyleBordered target: self action: @selector(cancel)] autorelease]; self.navigationItem.rightBarButtonItem = [[[UIBarButtonItem alloc] initWithTitle: TTLocalizedString(@"Send", @"") style: UIBarButtonItemStyleDone target: self action: @selector(send)] autorelease]; self.navigationItem.rightBarButtonItem.enabled = NO; } return self; } When I type anything in 'To' or 'Cc' field , two lists are appearing as search result:- One for 'To' field and second for 'Cc' Field. I want to show only one list according to 'To' or 'Cc' Field. Please suggest me any idea how can I resolve it or some other better way to implement my requirements? Thanks Deepika

    Read the article

  • Rails: three most recent comments with unique users

    - by Dennis Collective
    what would I put in the named scope :by_unique_users so that I can do Comment.recent.by_unique_users.limit(3), and only get one comment per user? class User has_many :comments end class Comment belongs_to :user named_scope :recent, :order => 'comments.created_at DESC' named_scope :limit, lambda { |limit| {:limit => limit}} named_scope :by_unique_users end on sqlite named_scope :by_unique_user, :group = "user_id" works, but makes it freak out on postgres, which is deployed on production PGError: ERROR: column "comments.id" must appear in the GROUP BY clause or be used in an aggregate function

    Read the article

< Previous Page | 10 11 12 13 14 15 16 17 18 19 20 21  | Next Page >