Posts

ASP.NET MVC TASK MANAGER one-to-many relationship -

i trying learn asp.net mvc have started build small application - task manager based on tutorials on internet (mvc music store, nerd dinner, etc ...). ive got stuck while trying define actionresult method in controller. i have model, defining activities. each activity can have several tasks. activity 1 (each activiy has got several tasks (task 1, task 2, etc)) activity 2 activity 3 activity n question: i ask definition of actionresult method, return view list of tasks related selected activity. picture here: http://sdrv.ms/z46nze the problém is, not able define method one-to-many relationship. whole project here in skydrive folder: http://sdrv.ms/zicbqi please help. in model, have following classes , context class generated mvcscaffolding: using system; using system.collections.generic; using system.linq; using system.web; using system.componentmodel.dataannotations; using system.componentmodel.dataannotations.schema; namespace task3.models { public class tas...

ios - UITableViewCell with a custom selectedBackgroundView that is wider than the master view controller on a UISplitViewController -

Image
i have ipad app uisplitviewcontroller displayed on landscape. master controller uitableviewcontroller. i want have selectedbackgroundview cells on uitableviewcontroller overflowing detail viewcontroller. this: how can accomplish that? if try set red arrow image (that 342px wide), gets resized 320px. tried subclassing uiimageview , overriding setframe ignore calls try resize image, still no luck. any ideas? (updated on 2013-10-01 make work on ios7) kudos user erway software helping me out. here how got code work: on uitableviewcontroller: - (uitableviewcell *)tableview:(uitableview *)tableview cellforrowatindexpath:(nsindexpath *)indexpath { // ... uitableviewcell *cell = [[uitableviewcell alloc] initwithstyle:uitableviewcellstyledefault reuseidentifier:@"someid"]; uiimage *image = [uiimage imagenamed:@"image_name"]; selectionimageview *imageview = [[selectionimageview alloc] initwithimage:image]; [cell setselectedba...

javascript - What is the 'iterator' function in Firebug? -

in firebug, when looking @ getelementsbytagname array, of type htmlcollection see following functions listed: item() iterator() nameditem() i know how use item(number of item) , nameditem(name of item) . use of iterator() ? i couldn't find answer, i'm asking here. it's method javascript calls when iterate on object using for…of loop, instance. see: http://wiki.ecmascript.org/doku.php?id=harmony:iterators#for-of_loop_bodies an example: var myobj = { iterator: function() { (let = 0; < 5; i++) yield i; } } (let value of myobj) console.log(value); see yield . in case of htmlcollection helps write code like: let divs = document.getelementsbytagname("div"); (let div of divs) { // `div` }

c# - Debugging Dllimport code -

is possible see/debug code c# compiler generates methods dllimport attribute? tried stepping method defined dllimport attribute inside vs debugger not allow me this. in disassembly view can see call instruction particular address, when hit f11 key (step into) steps on it. have "enable native code debugging" checkbox checked in project properties. update if understand correctly, compiler performs operations when sees dllimportattribute attached method. couldn't find in dllimportattribute class documentation. source code dllimportattribute class has basic class definition. in debugger when calling external function can see call ffa0c0c8 assembly instruction , when step it, moves imported function body, imported function has different address ffa0c0c8. couldn't change disassembly view address. looks dll loading logic inside function, debugger skips. i'm wondering if library function or function generated compiler? you can debug p/invoke calls if ...

eclipse call hierarchy incomplete -

when execute call hierarchy (eclipse indigo) results receive fewer know exist. strange thing functionality seemed working few weeks ago. when run same operation on same workspace in juno call hierarchy results expect. does eclipse auto-update under covers? else might cause this?

coursera, "Functional Programming Principles in Scala", Setting up IntelliJ on OSX -

the "functional programming principles in scala" coursera prepared eclipse. here there tutorial using intellij instead of eclipse course: http://www.guardian.co.uk/info/developer-blog/2012/sep/21/funtional-programming-principles-scala-setting-up-intellij however, fails with: sbt gen-idea [error] not valid command: gen-idea [error] expected '/' [error] expected ':' [error] not valid key: gen-idea [error] gen-idea [error] ^ what can problem? based on error looks don't have sbt intellij plugin installed. need add depencency sbt config : addsbtplugin("com.github.mpeltonen" % "sbt-idea" % "1.3.0") you can add line your_project/project/plugins.sbt - work have each project (note might have create plugins.sbt). a more convenient way : add dependency in ~/.sbt/plugins/build.sbt - way, plugin available each time start sbt, regardless of project specific config.

Pass parameter by "in" Delphi -

i need pass parameter sql in delphi using bde using "in", example below: select * customers id in (:p_in) i need pass: p_in list of customers. query.parambyname.('p_in').asstring: = '1, 2,3 ', , did not work .. have make array? or passed asvariant? try : p_in : string ; := 0 customerlist.count p_in := p_in +customerlist[i] + ','; myquery.text := 'select * customers id in (' + p_in + ' )' ;