Search Results

Search found 43416 results on 1737 pages for 'domain list'.

Page 50/1737 | < Previous Page | 46 47 48 49 50 51 52 53 54 55 56 57  | Next Page >

  • Taking a comma separated list and creating a unordered list

    - by mmsa
    I've got a simple list which is generated by a checkbox list. The generated code is simply this white,blue,red,black I need to use jquery to wrap each of these elements in a < li tag. How do you go through the list and use the comma as a separator? I also will need to delete the comma. Sometime there will be 1 item, sometimes 3, etc. Thanks in advance!

    Read the article

  • JSF: how to update the list after delete an item of that list

    - by Harry Pham
    It will take a moment for me to explain this, so please stay with me. I have table COMMENT that has OneToMany relationship with itself. @Entity public class Comment(){ ... @ManyToOne(optional=true, fetch=FetchType.LAZY) @JoinColumn(name="REPLYTO_ID") private Comment replyTo; @OneToMany(mappedBy="replyTo", cascade=CascadeType.ALL) private List<Comment> replies = new ArrayList<Comment>(); public void addReply(NewsFeed reply){ replies.add(reply); reply.setReplyTo(this); } public void removeReply(NewsFeed reply){ replies.remove(reply); } } So you can think like this. Each comment can have a List of replies which are also type Comment. Now it is very easy for me to delete the original comment and get the updated list back. All I need to do after delete is this. allComments = myEJB.getAllComments(); //This will query the db and return updated list But I am having problem when trying to delete replies and getting the updated list back. So here is how I delete the replies. Inside my managed bean I have //Before invoke this method, I have the value of originalFeed, and deletedFeed set. //These original comments are display inside a p:dataTable X, and the replies are //displayed inside p:dataTable Y which is inside X. So when I click the delete button //I know which comment I want to delete, and if it is the replies, I will know //which one is its original post public void deleteFeed(){ if(this.deletedFeed != null){ scholarEJB.deleteFeeds(this.deletedFeed); if(this.originalFeed != null){ //Since the originalFeed is not null, this is the `replies` //that I want to delete scholarEJB.removeReply(this.originalFeed, this.deletedFeed); } feeds = scholarEJB.findAllFeed(); } } Then inside my EJB scholarEJB, I have public void removeReply(NewsFeed comment, NewsFeed reply){ comment = em.merge(comment); comment.removeReply(reply); em.persist(comment); } public void deleteFeeds(NewsFeed e){ e = em.find(NewsFeed.class, e.getId()); em.remove(e); } When I get out, the entity (the reply) get correctly removed from the database, but inside the feeds List, reference of that reply still there. It only until I log out and log back in that the reply disappear. Please help

    Read the article

  • Python: create a function to modify a list by reference not value

    - by Jonathan
    Hey all- I'm doing some performance-critical Python work and want to create a function that removes a few elements from a list if they meet certain criteria. I'd rather not create any copies of the list because it's filled with a lot of really large objects. Functionality I want to implement: def listCleanup(listOfElements): i = 0 for element in listOfElements: if(element.meetsCriteria()): del(listOfElements[i]) i += 1 return listOfElements myList = range(10000) myList = listCleanup(listOfElements) I'm not familiar with the low-level workings of Python. Is myList being passed by value or by reference? How can I make this faster? Is it possible to somehow extend the list class and implement listCleanup() within that? myList = range(10000) myList.listCleanup() Thanks- Jonathan

    Read the article

  • HTML list wrapping problem

    - by Daniel
    I have a HTML list with this style: font-weight: bold; padding: 0px; margin: 0px; list-style-type: none; display: block; width:700px; font-size: 14px; white-space: pre-wrap; and the cells have this style: display: inline; and I have spacer cells between each cell with this style: padding-right: 20px; display: inline; My problem is that when the list is too long for its 700 pixels, it wraps. I want this, but I dont want the objects to be on two separate lines. I have tried the CSS white-space property, but nothing seems to work. Any ideas?

    Read the article

  • Is it better to use List or Collection?

    - by Vivin Paliath
    I have an object that stores some data in a list. The implementation could change later, and I don't want to expose the internal implementation to the end user. However, the user must have the ability to modify and access this collection of data. Currently I have something like this: public List<SomeDataType> getData() { return this.data; } public void setData(List<SomeDataType> data) { this.data = data; } Does this mean that I have allowed the internal implementation details to leak out? Should I be doing this instead? public Collection<SomeDataType> getData() { return this.data; } public void setData(Collection<SomeDataType> data) { this.data = new ArrayList<SomeDataType>(data); }

    Read the article

  • Making a textfile into a list in matlab?

    - by Ben Fossen
    I have a textfile and would like to import it onto Matlab and make it a list Person1 name = steven grade = 11 age= 17 Person2 name = mike grade = 9 age= 15 Person3 name = taylor grade = 11 age= 17 There are a few hundred entries like these above. Each are seperated by a blank line I was thinking I could scan the text and make the information between each blank line into an item in the list. I also would like to be able to look up each person by name once I have a list like the one below. I want something like x = [Person1 Person2 Person3 name = steven name = mike name = taylor grade = 11 grade = 9 grade = 11 age = 17 age = 15 age = 17] This seems very straight forward but I have been having trouble with this so far, I may be overlooking something. anyone have any ideas or advice?

    Read the article

  • Add entry to list and remove first one in Python

    - by wagglewax
    I have a list of about 40 entries. And I frequently want to append an item to the start of the list (with id 0) and want to delete the last entry (with id 40) of the list. how do i do this the best? like: (example with 5 entries) [0] = "herp" [1] = "derp" [2] = "blah" [3] = "what" [4] = "da..." after adding "wuggah" and deleting last it should be like: [0] = "wuggah" [1] = "herp" [2] = "derp" [3] = "blah" [4] = "what" or appending one and deleting first. And I don't want to end up manually moving them one after another all of the entries to the next id.

    Read the article

  • List view and list adapters for displaying json

    - by Rahul Varma
    Hi, I am trying to display the text from json in a list view. I got help for retrieving the json text from the following... http://www.josecgomez.com/2010/04/30/android-accessing-restfull-web-services-using-json/comment-page-1/#comment-498.... But my problem is that i cant figure out how to display them in list view. I also want to get only some of the text from url(for example, alerttext and date). Can anyone help me in declaring the list adapter and list view in order to display the data in the way i want... Plzzzz...

    Read the article

  • To return the list in JSON format

    - by Reshma
    Below is my code, List<string> modified_listofstrings = new List<string>(); string sJSON = ""; System.Web.Script.Serialization.JavaScriptSerializer jSearializer = new System.Web.Script.Serialization.JavaScriptSerializer(); resulted_value = final_resulted_series_name + ":" + period_name + ":" + period_final_value; modified_listofstrings.Add(resulted_value); json_resultedvalue = JsonConvert.SerializeObject(resulted_value); modified_listofstrings.Add(json_resultedvalue); sJSON = jSearializer.Serialize(modified_listofstrings); return sJSON; But on following line , sJSON = jSearializer.Serialize(modified_listofstrings); I am getting an error as Cannot implicitly convert type string to system.collection.generic.list

    Read the article

  • right-to-left unordered list

    - by Crippletoe
    hi all, i am trying to make an unordered list to behave in different browsers. i have a 2 level list which i am trying to display horizontally in one line. on safari and firefox everything looks good. on IE (7) everything goes nuts for some reason, and only when i am trying to make the list go right-to-left. when i try displaying it left to right, all browsers behave. a simple example of what i was doing is here: http://www.g6pdrecords.com/svk/test.html the CSS is found in the . any ideas anyone? thanks

    Read the article

  • How to eliminate the domain suffix off my user profile folder when migrating to a new domain?

    - by Jerry Dodge
    We have just upgraded a decade old SBS 2003 server to a brand new SBS 2011 machine. During the process, over 30 other client/server machines on that domain also needed to be dis-joined and re-joined from the old domain to the new one. These domains have different names and is not migrated in any way. It's built from scratch. Since each client machine had very unique user profiles under this domain, we needed to make sure these were all backed up and migrated over to the new domain. For the most part, profiles were migrated with no hassle, just by renaming the user profile folder names. However, in one case, when I log in to my domain account, it creates a profile folder with a suffix of the new domain name. I have replaced all the files in the profile's root which begin with "ntuser" with the files of the new profile. The only problem is half the applications can't find their data, because the folder name is different. How can I change this folder name and maintain this profile on the new domain? I have deleted every user account (except admin), deleted their profiles/folders, removed them from the registry, and made sure every trace of this account was gone. The computer was basically a dummy with only an admin account. Then, I log into the machine under my new domain user account (same username as the old domain). It creates a profile folder with my username plus a suffix extension of the new domain name. The client machine is Windows 7 Ultimate, the old server was SBS 2003, and the new server is SBS 2011.

    Read the article

  • SSL certificates and whether a wildcard common name will support domain.com

    - by timpone
    Sorry, if this is very vendor specific but I purchased an inexpensive SSL Cert from GoDaddy. Right now everything on production is hosted off of www.domain.com. When specifying the common name would a wildcard (ie *.domain.com) cover the case of a lack of a third-level domain such as domain.com? Just to be sure, I made it for www.domain.com rather than a wildcard. If it matters, I will be using with nginx and a mod_passenger. If I want to cover everything including domain.com and staging.domain.com, www.domain.com etc, would a wildcard be the proper cert? Does the inexpensive godaddy cert (12.99 / year) cover wildcard certs (it didn't seem to for me)? Again, sorry for asking vendor specific questions and thx in advance. thx

    Read the article

  • List of functions references

    - by Ockonal
    Hello, I'm using boost::function for making references to the functions. Can I make a list of references? For example: boost::function<bool (Entity &handle)> behaviorRef; And I need in a list of such pointers. For example: std::vector<behaviorRef> listPointers; Of course it's wrong code due to behaviorRef isn't a type. So the question is: how can I store a list of pointers for the function?

    Read the article

  • How to filter node list based on the contents of another node list

    - by ~otakuj462
    Hi, I'd like to use XSLT to filter a node list based on the contents of another node list. Specifically, I'd like to filter a node list such that elements with identical id attributes are eliminated from the resulting node list. Priority should be given to one of the two node lists. The way I originally imagined implementing this was to do something like this: <xsl:variable name="filteredList1" select="$list1[not($list2[@id_from_list1 = @id_from_list2])]"/> The problem is that the context node changes in the predicate for $list2, so I don't have access to attribute @id_from_list1. Due to these scoping constraints, it's not clear to me how I would be able to refer to an attribute from the outer node list using nested predicates in this fashion. To get around the issue of the context node, I've tried to create a solution involving a for-each loop, like the following: <xsl:variable name="filteredList1"> <xsl:for-each select="$list1"> <xsl:variable name="id_from_list1" select="@id_from_list1"/> <xsl:if test="not($list2[@id_from_list2 = $id_from_list1])"> <xsl:copy-of select="."/> </xsl:if> </xsl:for-each> </xsl:variable> But this doesn't work correctly. It's also not clear to me how it fails... Using the above technique, filteredList1 has a length of 1, but appears to be empty. It's strange behaviour, and anyhow, I feel there must be a more elegant approach. I'd appreciate any guidance anyone can offer. Thanks.

    Read the article

  • Slash after domain in URL missing for Rails site

    - by joshee
    After redirecting users in a Rails app, for some reason the slash after the domain is missing. Generated URLs are invalid and I'm forced to manually correct them. The problem only occurs on a subdomain. On a different primary domain (same server), everything works ok. For example, after logging out, the site is directing to https://www.sub.domain.comlogin/ rather than https://www.sub.domain.com/login I suspect the issue has something to do with the vhost setup, but I'm not sure. Here are the broken and working vhosts: BROKEN SUBDOMAIN <VirtualHost *:80> ServerName www.sub.domain.com ServerAlias sub.domain.com Redirect permanent / https://www.sub.domain.com </VirtualHost> <VirtualHost *:443> ServerAdmin [email protected] ServerName www.sub.domain.com ServerAlias sub.domain.com RailsEnv production # SSL Engine Switch SSLEngine on # SSL Cipher Suite: SSLCipherSuite ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP:+eNULL # Server Certificate SSLCertificateFile /path/to/server.crt # Server Private Key SSLCertificateKeyFile /path/to/server.key # Set header to indentify https requests for Mongrel RequestHeader set X_FORWARDED_PROTO "https" BrowserMatch ".*MSIE.*" \ nokeepalive ssl-unclean-shutdown \ downgrade-1.0 force-response-1.0 DocumentRoot /home/usr/www/www.sub.domain.com/current/public/ <Directory "/home/usr/www/www.sub.domain.com/current/public"> AllowOverride all Allow from all Options -MultiViews </Directory> WORKING PRIMARY DOMAIN <VirtualHost *:80> ServerName www.diffdomain.com ServerAlias diffdomain.com Redirect permanent / https://www.diffdomain.com </VirtualHost> <VirtualHost *:443> ServerAdmin [email protected] ServerName www.diffdomain.com ServerAlias diffdomain.com ServerAlias *.diffdomain.com RailsEnv production # SSL Engine Switch SSLEngine on # SSL Cipher Suite: SSLCipherSuite ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP:+eNULL # Server Certificate SSLCertificateFile /path/to/server.crt # Server Private Key SSLCertificateKeyFile /path/to/server.key # Set header to indentify https requests for Mongrel RequestHeader set X_FORWARDED_PROTO "https" BrowserMatch ".*MSIE.*" \ nokeepalive ssl-unclean-shutdown \ downgrade-1.0 force-response-1.0 DocumentRoot /home/usr/www/www.diffdomain.com/current/public/ <Directory "/home/usr/www/www.diffdomain.com/current/public"> AllowOverride all Allow from all Options -MultiViews </Directory> </VirtualHost> Please let me know if there's anything else I could provide that would help determine what's wrong here. UPDATE tried adding a trailing slash to the redirect command, but still no luck.

    Read the article

  • Method not returning string value c# <List>

    - by Santii20
    public List<string> Test_IsDataLoaded() { try { if (GRIDTest.Rows.Count != 0) { int countvalue = GRIDTest.Rows.Count; GRIDTest.Rows[0].WaitForControlReady(); List<string> ReleaseIDList = new List<string>(); int nCellCount = GRIDTest.Cells.Count; for(int nCount = 0;nCount<nCellCount ;nCount++) { if(nCount %5==0) ReleaseIDList.Add((GRIDTest.Cells[0].GetProperty("Value").ToString())); } return ReleaseIDList; } } catch (Exception) { } } Method throws me error = Not all code path return a value. Whats wrong in code.

    Read the article

  • linux shell utils: convert a list of hex to list of decimals

    - by osgx
    Hello How can I convert a file with a lot hex numbers into the decimal? Example: file1 0x59999 0x5acdc 0xffeff I want to start $ cat file1 | util | cat file2 and get file2 with smth like 1021489 1249230 3458080 (numbers in example output are random, as I cant convert so long hex to dec) Upd: perl : perl -pe '$_=hex;$_.="\n"'. Can anybody do it better? The real task is a sorting of hex numbers.

    Read the article

  • cPanel Domain Aliases Messing Up DNS?

    - by user37888
    Hi guys I have an issue, on my main domain when I added subdomain aliases it broke access via www and none of the sub domain aliases work. When I do it for other domains however it works. The main nameservers for this domain are ns1.domain.com and ns2.domain.com. Could it be because they are the domain servers this cannot work correctly? This worked fine in plesk, its just weird its breaking in cPanel.

    Read the article

  • Help with python list-comprehension

    - by leChuck
    A simplified version of my problem: I have a list comprehension that i use to set bitflags on a two dimensional list so: s = FLAG1 | FLAG2 | FLAG3 [[c.set_state(s) for c in row] for row in self.__map] All set_state does is: self.state |= f This works fine but I have to have this function "set_state" in every cell in __map. Every cell in __map has a .state so what I'm trying to do is something like: [[c.state |= s for c in row] for row in self.map] or map(lambda c: c.state |= s, [c for c in row for row in self.__map]) Except that neither works (Syntax error). Perhaps I'm barking up the wrong tree with map/lamda but I would like to get rid on set_state. And perhaps know why assignment does not work in the list-comprehension

    Read the article

  • List of items with same values

    - by user559780
    I'm creating a list of items from a file BufferedReader reader = new BufferedReader(new InputStreamReader(new FileInputStream("H:/temp/data.csv"))); try { List<Item> items = new ArrayList<Item>(); Item item = new Item(); String line = null; while ((line = reader.readLine()) != null) { String[] split = line.split(","); item.name = split[0]; item.quantity = Integer.valueOf(split[1]); item.price = Double.valueOf(split[2]); item.total = item.quantity * item.price; items.add(item); } for (Item item2 : items) { System.out.println("Item: " + item2.name); } } catch (IOException e) { reader.close(); e.printStackTrace(); } Problem is the list is displaying the last line in the file as the value for all items.

    Read the article

  • c# list<int> how to insert a new value in between two values

    - by gdubs
    so i have a list where i need to add new values constantly but when i do i need to increment it and insert it in between two values. List<int> initializers = new List <int>(); initializers.Add(1); initializers.Add(3); so initializers would have 1, 3 values. i would then process a new set of numbers. the initializers will need to have the values. 1, 5, 3, 7 and if i process another set of numbers it should become 1, 9, 5, 13, 3, 11, 7, 15 i know how to properly generate the new values inserted, i just need some help on inserting it in between the existing values of the initializers without having to add 2 or 3 more loops to move the values' positions.

    Read the article

  • PHP list of specific files in a directory

    - by Jessica
    The following code will list all the file in a directy <?php if ($handle = opendir('.')) { while (false !== ($file = readdir($handle))) { if ($file != "." && $file != "..") { $thelist .= '<LI><a href="'.$file.'">'.$file.'</a>'; } } closedir($handle); } ?> <P>List of files:</p> <UL> <P><?=$thelist?></p> </UL> While this is very simple code it does it job. I'm now looking for a way to list ONLY file that have .xml (or .XML) at the end, how do I do that? Code is appreciate, thanks! jess

    Read the article

  • Sorting a meta-list by first element of children lists in Python

    - by thismachinechills
    I have a list, root, of lists, root[child0], root[child1], etc. I want to sort the children of the root list by the first value in the child list, root[child0][0], which is an int. Example: import random children = 10 root = [[random.randint(0, children), "some value"] for child in children] I want to sort root from greatest to least by the first element of each of it's children. I've taken a look at some previous entries that used sorted() and a lamda function I'm entirely unfamiliar with, so I'm unsure of how to apply that to my problem. Appreciate any direction that can by given Thanks

    Read the article

  • Count number of given object in a list with LINQ

    - by Aaginor
    I have a list which can contain multiple occurrences of the same object. Now I need to count, how often the given object is contained in this list. int count = 0; foreach (IMyObject item in myList) if (item == object2Count) count++; I am sure that this can be done nicer with LINQ, but LINQ is still a mystery to me. My first question is: How would I count the objects via LINQ and the second question: Will this LINQ version be slower or faster? I am using a ObservableCollection and the number of items in the list is usally rather small ... usally not more then 20. Thanks in advance, Frank

    Read the article

< Previous Page | 46 47 48 49 50 51 52 53 54 55 56 57  | Next Page >