Daily Archives

Articles indexed Friday May 21 2010

Page 7/114 | < Previous Page | 3 4 5 6 7 8 9 10 11 12 13 14  | Next Page >

  • Heap Consistency Checking on Embedded System

    - by l.thee.a
    I get a crash like this: #0 0x2c58def0 in raise () from /lib/libpthread.so.0 #1 0x2d9b8958 in abort () from /lib/libc.so.0 #2 0x2d9b7e34 in __malloc_consolidate () from /lib/libc.so.0 #3 0x2d9b6dc8 in malloc () from /lib/libc.so.0 I guess it is a heap corruption issue. uclibc does not have mcheck/mprobe. Valgrind does not seem to MIPS support and my app (which is multi-threaded) depends on hw specific drivers. Any suggestions to check the consistency of the heap and to detect corruption?

    Read the article

  • iPad + OpenGL ES2. Why the Puzzling Virtual Memory Spike During Device Reorientation?

    - by dugla
    I've been spending the afternoon starring at Xcode Instruments memory monitor trying to decipher the following memory issue. I have a fullscreen OpenGL ES2 app running on iPad. I am fanatical about memory issues so my retains/releases are all nicely balanced. I closely monitor memory leaks. My app is basically squeeky clean. Except occassionally when I reorient the device. Portrait to Landscape. Back and forth I rock the device stress testing my discarding and rebuilding of the OpenGL framebuffer. The ambient memory footprint of my app is about 70MB Real Mems and 180MB Virtual Mems. Real memory hardly varies at all during device rotations. However the virtual mems reading sometimes briefly spikes up to 250MB and then recedes back to 180MB. No real pattern. But clearly related discarding/rebuilding the framebuffer. I see random memory warnings in my NSlogs but the app just hums along, no worries. 1) Since iPhone OS devices don't have VM could someone explain to me what the VM reading actually means? 2) My app totally leak free and generally bulletproof dispite the VM spikes. Never crashes. Rock solid. Should I be concerned about this? 3) There is clearly something happening in OpenGL framebuffer land that is causing this but I am using the API in the proper way: paraphrasing: Discarding the framebuffer: glDeleteRenderbuffers(1, &m_colorbuffer); glDeleteFramebuffers(1, &m_framebuffer); Rebuilding the framebuffer: glGenFramebuffers(1, &m_framebuffer); glGenRenderbuffers(1, &m_colorbuffer); Is there some other memory flushing trick I have missed? Thanks for any insight. Cheers, Doug

    Read the article

  • Efficient implementation of threads in the given scenario

    - by shadeMe
    I've got a winforms application that is set up in the following manner: 2 buttons, a textbox, a collection K, function X and another function, Y. Function X parses a large database and enumerates some of its data in the global collection. Button 1 calls function X. Function Y walks through the above collection and prints out the data in the textbox. Button 2 calls function Y. I'd like to call function X through a worker thread in such a way that: The form remains responsive to user input. This comes intrinsically from the use of a separate thread. There is never more than a single instance of function X running at any point in time. K can be accessed by both functions at all times. What would be the most efficient implementation of the above environment ?

    Read the article

  • Silverlight hierarchy gridview with MVVM

    - by Suresh Behera
    Since few days i have been struggling to bind a gridview from a simple WCF async call. Following article look promising… http://blogs.telerik.com/vladimirenchev/posts/09-10-16/how_to_silverlight_grid_hierarchy_load_on_demand_using_mvvm_and_ria_services.aspx I conclude binding is not simple traditional databind() method call from gridview if you don’t know howto ;) Thanks, Suresh...(read more)

    Read the article

  • Visual studio add-in

    - by Suresh Behera
    I was looking for a add in which could help to file the filename and found following few links for add-in All Visual Studio gallery http://www.visualstudiogallery.com Do you have any recommended add-ons/plug-in for Microsoft Visual Studio? http://stackoverflow.com/questions/2767/do-you-have-any-recommended-add-ons-plugins-for-microsoft-visual-studio Visual Studio Add-Ins Every Developer Should Download Now http://msdn.microsoft.com/en-us/magazine/cc300778.aspx Post here if you have any other extra...(read more)

    Read the article

  • Flash Player Automatic Updater on Windows Startup

    - by Mikee
    Hi all, Adobe Flash Player is set to automatically check for updates on Windows startup. I've always wondered where exactly it is set to do this. Checking the running services, as well as msconfig does not yield its location. The message in question looks like this: http://www.technipages.com/disable-an-update-to-your-adobe-flash-player-is-available-message-forever.html I know how to disable it via Adobe's web site (instructions are included in link above), but I'm interested in knowing where exactly in Windows is this set to perform this action? I have done some research on this, and people keep saying to check the following registry locations: HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\RunOnce or the HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Run However, I have checked those locations, and I still cannot locate where this updater is stored. I'm pretty sure that malware also uses this technique to automatically load upon startup, and since it's not in the typical location(s) that a user would look, it's well hidden. Thank you for the assistance!

    Read the article

  • Is there a good dual monitor arm solution for iMac 27" i7s?

    - by Darren Newton
    I currently have an iMac 27" and am considering purchasing another to run in target display mode. My desk space is a little limited. Is there a dual monitor arm solution that can support the weight of two iMac 27" units (30.5 pounds (13.8 kg)) as well as their width (25.6 inches (65.0 cm)) in a side-by-side landscape configuration? I looked at the Ergotron LX Dual Side by Side but the iMacs appear to exceed the width and weight limit this device is rated for. I'm open to alternate solutions to arms, such as a multi-unit desk stand/mount, but a wall mount is not possible for me at this time. Thanks!

    Read the article

  • is there any way we can disable on mouse over event on certain columns of an data grid

    - by prince23
    hi, here wat i am trying to do is that on mouse over of first column i need to hit mouse MouseEnter event and show the pop up which i have kept there rest all other column i dnt need to to show the pop up so i am having this fuction there MouseLeave="Row_MouseLeave" <sdk:DataGrid MinHeight="100" x:Name="dgCounty" AutoGenerateColumns="False" VerticalAlignment="Top" Grid.Row="1" IsReadOnly="True" Margin="5,5,5,0" RowDetailsVisibilityChanged="dgCounty_RowDetailsVisibilityChanged" SelectionMode="Extended" RowDetailsVisibilityMode="VisibleWhenSelected" MouseEnter="dgCounty_MouseEnter" MouseLeave="dgCounty_MouseLeave" SelectionChanged="dgCounty_SelectionChanged" LoadingRow="dgCounty_LoadingRow1" UnloadingRow="dgCounty_UnloadingRow"> <sdk:DataGrid.Columns> <sdk:DataGridTemplateColumn> <sdk:DataGridTemplateColumn.CellTemplate> <DataTemplate> <Button x:Name="myButton" Width="24" Height="24" Click="Details_Click"> <Image x:Name="img" Source="Images/detail.JPG" Stretch="None"/> </Button> </DataTemplate> </sdk:DataGridTemplateColumn.CellTemplate> </sdk:DataGridTemplateColumn> <sdk:DataGridTemplateColumn Header="ID"> <sdk:DataGridTemplateColumn.CellTemplate> <DataTemplate > <sdk:Label Content="{Binding EmployeeID}" /> </DataTemplate> </sdk:DataGridTemplateColumn.CellTemplate> </sdk:DataGridTemplateColumn> <sdk:DataGridTemplateColumn Header="Name"> <sdk:DataGridTemplateColumn.CellTemplate> <DataTemplate > <sdk:Label Content="{Binding EmployeeFName}" MouseLeave="Row_MouseLeave" /> </DataTemplate> </sdk:DataGridTemplateColumn.CellTemplate> </sdk:DataGridTemplateColumn> <sdk:DataGridTemplateColumn Header="MailID"> <sdk:DataGridTemplateColumn.CellTemplate> <DataTemplate > <sdk:Label Content="{Binding EmployeeMailID}" MouseLeave="Row_MouseLeave" /> </DataTemplate> </sdk:DataGridTemplateColumn.CellTemplate> </sdk:DataGridTemplateColumn> </sdk:DataGrid.Columns> </sdk:DataGrid> in code behind void Row_MouseLeave(object sender, MouseEventArgs e) { Show.Visibility = Visibility.Collapsed; PoPGrid.Visibility = Visibility.Collapsed; } void Row_MouseEnter(object sender, MouseEventArgs e) { } the pop up her is like the ajax modal pop up wat we do in asp.net i am able to show data in pop up now the main issue is i need to show pop up only on the 2 column. rest all other column i need to hide the pop up when i move mouse over on that column. i am trying this concept it is not working is there any way i can achive it as i said only need to show pop up on mouse over of the 2 column thanks in advance prince

    Read the article

  • Returning NSNull from actionForLayer:forKey

    - by MrHen
    If I implement the CALayer delegate method actionForLayer:forKey I can return [NSNull null] to force the CALayer to not animate any changes. Unfortunately, [NSNull null] doesn't implement the CAAction delegate and XCode kicks out the following warning: warning: class 'NSNull' does not implement the 'CAAction' protocol Here is the method code: - (id<CAAction>)actionForLayer:(CALayer *)theLayer forKey:(NSString *)theKey { //This disables the animations when moving things around //Also, don't animate the selection box. It was doing weird things if(undoGroupStarted || theLayer == self.selectionBox) { return [NSNull null]; } else { return nil; } } Am I doing something wrong? Is returning [NSNull null] bad behavior? If so, what is another way to do what I am trying to do here? If not, how do I make the compiler happy?

    Read the article

  • web2py server-side comments

    - by MikeWyatt
    In a web2py view, how do I comment out server-side code? In ASP.NET, I can surround any HTML or code tags with <%-- and --% and that block will not be compiled or sent to the client. Velocity does the same thing with #* and *#. Is there an equivalent in web2py? ASP.NET <div> <p><%=foo.bar%></p> <%-- don't print twice! <p><%=foo.bar%></p> --%> </div> web2py <div> <p><%=foo.bar%></p> ??? don't print twice! <p><%=foo.bar%></p> ??? </div>

    Read the article

  • Help thinking "Pythony"

    - by Josh
    I'm brand new to Python and trying to learn it by replicating the following C++ function into python // determines which words in a vector consist of the same letters // outputs the words with the same letters on the same line void equivalentWords(vector <string> words, ofstream & outFile) { outFile << "Equivalent words\n"; // checkedWord is parallel to the words vector. It is // used to make sure each word is only displayed once. vector <bool> checkedWord (words.size(), false); for(int i = 0; i < words.size(); i++) { if (!checkedWord[i]){ outFile << " "; for(int j = i; j < words.size(); j++){ if(equivalentWords(words[i], words[j], outFile)) { outFile << words[j] << " "; checkedWord[j] = true; } } outFile << "\n"; } } } In my python code (below), rather than having a second vector, I have a list ("words") of lists of a string, a sorted list of the chars in the former string (because strings are immutable), and a bool (that tells if the word has been checked yet). However, I can't figure out how to change a value as you iterate through a list. for word, s_word, checked in words: if not checked: for word1, s_word1, checked1 in words: if s_word1 == s_word: checked1 = True # this doesn't work print word1, print "" Any help on doing this or thinking more "Pythony" is appreciated.

    Read the article

  • How to order the items in a nested LINQ-provided collection

    - by Carson McComas
    I've got a (SQL Server) database table called Category. And another database table called SubCategory. SubCategory has a foreign key relationship to Category. Because of this, thanks to LINQ, each Cateogory has a property called SubCategories and LINQ is nice enough to return all the SubCategories associated with my Category when I grab it. If I want to sort the Categories alphabetically, I can just do: return db.Categories.OrderBy(c => c.Name); However, I have no idea how to order the SubCategories collection inside each Category. My goal is to return a collection of Categories, where all of the SubCategory collections inside of them are ordered alphabetically by Name.

    Read the article

  • Openlayers - LayerRedraw() / Feature rotation

    - by Ozaki
    TLDR: I have an Openlayers map with a layer called 'track' I want to remove track and add track back in. I have an image 'imageFeature' on a layer that rotates on load to the direction being set. I want it to update this rotation that is set in 'styleMap' on a layer called 'tracking'. I set the var 'stylemap' to apply the external image & rotation. The 'imageFeature' is added to the layer at the coords specified. 'imageFeature' is removed. 'imageFeature' is added again in its new location. Rotation is not applied.. As the 'styleMap' applies to the layer I think that I have to remove the layer and add it again rather than just the 'imageFeature' Layer: var tracking = new OpenLayers.Layer.GML("Tracking", "coordinates.json", { format: OpenLayers.Format.GeoJSON, styleMap: styleMap }); styleMap: var styleMap = new OpenLayers.StyleMap({ fillOpacity: 1, pointRadius: 10, rotation: heading, }); Now wrapped in a timed function the imageFeature: map.layers[3].addFeatures(new OpenLayers.Feature.Vector( new OpenLayers.Geometry.Point(longitude, latitude), {rotation: heading, type: parseInt(Math.random() * 3)} )); Type refers to a lookup of 1 of 3 images.: styleMap.addUniqueValueRules("default", "type", lookup); var lookup = { 0: {externalGraphic: "Image1.png", rotation: heading}, 1: {externalGraphic: "Image2.png", rotation: heading}, 2: {externalGraphic: "Image3.png", rotation: heading} } I have tried the 'redraw()' function: but it returns "tracking is undefined" or "map.layers[2]" is undefined. tracking.redraw(true); map.layers[2].redraw(true); Heading is a variable: from a JSON feed. var heading = 13.542; But so far can't get anything to work it will only rotate the image onload. The image will move in coordinates as it should though. So what am I doing wrong with the redraw function or how can I get this image to rotate live? Thanks in advance -Ozaki Add: I managed to get map.layers[2].redraw(true); to sucessfully redraw layer 2. But it still does not update the rotation. I am thinking because the stylemap is updating. But it runs through the style map every n sec, but no updates to rotation and the variable for heading is updating correctly if i put a watch on it in firebug.

    Read the article

  • Problems with Ajax Chat version .8.3

    - by Matt
    I am not sure why, but my Ajax Chatroom ever once in awhile (once time ever other day on average I'd say), displays an connection error 503. Now doing some digging apparently 503 is an error for exceeding max connections, and the typical fix is increasing your limit to something like 400 but my max connections is already set to 1500. That being said I would love some help on the issue as I cannot find any further info on it.

    Read the article

  • UISlider how to set the initial value

    - by slim
    I'm pretty new at this iphone dev stuff and i'm working on some existing code at a company. The uislider i'm trying to set the initial value on is actually in a UITableViewCell and is a custom control. I was thinking in the cell init cell = (QuantitiesCell *)[self loadCellWithNibName:@"QuantitiesCell" forTableView:ltableView withStyle:UITableViewCellStyleDefault]; i could just call something like ((QuantitiesCell *)cell).value = 5; The actual QuantitiesCell class has the member value and the following functions -(void)initCell;{ if (listOfValues == nil) { [self initListOfValues]; } quantitiesSLider.maximumValue = [listOfValues count]-1; quantitiesSLider.minimumValue = 0; quantitiesSLider.value = self.value; } -(void)initListOfValues;{ listOfValues = [[NSMutableArray alloc] initWithCapacity:10]; int j =0; for (float i = minValue; i <= maxValue+increment; i=i+increment) { [listOfValues addObject:[NSNumber numberWithFloat: i]]; if (i == value) { quantitiesSLider.value = j; } j++; } } like i said, i'm pretty new at this so if i need to post more of the code to show whats going to get help, let me know, This slider always is defaulting to 1, the slider ranges usually from 1-10, and i want to set it to a specific value of the item i'm trying to edit.

    Read the article

  • PHP Loop Over ONLY Different Arrays

    - by Steven
    Hello, I have a single array with several of the same values. And I only want to loop over DIFFERENT values. How could I go about doing this? Example 166-01 001;09;UO; 166-01 001;09;UO; 166-01 001;09;UO; 166-01 001;09;UO; 166-01 001;09;UO; 166-01 001;09;UO; 166-01 001;09;UO;_86 166-01 001;09;UO;_86 166-01 001;09;UO;_86 166-01 001;09;UO;_86 166-01 001;09;UO;_86 166-01 001;09;UO;_86_97 166-01 001;09;UO;_86_97 166-01 001;09;UO;_86_97 166-01 001;09;UO;_86_97_108 166-01 001;09;UO;_86_97_108 166-01 001;09;UO;_86_97_108_119 166-01 001;09;UO;_86_97_108_119 I have that in a single array, but I only want to loop for the different ones. So it would loop once for nothing, then once for _86, then once for _86_97, then once for _86_97_108, and then once for _86-97_108_119. So only loop for different key values, or would there be a way to count the number of different keys?

    Read the article

  • axWindowsMediaPlayer/window media player has stoped working?

    - by Madhup
    Hi, I am using axWnidowsMediaPlayer in my windows mobile application with compact framework 3.5 . It was working beautifully few days ago but now whenever i try to play a song from url it shows the message "Can not play the file.The file is either corrupted or the player does not support the format you are playing" The same url is not played by the phone's wmplayer also but when I try to play it with the systems wmplayer it plays the same url successfully.

    Read the article

  • WCF Web/ServiceHost - Singletons and initialisation

    - by Kyle
    I have some Service class which is defined as InstanceContextMode.Single, and is well known in the hosting application. (The host creates an instance, and passes that to the WebServiceHost) Hosting app:WebServiceHost host = null; SomeService serviceInstance = new SomeService("text", "more text"); host = new WebServiceHost(serviceInstance, baseUri); Problem: When I go to use the variables initialised when the service is created (ie, when a call is made to the service), they are either null or empty... Am I wrong in assuming that as the instance being initialised in the hosting application is used for each request to the WebServiceHost? Any pointers here would be great.

    Read the article

  • Style question: Writing "this." before instance variable and methods: good or bad idea?

    - by Uri
    One of my nasty (?) programming habits in C++ and Java is to always precede calls or accesses to members with a this. For example: this.process(this.event). A few of my students commented on this, and I'm wondering if I am teaching bad habits. My rationale is: 1) Makes code more readable — Easier to distinguish fields from local variables. 2) Makes it easier to distinguish standard calls from static calls (especially in Java) 3) Makes me remember that this call (unless the target is final) could end up on a different target, for example in an overriding version in a subclass. Obviously, this has zero impact on the compiled program, it's just readability. So am I making it more or less readable? Related Question Note: I turned it into a CW since there really isn't a correct answer.

    Read the article

< Previous Page | 3 4 5 6 7 8 9 10 11 12 13 14  | Next Page >