Search Results

Search found 6479 results on 260 pages for 'distribution lists'.

Page 22/260 | < Previous Page | 18 19 20 21 22 23 24 25 26 27 28 29  | Next Page >

  • Find all numbers that appear in each of a set of lists

    - by Ankur
    I have several ArrayLists of Integer objects, stored in a HashMap. I want to get a list (ArrayList) of all the numbers (Integer objects) that appear in each list. My thinking so far is: Iterate through each ArrayList and put all the values into a HashSet This will give us a "listing" of all the values in the lists, but only once Iterate through the HashSet 2.1 With each iteration perform ArrayList.contains() 2.2 If none of the ArrayLists return false for the operation add the number to a "master list" which contains all the final values. If you can come up with something faster or more efficient, funny thing is as I wrote this I came up with a reasonably good solution. But I'll still post it just in case it is useful for someone else. But of course if you have a better way please do let me know.

    Read the article

  • how to interleaving lists

    - by user2829177
    I have two lists that could be not equal in lengths and I want to be able to interleave them. I want to be able to append the extra values in the longer list at the end of my interleaved list.I have this: a=xs b=ys minlength=[len(a),len(b)] extralist= list() interleave= list() for i in range((minval(minlength))): pair=a[i],b[i] interleave.append(pair) flat=flatten(interleave) c=a+b if len(b)>len(a): remainder=len(c)-len(a) for j in range(-remainder): extra=remainder[j] extralist.append(extra) if len(a)>len(b): remainder=len(c)-len(b) for j in range(-remainder): extra=remainder[j] final=flat+extralist return final but if I test it: >>> interleave([1,2,3], ["hi", "bye",True, False, 33]) [1, 'hi', 2, 'bye', 3, True] >>> The False and 33 don't appear. What is it that Im doing wrong?

    Read the article

  • Programming DataEntry&Forms: Population of Official Common Data Lists

    - by rlb.usa
    As a programmer of data-entry forms of all kinds, I often find myself making fields for things like Country and State. Consider: Perhaps a list the 50 United States names is an easy thing to find (does one include DC?) , but the countries are not. Nearly every site you find has a differing list with all of the political goings on over the years, and they become outdated quickly. What's the best practice regarding population of these kinds of lists? Is there an official list somewhere that one uses to populate these kinds of formal/official fields? Where do you get this data from, when it's not exactly specified in the specs?

    Read the article

  • hibernate - Postgres- target lists can have at most 1664 entries

    - by Vineyard
    We are using hibernate, postgres 8.3x Our entities are many to one mapped with eager fetching. We have multiple associations with Many to one mapping. As we added new columns to any other existing entities, We are getting below error: target lists can have at most 1664 entries I searched internet and they say this is due to More number of select statements in sql query (generated by hibernate) Can you any body please let us know if there is any configuration (in postgres) to update max number columns in configuration or any other solution to solve this issue. Thank you in advance.

    Read the article

  • How to maintain 2 lists of object

    - by michael
    Hi, My c++ program needs to maintain 2 list of objects. list inuse; list free; So objects A can even in 'inuse' list or in 'free' list, but not both. http://www.cplusplus.com/reference/stl/list/ I am think of using 'list' as the data structure for my lists. My questions are 1. why i can't randomly access an elmenet in the list, I look at the above api, I don't see a way to get inuse[2]; 2. How can I remove an element in the list? There is an erase(), but how can I use it to remove element #2? And after I remove element 2? will STL list fill the erased spot automatically? e.g. #3 will become #2, #4 will become #3 and so on? Thank you.

    Read the article

  • Optimal diff between object lists in Java

    - by Philipp
    I have a List of Java objects on my server which is sent to the client through some serialization mechanism. Once in a while the List of objects gets updated on the server, that is, some objects get added, some get deleted and others just change their place in the List. I want to update the List on the client side as well, but send the least possible data. Especially, I don't want to resend Objects which are already available on the client. Is there a library available which will produce some sort of diff from the two lists, so that I can only send the difference and the new Objects accross the wire? I have found several Java implementation of the unix diff command, but this algorithm is unpractical for order changes. ie. [A,B,C] - [C,B,A] could be sent as only place changes [1-3] [3-1], while diff will want to resend the whole A and C objects (as far as I understand).

    Read the article

  • Compare two object lists with LINQ on specific property

    - by Niklas
    I have these two lists (where the Value in a SelectListItem is a bookingid): List<SelectListItem> selectedbookings; List<Booking> availableBookings; I need to find the ids from selectedBookings that are not in availableBookings. The LINQ join below will only get me the bookingids that are in availableBookings, and I'm not sure how to do it the other way around. != won't work since I'm comparing strings. results = ( from s in selectedbookings join a in availableBookings on s.bookingID.ToString() equals a.Value select s);

    Read the article

  • python equivalent of filter() getting two output lists

    - by FX
    Let's say I have a list, and a filtering function. Using something like >>> filter(lambda x: x > 10, [1,4,12,7,42]) [12, 42] I can get the elements matching the criterion. Is there a function I could use that would output two lists, one of elements matching, one of the remaining elements? I could call the filter() function twice, but that's kinda ugly :) Edit: the order of elements should be conserved, and I may have identical elements multiple times.

    Read the article

  • Need to sync two lists with atrribute time, but times aren't equal

    - by virgula24
    I gonna try to describe my problem the best i can. I have two lists, one with audio frames and other with color frames (not relevant). Both of them have timestamps, they were captured at the same moment but at different instants. So, i have like this: index COLOR AUDIO 0 841 846 1 873 897 2 905 948 3 940 1000 the frames start at high numbers because they were captured and then trimmed to specific parts, but im shot, frame 0 is synced with only 5ms apart(timestamp in ms). On every case i have, the audio frames count is less than the color count. I need to make them have the same count. The stating frames may be coloraudio, color

    Read the article

  • ATI Radeon Drivers works with which linux distribution and version?

    - by amit.codename13
    I have ATI Mobility Radeon HD 5850 graphics card. Almost every new linux distribution seems to have an issue with it, when i install the drivers. Working without utilizing the graphics card leaves me so unproductive. So i made a plan to use older versions of linux, any distribution suitable as a desktop distribution. UPDATE: The kind of problems that i am facing are, 1) After installing drivers the system boots and hangs, 2) There are unusual lines over the screen 3) After upgrade system doesn't start properly(hangs the usual old way) The kind of answers i am looking for is, distribution X(the newer the version the better) doesn't have the above problem after installing drivers for ATI Mobility Radeon HD 5850 graphics card. UPDATE: The new drivers released by AMD seems to fix all the issues, although they are still beta Thanks

    Read the article

  • ATI Radeon Drivers works with which linux distribution and version? [closed]

    - by amit.codename13
    I have ATI Mobility Radeon HD 5850 graphics card. Almost every new linux distribution seems to have an issue with it, when i install the drivers. Working without utilizing the graphics card leaves me so unproductive. So i made a plan to use older versions of linux, any distribution suitable as a desktop distribution. The problems that i am facing are, 1) After installing drivers the system boots and hangs, 2) There are unusual lines over the screen 3) After upgrade system doesn't start properly(hangs the usual old way) The kind of answers i am looking for is, distribution X(the newer the version the better) doesn't have the above problem after installing drivers for ATI Mobility Radeon HD 5850 graphics card. UPDATE: The new drivers released by AMD seems to fix all the issues, although they are still beta

    Read the article

  • how do I list Distribution Group (List) and their members inside of an OU using AD or exchange 2010

    - by wraak
    our entire domain has thousands of distribution groups, while i can use the script referenced here: How to get a list of all Distribution Lists and their Members in Exchange 2007? to pull all distribution groups and their members, it would be too hard to filter through all results. I particularilly need to pull either a. (preferred) all groups (both distribution and security) and their members inside of an OU (this particular OU contains over 100 hundred groups) or b. all groups and members matching a name starting with exampl* dsquery | dsget looks like could almost serve that purpose however when i did: dsquery group "OU=my-department,DC=blah,DC=blahblah,DC=com" -name * | dsget group -members (-expand) c:\my-department.txt it displays only the members without showing which group they belong to. The output I need should have: group name, members and potentially expanded sub-groups. i am still researching on how to get this done, seems like i can somehow make the above referenced script to search only inside of an OU, but i am not very familiar with powershell. any help would be appreciated, thank you.

    Read the article

  • Is there a way to convert a list of cc'es to a distribution list in Outlook?

    - by Will M
    In Outlook 2003, I find myself frequently sending emails to the same group of people all working on a project. I'd like to find a simple way to convert the list of addresses in an email that I would "reply all" to into an Outlook distribution list for future use. I know how to create Outlook distribution lists, that's not my question. But the normal process that I see in Outlook requires adding the names to the list one by one. If I have an email with a large "reply all" list is there any way to take that whole list all at once (including many email addresses not otherwise already in my Outlook contacts) and convert it to a distribution list in one step? Trying to google for this answer got me many, many pages of instructions on how to create a distribution list, but I can't seem to find the search term to locate an answer on how to convert a list of address.

    Read the article

  • creating a new distribution profile for a application after deleting it from iphone??

    - by hemant
    i created a distribution profile of my application,installed and tested it on my iphone and uploaded the binary to app store...due to some usual reasons apple rejected it and asked me to make a few changes...meanwhile i deleted the application from my iphone...now when i reinstall it says valid provisioning profile is not present so will i have to repeat the whole process of making a distribution profile and then upload it to the store...provisional profile cannot change so should i create the new distribution profile with the same one and delete the old distribution profile i made??

    Read the article

  • Create many constrained, random permutation of a list

    - by Eyal
    I need to make a random list of permutations. The elements can be anything but assume that they are the integers 0 through x-1. I want to make y lists, each containing z elements. The rules are that no list may contain the same element twice and that over all the lists, the number of times each elements is used is the same (or as close as possible). For instance, if my elements are 0,1,2,3, y is 6, and z is 2, then one possible solution is: 0,3 1,2 3,0 2,1 0,1 2,3 Each row has only unique elements and no element has been used more than 3 times. If y were 7, then 2 elements would be used 4 times, the rest 3.

    Read the article

  • Sorting in Matlab

    - by smichak
    Hi, I would like to sort elements in a comma-separated list. The elements in the list are structs and I would like the list to be sorted according to one of the fields in the struct. For example, given the following code: L = {struct('obs', [1 2 3 4], 'n', 4), struct('obs', [6 7 5 3], 'n', 2)}; I would want to have a way to sort L by the field 'n'. Matlab's sort function only works on matrices or arrays and on lists of strings (not even lists of numbers). Any ideas on how that may be achieved? Thanks, Micha

    Read the article

  • Combining entries, filtering of Python dictionaries

    - by matt
    I have two large lists that are filled with dictionaries. I need to combine the entries if a value from dict2==dict1 and place the newly combined matches somewhere else. I'm having trouble explaining it. List one contains: {'keyword':value, 'keyword2':value2} List two: {'keyword2':value2, 'keyword3':value3} I want a new list with dictionaries including keyword1, keyword2, and keyword3 if both lists share the same 'keyword2' value. What's the best way to do this? When I try, I only come up with tons of nested for loops. Thanks

    Read the article

  • Exploring TCP throughput with DTrace (2)

    - by user12820842
    Last time, I described how we can use the overlap in distributions of unacknowledged byte counts and send window to determine whether the peer's receive window may be too small, limiting throughput. Let's combine that comparison with a comparison of congestion window and slow start threshold, all on a per-port/per-client basis. This will help us Identify whether the congestion window or the receive window are limiting factors on throughput by comparing the distributions of congestion window and send window values to the distribution of outstanding (unacked) bytes. This will allow us to get a visual sense for how often we are thwarted in our attempts to fill the pipe due to congestion control versus the peer not being able to receive any more data. Identify whether slow start or congestion avoidance predominate by comparing the overlap in the congestion window and slow start distributions. If the slow start threshold distribution overlaps with the congestion window, we know that we have switched between slow start and congestion avoidance, possibly multiple times. Identify whether the peer's receive window is too small by comparing the distribution of outstanding unacked bytes with the send window distribution (i.e. the peer's receive window). I discussed this here. # dtrace -s tcp_window.d dtrace: script 'tcp_window.d' matched 10 probes ^C cwnd 80 10.175.96.92 value ------------- Distribution ------------- count 1024 | 0 2048 | 4 4096 | 6 8192 | 18 16384 | 36 32768 |@ 79 65536 |@ 155 131072 |@ 199 262144 |@@@ 400 524288 |@@@@@@ 798 1048576 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 3848 2097152 | 0 ssthresh 80 10.175.96.92 value ------------- Distribution ------------- count 268435456 | 0 536870912 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 5543 1073741824 | 0 unacked 80 10.175.96.92 value ------------- Distribution ------------- count -1 | 0 0 | 1 1 | 0 2 | 0 4 | 0 8 | 0 16 | 0 32 | 0 64 | 0 128 | 0 256 | 3 512 | 0 1024 | 0 2048 | 4 4096 | 9 8192 | 21 16384 | 36 32768 |@ 78 65536 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 5391 131072 | 0 swnd 80 10.175.96.92 value ------------- Distribution ------------- count 32768 | 0 65536 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 5543 131072 | 0 Here we are observing a large file transfer via http on the webserver. Comparing these distributions, we can observe: That slow start congestion control is in operation. The distribution of congestion window values lies below the range of slow start threshold values (which are in the 536870912+ range), so the connection is in slow start mode. Both the unacked byte count and the send window values peak in the 65536-131071 range, but the send window value distribution is narrower. This tells us that the peer TCP's receive window is not closing. The congestion window distribution peaks in the 1048576 - 2097152 range while the receive window distribution is confined to the 65536-131071 range. Since the cwnd distribution ranges as low as 2048-4095, we can see that for some of the time we have been observing the connection, congestion control has been a limiting factor on transfer, but for the majority of the time the receive window of the peer would more likely have been the limiting factor. However, we know the window has never closed as the distribution of swnd values stays within the 65536-131071 range. So all in all we have a connection that has been mildly constrained by congestion control, but for the bulk of the time we have been observing it neither congestion or peer receive window have limited throughput. Here's the script: #!/usr/sbin/dtrace -s tcp:::send / (args[4]-tcp_flags & (TH_SYN|TH_RST|TH_FIN)) == 0 / { @cwnd["cwnd", args[4]-tcp_sport, args[2]-ip_daddr] = quantize(args[3]-tcps_cwnd); @ssthresh["ssthresh", args[4]-tcp_sport, args[2]-ip_daddr] = quantize(args[3]-tcps_cwnd_ssthresh); @unacked["unacked", args[4]-tcp_sport, args[2]-ip_daddr] = quantize(args[3]-tcps_snxt - args[3]-tcps_suna); @swnd["swnd", args[4]-tcp_sport, args[2]-ip_daddr] = quantize((args[4]-tcp_window)*(1 tcps_snd_ws)); } One surprise here is that slow start is still in operation - one would assume that for a large file transfer, acknowledgements would push the congestion window up past the slow start threshold over time. The slow start threshold is in fact still close to it's initial (very high) value, so that would suggest we have not experienced any congestion (the slow start threshold is adjusted when congestion occurs). Also, the above measurements were taken early in the connection lifetime, so the congestion window did not get a changes to get bumped up to the level of the slow start threshold. A good strategy when examining these sorts of measurements for a given service (such as a webserver) would be start by examining the distributions above aggregated by port number only to get an overall feel for service performance, i.e. is congestion control or peer receive window size an issue, or are we unconstrained to fill the pipe? From there, the overlap of distributions will tell us whether to drill down into specific clients. For example if the send window distribution has multiple peaks, we may want to examine if particular clients show issues with their receive window.

    Read the article

  • Android : un nouveau canal de distribution privée spécialement dédié aux entreprises arrive dans le Google Play Store

    Android : un nouveau canal de distribution privé Spécialement dédié aux entreprises, il arrive dans le Google Play Store Voilà une nouveauté qui va plaire aux professionnels en charge de la gestion des applications d'entreprise. Le Google Play Store (ex-Android Market) s'enrichit d'un nouveau « canal de distribution » spécialement dédié aux professionnels. Baptisé Google Play Private Channel, il permet de déployer des applications mobiles sans passer par la galerie grand public. L'entreprise ouvre un domaine sur Google Play, met en ligne ses apps privées, et l'utilisateur n'a plus qu'à se connecter avec son adresse corporate ? via le Marketplace ? à ce domaine...

    Read the article

  • Selected Item in Dropdown Lists from Enum in ASP.net MVC

    - by AlexCuse
    Sorry if this is a dup, my searching turned up nothing. I am using the following method to generate drop down lists for enum types (lifted from here: http://addinit.com/?q=node/54): public static string DropDownList(this HtmlHelper helper, string name, Type type, object selected) { if (!type.IsEnum) throw new ArgumentException("Type is not an enum."); if(selected != null && selected.GetType() != type) throw new ArgumentException("Selected object is not " + type.ToString()); var enums = new List<SelectListItem>(); foreach (int value in Enum.GetValues(type)) { var item = new SelectListItem(); item.Value = value.ToString(); item.Text = Enum.GetName(type, value); if(selected != null) item.Selected = (int)selected == value; enums.Add(item); } return System.Web.Mvc.Html.SelectExtensions.DropDownList(helper, name, enums, "--Select--"); } It is working fine, except for one thing. If I give the dropdown list the same name as the property on my model the selected value is not set properly. Meaning this works: <%= Html.DropDownList("fam", typeof(EnumFamily), Model.Family)%> But this doesn't: <%= Html.DropDownList("family", typeof(EnumFamily), Model.Family)%> Because I'm trying to pass an entire object directly to the controller method I am posting to, I would really like to have the dropdown list named for the property on the model. When using the "right" name, the dropdown does post correctly, I just can't seem to set the selected value. I don't think this matters but I am running MVC 1 on mono 2.6

    Read the article

  • Books and resources for Java Performance tuning - when working with databases, huge lists

    - by Arvind
    Hi All, I am relatively new to working on huge applications in Java. I am working on a Java web service which is pretty heavily used by various clients. The service basically queries the database (hibernate) and then works with a lot of Lists (there are adapters to convert list returned from DB to the interface which the service publishes) and I am seeing lot of issues with the service like high CPU usage or high heap space. While I can troubleshoot the performance issues using a profiler, I want to actually learn about what all I need to take care when I actually write code. Like what kind of List to use or things like using StringBuilder instead of String, etc... Is there any book or blogs which I can refer which will help me while I write new services? Also my application is multithreaded - each service call from a client is a new thread, and I want to know some best practices around that area as well. I did search the web but I found many tips which are not relevant in the latest Java 6 releases, so wanted to know what kind of resources would help a developer starting out now on Java for heavily used applications. Arvind

    Read the article

  • SugarCRM SOAP set_relationship between Contacts and Prospect lists bug

    - by AntonioCS
    Hey! I am trying to create a relationship between a Prospect List (target list) and a Contact. I create a new contact and get the id of a prospect list all using classes I created which are just wrappers for the soap api calls sugar provides. But the code boils down to this soap call: $this->_sugarsoap->client->__soapCall('set_relationship', array($this->getSessionid(),$relationship)); $this-getSessionid() Is the session Id and $relationship is an array which holds this: array 0 => string 'ProspectLists' (length=13) 1 => string '180ab1f5-cf7e-d386-50f8-4c18a790e016' (length=36) 2 => string 'Contacts' (length=8) 3 => string '76323942-8cbb-3224-f18a-4c19efa80a1b' (length=36) After I try this I always get this error: (I do a var_dump of the returned values of the soap call) object(stdClass)[5] public 'number' => string '20' (length=2) public 'name' => string 'Module Does Not Exist' (length=21) public 'description' => string 'This module is not available on this server' (length=43) This seems like a sugarcrm bug because I do have the contacts module and also the prospect lists module. I know this for a fact because I add a contact via the soap call and also retrieve the id of a prospect list via the soap call. I found this thread in the sugar forums and I did try the code given there but I still got the same error. Anyone have a solution for this? I really need to associate a contact to a prospect list (target list) via a soap call. I am using SugarCRM 5.5.0 (I also tried with sugarcrm 5.5.2 and got the same error) on ubuntu server using mysql. Thanks!

    Read the article

  • PHP Markdown Extra and Definition Lists

    - by Kirk Bentley
    I'm currently generating a definition list with PHP Markdown Extra with the following syntax: Term : Description : Description Two My Other Term : Description which generates the following HTML: <dl> <dt>Term</dt> <dd>Description</dd> <dd>Description Two</dd> <dt>My Other Term</dt> <dd>Description</dd> </dl> Does anyone know how I can get Markdown to create separate definition lists for each definition term and descriptions to create markup like this? <dl> <dt>Term</dt> <dd>Description</dd> <dd>Description Two</dd> </dl> <dl <dt>My Other Term</dt> <dd>Description</dd> </dl>

    Read the article

  • Java anagram recursion List<List<String>> only storing empty lists<Strings>

    - by Riff Rafffer
    Hi In this recursion method i am trying to find all anagrams and add it to a List but what happens when i run this code is it just returns alot of empty Lists. private List<List<String>> findAnagrams(LetterInventory words, ArrayList<String> anagram, int max, Map<String, LetterInventory> smallDict, int level, List<List<String>> result) { ArrayList<String> solvedWord = new ArrayList<String>(); LetterInventory shell; LetterInventory shell2; if (level < max || max == 0) { Iterator<String> it = smallDict.keySet().iterator(); while (it.hasNext()) { String k = it.next(); shell = new LetterInventory(k); shell2 = words; if (shell2.subtract(shell) != null) { anagram.add(k); shell2 = words.subtract(shell); if (shell2.isEmpty()) { //System.out.println(anagram.toString()); it prints off fine here result.add(anagram); // but doesnt add here } else findAnagrams(shell2, anagram, max, smallDict, level + 1, result); anagram.remove(anagram.size()-1); } } } return results; }

    Read the article

  • How to visualize a list of lists of lists of ... in R?

    - by Martin
    Hi there, I have a very deep list of lists in R. Now I want to print this list to the standard output to get a better overview of the elements. It should look like the way the StatET plugin for eclipse shows a list. Example list: l6 = list() l6[["h"]] = "one entry" l6[["g"]] = "nice" l5 = list() l5[["e"]] = l6 l4 = list() l4[["f"]] = "test" l4[["d"]] = l5 l3 = list() l3[["c"]] = l4 l2 = list() l2[["b"]] = l3 l1 = list() l1[["a"]] = l2 This should print like: List of 1 $ a:List of 1 ..$ b:List of 1 .. ..$ c:List of 2 .. .. ..$ f: chr "test" .. .. ..$ d:List of 1 .. .. .. ..$ e:List of 2 .. .. .. .. ..$ h: chr "one entry" .. .. .. .. ..$ g: chr "nice" I know this is possible with recursion and the deepness. But is there a way to do this with the help of rapply or something like that? Thanx in advance, Martin

    Read the article

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