Daily Archives

Articles indexed Thursday November 22 2012

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

  • Cocos2d update leaking memory

    - by Andrey Chernukha
    I have a weird issue - my app is leaking memory on device only, not on a simulator. It is leaking if i schedule update method anywhere, on any scene. It is leaking despite update method is empty, there's nothing inside it except NSLog. How can it be? I have even scheduled update on the very first scene where it seems there's nothing to leak, and scheduled another empty and it's leaking or not leaking but allocating something, the result is the same - the volume of the memory consumed is increasing and my app is crashing soon. I can detect the leakage via using Instruments-Memory-Activity Monitor or with help of following function: void report_memory(void) { struct task_basic_info info; mach_msg_type_number_t size = sizeof(info); kern_return_t kerr = task_info(mach_task_self(), TASK_BASIC_INFO, (task_info_t)&info, &size); if( kerr == KERN_SUCCESS ) { NSLog(@"Memory in use (in bytes): %u", info.resident_size); } else { NSLog(@"Error with task_info(): %s", mach_error_string(kerr)); } } Can anyone explain me what's going on?

    Read the article

  • Procedural world generation oriented on gameplay features

    - by Richard Fabian
    In large procedural landscape games, the land seems dull, but that's probably because the real world is largely dull, with only limited places where the scenery is dramatic or tactical. Looking at world generation from this point of view, a landscape generator for a game (that is, not for the sake of scenery, but for the sake of gameplay) needs to not follow the rules of landscaping, but instead some rules married to the expectations of the gamer. For example, there could be a choke point / route generator that creates hills ravines, rivers and mountains between cities, rather than the natural way cities arise, scattered on the land based on resources or conditions generated by the mountains and rainfall patterns. Is there any existing work being done like this? Start with cities or population centres and then add in terrain afterwards? The reason I'm asking is that I'd previously pondered taking existing maps from fantasy fiction (my own and others), putting the information into the system as a base point, and then generating a good world to play in from it. This seems covered by existing technology, that is, where the designer puts in all the necessary information such as the city populations, resources, biomes, road networks and rivers, then allows the PCG fill in the gaps. But now I'm wondering if it may be possible to have a content generator generate also the overall design. Generate the cities and population centres, balancing them so that there is a natural seeming need of commerce, then generate the positions and connectivity, then from the type of city produce the list of necessary resources that must be nearby, and only then, maybe given some rules on how to make the journey between cities both believable and interesting, generate the final content including the roads, the choke points, the bridges and tunnels, ferries and the terrain including the biomes and coastline necessary. If this has been done before, I'd like to know, and would like to know what went wrong, and what went right.

    Read the article

  • How to perform feature upgrade in SharePoint2010 part1

    - by ybbest
    Once your custom SharePoint solution went into production. Any changes made to it require you to perform feature upgrade. Today, I’d like to show you how to perform feature upgrade. For the first version of my solution, I deploy a document library with a custom document set content type. You can download the solution here. Once you extract your solution, the first version is in the original folder. In order to deploy the original solution, you need to run the sitecreation.ps1 in the script folder. Next, I will modify the solution so that I will index the application number in the document library I just created in my original solution. 1. Modify the ApplicationLibrary.Template.xml as highlighted below: 2. Adding the following code into the feature event receiver. public override void FeatureUpgrading(SPFeatureReceiverProperties properties, string upgradeActionName, System.Collections.Generic.IDictionary<string, string> parameters) { base.FeatureUpgrading(properties, upgradeActionName, parameters); SPWeb web = GetFeatureWeb(properties); switch (upgradeActionName) { case "IndexApplicationNumber": SPList applicationLibrary = web.Lists.TryGetList(ApplicationLibraryNamesConstant.ApplicationLibraryName); if (applicationLibrary != null) { SPField queueField = applicationLibrary.Fields["ApplicationNumber"]; queueField.Indexed = true; queueField.Update(); } break; } } 3. Package your solution and run the feature upgrade PowerShell script. $wspFolder ="v1.1" $scriptPath=Split-Path $myInvocation.MyCommand.Path $siteUrl = "http://ybbest" $featureToCheckGuid="1b9d84cd-227d-45f1-92d4-a43008aa8fe7" $requiredFeatureVersion="0.0.0.0" $siteUrlOfFeatureToBeChecked="http://ybbest" AppendLog "Starting Solution UpgradeSolutionAndFeatures.ps1" Magenta & "$scriptPath\UpgradeSolutionAndFeatures.ps1" $siteUrl $wspFolder $featureToCheckGuid $requiredFeatureVersion $siteUrlOfFeatureToBeChecked Write-Host AppendLog "All features updated" "Green" Note: If you have not version your feature explicitly , your feature version will be 0.0.0.0 . References: Feature upgrade.

    Read the article

  • Xerces conflicts string.h

    - by Velthune
    Compiling my program I have this error: /usr/include/xercesc/util/Compilers/GCCDefs.hpp:133:60: error: declaration of ‘int strcasecmp(const char*, const char*)’ has a different exception specifier /usr/include/string.h:536:12: error: from previous declaration ‘int strcasecmp(const char*, const char*) throw ()’ make: *** [src/test/VFTImageMaterial.o] Error 1 Any idea about this conflict with string.h?

    Read the article

  • Regarding Standard Oxford Format for vlfeat sift

    - by Karl
    One of my upper classmen has gave me a data set for experimenting with vlfeat's SIFT, however, her extracted SIFT data for the frame part contains 5 dimensions. Recall from vl_sift function: [F,D] = VL_SIFT(I) Each column of D is the descriptor of the corresponding frame in F. F normally contains 4 dimensions which consists of x-coordinate, y-coordinate, scale, and orientation. So I asked her what is this 5th dimension, and she pointed me to search for "standard oxford format" for sift feature. The thing is I tried to search around regarding this standard oxford format and sift feature, but I got no luck in finding it at all. If somebody knows regarding this, could you please point me to the right direction?

    Read the article

  • Fast check if an object will be successfully instantiated in PHP?

    - by Gremo
    How can I check if an object will be successfully instantiated with the given argument, without actually creating the instance? Actually I'm only checking (didn't tested this code, but should work fine...) the number of required parameters, ignoring types: // Filter definition and arguments as per configuration $filter = $container->getDefinition($serviceId); $args = $activeFilters[$filterName]; // Check number of required arguments vs arguments in config $constructor = $reflector->getConstructor(); $numRequired = $constructor->getNumberOfRequiredParameters(); $numSpecified = is_array($args) ? count($args) : 1; if($numRequired < $numSpecified) { throw new InvalidFilterDefinitionException( $serviceId, $numRequired, $numSpecified ); }

    Read the article

  • Googla Maps Javascript API, Jquery Tabs

    - by user1357598
    I have tried everything possible.. unminified all javascript, still can't get the map to load properly inside the tab. Trying to use this custom code too with no success jQuery('.tabs-shortcode > ul').bind('tabsshow', function(e, ui) { if (ui && ui.panel) { jQuery('.mapp-canvas', ui.panel).each(function() { var id = jQuery(this).attr('id'); if (id) { window[id].resize(); } }); } }); webpage: http://bit.ly/UTHskS thanks in advance, Andy

    Read the article

  • Turkish characters are not displayed correctly

    - by tfeseas
    MySql database uses utf-8 encoding and data are stored correctly.I use set_name utf8 query to make sure the data called are utf-8 encoded.all variables from database works fine as long as the header charset is utf-8,but the static html characters do not work properly.When i set header charset to ISO-8859-9 variables are displayed differenly while html characters work ok.can anyone help me? <?php header('Content-Type: text/html; charset=ISO-8859-9'); ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head><title>noname</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

    Read the article

  • Setting Android webview initialScale prevents proper zooming

    - by Ryan
    Need: I want a webview to automatically be sized to fit the width of that particular page. I have Googled this and found several different suggestions. Most of them work. But then each of them effects zooming in / zooming out. What I'm looking for is a solution that accomplishes both. The webview is initially set to fill the screen, but then it allows the user to zoom in (with pinching) and zoom out. What I've Tried: mainView.getSettings().setLoadWithOverviewMode(true); mainView.getSettings().setUseWideViewPort(false); mainView.setScrollBarStyle(WebView.SCROLLBARS_OUTSIDE_OVERLAY); mainView.getSettings().setBuiltInZoomControls(true); mainView.getSettings().setSupportZoom(true); I have also tried setting mainView.setInitialScale(various percentages) Again, I have tried these in different orders, including some, not including others. Currently, if I use the above code and setInitialScale(65), it loads initially fine but then once you zoom in, you cannot zoom all the way back out. Does anyone know of the best practice to set initial scale to fit screen but fully allow zooming out and in? Why I Need It: I'm using a ViewFlipper in my Android app to load several webviews simultaneously. I have a touch sensor that allows sliding from left to right to switch between different webviews. The practical purpose of this is to show a grocery store's ads and allow the user to slide from page to page. The problem is that the API feed I'm using basically only allows me to load a URL for each page. So I have to use webviews.

    Read the article

  • How to crosscheck two tables and insert relevant data into a new table in MYSQL?

    - by JackDamery
    I'm trying to crosscheck a row that exists in two tables using a MYSQL query in phpmyadmin and then if a userID is found in both tables, insert their userID and user name into another table. Here's my code: INSERT INTO userswithoutmeetings SELECT user.userID IF('user.userID'='meeting.userID'); I keep getting plagued by this error: 1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'IF('user.userID'='meeting.userID')' at line 3 Other statements I've tried have worked but not deposited the values in the table.

    Read the article

  • Reading http file on url

    - by Nkunzis
    I am trying to read an xml file on an http url. "Unexpected end of file from server" keeps on coming . the page is password protected, I would like to know if I am properly giving in my url authentication details. I tried with non protected pages and I can read them properly. Here is my code: URL url = new URL("http://username:[email protected]:0000/test.xml"); URLConnection yc = url.openConnection(); BufferedReader in = new BufferedReader(new InputStreamReader(yc.getInputStream())); String inputLine; while ((inputLine = in.readLine()) != null) System.out.println(inputLine); in.close();

    Read the article

  • Sort string array by analysing date details in those strings

    - by Jason Evans
    I have a requirement for the project I'm working on right now which is proving a bit tricky for me. Basically I have to sort an array of items based on the Text property of those items: Here are my items: var answers = [], answer1 = { Id: 1, Text: '3-4 weeks ago' }, answer2 = { Id: 2, Text: '1-2 weeks ago' }, answer3 = { Id: 3, Text: '7-8 weeks ago' }, answer4 = { Id: 4, Text: '5-6 weeks ago' }, answer5 = { Id: 5, Text: '1-2 days ago' }, answer6 = { Id: 6, Text: 'More than 1 month ago' }; answers.push(answer1); answers.push(answer2); answers.push(answer3); answers.push(answer4); answers.push(answer5); answers.push(answer6); I need to analyse the Text property of each item so that, after the sorting, the array looks like this: answers[0] = { Id: 6, Text: 'More than 1 month ago' } answers[1] = { Id: 3, Text: '7-8 weeks ago' } answers[2] = { Id: 4, Text: '5-6 weeks ago' } answers[3] = { Id: 1, Text: '3-4 weeks ago' } answers[4] = { Id: 2, Text: '1-2 weeks ago' } answers[5] = { Id: 5, Text: '1-2 days ago' } The logic is that, the furthest away the date, the more high priority it is, so it should appear first in the array. So "1-2 days" is less of a priority then "7-8 weeks". So the logic is that, I need to extract the number values, and then the units (e.g. days, weeks) and somehow sort the array based on those details. Quite honestly I'm finding it very difficult to come up with a solution, and I'd appreciate any help.

    Read the article

  • How to set only the first cell of a UITableView to a different color?

    - by Ted
    I use cellForRowAtIndexPath like here: - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { static NSString *CellIdentifier = @"Cell"; UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier]; if(cell == nil) cell = [self getCellContentView:CellIdentifier]; UILabel *lbl = (UILabel*)[cell.contentView viewWithTag:1]; for (UITableViewCell *c in [tbl visibleCells]) { // UITableViewCell *cell2 = [tbl cellForRowAtIndexPath:[NSIndexPath indexPathForRow:i inSection:0]]; UILabel *lbl = (UILabel*)[c.contentView viewWithTag:1]; lbl.textColor = [UIColor redColor]; } if([tbl indexPathForCell:cell].section==0) lbl.textColor = [UIColor whiteColor]; UILabel *lblTemp1 = (UILabel *)[cell viewWithTag:1]; UILabel *lblTemp2 = (UILabel *)[cell viewWithTag:2]; //First get the dictionary object lblTemp1.text = @"test!"; lblTemp2.text = @"testing more"; NSLog(@"%@",[tbl indexPathForCell:cell]); return cell; } But is still makes some of my cells white instead of gray. How can I change only the first item in the row to white?

    Read the article

  • copy code from one file to other file in c#

    - by gou
    Using Below Code, We Can Copy Code from One textbox to other textbox. private void Copybtn_Click(object sender, EventArgs e) { Clipboard.SetText(txtSour.Text); } //paste the text private void Pastebtn_Click(object sender, EventArgs e) { txtDestinatio.Text = Clipboard.GetText(); } My Requirement is: Copy Code from one file to other file using C#? Is It possible using ClipBoard? Then i need to copy code from one file to other? Please AnyOne Help me

    Read the article

  • How to use visibilitychange event on Firefox Extensions

    - by Tom S.
    I'm trying to learn how to make a firefox extension. I want to create a toolbar that only shows up on a specific page. I can make the toolbar appear, but then it should become hidden when I open or switch to a new tab, or close the tab with that specific page. I don't understand how to make the visibilitychange event work though, no matter what I try nothing happens. window.addEventListener("load", function load(event){ window.removeEventListener("load", load, false); myExtension.init(); },false); var myExtension = { init: function (aEvent) { gBrowser.addEventListener("DOMContentLoaded", this.showToolbar, false); }, showToolbar: function(aEvent) { var doc = aEvent.originalTarget; if(doc.location.href=="http://www.google.ca/"){ eToolbar=document.getElementById("nav-toolbar"); eToolbar.hidden=false; //no matter how I change this line below it never does anything gBrowser.addEventListener("mozvisibilitychange", this.toggleToolbar, false); } }, toggleToolbar: function(aEvent) { eToolbar=document.getElementById("nav-toolbar"); if(document["mozVisibilityState"]=="mozHidden"){ eToolbar.hidden=true; } else { eToolbar.hidden=false; } } }

    Read the article

  • Sphinx Error Unknow directive type "automodule" or "autoclass"

    - by user1130381
    I need document my python project using Sphinx. But I can't use autodoc. When I config my project I select the option "extension autodoc", but now if I use .. autoclass:: Class, I have a ERROR: ERROR: Unknown directive type "autoclass" I configure the PYTHONPATH, and now it's good. But I already have this problem. My index file is: .. ATOM documentation master file, created by sphinx-quickstart on Thu Nov 22 15:24:42 2012. You can adapt this file completely to your liking, but it should at least contain the root toctree directive. Welcome to ATOM's documentation! Contents: .. toctree:: :maxdepth: 2 .. automodule:: atom Indices and tables :ref:genindex :ref:modindex :ref:search Thank you, I need that someone say me how I find the problem, or how i can fix this! Sorry for my English, I start now to learn English.

    Read the article

  • Supersede users need to press enter after inputting a string in python 3.0

    - by Cimex
    I've been attempting to create a simple Rock, Paper, Scissors game in python 3.0 -- very standard task for anybody learning programming. But, as I finish up to a point, I think,"wow, that'd be awesome", or,"it'd be cool to do this!" So anyways, I keep building upon the project... I've developed a menu, a single player game vs the computer, and just finished the multiplayer game. But, I've realized, that the multiplayer game isn't very effective. It just dosen't work like the analog version of the game. Currently, it'll ask for player1's input, then player2's input, compare them, and spit out the result and the current score. What I'd rather have happen is that the program asks for both players input at the same time and both players input their choice at the same time. I understand that I can easily do that by just grabbing the index of the first and second answer and compare the 2 inputs -- easy. But what I'd rather have happen is that after both players enter their one character answers at the same time (r for rock, p for paper, or s for scissors), then the program will auto enter the input. Not needing someone to press enter. The input would be dictated by the fact that 2 characters have been entered. I guess my question is: Is there any way to dictate what can be used as an input for 'enter'?

    Read the article

  • PHP download page: file_exists() returns true, but browser returns 'page not found'

    - by Chris
    I'm using PHP for a file download page. Here's a snippet of the problem code: if (file_exists($attachment_location)) { header($_SERVER["SERVER_PROTOCOL"] . " 200 OK"); header("Cache-Control: public"); // needed for i.e. header("Content-Type: application/zip"); header("Content-Transfer-Encoding: Binary"); header("Content-Length:".filesize($attachment_location)); header("Content-Disposition: attachment; filename=file.zip"); readfile($attachment_location); die("Hooray"); } else { die("Error: File not found."); } This code works absolutely fine when testing locally, but after deploying to the live server the browser returns a 'Page not found' error. I thought it might be an .htaccess issue, but all .htaccess files on the live server are identical to their local counterparts. My next guess would be the live server's PHP configuration, but I have no idea what PHP setting might cause this behaviour. The file_exists() function always returns true - I've checked this on the live server and it's always correctly picking up the file, its size etc., so it does have a handle on the file. It just won't perform the download! The main site is a Wordpress site, but this code isn't part of a Wordpress page - it's in a standalone directory within the site root. UPDATE: is_file() and is_readable() are both returning true for the file, so that's not the problem. The specific line that is causing the problem is: readfile($attachment_location) Everything up until that point is super happy.

    Read the article

  • Paginator (Migration from Cake 1.3 to 2.0

    - by Christian Waschke
    i am struggling with the paginator in cakephp 2.0. While i am trying to migrate my application to 2.0 i cant find any solution to jump directly to the last page. In 1.3 it was quiet to do that from outside like this: echo $this->Html->link(__('Flights'), array('controller' => 'flights', 'action' => 'index','page' => 'last')); but this little trick putting 'page:last' in does not work anymore in 2.0. Of course there is a Paginator function called last, but this would only help if i would be already inside the app. My Problem is to access from an outside link directly the last page of the paginator. Thank you for reading, cdjw

    Read the article

  • JPQL: unknown state or association field (EclipseLink)

    - by Kawu
    I have an Employee entity which inherits from Person and OrganizationalUnit: OrganizationalUnit: @MappedSuperclass public abstract class OrganizationalUnit implements Serializable { @Id private Long id; @Basic( optional = false ) private String name; public Long getId() { return this.id; } public void setId( Long id ) { this.id = id; } public String getName() { return this.name; } public void setName( String name ) { this.name = name; } // ... } Person: @MappedSuperclass public abstract class Person extends OrganizationalUnit { private String lastName; private String firstName; public String getLastName() { return this.lastName; } public void setLastName( String lastName ) { this.lastName = lastName; } public String getFirstName() { return this.firstName; } public void setFirstName( String firstName ) { this.firstName = firstName; } /** * Returns names of the form "John Doe". */ @Override public String getName() { return this.firstName + " " + this.lastName; } @Override public void setName( String name ) { throw new UnsupportedOperationException( "Name cannot be set explicitly!" ); } /** * Returns names of the form "Doe, John". */ public String getFormalName() { return this.lastName + ", " + this.firstName; } // ... } Employee entity: @Entity @Table( name = "EMPLOYEES" ) @AttributeOverrides ( { @AttributeOverride( name = "id", column = @Column( name = "EMPLOYEE_ID" ) ), @AttributeOverride( name = "name", column = @Column( name = "LASTNAME", insertable = false, updatable = false ) ), @AttributeOverride( name = "firstName", column = @Column( name = "FIRSTNAME" ) ), @AttributeOverride( name = "lastName", column = @Column( name = "LASTNAME" ) ), } ) @NamedQueries ( { @NamedQuery( name = "Employee.FIND_BY_FORMAL_NAME", query = "SELECT emp " + "FROM Employee emp " + "WHERE emp.formalName = :formalName" ) } ) public class Employee extends Person { @Column( name = "EMPLOYEE_NO" ) private String nbr; // lots of other stuff... } I then attempted to find an employee by its formal name, e.g. "Doe, John" using the query above: SELECT emp FROM Employee emp WHERE emp.formalName = :formalName However, this gives me an exception on deploying to EclipseLink: Exception while preparing the app : Exception [EclipseLink-8030] (Eclipse Persistence Services - 2.3.2.v20111125-r10461): org.eclipse.persistence.exceptions.JPQLException Exception Description: Error compiling the query [Employee.FIND_BY_CLIENT_AND_FORMAL_NAME: SELECT emp FROM Employee emp JOIN FETCH emp.client JOIN FETCH emp.unit WHERE emp.client.id = :clientId AND emp.formalName = :formalName], line 1, column 115: unknown state or association field [formalName] of class [de.bnext.core.common.entity.Employee]. Local Exception Stack: Exception [EclipseLink-8030] (Eclipse Persistence Services - 2.3.2.v20111125-r10461): org.eclipse.persistence.exceptions.JPQLException Exception Description: Error compiling the query [Employee.FIND_BY_CLIENT_AND_FORMAL_NAME: SELECT emp FROM Employee emp JOIN FETCH emp.client JOIN FETCH emp.unit WHERE emp.client.id = :clientId AND emp.formalName = :formalName], line 1, column 115: unknown state or association field [formalName] of class [de.bnext.core.common.entity.Employee]. Qs: What's wrong? Is it prohibited to use "artificial" properties in JPQL, here the WHERE clause? What are the premises here? I checked the capitalization and spelling many times, I'm out of luck.

    Read the article

  • replace NA in an R vector with adjacent values

    - by pssguy
    I have a dataframe which has merged player and team data for soccer seasons So for a particular player in a specific season I have data like df <- data.frame(team=c(NA,"CRP",NA,"CRP","CRP",NA), player=c(NA,"Ed",NA,"Ed","Ed",NA), playerGame= c(NA,1,NA,2,3,NA), teamGame =c(1,2,3,4,5,6)) Where the NA's indicate that the player did not appear in that specific team game How would I most efficiently replace the team and player NA's with "CRP" and "Ed" respectively and have a plGame output of, in this instance, 0,1,1,2,3,3

    Read the article

  • P/Invoke declarations should not be safe-critical

    - by Bobrovsky
    My code imports following native methods: DeleteObject, GetFontData and SelectObject from gdi32.dll GetDC and ReleaseDC from user32.dll I want to run the code in full trust and medium trust environments (I am fine with exceptions being thrown when these imported methods are indirectly used in medium trust environments). When I run Code Analysis on the code I get warnings like: CA5122 P/Invoke declarations should not be safe-critical. P/Invoke method 'GdiFont.DeleteObject(IntPtr)' is marked safe-critical. Since P/Invokes may only be called by critical code, this declaration should either be marked as security critical, or have its annotation removed entirely to avoid being misleading. Could someone explain me (in layman terms) what does this warning really mean? I tried putting these imports in static SafeNativeMethods class as internal static methods but this doesn't make the warnings go away. I didn't try to put them in NativeMethods because after reading this article I am unsure that it's the right way to go because I don't want my code to be completely unusable in medium trust environments (I think this will be the consequence of moving imports to NativeMethods). Honestly, I am pretty much confused about the real meaning of the warning and consequences of different options to suppressing it. Could someone shed some light on all this? EDIT: My code target .NET 2.0 framework. Assembly is marked with [assembly: AllowPartiallyTrustedCallers] Methods are declared like this: [DllImport("gdi32")] internal static extern int DeleteObject(HANDLE hObject);

    Read the article

  • C: Why does gcc allow char array initialization with string literal larger than array?

    - by Ashwin
    int main() { char a[7] = "Network"; return 0; } A string literal in C is terminated internally with a nul character. So, the above code should give a compilation error since the actual length of the string literal Network is 8 and it cannot fit in a char[7] array. However, gcc (even with -Wall) on Ubuntu compiles this code without any error or warning. Why does gcc allow this and not flag it as compilation error? gcc only gives a warning (still no error!) when the char array size is smaller than the string literal. For example, it warns on: char a[6] = "Network"; [Related] Visual C++ 2012 gives a compilation error for char a[7]: 1>d:\main.cpp(3): error C2117: 'a' : array bounds overflow 1> d:\main.cpp(3) : see declaration of 'a'

    Read the article

  • Meteor exception in Meteor.flush when updating a collection breaks reactivity across clients

    - by Harel
    When I'm calling Collection.update from the front end (the method call is allowed), the update does work ok, but the exception below is being thrown (in Chrome's JS console, not in the server). Although the update took place, other clients connected to the same collection do not see the updates until they refresh the browser - I suspect because of the exception. Any idea what might cause this? Exception from Meteor.flush: Error: Can't create second landmark in same branch at Object.Spark.createLandmark (http://checkadoo.com/packages/spark/spark.js?8b4e0abcbf865e6ad778592160ec3b3401d7abd2:1085:13) at http://checkadoo.com/packages/templating/deftemplate.js?7f4bb363e9e340dbaaea8d74ac670af40ac82d0a:115:26 at Object.Spark.labelBranch (http://checkadoo.com/packages/spark/spark.js?8b4e0abcbf865e6ad778592160ec3b3401d7abd2:1030:14) at Object.partial [as list_item] (http://checkadoo.com/packages/templating/deftemplate.js?7f4bb363e9e340dbaaea8d74ac670af40ac82d0a:114:24) at http://checkadoo.com/packages/handlebars/evaluate.js?ab265dbab665c32cfd7ec343166437f2e03f1a54:349:48 at Object.Spark.labelBranch (http://checkadoo.com/packages/spark/spark.js?8b4e0abcbf865e6ad778592160ec3b3401d7abd2:1030:14) at branch (http://checkadoo.com/packages/handlebars/evaluate.js?ab265dbab665c32cfd7ec343166437f2e03f1a54:308:20) at http://checkadoo.com/packages/handlebars/evaluate.js?ab265dbab665c32cfd7ec343166437f2e03f1a54:348:20 at Array.forEach (native) at Function._.each._.forEach (http://checkadoo.com/packages/underscore/underscore.js?772b2587aa2fa345fb760eff9ebe5acd97937243:76:11) EDIT Here is my template for the clickable item that triggers the update: <template name="list_item"> <li class="checklistitemli"> <div class="{{checkbox_class}}" id="clitem_{{index}}"> <input type="checkbox" name="item_checked" value="1" id="clcheck_{{index}}" class="checklist_item_check" {{checkbox_ticked}}> {{title}} </div> </li> </template> and here's the event handler for clicks on 'list_item': var visualCheck = function(el, checked) { var checkId = el.id.replace('clitem','clcheck'); if (checked) { addClass(el, 'strikethrough'); $('') } else { removeClass(el, 'strikethrough'); } $('#'+checkId)[0].checked=checked; }; Template.list_item.events = { 'click .checklistitem' : function(ev) { this.checked = !this.checked; var reverseState = !this.checked; var updateItem = {}, self = this, el = ev.target; visualCheck(el, this.checked); updateItem['items.'+this.index+'.checked'] = this.checked; console.log("The error happens here"); Lists.update({_id: this._id}, {$set:updateItem}, {multi:false} , function(err) { console.log("In callback, after the error"); if (err) { visualCheck(el, reverseState); } }); } } The whole thing is available at http://checkadoo.com (Its a port of a Tornado based Python app of mine)

    Read the article

  • Documenting user interfaces in a mouse-less touch UI

    - by Daniel Cazzulino
    “Old” apps rely on mouse pointing and tooltips to explain what a given button is for. Maybe there is text associated with the button, but you can only put so much text without wasting useful screen state. More so in a phone or tablet app. I’ve seen a trend in Google apps where they put an overlay on top of the app the first time it runs, to explain how the various pieces of UI work. I have seen this also on my Nexus phone, but don’t have a screenshot. I don’t recall a way to actually bring that help overlay back again, so that’s maybe some built-in gesture that’s missing. Here’s what it looks like in Gmail, the first time you use the new compose layout:   I like the approach very much, and I think it’s something that should become standard part of mobile OS, and Windows, including a standard way to bring that help up from within any app....Read full article

    Read the article

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