Posts

entity framework - Add multiple records to one record -

Image
i think should pretty standard requirement, i'm struggling ( load values via junctions table ) on how display on data-grid sufficiently. suspect maybe data design not done properly, that's why got stuck here. i have item table, every item have multiple groups, in data-grid need display group names assigned item in list.

What Type does Powershells `Get-Member` show -

i use powershell write database exporter. i have datarow s, serialized via export-clixml 'data.xml' . these datarows have column value . i read first row via $row = (import-clixml 'data.xml')[0] . if check it's type, via $row.value -is [system.management.automation.pscustomobject] true if use get-member on value, $row.value | get-member , output typename: deserialized.system.dbnull i kind of expected system.management.automation.pscustomobject . where type get-member shows me come from? if @ $row.value.psobject.typenames you'll see deserialized.system.dbnull first in list. also see this answer keith hill , msdn on typenames property .

swift - MPMusicPlayerController.play() not working after killing iOS music app -

i have app allows search title of song in music library , play it. play selected song using code: func playsongbypersistentid(id: int) { //id persistent id of chosen song let predicate = mpmediapropertypredicate(value: id, forproperty: mpmediaitempropertypersistentid) let songquery = mpmediaquery() songquery.addfilterpredicate(predicate) if songquery.items?.count < 1 { print("could not find song") // make alert return } else { print("gonna play \(songquery.items?[0].title)") } musicplayer.preparetoplay() musicplayer.setqueuewithitemcollection(songquery.collections![0]) musicplayer.play() } the above function gets called in tableview(:didselectrowatindexpath) . have confirmed correct id , song title retrieved when song selected. here problem. if go app , select song play after killing ios music app , song not play. if choose different song , different song plays no problem. if choose same song...

java - Dagger2: Using factory methods in place of public constructors -

i trying use public factory methods in place of public constructors dagger2. think missing connection in using dagger2. when use public constructors, example interfaces / classes follows: interface interfacea { void foo(); } class implements interfacea { @inject public a() {} @override public void foo() { system.out.println("foo"); } } interface interfaceb { void bar(); } class b implements interfaceb { private final interfacea depa; @inject public b(interfacea depinstance) { depa = depinstance; } @override public void bar() { system.out.println("bar"); depa.foo(); } } @module class mymodule { @provides interfacea providea(final provider<a> provider) { return a.create(provider); } @provides interfaceb provideb(b binstance) { return binstance; } } @component(modules=mymodule.class) interface mycomponent { interfacea provideint...

migration - Django 1.8 Syncdb vs migrate -

i have created model , executed syncdb had created tables model designed. afterwards modified model , executed makemigrations created migrations ignoring tables syncdb had created. so ended error "relation exists". why did makemigrations created scratch? how fix situation ? makemigrations creates new migrations based on changes detected models. also, 1 thing note syncdb command deprecated since django 1.7 , removed in django 1.9. so, should use migrate command. from syncdb docs: deprecated since version 1.7: command has been deprecated in favor of migrate command , performs both old behavior executing migrations.

regex - Nginx configuration equivalent for Apache -

i convert nginx rules work apache : location ~ ^/video/([a-za-z0-9=\?]+)$ { rewrite ^/video/(.*)$ /video/ break; } location /video { ssi on; } location /http-bind { proxy_pass http://localhost:5280/http-bind; proxy_set_header x-forwarded-for $remote_addr; proxy_set_header host $http_host; } after research, have found : rewritecond %{request_uri} ^/meet/[a-za-z0-9]+$ rewriterule ^/meet/(.*)$ /meet/ [pt] proxypreservehost off <location "/meet/http-bind"> requestheader set host "localhost" proxypass http://localhost:5280/http-bind proxypassreverse http://localhost:5280/http-bind </location> but configuration doesn't work well... can me modify configuration ? thanks

animation - Safari not rendering images inside SVG with Adobe Edge Animate -

i made animation edge animate, , i'm using svgs images embedded inside (exported illustrator cs6). display without problem in chrome, firefox , microsoft edge in windows , mac computers. problem when open safari, images not rendered , vector part showing. how can solve edge animate? thanks! the problem present in safari , apparently in browser running on apple os. solved exporting pngs instead of svgs (they lighter, too!)