Daily Archives

Articles indexed Thursday December 30 2010

Page 30/34 | < Previous Page | 26 27 28 29 30 31 32 33 34  | Next Page >

  • Microsoft SDE Interview vs Microsoft SDET Interview and Resources to Study

    - by vinayvasyani
    I have always heard that SDE interviews are much harder to crack than SDET. Is it really true? I have also heard that if candidate doesnt do well in SDE interview he is also sometimes offered SDET position. How much truth is there into these talks? I would highly appreciate if someone would put good resources and guidelines for how to prepare for Microsoft interviews..which books to read, which notes, online programming questions websites, etc. Give as much info as possible. Thanks in advance to everyone for your valuable help and contribution.

    Read the article

  • Compiling kernal problem

    - by James
    Hi, I have a hp pavilion dm3t with intel HD graphics running ubuntu 10.10 64 bit. I'm trying to compile and install a patched kernel according to this, https://launchpad.net/~kamalmostafa/+archive/linux-kamal-mjgbacklight So I downloaded the tarball from here (linked to from the page above): http://kernel.ubuntu.com/git?p=kamal/ubuntu-maverick.git;a=shortlog;h=refs/heads/mjg-backlight I untar'd it to a directory, entered the directory and did: make defconfig which was successful, so I did: make which seemed to work fine until it gave these errors: ubuntu/ndiswrapper/iw_ndis.c:1966: error: unknown field ‘num_private’ specified in initializer ubuntu/ndiswrapper/iw_ndis.c:1966: warning: initialization makes pointer from integer without a cast ubuntu/ndiswrapper/iw_ndis.c:1967: error: unknown field ‘num_private_args’ specified in initializer ubuntu/ndiswrapper/iw_ndis.c:1967: warning: excess elements in struct initializer ubuntu/ndiswrapper/iw_ndis.c:1967: warning: (near initialization for ‘ndis_handler_def’) ubuntu/ndiswrapper/iw_ndis.c:1970: error: unknown field ‘private’ specified in initializer ubuntu/ndiswrapper/iw_ndis.c:1970: warning: initialization makes integer from pointer without a cast ubuntu/ndiswrapper/iw_ndis.c:1970: error: initializer element is not computable at load time ubuntu/ndiswrapper/iw_ndis.c:1970: error: (near initialization for ‘ndis_handler_def.num_standard’) ubuntu/ndiswrapper/iw_ndis.c:1971: error: unknown field ‘private_args’ specified in initializer ubuntu/ndiswrapper/iw_ndis.c:1971: warning: initialization from incompatible pointer type make[2]: *** [ubuntu/ndiswrapper/iw_ndis.o] Error 1 make[1]: *** [ubuntu/ndiswrapper] Error 2 make: *** [ubuntu] Error 2 How can I compile and install this kernel successfully? I'm new to this and would appreciate any help.

    Read the article

  • no wifi after grub 2 crash

    - by Omu
    on ubuntu 10.10 I used StartupManager to set windows 7 as the default boot, also chosen the 1024x768 resolution, 16 bit, time: 3sec, and checked "show splash screen". after the restart there was no GRUB menu at all, windows 7 booted, and in windows the clock was 0:03 instead of 10:03, also the wifi doesn't sees any connections anymore I reinstalled ubuntu 10.10 so the GRUB menu is back, changed the clock back from BIOS, but my wifi doesn't sees any connections in windows nor in ubuntu (I write this from another computer)

    Read the article

  • Error occurred in deployment step ‘Add Solution’: Value does not fall within the expected range.

    - by ybbest
    I got this error when I deploy a new content type into SharePoint2010.This error message is not very helpful after a few hours of hard work, I find out there is a dash(-) in my contentID.It happen when I generate GUID using visual studio tool and copy it to the ID and forgot to delete the dash. After correct this, I press deploy again, it works like charm. If you got this error double-check your contentID. If you are not quite sure what is a Valid contentTypeID, check the MSDN documentation here.

    Read the article

  • Annoying mistake when create web template in SharePoint 2010

    - by ybbest
    I get the error    Error occurred in deployment step ‘Add Solution’: Exception from HRESULT: 0x8107026E when deploying my web template project. It turns out that your name for the Web template name has to match the name of you WebTemplate section in the element.xml file. Please see the screenshot below, the highlighted two needs to be the same. It took me so long to figure out and I will keep here in case everybody else struggle. If you are a newbie with web template in SharePoint 2010, this blog post explains the details.

    Read the article

  • Blog post every SharePoint developer should read

    - by ybbest
    I will continuously update the list while I keep diving into SharePoint 2010 SharePoint 2010 and web templates By Vesa Juvone Tools of a SharePoint Consultant – the 2010 edition By Sahil Malik A SharePoint Developer’s Toolchest By Sahil malik Building SharePoint Applications with InfoPath 2010 By David Gerhardt WCM Creating a Page Layout in SharePoint 2010 using Visual Studio 2010 By Becky Bertram

    Read the article

  • OpenWeb(String) method

    - by ybbest
    I guess this is a SharePoint beginner problem ,however it took me a while to figure out what the problem is and I will blog it to help me to remember. Basically I wrote the following code to grab some list item from my SharePoint subsite http://win-oirj50igics/RestAPI,however I got the error stating that : “<nativehr>0×80070002</nativehr><nativestack></nativestack>There is no Web named / http://win-oirj50igics/RestAPI”. The problem is that OpenWeb(String) method returns the web site that is located at the specified server-relative or site-relative URL. It is the relative URL , so after I changed http://win-oirj50igics/RestAPI to RestAPI, everything works fine. using (SPSite site = new SPSite(http://win-oirj50igics/)) { SPWeb web = site.OpenWeb("http://win-oirj50igics/RestAPI"); SPQuery query = new SPQuery(); query.Query = camlDocument.InnerXml; SPListItemCollection items = web.Lists["Songs"].GetItems(query); IEnumerable<Song> sortedItems = from item in items.OfType<SPListItem>() orderby item.Title select new Song {SongName = item.Title, SongID = item.ID}; songs.AddRange(sortedItems); }

    Read the article

  • How to study for 70-573 Microsoft SharePoint 2010, Application Development

    - by ybbest
    I just passed my 70-573 exam today and would like to Share my experience on learning SharePoint 2010 as a beginner. 1. Book Microsoft SharePoint 2010: Building Solutions for SharePoint 2010 by Sahil Malik http://apress.com/book/view/1430228652 Sahil is an expert and MVP in SharePoint 2010.He certainly know his field and the book is well written. More importantly Sahil has got very good sense of humor in delivering the knowledge. 2.A development machine It is of great importance to have a dev machine , you cannot learn a new technology by just reading a book nor by watching some training videos. You need get your hands dirty with SharePoint a lot. 3.Training videos Since I have one year subscription with learndev , I use them as my learning resources. It is quite cheap , only cost US $99 for a year subscription and you will get not only the SharePoint training but the whole training library .The videos are from Appdev . Appdev training is of high quality. http://www.appdev.com/ http://www.learndevnow.com/ You can also get the videos from Microsoft SharePoint site. They are pretty good too. But bear in mind , by just watching these videos you will not learn much , you need to build a SharePoint 2010 machine and play with it .Try to write the sample code yourself and not just copy and paste. 4. Write blogs about your learning. This will motive you in your long journey with SharePoint learning. 5. Do check out the patterns & practices SharePoint Guidance on codeplex. http://spg.codeplex.com/ 6.Thanks for Becky Bertram,who kindly put up all the exam requirements with links to MSDN http://blog.beckybertram.com/Lists/Exam%2070573%20Study%20Guide/AllItems.aspx

    Read the article

  • Cannot save all of the property settings for this Web Part.

    - by ybbest
    I would like to display all the items of custom content type of Animals in a SharePoint content query WebPart. After choosing the appropriate values in the web part editor and click on Save I got this error: Cannot save all of the property settings for this Web Part. There is a problem with one or more of the field values below. But when I examine all the values below , it does not flag any error information. I finally manage to locate the error flag after I expand the presentation section. I then delete the text in the Link textbox , now I can save the settings. However , I think the error message should have been more specific so that users can quickly locate the error. The worst part for this is that I did not even change anything in the presentation section, I merely configure the Source in the Query section. Well, I guess I am still new to SharePoint, I just have to get used to these generic error message ):

    Read the article

  • Silverlight 3.0 and ADO.NET data service framework(An error occurred while processing this request)

    - by ybbest
    Today , I try to write a Silverlight app that talks to SharePoint 2010 using the REST API.However after deploy the silverlight app and run the code , I got the following error.In order to fix this I need to make the target framework of your caller application to 4.0,in this case I need to use Silverlight 4.0 instead 3.0.After I have done that and redeploy the solution to the SharePoint.It works like a charm.   Exceptions details: System.Data.Services.Client.DataServiceQueryException: An error occurred while processing this request. Request version ’1.0′ is too low for the response. The lowest supported version is ’2.0′. However , if you got the error like this: Could not load type ‘System.Data.Services.Providers.IDataServiceUpdateProvider’ from assembly ‘System.Data.Services, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089′,then you need to install ADO.NET Data Services Update for .NET Framework 3.5 SP1 ,you can download here (for windowns 7 and server 2008 r2 ) or here (for windows vista of server 2008).

    Read the article

  • Cannot start service SPUserCodeV4 on computer

    - by ybbest
    When you create a sand boxed solution for SharePoint 2010 in Visual Studio 2010 and try to deploy the solution , you could get the error “Error occurred in deployment step ‘Retract Solution’: Cannot start service SPUserCodeV4 on computer”(See the Picture1 below). In order to fix this , you need to go to Central Administration -> System Settings -> Manage services on server and start service “Microsoft SharePoint Foundation User Code Service” If you are developing SharePoint on DC(Domain controller),you need to check the solution from my previous post. Error message.(Picture1) Locate Microsoft SharePoint Foundation User Code Service.(Picture 2)

    Read the article

  • Using SMO to drop a SQL Database

    - by ybbest
    SQL Server Management Objects(SMO) is the API you can use to manipulate the sql server,like create databse and delete database. To get more details you can check the msdn documentation. There are 2 ways you can drop a database 1. You could create a Database object and call Drop method: Dim database As Database = New Database(Your database name) database.Drop() 2.However if you have existing connections to the database ,attempting to drop it using the above method will fail.Recall that when you try to drop the database from management studio ,you can tick the check box to close all the connections before drop the database.It is not so obvious , but you can do the exact same thing using SMO: Dim server As Server= New Server(ServerConn) server.KillAllProcesses(Your database name) server.KillDatabase(Your database name)

    Read the article

  • Computing "average" of two colors

    - by Francisco P.
    This is only marginally programming related - has much more to do w/ colors and their representation. I am working on a very low level app. I have an array of bytes in memory. Those are characters. They were rendered with anti-aliasing: they have values from 0 to 255, 0 being fully transparent and 255 totally opaque (alpha, if you wish). I am having trouble conceiving an algorithm for the rendering of this font. I'm doing the following for each pixel: // intensity is the weight I talked about: 0 to 255 intensity = glyphs[text[i]][x + GLYPH_WIDTH*y]; if (intensity == 255) continue; // Don't draw it, fully transparent else if (intensity == 0) setPixel(x + xi, y + yi, color, base); // Fully opaque, can draw original color else { // Here's the tricky part // Get the pixel in the destination for averaging purposes pixel = getPixel(x + xi, y + yi, base); // transfer is an int for calculations transfer = (int) ((float)((float) (255.0 - (float) intensity/255.0) * (float) color.red + (float) pixel.red)/2); // This is my attempt at averaging newPixel.red = (Byte) transfer; transfer = (int) ((float)((float) (255.0 - (float) intensity/255.0) * (float) color.green + (float) pixel.green)/2); newPixel.green = (Byte) transfer; // transfer = (int) ((float) ((float) 255.0 - (float) intensity)/255.0 * (((float) color.blue) + (float) pixel.blue)/2); transfer = (int) ((float)((float) (255.0 - (float) intensity/255.0) * (float) color.blue + (float) pixel.blue)/2); newPixel.blue = (Byte) transfer; // Set the newpixel in the desired mem. position setPixel(x+xi, y+yi, newPixel, base); } The results, as you can see, are less than desirable. That is a very zoomed in image, at 1:1 scale it looks like the text has a green "aura". Any idea for how to properly compute this would be greatly appreciated. Thanks for your time!

    Read the article

  • jQuery code .val(); not working in FF

    - by SzamDev
    Hi I have this code function calculateTotal() { var total = 0; $(".quantity").each(function() { if (!isNaN(this.value) && this.value.length != 0) { total += parseFloat(this.value); } }); $("#total_quantity").val(total); } <input onchange="calculateTotal();" name="sol1" type="text" class="result_form_textbox_small quantity" id="sol1" /> <input name="total_quantity" type="text" class="result_form_textbox_small" id="total_quantity" /> This code is working in IE very good but it's not working in FF. What is the proplem? Thanks in advance.

    Read the article

  • Sandbox solutions seem to be too severely crippled.

    - by Vaccano
    I am learning SharePoint and the different kind of solutions you can deploy. From the training I am watching it seems like you should try your best to use a Sandbox Solution when ever possible. This is because Farm Solutions can mess things up too much. However, two of the main things I would do with WebParts are not supported in Sandbox Solutions. Those are Visual WebParts and WebPart communication. (The first is not allowed because it needs to hit the file system and the second is disallowed because it uses reflection). It seems to me that my WebParts will always want to do at least one of those things. (WebParts that don't communicate are not really that modular are they?) Am I missing the point or are Sandbox Solutions a "nice idea" that are not really used in actual code?

    Read the article

  • alternative to lag SQL command

    - by mahen
    I have a table which has a table like this. Month-----Book_Type-----sold_in_Dollars Jan----------A------------ 100 Jan----------B------------ 120 Feb----------A------------ 50 Mar----------A------------ 60 Mar----------B------------ 30 and so on I have to calculate the expected sales for each month and book type based on the last 2 months sales. So for March and type A it would be (100+50)/2 = 75 For March and type B it is 120/1 since no data for Feb is there. I was trying to use the lag function but it wouldn't work since there is data missing in a few rows. Any ideas on this?

    Read the article

  • Algorithm complexity question

    - by Itsik
    During a recent job interview, I was asked to give a solution to the following problem: Given a string s (without spaces) and a dictionary, return the words in the dictionary that compose the string. For example, s= peachpie, dic= {peach, pie}, result={peach, pie}. I will ask the the decision variation of this problem: if s can be composed of words in the dictionary return yes, otherwise return no. My solution to this was in backtracking (written in Java) public static boolean words(String s, Set<String> dictionary) { if ("".equals(s)) return true; for (int i=0; i <= s.length(); i++) { String pre = prefix(s,i); // returns s[0..i-1] String suf = suffix(s,i); // returns s[i..s.len] if (dictionary.contains(pre) && words(suf, dictionary)) return true; } return false; } public static void main(String[] args) { Set<String> dic = new HashSet<String>(); dic.add("peach"); dic.add("pie"); dic.add("1"); System.out.println(words("peachpie1", dic)); // true System.out.println(words("peachpie2", dic)); // false } What is the time complexity of this solution? I'm calling recursively in the for loop, but only for the prefix's that are in the dictionary. Any idea's?

    Read the article

  • How to style "form" field labels in Windows Phone 7?

    - by Jeremy Bell
    Is there any standards guidance on how to style field labels next to form fields in windows phone 7 silverlight applications? For example, let's say I have a StackPanel with the TextBlock label and a TextBox for data entry. Currently I am using the default TextBlock Margin included in the PhoneTextSubtleStyle ("12,0,12,0"), and using a Margin of "0,-12,0,0" to push the TextBox up closer to the label: <StackPanel HorizontalAlignment="Left"> <TextBlock VerticalAlignment="Center" Text="Name" Style="{StaticResource PhoneTextSubtleStyle}" /> <TextBox Text="{Binding ItemName, Mode=TwoWay}" TextChanged="TextBox_TextChanged" VerticalAlignment="Center" Width="433" Margin="0,-12,0,0" /> </StackPanel> Note that the TextBox seems to have some internal padding of 12 pixels to the left and right, so that the TextBlock label and the TextBox control visually line up perfectly on the left. The problem is, I see existing apps with widely varying conventions for field label styling. Some do not do the negative margin adjustment, like I have above. Some don't. Some appear to override the label TextBlock Margin so that it is indented an additional 12 pixels on the left (i.e. "24,0,12,0" instead of the default "12,0,12,0"). Some apps put the labels to the left of the fields themselves (I hate that). Is there some standard design guidance on field labels in Windows Phone 7? I read through the design template PDF and could only determine that the field labels should be upper case on the first word (preferably only one word labels), and should NOT have a colon at the end. I didn't see anything with regards to margins or alignment between the label and the field.

    Read the article

  • Radio buttons: Replacing the stock round ones with built in android buttons

    - by Aaron Kapitsk
    Hi all, how do I create a group of radio buttons where the buttons look like nice stock android buttons? This is what I have found so far: * The look of radio button can be replaced with 4 drawables. * There is an example of ^^ on the web. This does not work for me. So I have figured out two bad choices: A) Use stock buttons -do the radio logic in java. //Gross B) Render the buttons to drawables set them at runtime //Blah Any ideas are very appreciated. (This is my first question here. Hope it is well formulated.)

    Read the article

  • The D Programming Language for Game Development

    - by n2liquid
    Hi all, Recently I've been bothered because I reached a point in which C++ (even 0x) felt very limited, so I started looking for alternatives. Forget Java, C#, Python or Ruby. I still like the low-level nature of C++ and I'm not fond of virtual machines. Further, I'm a game engine developer, so I have to develop core routines which must be really fast, and lately I've been hungry for code expressiveness. C++ is an almost-there language for me, but there are many exceptions on how to use templates, and GCC isn't optimizing stuff as well as I'd hoped it would. So I'm considering to start learning D. Do you think it will suffice my needs as a game developer? I'm weary because I've never heard of D being used for that. Thanks!

    Read the article

  • Compare to a defined constants in C?

    - by J.W.
    I am trying to compare to a defined constants in C, and I have simplified my program to the following.. #include "stdio.h" #include "stdlib.h" #define INVALID_VALUE -999; int main(int argc, const char* argv[]) { int test=0; if(test==INVALID_VALUE) //The error line.. return INVALID_VALUE; return 0; }; And when I use gcc to compile. it gives out error "error: expected ‘)’ before ‘;’ token" Any reason that this cannot be done.

    Read the article

  • Javascript works great locally, but not on my server

    - by Jonathan Cohen
    I'm teaching myself javascript by creating a script for displaying an external rss feed on a webpage. The code I patched together works great locally. This is a screen grab of the code producing exactly the desired behavior. The code is populating all the information inside the section "Blog: Shades of Gray", except for "tagged" which I hard coded: But when I upload the site files to my server, the code doesn't work at all. This is a screen grab of the code on my site NOT producing the desired behavior... This feels like I'm not getting something really basic about how javascript works locally vs. on the server. I did my half hour of googling for an answer and no trails look promising. So I'd really appreciate your help. This is my site (under construction) http://jonathangcohen.com Below is the code, which can also be found at http://jonathangcohen.com/grabFeeds.js. /*Javascript for Displaying an External RSS Feed on a Webpage Wrote some code that’ll grab attributes from an rss feed and assign IDs for displaying on a webpage. The code references my Tumblr blog but it’ll extend to any RSS feed.*/ window.onload = writeRSS; function writeRSS(){ writeBlog(); } function writeBlog(){ if (window.XMLHttpRequest) {// code for IE7+, Firefox, Chrome, Opera, Safari xmlhttp=new XMLHttpRequest(); } else {// code for IE6, IE5 xmlhttp=new ActiveXObject("Microsoft.XMLHTTP"); } xmlhttp.open("GET","http://blog.jonathangcohen.com/rss.xml",false); xmlhttp.send(); xmlDoc=xmlhttp.responseXML; var x=xmlDoc.getElementsByTagName("item"); //append category to link for (i=0;i<3;i++) { if (i == 0){ //print category var blogTumblrCategory = x[i].getElementsByTagName("category")[0].childNodes[0].nodeValue document.getElementById("getBlogCategory1").innerHTML = '<a class="BlogTitleLinkStyle" href="http://blog.jonathangcohen.com/tagged/'+blogTumblrCategory+'">'+blogTumblrCategory+'</a>'; //print date var k = x[i].getElementsByTagName("pubDate")[0].childNodes[0].nodeValue thisDate = new Date(); thisDate = formatTumblrDate(k); document.getElementById("getBlogPublishDate1").innerHTML = thisDate; //print title var blogTumblrTitle = x[i].getElementsByTagName("title")[0].childNodes[0].nodeValue var blogTumblrLink = x[i].getElementsByTagName("link")[0].childNodes[0].nodeValue document.getElementById("getBlogTitle1").innerHTML = '<a class="BlogTitleLinkStyle" href="'+blogTumblrLink+'">'+blogTumblrTitle+'</a>'; } if (i == 1){ //print category var blogTumblrCategory = x[i].getElementsByTagName("category")[0].childNodes[0].nodeValue document.getElementById("getBlogCategory2").innerHTML = '<a class="BlogTitleLinkStyle" href="http://blog.jonathangcohen.com/tagged/'+blogTumblrCategory+'">'+blogTumblrCategory+'</a>'; //print date var k = x[i].getElementsByTagName("pubDate")[0].childNodes[0].nodeValue thisDate = new Date(); thisDate = formatTumblrDate(k); document.getElementById("getBlogPublishDate2").innerHTML = thisDate; //print title var blogTumblrTitle = x[i].getElementsByTagName("title")[0].childNodes[0].nodeValue var blogTumblrLink = x[i].getElementsByTagName("link")[0].childNodes[0].nodeValue document.getElementById("getBlogTitle2").innerHTML = '<a class="BlogTitleLinkStyle" href="'+blogTumblrLink+'">'+blogTumblrTitle+'</a>'; } if (i == 2){ //print category var blogTumblrCategory = x[i].getElementsByTagName("category")[0].childNodes[0].nodeValue document.getElementById("getBlogCategory3").innerHTML = '<a class="BlogTitleLinkStyle" href="http://blog.jonathangcohen.com/tagged/'+blogTumblrCategory+'">'+blogTumblrCategory+'</a>'; //print date var k = x[i].getElementsByTagName("pubDate")[0].childNodes[0].nodeValue thisDate = new Date(); thisDate = formatTumblrDate(k); document.getElementById("getBlogPublishDate3").innerHTML = thisDate; //print title var blogTumblrTitle = x[i].getElementsByTagName("title")[0].childNodes[0].nodeValue var blogTumblrLink = x[i].getElementsByTagName("link")[0].childNodes[0].nodeValue document.getElementById("getBlogTitle3").innerHTML = '<a class="BlogTitleLinkStyle" href="'+blogTumblrLink+'">'+blogTumblrTitle+'</a>'; } } } function formatTumblrDate(k){ d = new Date(k); var curr_date = d.getDate(); var curr_month = d.getMonth(); curr_month++; var curr_year = d.getFullYear(); printDate = (curr_month + "/" + curr_date + "/" + curr_year); return printDate; } Thank you!

    Read the article

  • UINavigationController as child view of UIViewController

    - by Gregg
    I have an application that isn't nav based. So there is no UINavigationController in the App Delegate. However, I need to switch to a UINavigationController for a piece of the application. Steps I currently took... Create a new Class that extends UIViewController Added a UINavigationController via IB Told IB that the new UIViewController's view is the view for the UINavigationController The problem now is that the File's Owner needs it's view set. But via IB there is no way to specify this. So obviously, I'm not going about this the right way. Any tips in the right direction are much appreciated.

    Read the article

  • How to fix notifyDataSetChanged/ListView problems in dynamic Adapter wrapper Android

    - by ipaterson
    Summary: Trying to dynamically add heading rows to a ListView via a custom adapter wrapper. ListView is having trouble keeping the scroll position in sync. Runnable demo project provided. I would like to dynamically add items to a list based on the values in a CursorAdapter, several positions ahead of what the user is currently viewing. To do this, I have an adapter that wraps the CursorAdapter and keeps the new content indexed in a SparseArray. The ListView needs to be updated when items are added to the custom adapter, but I have met a lot of pitfalls trying to get that to work and would love some advice. The demo project can be downloaded here: http://dl.dropbox.com/u/15334423/DynamicSectionedList.zip In the demo, the headings are added dynamically by looking ahead 10 places to find the correct position where the list items switch to the next letter. Each implementation of notifyDataSetChanged has problems as described: Demo 1 This demo shows the importance of notifyDataSetChanged(). On clicking anything, the app will crash. This is due to some sanity checking in ListView... mItemCount != adapter.getItemCount(). Moral is, we need to notify the list that data has changed. Demo 2 The natural next step is to notify the ListView of changes when changes occur. Unfortunately, doing so while the ListView is scrolling firmly breaks all touch interaction until the app switches out of touch mode. You will need to "fling scroll" far enough to generate new headings in order to notice this. Tapping the screen will not cause the scroll to stop, and once stopped none of the list items will be clickable. This is due to some if (!mDataChanged) { /* do very important stuff */ } code in AbsListView.onTouchEvent(). Demo 3 To fix this, Demo 3 introduces a pendingChanges flag and the custom Adapter gains a notifyDataSetChangedIfNeeded() which can be called by the ListView once it has entered a "safe" state for changes. The first point where changes must be notified is in ListView.layoutChildren(), so I overrode that method to first notify of changes if needed, then call through. Fling past at least one heading then click a list item. This doesn't quite work right, though I'm not totally sure why. Tapping or selecting an item with the keyboard/trackball causes the list to refresh without properly syncing the old position. It scrolls to the top of the list which is not acceptable. Demo 4 The scroll problem in Demo 3 can be conquered, at least in touch mode. By adding a call to notifyDataSetChangedIfNeeded() on touch down, the data change happens to take place at such a time that all touch interaction works as expected and the list position is properly synced. However, I can't find an analog for that when the device is not in touch mode, not to mention the fact that it definitely seems like a hack. The list almost always scrolls back to the top, I can't find out what causes it to occasionally maintain the correct position. Since Android is fighting me at each step of the way, I feel like there should be a better approach. Please try the demo, if any fixes can be applied to get it working that would be great! Many thanks to anyone who can look into this, hopefully if we can get the code working it will be useful for others trying to accomplish the same optimization for lists with headings.

    Read the article

  • help to reiterate through my jquery snippet

    - by s2xi
    Code in question: $("#alpha").click(function(event) { event.preventDefault(); $("#show").slideToggle(); }); I have a list of files and its being outputted with PHP in alphabetical. I use this method in PHP: foreach(range('A','Z') as $i) { if (array_key_exists ("$i", $alpha)) { echo '<div id="alpha"><a href="#" name="'.$i.'"><h2>'.$i.'</h2></a></div><div id="show">'; foreach ($$i as $key=>$value) echo '<p>'.$value.' '.$key.'</p>'; } echo '</div>'; } What I want to do is when the user clicks on the #alpha to toggle the div #show that has the names that belong to a letter up. I can do this with the first listing, but every listing after that isn't affected. how can i tell jquery that foreach letter apply the js code so it can toggle up/down the #show. I don't want to this 26 times (one time for each letter in the alphabet), I tried to use class instead of id but that causes all the #show to toggleup heh.

    Read the article

< Previous Page | 26 27 28 29 30 31 32 33 34  | Next Page >