Search Results

Search found 13450 results on 538 pages for 'recent items'.

Page 42/538 | < Previous Page | 38 39 40 41 42 43 44 45 46 47 48 49  | Next Page >

  • How do I use cookies to store users' recent site history(PHP)?

    - by ggfan
    I decided to make a recent view box that allows users to see what links they clicked on before. Whenever they click on a posting, the posting's id gets stored in a cookie and displays it in the recent view box. In my ad.php, I have a definerecentview function that stores the posting's id (so I can call it later when trying to get the posting's information such as title, price from the database) in a cookie. How do I create a cookie array for this? **EXAMPLE:** user clicks on ad.php?posting_id='200' //this is in the ad.php function definerecentview() { $posting_id=$_GET['posting_id']; //this adds 30 days to the current time $Month = 2592000 + time(); $i=1; if (isset($posting_id)){ //lost here for($i=1,$i< ???,$i++){ setcookie("recentviewitem[$i]", $posting_id, $Month); } } } function displayrecentviews() { echo "<div class='recentviews'>"; echo "Recent Views"; if (isset($_COOKIE['recentviewitem'])) { foreach ($_COOKIE['recentviewitem'] as $name => $value) { echo "$name : $value <br />\n"; //right now just shows the posting_id } } echo "</div>"; } How do I use a for loop or foreach loop to make it that whenever a user clicks on an ad, it makes an array in the cookie? So it would be like.. 1. clicks on ad.php?posting_id=200 --- setcookie("recentviewitem[1]",200,$month); 2. clicks on ad.php?posting_id=201 --- setcookie("recentviewitem[2]",201,$month); 3. clicks on ad.php?posting_id=202 --- setcookie("recentviewitem[3]",202,$month); Then in the displayrecentitem function, I just echo however many cookies were set? I'm just totally lost in creating a for loop that sets the cookies. any help would be appreciated

    Read the article

  • django: failing tests from django.contrib.auth

    - by gruszczy
    When I run my django test I get following errors, that are outside of my test suite: ====================================================================== ERROR: test_known_user (django.contrib.auth.tests.remote_user.RemoteUserCustomTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/lib/pymodules/python2.6/django/contrib/auth/tests/remote_user.py", line 160, in test_known_user super(RemoteUserCustomTest, self).test_known_user() File "/usr/lib/pymodules/python2.6/django/contrib/auth/tests/remote_user.py", line 67, in test_known_user self.assertEqual(response.context['user'].username, 'knownuser') TypeError: 'NoneType' object is unsubscriptable ====================================================================== ERROR: test_last_login (django.contrib.auth.tests.remote_user.RemoteUserCustomTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/lib/pymodules/python2.6/django/contrib/auth/tests/remote_user.py", line 87, in test_last_login self.assertNotEqual(default_login, response.context['user'].last_login) TypeError: 'NoneType' object is unsubscriptable ====================================================================== ERROR: test_no_remote_user (django.contrib.auth.tests.remote_user.RemoteUserCustomTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/lib/pymodules/python2.6/django/contrib/auth/tests/remote_user.py", line 33, in test_no_remote_user self.assert_(isinstance(response.context['user'], AnonymousUser)) TypeError: 'NoneType' object is unsubscriptable ====================================================================== ERROR: test_unknown_user (django.contrib.auth.tests.remote_user.RemoteUserCustomTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/lib/pymodules/python2.6/django/contrib/auth/tests/remote_user.py", line 168, in test_unknown_user super(RemoteUserCustomTest, self).test_unknown_user() File "/usr/lib/pymodules/python2.6/django/contrib/auth/tests/remote_user.py", line 51, in test_unknown_user self.assertEqual(response.context['user'].username, 'newuser') TypeError: 'NoneType' object is unsubscriptable ====================================================================== ERROR: test_known_user (django.contrib.auth.tests.remote_user.RemoteUserNoCreateTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/lib/pymodules/python2.6/django/contrib/auth/tests/remote_user.py", line 67, in test_known_user self.assertEqual(response.context['user'].username, 'knownuser') TypeError: 'NoneType' object is unsubscriptable ====================================================================== ERROR: test_last_login (django.contrib.auth.tests.remote_user.RemoteUserNoCreateTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/lib/pymodules/python2.6/django/contrib/auth/tests/remote_user.py", line 87, in test_last_login self.assertNotEqual(default_login, response.context['user'].last_login) TypeError: 'NoneType' object is unsubscriptable ====================================================================== ERROR: test_no_remote_user (django.contrib.auth.tests.remote_user.RemoteUserNoCreateTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/lib/pymodules/python2.6/django/contrib/auth/tests/remote_user.py", line 33, in test_no_remote_user self.assert_(isinstance(response.context['user'], AnonymousUser)) TypeError: 'NoneType' object is unsubscriptable ====================================================================== ERROR: test_unknown_user (django.contrib.auth.tests.remote_user.RemoteUserNoCreateTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/lib/pymodules/python2.6/django/contrib/auth/tests/remote_user.py", line 118, in test_unknown_user self.assert_(isinstance(response.context['user'], AnonymousUser)) TypeError: 'NoneType' object is unsubscriptable ====================================================================== ERROR: test_known_user (django.contrib.auth.tests.remote_user.RemoteUserTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/lib/pymodules/python2.6/django/contrib/auth/tests/remote_user.py", line 67, in test_known_user self.assertEqual(response.context['user'].username, 'knownuser') TypeError: 'NoneType' object is unsubscriptable ====================================================================== ERROR: test_last_login (django.contrib.auth.tests.remote_user.RemoteUserTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/lib/pymodules/python2.6/django/contrib/auth/tests/remote_user.py", line 87, in test_last_login self.assertNotEqual(default_login, response.context['user'].last_login) TypeError: 'NoneType' object is unsubscriptable ====================================================================== ERROR: test_no_remote_user (django.contrib.auth.tests.remote_user.RemoteUserTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/lib/pymodules/python2.6/django/contrib/auth/tests/remote_user.py", line 33, in test_no_remote_user self.assert_(isinstance(response.context['user'], AnonymousUser)) TypeError: 'NoneType' object is unsubscriptable ====================================================================== ERROR: test_unknown_user (django.contrib.auth.tests.remote_user.RemoteUserTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/lib/pymodules/python2.6/django/contrib/auth/tests/remote_user.py", line 51, in test_unknown_user self.assertEqual(response.context['user'].username, 'newuser') TypeError: 'NoneType' object is unsubscriptable ====================================================================== FAIL: test_current_site_in_context_after_login (django.contrib.auth.tests.views.LoginTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/lib/pymodules/python2.6/django/contrib/auth/tests/views.py", line 190, in test_current_site_in_context_after_login self.assertEquals(response.status_code, 200) AssertionError: 302 != 200 Could anyone explain me, what am I doing wrong or what I should set to get those tests pass?

    Read the article

  • Use Dojo Drag and Drop together with Dojo Moveable

    - by Select0r
    Hi, I'm using Dojo.dnd to transfer items between to areas. The problem is: the items will snap into place once I drop them, but I'd like to have them stay where I drop them, but only for one area. Here's a little code to explain this better: <div id="dropZone" class="dropZone"> <div id="itemNodes"></div> <div id="targetZone" dojoType="dojo.dnd.Source"></div> </div> "dropZone" is a DIV that contains two dojo.dnd.Source-areas, "itemNodes" (created programmatically) and "targetZone". Items (DIVs with images) should be dragged from a simple list out of "itemNodes" into "targetZone" and stay where they are dropped. As soon as they are dragged out of "targetZone" they should snap back to the list inside "itemNodes". Here's the code I use to create the items: var nodelist = new dojo.dnd.Source("itemNodes"); {Smarty-Loop} nodelist.insertNodes(false, ['<img class="dragItem" src="{$items->info.itemtext}" alt="{$items->info.itemtext}" border="0" />']); {/Smarty-Loop} But this way I just have two lists of items, the items dropped into "targetZone" won't stay where I dropped them. I've tried a loop dojo.query(".dojoDndItem").forEach(function(node) to grab all items and change them to a "moveable"-type: using dojo.dnd.move.constrainedMoveable will change the items so they can always be moved around (even in "itemNodes") using dojo.dnd.move.boxConstrainedMoveable and defining the "box" to the borders of "targetZone" makes it possible to just move the items around inside "targetZone", but as soon as I drop them, I can't grab and move them back out So here's the question: is it possible to create two dnd.Sources where I can move items back and forth and let the items be "moveable" only in one of the sources?Or is there a workaround like making the items moveable and if they're not dropped into "targetZone" they'll be moved back to the list in "itemNodes" automatically? Once the page is submitted, I have to save the position of every item that has been placed into "targetZone". (The next step will be positioning the items inside "targetZone" on page load if the grid has already been filled before, but I'd be happy to just get the thing working in the first place.) Any hint is appreciated. Greetings, Select0r

    Read the article

  • Permission denied error when trying to install with wubi

    - by badri
    I run into problem when tried to install Ubuntu 11.04 on Windows 7 using wubi installer . It downloads the image for sometime and ends up with the error that says Permission denied: for more details see the log file In the log it seems to be like DownloadError: Problem connecting to tracker - urlopen error (10060, 'Operation timed out') but my network is good and I checked it. Tried using wubi several times, but ends up with same problem. Log content: 10-08 16:56 DEBUG TaskList: ### Finished get_metalink 10-08 16:56 DEBUG TaskList: New task download 10-08 16:56 DEBUG TaskList: ### Running download... 10-08 16:56 DEBUG btdownloader: downloading http://releases.ubuntu.com/11.04/ubuntu-11.04-desktop-amd64.iso.torrent > C:\ubuntu\install\ubuntu-11.04-desktop-amd64.iso 10-08 18:02 ERROR TaskList: Traceback (most recent call last): File "\lib\bittorrent\RawServer.py", line 229, in listen_forever File "\lib\wubi\backends\common\btdownloader.py", line 70, in error_callback DownloadError: Traceback (most recent call last): File "\lib\bittorrent\RawServer.py", line 221, in listen_forever File "\lib\bittorrent\Rerequester.py", line 96, in fail File "\lib\wubi\backends\common\btdownloader.py", line 70, in error_callback DownloadError: Problem connecting to tracker - urlopen error (10060, 'Operation timed out') Traceback (most recent call last): File "\lib\wubi\backends\common\tasklist.py", line 197, in __call__ File "\lib\wubi\backends\common\btdownloader.py", line 79, in download File "\lib\bittorrent\download.py", line 303, in download File "\lib\bittorrent\RawServer.py", line 256, in listen_forever File "\lib\wubi\backends\common\btdownloader.py", line 70, in error_callback DownloadError: Traceback (most recent call last): File "\lib\bittorrent\RawServer.py", line 229, in listen_forever File "\lib\wubi\backends\common\btdownloader.py", line 70, in error_callback DownloadError: Traceback (most recent call last): File "\lib\bittorrent\RawServer.py", line 221, in listen_forever File "\lib\bittorrent\Rerequester.py", line 96, in fail File "\lib\wubi\backends\common\btdownloader.py", line 70, in error_callback DownloadError: Problem connecting to tracker - urlopen error (10060, 'Operation timed out') 10-08 18:02 ERROR TaskList: Non fatal error Traceback (most recent call last): File "\lib\bittorrent\RawServer.py", line 229, in listen_forever File "\lib\wubi\backends\common\btdownloader.py", line 70, in error_callback DownloadError: Traceback (most recent call last): File "\lib\bittorrent\RawServer.py", line 221, in listen_forever File "\lib\bittorrent\Rerequester.py", line 96, in fail File "\lib\wubi\backends\common\btdownloader.py", line 70, in error_callback DownloadError: Problem connecting to tracker - urlopen error (10060, 'Operation timed out') in task download 10-08 18:02 DEBUG TaskList: ### Finished download 10-08 18:02 ERROR TaskList: [Errno 13] Permission denied: u'C:\\ubuntu\\install\\ubuntu-11.04-desktop-amd64.iso' Traceback (most recent call last): File "\lib\wubi\backends\common\tasklist.py", line 197, in __call__ File "\lib\wubi\backends\common\backend.py", line 492, in get_iso File "\lib\wubi\backends\common\backend.py", line 347, in download_iso OSError: [Errno 13] Permission denied: u'C:\\ubuntu\\install\\ubuntu-11.04-desktop-amd64.iso' 10-08 18:02 DEBUG TaskList: # Cancelling tasklist 10-08 18:02 DEBUG TaskList: # Finished tasklist 10-08 18:02 ERROR root: [Errno 13] Permission denied: u'C:\\ubuntu\\install\\ubuntu-11.04-desktop-amd64.iso' Traceback (most recent call last): File "\lib\wubi\application.py", line 57, in run File "\lib\wubi\application.py", line 131, in select_task File "\lib\wubi\application.py", line 157, in run_installer File "\lib\wubi\backends\common\tasklist.py", line 197, in __call__ File "\lib\wubi\backends\common\backend.py", line 492, in get_iso File "\lib\wubi\backends\common\backend.py", line 347, in download_iso OSError: [Errno 13] Permission denied: u'C:\\ubuntu\\install\\ubuntu-11.04-desktop-amd64.iso'

    Read the article

  • How can I line up WPF items in a Horizontal WrapPanel so they line up based on an arbitrary vertical

    - by Scott Whitlock
    I'm trying to create a View in WPF and having a hard time figuring out how to set it up. Here's what I'm trying to build: My ViewModel exposes an IEnumerable property called Items Each item is an event on a timeline, and each one implements ITimelineItem The ViewModel for each item has it's own DataTemplate to to display it I want to display all the items on the timeline connected by a line. I'm thinking a WrapPanel inside of a ListView would work well for this. However, the height of each item will vary depending on the information it displays. Some items will have graphic objects right on the line (like a circle or a diamond, or whatever), and some have annotations above or below the line. So it seems complicated to me. It seems that each item on the timeline has to render its own segment of the line. That's fine. But the distance between the top of the item to the line (and the bottom of the item to the line) could vary. If one item has the line 50 px down from the top and the next item has the line 100 px down from the top, then the first item needs 50 px of padding so that the line segments add up. I think I could solve that problem, however, we only need to add padding if these two items are on the same line in the WrapPanel! Let's say there are 5 items and only room on the screen for 3 across... the WrapPanel will put the other two on the next line. That's ok, but that means only the first 3 need to pad together, and the last 2 need to pad together. This is what's giving me a headache. Is there another approach I could look at?

    Read the article

  • Why is the ASP Repeater.Items collection empty, when controls are on the screen?

    - by Ryan
    I have an ASP page with the following repeater: <asp:Repeater runat="server" ID="RegionRepeater" DataSourceID="SqlDataSourceRegions" EnableViewState="true"> <ItemTemplate> <tr> <td valign="top"> <b><%#Eval("description")%></b> <asp:HiddenField runat="server" ID="RegionID" Value='<%#Eval("region_id")%>'/> </td> <td> <asp:FileUpload ID="FileUpload" runat="server" Width="368px" /> </td> </tr> </ItemTemplate> </asp:Repeater> (The repeater is inside a Wizard, inside a content pane). The code behind is connected to the protected void Wizard1_NextButtonClick(object sender, WizardNavigationEventArgs e) event. There are two items on the screen (two rows inside the table). However, when the code tries to read those items, the Items collection is empty! foreach(RepeaterItem region in RegionRepeater.Items) { // Never runs - the RegionRepeater.Items.Count = 0 FileUpload fileUpload = (FileUpload) region.FindControl("FileUpload"); String regionID = ((HiddenField)region.FindControl("RegionID")).Value; ... Why is the collection empty, when there are controls drawn on the screen? Thanks a lot for any help; this is starting to drive me nuts. (BTW: I tried adding/removing the EnableViewState="true" tag)

    Read the article

  • How do I Fix SQL Server error: Order by items must appear in the select list if Select distinct is s

    - by Paula DiTallo 2007-2009 All Rights Reserved
    There's more than one reason why you may receive this error, but the most common reason is that your order by statement column list doesn't correlate with the values specified in your column list when you happen to be using DISTINCT. This is usually easy to spot and resolve. A more obscure reason may be that you are using a function around one of the selected columns --but omitting to use the same function around the same selected column name in the order by statement. Here's an example:   select distinct upper(columnA)   from [evaluate].[testTable]    order by columnA  asc   This statement will cause the "Order by items must appear in the select list if SELECT DISTINCT is specified."  error to appear not because distinct was used, but because the order by statement did not utilize the upper() fundtion around colunnA.  To correct this error, do this: select distinct upper(columnA)   from [evaluate].[testTable]    order by upper(columnA) asc

    Read the article

  • How can I store spell & items using a std::vector implementation?

    - by Vladimir Marenus
    I'm following along with a book from GameInstitute right now, and it's asking me to: Allow the player to buy and carry healing potions and potions of fireball. You can add an Item array (after you define the item class) to the Player class for storing them, or use a std::vector to store them. I think I would like to use the std::vector implementation, because that seems to confuse me less than making an item class, but I am unsure how to do so. I've heard from many people that vectors are great ways to store dynamic values (such as items, weapons, etc), but I've not seen it used.

    Read the article

  • How to add multiple menu items with the same title to NSPopUpButton(NSMenu)?

    - by William S. Pear
    As docs say it's impossible to add two menu items to NSPopUpButton if they both have the same title. I was trying to add menu items to [popupButton menu], but with no luck. I was also trying to create a new menu, add items to it and then use [popupButton setMenu:newMenu], but no. Menu always display only one item per name. But I know it should be possible, if you try to create a smart playlist in iTunes, you could select "Playlist" from the left popup button, "=" from the middle, and the right one will hold menu items for every playlist in iTunes EVEN if they have the same title. So how do they do it?

    Read the article

  • What is the best way to construct a "remove multiple items" area (ASP.NET VB) [on hold]

    - by Darkcat Studios
    Lets say for example I have a (variable length) 2 dimensional array of product names and their unique product codes. I can display this list in a datagrid, table etc. (Imagine this as a standard shopping basket type scenario) What I need to do is be able to tick multiple items (?) , then on clicking a submit button, fire an action. The bit im struggling with is how do i: A: programatically display asp:checkboxes for each item (and give them a unique ID) B: know which are ticked on firing the final action (not sure if this question is best suited to the main stack but theres so much activity on there that questions just get lost now!)

    Read the article

  • What all items can I put on my resume without it looking tacky? [closed]

    - by Earlz
    I've been searching for work, and so far it's very hard for me to even get a call back. So, I'm looking at adding things to my resume. I know a resume doesn't need to be over 2 pages. I have the basics: Objective/personal info General skills (languages known, etc) Work experience Some things I'm considering adding to it: My college education (though I don't have a degree) Awards given for programming skills in high school (curriculum contests and AP test scores) Open source projects? Would any of these 3 items look tacky? And I only have about 1.5 years of work experience, but I've been programming since I was 13. Is there anything else I can add to my resume that would give me a better chance of getting my foot in the door?

    Read the article

  • getView only shows Flagged Backgrounds for drawn Views, It does not show Flagged Background when scroll to view more items on list

    - by Leoa
    I am trying to create a listview that receives a flagged list of items to indicate a status to the user. I have been able to create the flag display by using a yellow background (see image at bottom). In Theory, the flagged list can have many flagged items in it. However in my app, only the first three flagged backgrounds are shown. I believe this is because they are initially drawn to the screen. The Flagged background that are not drawn initially to the screen do not show. I'd like to know how to get the remaining flags to show in the list. ListView Recycling: The backgrounds in the listView are being recycled in getView(). This recycling goes from position 0 to position 9. I have flags that need to match at positions 13, 14 and so on. Those positions are not being displayed. listView.getCheckedItemPositions() for multiple selections: This method will not work in my case because the user will not selected the flags. The flags are coming from the server. setNotifyOnChange() and/or public virtual void SetNotifyOnChange (bool notifyOnChange): I'm not adding new data to the list, so I don't see how this method would work for my program. Does this method communicate to getview when it is recycling data? I was unable to find an answer to this in my research. public void registerDataSetObserver: This may be overkill for my problem, but is it possible to have an observer object that keeps track of the all the positions in my items list and in my flag list no matter if the view is recycled and match them on the screen? Code: package com.convention.notification.app; import java.util.Iterator; import java.util.ArrayList; import java.util.List; import android.app.Activity; import android.content.Context; import android.graphics.Color; import android.os.Bundle; import android.text.Html; import android.util.Log; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.view.ViewParent; import android.widget.AdapterView; import android.widget.ArrayAdapter; import android.widget.TextView; public class NewsRowAdapter extends ArrayAdapter<Item> { private Activity activity; private List<Item> items; private Item objBean; private int row; private List<Integer> disable; View view ; int disableView; public NewsRowAdapter(Activity act, int resource, List<Item> arrayList, List<Integer> disableList) { super(act, resource, arrayList); this.activity = act; this.row = resource; this.items = arrayList; this.disable=disableList; System.out.println("results of delete list a:"+disable.toString()); } public int getCount() { return items.size(); } public Item getItem(int position) { return items.get(position); } public long getItemId(int position) { return position; } @Override public int getItemViewType(int position) { for(int k =0;k < disable.size();k++){ if(position==disable.get(k)){ //System.out.println( "is "+position+" value of disable "+disable.get(k)); disableView=disable.get(k); //AdapterView.getItemAtPosition(position); } } return position; } @Override public View getView(final int position, View convertView, ViewGroup parent) { View view = convertView; ViewHolder holder; if (view == null) { LayoutInflater inflater = (LayoutInflater) activity.getSystemService(Context.LAYOUT_INFLATER_SERVICE); view = inflater.inflate(row, null); getItemViewType(position); long id=getItemId(position); if(position==disableView){ view.setBackgroundColor(Color.YELLOW); System.out.println(" background set to yellow at position "+position +" disableView is at "+disableView); }else{ view.setBackgroundColor(Color.WHITE); System.out.println(" background set to white at position "+position +" disableView is at "+disableView); } //ViewHolder is a custom class that gets TextViews by name: tvName, tvCity, tvBDate, tvGender, tvAge; holder = new ViewHolder(); /* setTag Sets the tag associated with this view. A tag can be used to * mark a view in its hierarchy and does not have to be unique * within the hierarchy. Tags can also be used to store data within * a view without resorting to another data structure. */ view.setTag(holder); } else { //the Object stored in this view as a tag holder = (ViewHolder) view.getTag(); } if ((items == null) || ((position + 1) > items.size())) return view; objBean = items.get(position); holder.tv_event_name = (TextView) view.findViewById(R.id.tv_event_name); holder.tv_event_date = (TextView) view.findViewById(R.id.tv_event_date); holder.tv_event_start = (TextView) view.findViewById(R.id.tv_event_start); holder.tv_event_end = (TextView) view.findViewById(R.id.tv_event_end); holder.tv_event_location = (TextView) view.findViewById(R.id.tv_event_location); if (holder.tv_event_name != null && null != objBean.getName() && objBean.getName().trim().length() > 0) { holder.tv_event_name.setText(Html.fromHtml(objBean.getName())); } if (holder.tv_event_date != null && null != objBean.getDate() && objBean.getDate().trim().length() > 0) { holder.tv_event_date.setText(Html.fromHtml(objBean.getDate())); } if (holder.tv_event_start != null && null != objBean.getStartTime() && objBean.getStartTime().trim().length() > 0) { holder.tv_event_start.setText(Html.fromHtml(objBean.getStartTime())); } if (holder.tv_event_end != null && null != objBean.getEndTime() && objBean.getEndTime().trim().length() > 0) { holder.tv_event_end.setText(Html.fromHtml(objBean.getEndTime())); } if (holder.tv_event_location != null && null != objBean.getLocation () && objBean.getLocation ().trim().length() > 0) { holder.tv_event_location.setText(Html.fromHtml(objBean.getLocation ())); } return view; } public class ViewHolder { public TextView tv_event_name, tv_event_date, tv_event_start, tv_event_end, tv_event_location /*tv_event_delete_flag*/; } } Logcat: 06-12 20:54:12.058: I/System.out(493): item disalbed is at postion :0 06-12 20:54:12.058: I/System.out(493): item disalbed is at postion :4 06-12 20:54:12.069: I/System.out(493): item disalbed is at postion :5 06-12 20:54:12.069: I/System.out(493): item disalbed is at postion :13 06-12 20:54:12.069: I/System.out(493): item disalbed is at postion :14 06-12 20:54:12.069: I/System.out(493): item disalbed is at postion :17 06-12 20:54:12.069: I/System.out(493): results of delete list :[0, 4, 5, 13, 14, 17] 06-12 20:54:12.069: I/System.out(493): results of delete list a:[0, 4, 5, 13, 14, 17] 06-12 20:54:12.069: I/System.out(493): set adapaer to list view called; 06-12 20:54:12.128: I/System.out(493): background set to yellow at position 0 disableView is at 0 06-12 20:54:12.628: I/System.out(493): background set to white at position 1 disableView is at 0 06-12 20:54:12.678: I/System.out(493): background set to white at position 2 disableView is at 0 06-12 20:54:12.708: I/System.out(493): background set to white at position 3 disableView is at 0 06-12 20:54:12.738: I/System.out(493): background set to yellow at position 4 disableView is at 4 06-12 20:54:12.778: I/System.out(493): background set to yellow at position 5 disableView is at 5 06-12 20:54:12.808: I/System.out(493): background set to white at position 6 disableView is at 5 06-12 20:54:12.838: I/System.out(493): background set to white at position 7 disableView is at 5 This is a link to my first question a day ago: Change Background on a specific row based on a condition in Custom Adapter I appreciate your help!

    Read the article

  • Why is the ASP.NET Repeater.Items collection empty, when controls are on the screen?

    - by Ryan
    I have an ASP page with the following repeater: <asp:Repeater runat="server" ID="RegionRepeater" DataSourceID="SqlDataSourceRegions" EnableViewState="true"> <ItemTemplate> <tr> <td valign="top"> <b><%#Eval("description")%></b> <asp:HiddenField runat="server" ID="RegionID" Value='<%#Eval("region_id")%>'/> </td> <td> <asp:FileUpload ID="FileUpload" runat="server" Width="368px" /> </td> </tr> </ItemTemplate> </asp:Repeater> (The repeater is inside a Wizard, inside a content pane). The code behind is connected to the protected void Wizard1_NextButtonClick(object sender, WizardNavigationEventArgs e) event. There are two items on the screen (two rows inside the table). However, when the code tries to read those items, the Items collection is empty! foreach(RepeaterItem region in RegionRepeater.Items) { // Never runs - the RegionRepeater.Items.Count = 0 FileUpload fileUpload = (FileUpload) region.FindControl("FileUpload"); String regionID = ((HiddenField)region.FindControl("RegionID")).Value; ... Why is the collection empty, when there are controls drawn on the screen? Thanks a lot for any help; this is starting to drive me nuts. (BTW: I tried adding/removing the EnableViewState="true" tag)

    Read the article

  • How to correctly remove items from Wine Programs menu?

    - by Ivan
    As soon as a Windows application creates a shortcut/directory in Wine Start Menu Programs directory (in particular I do this manually by means of Total Commander and it works), it gets reflected in Ubuntu Wine Programs menu. But when a shortcut/folder is removed (manually, by means of Total Commander again) - Ubuntu Wine Programs menu item persists, and this is an undesirable behaviour. I've once done something causing Wine/Ubuntu to actually refresh the menu state and remove orphan items, but unfortunately I can't remember what. Do you know the way? I am specifically interested in hand-made/removed shortcuts, not installing/uninstalling Windows software.

    Read the article

  • Can you add items to a context menu in a parents menu?

    - by Joel Barsotti
    or conversly can you import a parents menu items into a child window? So I have an UI that is composed of controls that all have their own context menu, but we also have a datagrid that get's nested inside our generic contaier. So when you right click the datagrid elements I want to show both the context items I've created for the datagrid and the items from the generic container.

    Read the article

  • How should I implement items that are normalized in the Database, in Object Oriented Design?

    - by Jonas
    How should I implement items that are normalized in the Database, in Object Oriented classes? In the database I have a big table of items and a smaller of groups. Each item belong to one group. This is how my database design look like: +----------------------------------------+ | Inventory | +----+------+-------+----------+---------+ | Id | Name | Price | Quantity | GroupId | +----+------+-------+----------+---------+ | 43 | Box | 34.00 | 456 | 4 | | 56 | Ball | 56.50 | 3 | 6 | | 66 | Tin | 23.00 | 14 | 4 | +----+------+-------+----------+---------+ Totally 3000 lines +----------------------+ | Groups | +---------+------+-----+ | GroupId | Name | VAT | +---------+------+-----+ | 4 | Mini | 0.2 | | 6 | Big | 0.3 | +---------+------+-----+ Totally 10 lines I will use the OOP classes in a GUI, where the user can edit Items and Groups in the inventory. It should also be easy to do calculations with a bunch of items. The group information like VAT are needed for the calculations. I will write an Item class, but do I need a Group class? and if I need it, should I keep them in a global location or how do I access it when I need it for Item-calculations? Is there any design pattern for this case?

    Read the article

  • Can jQuery UI's Sortable handle complex selectors for the items option?

    - by jverdi
    I have list items in an unordered list that when double clicked, can be edited in place via a wysiwyg editor. $('ul.mtm_section').sortable({ disabled: true, distance: 10, items: '> li:not(:has(form))' }); My goal is to prevent the list item from being sorted while it is being edited - aka once a form element has been swapped in place of the contents. Unfortunately my selector for items is not working. Is sortable able to handle complex selectors like these? If not, are there other clever means to disable some items from being sortable, perhaps a callback function? I would prefer to rely on this sortable option, as the wysiwyg plugin is deeply nested with jEditable and as far as I know does not open up any events for me to hook into. Using jQuery 1.4.2 and jQuery UI 1.8.1

    Read the article

  • In WPF using a ListView is there an elegant way to auto resize items?

    - by Justin
    I recently wrote, my first, WPF application that has a list of items that are polled from a web-serivce. The items are displayed/data-bound in a ListView via a GridView. A background thread periodically polls the web-serivce and updates the list. If, say, I had three items initially bound to the ListView that simply display a description and the three descriptions where something like: - ProjectA - ProjectB - ProjectC Later a new item is added with a description of 'AReallyReallyLongProjectName', I would end up with a list like: - ProjectA - ProjectB - ProjectC - AReallyR The GridViewColumn would not update it's width and would subsequently cut off any new items that extended the original width. I added this bit of code which forces the column to resize, but it just seems a little hacky. (Just seems weird to set a width just to set it back to nothing to force the resize) if(gridView != null) { foreach(var column in gridView.Columns) { if (double.IsNaN(column.Width) column.Width = column.ActualWidth; column.Width = double.NaN; } } Is there a better, more elegant solution, to accomplish this same thing?

    Read the article

  • Modify javascript to display a SharePoint list from another site collection, want items to open in a modal dialog [on hold]

    - by FRD
    I'm trying to modify the javascript below so that when a list from one site collection is displayed in another site collection and an item is selected, it opens in a dialog box instead of taking over the entire page and forcing the user to the originating site. <div id="ExternalListContainer"></div> <script type="text/javascript"> //wait for SP to load up ExecuteOrDelayUntilScriptLoaded( function LoadExternalList() { //turn on xsite scripting support for jquery $.support.cors = true; //load the external SP list $("#ExternalListContainer").load("http://originatingsiteurl.aspx table.ms-listviewtable", function(response, status, xhr) { //find all the list items and convert to HTML so we don't see the code $("#ExternalListContainer").find(".ms-vb2").each(function () { $(this).html($(this).text()); }); }); }, "sp.ribbon.js"); </script>

    Read the article

  • How do efficiently display items on Google map in the viewing range of the user?

    - by Cory
    When a user moves the Google map, I would like to display items in the viewing range of the user automatically. How can I efficiently and quickly display the items? I have basic understanding of calling getBounds() method every time the user moves the map, but I am not sure how I can efficiently search and get from my database the items within the lat/lng of the bounds of the current viewport. Is there easier and faster way of doing this?

    Read the article

  • How to make the TextView invisible when there are items in listView?

    - by Raphael Thomas Liewl
    I like to display textView when there are no items in the listView whereas the textView will not display when there are items in the listView. My problem is even there are items in the listView, the textView still will be displayed in a short time and then load the items into listView. So, how to make the TextView invisible when there are items in listView? Here is the codes: public void onCreate(Bundle savedInstancesState){ super.onCreate(savedInstancesState); setContentView(R.layout.list_screen); user = getIntent().getExtras().getString("user"); Log.d("dg",user); getList(); lv = (ListView) findViewById(android.R.id.list); emptyText = (TextView)findViewById(android.R.id.empty); lv.setEmptyView(emptyText); } list_screen.xml <?xml version="1.0" encoding="UTF-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" > <ListView android:id="@+id/android:list" android:layout_width="fill_parent" android:layout_height="fill_parent"/> <TextView android:id="@+id/android:empty" android:layout_width="fill_parent" android:layout_height="fill_parent" android:text="@string/no_friend" android:gravity="center_vertical|center_horizontal"/> </LinearLayout>

    Read the article

  • How can I extract a list of Minecraft items and recipes?

    - by Sean
    I'm designing a robust system for resolving item dependencies in Minecraft and to do so, I need to maintain a database of items and recipes. Right now, this database has to be hand-crafted (no pun intended); I would like to know if it is possible to somehow query the Minecraft jars (or perhaps more realistically, grep through them) to extract this data automatically. How can this be done? The project is currently in Python, but it can still be ported to Java without much fuss at this stage. (For the curious.)

    Read the article

  • How do I attach event bindings to items on a canvas using Tkinter?

    - by Ian
    If I'm using a canvas to display data and I want the user to be able to click on various items on the canvas in order to get more information or interact with it in some way, whats the best way of going about this? Searching online I can find information about how to bind events to tags but that seems to be more indirect then what I want. I don't want to group items with tags, but rather have specific function calls when the user clicks specific items on the canvas.

    Read the article

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