Search Results

Search found 883 results on 36 pages for 'subset'.

Page 20/36 | < Previous Page | 16 17 18 19 20 21 22 23 24 25 26 27  | Next Page >

  • jQuery: Trouble inserting DOM elements

    - by Rosarch
    I want to add a set of lists to the children of another DOM element: var req_subsets = $("#req_subsets"); $.each(subsets, function(index, subset) { var subset_list = $("<ul></ul>"); // add DOM elements to subset_list req_subsets.append(subset_list); }); However, only one DOM element is ever added. This makes me suspect that when I assign a new value to subset_list, the old one is overwritten. If that is the problem, how do I avoid it? If not, what else am I doing wrong? UPDATE: I changed something else, and I'm almost entirely certain that this is fixed.

    Read the article

  • Committing file deletions to svn repository whilst ignoring some other local mods

    - by TheJuice
    I have svn repository where I have scheduled some files and folders to be moved in the repository with svn mv. I also have some files that are peers of the files to be moved that have local modifications of which I only want a subset of those files to be committed along with the moves. e.g. the output of svn st would look like: D foo/bar D foo/bar/a.txt D foo/bar/b.txt M foo/exclude.txt M foo/include.txt A foo/whiz/bar A + foo/whiz/bar/c.txt A + foo/whiz/bar/d.txt To commit to the moves to the repository, I would need to perform the commit on foo but that would also commit the modifications to foo/exclude.txt and foo/include.txt. How would I commit only the deletions/additions as a result of the move plus the mods to foo/include.txt whilst excluding foo/exclude.txt? I have a feeling the answer lies with the --depth argument to svn ci but it's not clear to me how it will operate.

    Read the article

  • Spotlight search with PHP

    - by htf
    Hi. I want to add a spotlight search functionality - search results being displayed with rich contents like thumbnail etc in a drop down menu changing on each keyup event - just like the apple.com search - to a site, having data in MySQL InnoDB tables. The data is spread into separate tables for categories, help pages, blog pages and so on. The search script must take into account just a subset of columns. Since it seems to be a popular demand, I guess there are some PHP search engine projects (preferably open-source and with memcached support), which could be integrated into the existing system on the basis of regular exports of relevant data from the working db/tables. Are there any solutions out there? Which one would you recommend? Or maybe it would be better to implement it the other way around? Thanks

    Read the article

  • [C#] Array as DataSource of a DataGrid: how to customize columns?

    - by pbean
    In my Windows Mobile .NET application I have a simple array of object with the data I want to display in my DataGrid. To do this, I simply call: myDataGrid.DataSource = myArray; This works, but I have a problem with it: it uses all properties as columns and uses the names of the properties as the column headers. I can't figure out how to customize two things: Select which subset of properties should be displayed as columns (say I have an ID, Name and Value property, I'd only want to show Name and Value); Rename the column headers to make more sense (for example if the property is called ID display a column header saying "Number"). Is this possible at all? As mentioned this is in a Windows Mobile .NET (version 2) application.

    Read the article

  • Is there a .def file equivalent on Linux for controlling exported function names in a shared library

    - by morpheous
    I am building a shared library on Ubuntu 9.10. I want to export only a subset of my functions from the library. On the Windows platform, this would be done using a module definition (.def) file which would contain a list of the external and internal names of the functions exported from the library. I have the following questions: How can I restrict the exported functions of a shared library to those I want (i.e. a .def file equivalent) Using .def files as an example, you can give a function an external name that is different from its internal name (useful for prevent name collisions and also redecorating mangled names etc) On windows I can use the EXPORT command (IIRC) to check the list of exported functions and addresses, what is the equivalent way to do this on Linux?

    Read the article

  • <transport> tag within the ServicesReferences.ClientConfig

    - by jdiaz
    I've created a WCF service and added it to an existing Silverlight application that I am working on. When I run the silverlight application in debug mode it fails when I reference the WCF web service. Unrecognized element '' in service reference configuration. Note that only a subset of the Windows Communication Foundation configuration functionality is available in Silverlight. After searching around apparently the following line is causing the app to fail: <transport> <extendedProtectionPolicy policyEnforcement="Never" /> </transport> After removing the above lines everything works. What is the issue here? Should I believing this code in and configuring something else?

    Read the article

  • jQuery-AJAX to rebind dropdown list to results from stored procedure

    - by webworm
    I have a dropdown list of peoples names that is quite long. As many as 2,000 names. I would like to make it easier to find the name the user is interested in by limiting the dropdown list to a subset of names at a time. I have done this by creating a series of 26 links (A, B, C ... Z) that call a method in the code behind that populates the dropdown list with only those names starting with the letter the user clicked. This all works well but I would like to be able to use AJAX to accomplish this update of the dropdown list without a page refresh. I would like to use jQuery for the AJAX functionality rather than ASP.NET AJAX. My problem is I am not sure how to execute the stored procedure and then "rebind" the dropdown list with the new dataset via jQuery AJAX. Any suggestions or resources that might provide and example or walk-through? Thank you.

    Read the article

  • Replicating Java's DecimalFormat in C#

    - by Frank Krueger
    I am trying to replicate a subset of Java's DecimalFormat class. Below is what I've come up with. Does this look right to everyone? public class DecimalFormat : NumberFormat { int _maximumFractionDigits; int _minimumFractionDigits; string _format; void RebuildFormat () { _format = "{0:0."; _format += new string ('0', _minimumFractionDigits); if (_maximumFractionDigits > _minimumFractionDigits) { _format += new string ('#', _maximumFractionDigits - _minimumFractionDigits); } _format += "}"; } public override string format (object value) { return string.Format (_format, value); } public override void setMaximumFractionDigits (int n) { _maximumFractionDigits = n; RebuildFormat (); } public override void setMinimumFractionDigits (int n) { _minimumFractionDigits = n; RebuildFormat (); } public override void setGroupingUsed (bool g) { } public static NumberFormat getInstance () { return new DecimalFormat (); } }

    Read the article

  • What's the proper technical term for "high ascii" characters?

    - by moodforaday
    What is the technically correct way of referring to "high ascii" or "extended ascii" characters? I don't just mean the range of 128-255, but any character beyond the 0-127 scope. Often they're called diacritics, accented letters, sometimes casually referred to as "national" or non-English characters, but these names are either imprecise or they cover only a subset of the possible characters. What correct, precise term that will programmers immediately recognize? And what would be the best English term to use when speaking to a non-technical audience?

    Read the article

  • select n largest using LINQ

    - by Mathias
    This is likely a novice question about LINQ, but assuming I have a set of Items with a DateTime property, one date having at most one item, how would I go about selecting the N most recent items from a date of reference, that is, the N items which have a date smaller that the requested date, and the largest date? My naive thought would be to first select items with a date smaller than the reference date, sort by date, and select the N first items from that subset. var recentItems = from item in dataContext.Items where item.Date<=date orderby item.Date descending select item; var mostRecentItems = recentItems.Take(5).ToList(); Is this the "right" way to do it, or are there obviously better ways to achieve my goal?

    Read the article

  • Remove all problematic characters in an intelligent way in C#

    - by J. Pablo Fernández
    Is there any .Net library to remove all problematic characters of a string and only leave alphanumeric, hyphen and underscore (or similar subset) in an intelligent way? This is for using in URLs, file names, etc. I'm looking for something similar to stringex which can do the following: A simple prelude "simple English".to_url = "simple-english" "it's nothing at all".to_url = "its-nothing-at-all" "rock & roll".to_url = "rock-and-roll" Let's show off "$12 worth of Ruby power".to_url = "12-dollars-worth-of-ruby-power" "10% off if you act now".to_url = "10-percent-off-if-you-act-now" You don't even wanna trust Iconv for this next part "kick it en Français".to_url = "kick-it-en-francais" "rock it Español style".to_url = "rock-it-espanol-style" "tell your readers ??".to_url = "tell-your-readers-ni-hao"

    Read the article

  • SQL query duration is longer for smaller dataset?

    - by entens
    I received reports that a my report generating application was not working. After my initial investigation, I found that the SQL transaction was timing out. I'm mystified as to why the query for a smaller selection of items would take so much longer to return results. Quick query (averages 4 seconds to return): SELECT * FROM Payroll WHERE LINEDATE >= '04-17-2010'AND LINEDATE <= '04-24-2010' ORDER BY 'EMPLYEE_NUM' ASC, 'OP_CODE' ASC, 'LINEDATE' ASC Long query (averages 1 minute 20 seconds to return): SELECT * FROM Payroll WHERE LINEDATE >= '04-18-2010'AND LINEDATE <= '04-24-2010' ORDER BY 'EMPLYEE_NUM' ASC, 'OP_CODE' ASC, 'LINEDATE' ASC I could simply increase the timeout on the SqlCommand, but it doesn't change the fact the query is taking longer than it should. Why would requesting a subset of the items take longer than the query that returns more data? How can I optimize this query?

    Read the article

  • Ignoring unclosed tags from another <div>?

    - by Mike
    I have a website where members can input text using a limited subset of HTML. When a page is displayed that contains a user's text, if they have any unclosed tags, the formatting "bleeds" across into the next area. For example, if the user entered: Hi, my name is <b>John Then, the rest of the page will be bold. Ideally, there'd be someting I could do that would be this simple: <div contained>Hi, my name is <b>John</div> And no tags could bleed out of that div. Assuming there isn't anything this simple, how would I accomplish a similar effect? Or, is there something this easy? Importantly, I do not want to validate the user's input and return an error if they have unclosed tags, since I want to provide the "easiest" user interface possible for my users. Thanks!

    Read the article

  • New to C/C++ Using Android NDK to port Legacy code, getting compile errors

    - by Donal Rafferty
    I have been trying to take some old Symbian C++ code over to Android today using the NDK. I have little to no C or C++ knowledge so its been a chore, however has to be done. My main issue is that I'm having trouble porting what I believe is Symbian specifi code to work using the small C/C++ subset that is available with the Android NDK. Here is a picture of the compilation errors I'm getting using cygwin I was wondering if anyone could point me in the right direction on how to deal with these errors? For instance is TBool/Int/TUint/RPointerArray/RSocket a Symbian primitive and thats why it wont compile or is it something else? Also what is ISO C++? Any tutorials, guides or tips and help would be greatly appreciated.

    Read the article

  • Marionette multi user/roles application

    - by Fabrizio Fortino
    I have to build a pretty complex application using Backbone Marionette. The user interface has to handle multiple users with different roles. For example the 'admin' user will see the complete menu whereas the 'guest' user will access a subset of the same menu. Moreover some views will be accessible to all the users but the functions inside them (add, edit, delete) need to be profiled on the different roles. I am not sure about the right approach to use in order to solve this issue. I could have different templates for the different roles but in this case plenty of code will be duplicated inside them. Is there any best practice (or maybe some example) to sort my problem out using Marionette? Thanks in advance, Fabrizio

    Read the article

  • Changing ylim (axis limits) drops data falling outside range. How can this be prevented?

    - by Alex Holcombe
    df <- data.frame(age=c(10,10,20,20,25,25,25),veg=c(0,1,0,1,1,0,1)) g=ggplot(data=df,aes(x=age,y=veg)) g=g+stat_summary(fun.y=mean,geom="point") Points reflect mean of veg at each age, which is what I expected and want to preserve after changing axis limits with the command below. g=g+ylim(0.2,1) Changing axis limits with the above command unfortunately causes veg==0 subset to be dropped from the data, yielding "Warning message: Removed 4 rows containing missing values (stat_summary)" This is bad because now the data plot (stat_summary mean) omits the veg==0 points. How can this be prevented? I simply want to avoid showing the empty part of the plot- the ordinate from 0 to .2, but not drop the associated data from the stat_summary calculation.

    Read the article

  • Algorithm to find a measurement of similarity between lists.

    - by Cubed
    Given that I have two lists that each contain a separate subset of a common superset, is there an algorithm to give me a similarity measurement? Example: A = { John, Mary, Kate, Peter } and B = { Peter, James, Mary, Kate } How similar are these two lists? Note that I do not know all elements of the common superset. Update: I was unclear and I have probably used the word 'set' in a sloppy fashion. My apologies. Clarification: Order is of importance. If identical elements occupy the same position in the list, we have the highest similarity for that element. The similarity decreased the farther apart the identical elements are. The similarity is even lower if the element only exists in one of the lists. I could even add the extra dimension that lower indices are of greater value, so a a[1] == b[1] is worth more than a[9] == b[9], but that is mainly cause I am curious.

    Read the article

  • How can I generate a list of symbols used by a build product from a particular statically linked lib

    - by morechilli
    Say I have a visual studio project that builds a windows exe or dll from c++ source. The project statically links to several library (.lib) files. I would like to generate the subset of the available functionality in a particular .lib that the project actually links to. A very crude way to achieve this would be to remove the .lib from the linker input list. The error list on the build would then show me all the symbols that could not be found. Is there a better/proper way to generate this list, I'm happy with a solution that can be run as a custom build step in the project or one that runs against a built binary. I've looked at both the linker and dumpbin command line options but have not seen anything appropriate.

    Read the article

  • SQL update fields of one table from fields of another one.

    - by Nir
    I'm having two tables: A [ID, column1, column2, column3] B [ID, column1, column2, column3, column4] A table will always be subset of B table (meaning all columns of A are also in B). I want to update a record with a specific ID in B with their data from A for all columns of A. This ID exists both in A and B. Is there an UPDATE syntax or any other way to do that without specifying the column names, just saying "set all columns of A"? I'm using postgresql, so a specific non-standard command is also accepted (however, not preferred). Thanks.

    Read the article

  • Export Sharepoint 2007 Custom List as RSS File

    - by matt
    Here's our scenario: We've created a sharepoint 2007 calendar on our intranet site We want to run a daily job to export a subset of the events to an rss file Another job will move the rss file to our public web site We have some funny restrictions where we can't simply publish the rss feed to the public. We have to go this export route. I'm not clear on how to accomplish step 2. Ideally, we wouldn't have to write a lot of custom code to accomplish this. Thanks.

    Read the article

  • Deserialize array values to .NET properties using DataContractJsonSerializer

    - by James Cadd
    I'm working with the DataContractJsonSerializer in Silverlight 4 and would like to deserialize the following JSON: { "collectionname":"Books", "collectionitems": [ ["12345-67890",201, "Book One"], ["09876-54321",45, "Book Two"] ] } Into classes like the following: class BookCollection { public string collectionname { get; set; } public List<Book> collectionitems { get; set; } } class Book { public string Id { get; set; } public int NumberOfPages { get; set; } public string Title { get; set; } } What's the proper place to extend DataContractJsonSerializer to map the unnamed first array element in "collectionitems" to the Id property of the Book class, the second element to the NumberOfPages property and the final element to Title? I don't have control over the JSON generation in this instance and would like the solution to work with the Silverlight subset of .NET. It would be great if the solution could perform the reverse for serialization as well.

    Read the article

  • Should I use implicit conversions to enforce preconditions?

    - by Malvolio
    It occurs to me that I could use use implicit conversions to both announce and enforce preconditions. Consider this: object NonNegativeDouble { implicit def int2nnd(d : Double) : NonNegativeDouble = new NonNegativeDouble(d) implicit def nnd2int(d : NonNegativeDouble) : Double = d.v def sqrt(n : NonNegativeDouble) : NonNegativeDouble = scala.math.sqrt(n) } class NonNegativeDouble(val v : Double ) { if (v < 0) { throw new IllegalArgumentException("negative value") } } object Test { def t1 = { val d : Double = NonNegativeDouble.sqrt(3.0); printf("%f\n", d); val n : Double = NonNegativeDouble.sqrt(-3.0); } } Ignore for the moment the actual vacuity of the example: my point is, the subclass NonNegativeDouble expresses the notion that a function only takes a subset of the entire range of the class's values. First is this: A good idea, a bad idea, or an obvious idea everybody else already knows about Second, this would be most useful with basic types, like Int and String. Those classes are final, of course, so is there a good way to not only use the restricted type in functions (that's what the second implicit is for) but also delegate to all methods on the underlying value (short of hand-implementing every delegation)?

    Read the article

  • How to do Linq aggregates when there might be an empty set?

    - by Shaul
    I have a Linq collection of Things, where Thing has an Amount (decimal) property. I'm trying to do an aggregate on this for a certain subset of Things: var total = myThings.Sum(t => t.Amount); and that works nicely. But then I added a condition that left me with no Things in the result: var total = myThings.Where(t => t.OtherProperty == 123).Sum(t => t.Amount); And instead of getting total = 0 or null, I get an error: System.InvalidOperationException: The null value cannot be assigned to a member with type System.Decimal which is a non-nullable value type. That is really nasty, because I didn't expect that behavior. I would have expected total to be zero, maybe null - but certainly not to throw an exception! What am I doing wrong? What's the workaround/fix?

    Read the article

  • Will .NET 4.0 apps work on Win 2008 R2 Server Core?

    - by markus
    When Windows Server 2008 R2 was launched, the "server core" edition started to become useful to me, because it lets me deploy .NET background applications isolated on their own virtual machine instance with only a small fraction of all the disk space overhead of a default Windows Server installation, and very few Windows Updates. It comes with a subset of .NET 3.5 SP1 integrated (as an optional feature). Now that .NET 4.0 is released, the redistributables explicitly state that it's not support on Server Core. Any chance that there will be a separate download available for Server Core (e. g. without WPF) any time soon, has anybody heard about it?

    Read the article

  • How can I support conditional validation of model properties

    - by Jeff
    I currently have a form that I am building that needs to support two different versions. Each version might use a different subset of form fields. I have to do this to support two different clients, but I don't want to have entirely different controller actions for both. So, I am trying to come up with a way to use a strongly typed model with validation attributes but have some of these attributes be conditional. Some approaches I can think of is similar to steve sanderson's partial validation approach. Where I would clear the model errors in a filter OnActionExecuting based on which version of the form was active. The other approach I was thinking of would to break the model up into pieces using something like class FormModel { public Form1 Form1Model {get; set;} public Form2 FormModel {get; set;} } and then we would validate appropriately depending on

    Read the article

< Previous Page | 16 17 18 19 20 21 22 23 24 25 26 27  | Next Page >