Posts

ember.js - Router and DS model with belongsTo throws confusing exception -

ember.js - Router and DS model with belongsTo throws confusing exception - my router keeps throwing next exception: error while processing route: study assertion failed: can add together 'location' record relationship error: assertion failed: can add together 'location' record relationship ds models: app.location = ds.model.extend({ street: ds.attr('string'), city: ds.attr('string'), area: ds.attr('string'), lat: ds.attr('string'), lng: ds.attr('string'), report: ds.belongsto('report', {embedded: 'load'}) }); app.report = ds.model.extend({ title: ds.attr('string'), description: ds.attr('string'), reg_num: ds.attr('string'), location_str: ds.attr('string'), location: ds.belongsto('location', {embedded: 'load'}) }); and router: app.reportroute = ember.route.extend({ model: function () { ho...

memory - Is there any way to inspect kernel space in GDB? -

memory - Is there any way to inspect kernel space in GDB? - i may have more fundamental misunderstanding here, outline everything: i wanted gain improve understanding of how programs laid out in memory. starting here went , made simple programs , opened them in gdb see things laid in more practical sense: 0x0 - 0x08048000 = ?? 0x08048000 = start .text section 0x08048000 = plt 0x08048300 = _start 0x08048400 = main 0x08048480 = other functions 0x0804a000 = got 0x0804a020 = start .data section 0x0804a028 = start .bss section (random offset) 0x0804b008 = start heap ... 0xf7?????? = start memory mapping section 0xf7e50000 = #included library function definitions 0xf7ff0000 = linux dynamic loader (random offset) 0xffffd010 = top of stack (grows negatively) (random offset) i understand lot of these addresses subject change, helped me visualize assigning numbers things. anyway, in next image presented in source above, there's block dedicated kernel space @ top of program...

c++ - Why does this recursive function crash? -

c++ - Why does this recursive function crash? - int g(int n) { int x = g(n - 1); if (x > 0) { homecoming x + 1; } else { homecoming 1; } } my guess has first line of function... i'm not sure why case. if function said this: int g(int n) { homecoming g(n - 1); } then not expect work, instead maintain recursing until run out of stack space , programme crashes. putting recursion before exit status in function, doing this. you should rewrite function performs exit test before calling g() again. c++ crash segmentation-fault

javascript - Angularjs - data binding not working with controller -

javascript - Angularjs - data binding not working with controller - i developing app uses bootstrap (v3.2.0) angularjs (v1.2.26), want create set of columns changable via dropdown. i have got dropdown info binding ok, failing alter bootstrap responsive column classes when user selects different number of columns in dropdown. this fiddle shows code far. the html... <div data-ng-app=""> <div class="container-fluid"> <nav class="navbar navbar-default" role="navigation"> <div class="container-fluid"> <!-- brand , toggle grouped improve mobile display --> <div class="navbar-header"> <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1"> <span class="sr-only">toggle navigation...

css3 - jquery to change image and show captions on mouse-hover -

css3 - jquery to change image and show captions on mouse-hover - below codes: class="snippet-code-css lang-css prettyprint-override"> * { font-family: arial; } .slide-container { /*border: solid 1px;*/ width: 500px; height: 360px; } .slide-jumbo { /*border: solid 1px;*/ width: 500px; height: 300px; overflow: hidden; } .jumbo { position: relative; display: inline-block; width: 500px; height: 300px; float: left; } .jumbo img, .thumb img { position: absolute; left: 0; } .jumbo img { top: 0; } .thumb img { bottom: 0; } .jumbo-capt, .thumb-capt { width: 100%; background-color: rgba(0,0,0,0.8); position: absolute; color: #fff; z-index: 100; /* -webkit-transition: 300ms ease-out; ...

iphone - uiwebview detect youtube video is loaded completeley -

iphone - uiwebview detect youtube video is loaded completeley - i playing youtube video in uiwebview using next code nsstring *embedhtml = @"\ <html><head>\ <style type=\"text/css\">\ body {\ background-color: transparent;\ color: white;\ }\ </style>\ </head><body style=\"margin:0\">\ <embed id=\"yt\" src=\"http://www.youtube.com/embed/%@?autoplay=0&showinfo=0&controls=0\" type=\"application/x-shockwave-flash\" \ width=\"%0.0f\" height=\"%0.0f\"></embed>\ </body></html>"; nsstring *html = [nsstring stringwithformat:embedhtml, videotoken, videoview.frame.size.width, videoview.frame.size.height]; [videoview load...

embedded - can I change "delay until" granularity on cortex-m4? -

embedded - can I change "delay until" granularity on cortex-m4? - i'm scheduling loop "delay until" clause on stm32f4 discovery board, , when increment frequency, thing stop respecting time constraint. after digging, under impression it's scheduler granularity not task. 1 of signs when go slow time respected, , faster go, more bonkers go. tardiness seems discrete, falling on scheduling frequency limit. here test code: task body pwm onperiod : time_span; offperiod : time_span; period : time_span; next_start : time := clock; pwm_on : boolean := true; begin loop period := microseconds (1_000_000) / pwmfrequency; onperiod := period / 3; offperiod := 2 * period / 3; if (pwm_on) off (pattern (next_led)); pwm_on := false; next_start := next_start + offperiod; else on (pattern (next_led)); ...