Posts

c# - EF6: Modifying an entity property with a foreign key relation - Do I need to change the Id or the related object or both? -

i modifiying foreign key property on entity in code, modifiying id only: elementdata.servicelevelid = parameter.servicelevelid; i have found, after persisting, works expected, when corresponding navigation property servicelevel null accident. if still holds "old" object, change not hit database. this means, need do elementdata.servicelevelid = parameter.servicelevelid; elementdata.servicelevel = null; //force update database does mean, changing object "stronger" changing id only? should set related object null in such situations? update (per tim copenhaver's comment) : entity in question copy (with mentioned modification) of existing one. uses automapper copying, , maps except primary key , 1 unrelated property. automapper creates shallow copy afaik. thus, situation copy updated id , untouched object reference not match @ moment of adding context. guess, ef decides "object reference stronger". changing either property work l...

Service Mediation Using Proxy Services -WSO2 -

i'm new area , need access web service via esb. mentioned in here - service mediation using proxy services tried to create it. after run , response follows : <tryitproxyerror xmlns:h="http://wso2.org/ns/tryitproxy" h:status="soap envelope error">org.apache.axis2.axisfault: input stream incoming message null.</tryitproxyerror> but tried run same web method using soapui , expected out put below: <soap:envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/xmlschema-instance" xmlns:xsd="http://www.w3.org/2001/xmlschema"> <soap:body> <getpatienthistoryresponse xmlns="http://tilani.lk/"> <getpatienthistoryresult> <nic>123</nic> <fullname>abc def</fullname> <firstname>abc</firstname> <surname>def</surname> <title...

Using jquery-ui-rails datepicker in an Ruby on Rails website. datepicker method not defined -

i got problem writing website ruby on rails. bundle show * jquery-ui-rails (4.0.1) in app/assets/javascripts/application.js //= require jquery.ui.datepicker in app/assets/stylesheets/application.css *= require jquery.ui.datepicker in app/views/layouts/application.html.erb <%= stylesheet_link_tag "application", :media => "all" %> <%= javascript_include_tag "application" %> and in somepage.html.erb, got <script type="text/javascript"> $(function(){ $("#startdate").datepicker(); $("#enddate").datepicker(); }); </script> when running it, chrome says uncaught typeerror: object [object object] has no method 'datepicker' i suppose resource not being referred cause because problem fixed adding follows app/views/layouts/application.html.erb <link rel="stylesheet" href="http://code.jquery.com/ui/1.10.1/themes/base/jquery-ui.css" /> <...

sql - Insert into table on the Linked Server with Data from local table -

i'm working sql server express, created linked server oracle database. as title indicates, want insert data selected local table table @ linked server. i tried many queries no 1 of them worked want. this query below used has worked, static values, want insert data dynamically table on local database. insert openquery (ortest, 'select * reservation') values (2, '2', 3); you should able use linked server name part of qualifying table name, , normal insert select: insert ortest.[dbname].[dbo].[reservation] select * [dbname].[db].[reservation]

c# - Algorithm to detect overlapping recurent time periods -

Image
i'm trying detect event's colision depending of days recurrency , timetable. a version more complex issue algorithm detect overlapping periods . my case : event 8am 1pm tuesday, thurday , saturday, between 2 dates. the b event 11am 2pm tuesday , thurday, between 2 dates(differents of event a) here, putted in red colisions between 2 events. i spent hour trying write algorithm detect if there @ least 1 colision between 2 event. by way date of end of event (tend) can undeterminate. is there existing algorithm manage this? figure out 1 ends first. if both , b unlimited pick random date in future. i'm going assume events repeat on weekly basis (every week there's same recurring times). if that's not true replace week largest repeting basis (month/year/whatever). take last week before date picked in first step. generate events happen week (make sure checks, since 1 of events might start repeating in period. each event should have concrete ...

sql server - sql union remove "semi-duplicates" -

i'm doing union so select name, price products project = 10 // prio 1 union select name, price products customer = 5 // prio 2 union select name, price products standard = 9 // prio 3 edit: changed where-clause make bit more complicated this typically give me back +-----+------+-----------+--------------+ |(no) | name | price | (prio) | +-----+------+-----------+--------------+ | 1 | | 10 | (1) | | 2 | b | 5 | (1) | | 3 | | 13 | (2) | | 4 | b | 2 | (2) | | 5 | | 1 | (3) | | 6 | b | 5 | (3) | | 7 | c | 3 | (3) | +-----+------+-----------+--------------+ i understand e.g. row no 1 , 3 not duplicates , not removed union statement. however, want do. is, if name (e.g. "a") gets returned first select statement (prio 1) don't want other "a":s result set select statements of higher priori...

coldfusion - Calling CFC's on another folder level -

i have page use cfc's on. this: <cfset cfcdashboard = new dashboard()> <cfset grab_image = cfcdashboard.getpicture()> how call cfc's if inside of folder? of right work if on same level or inside same folder? how call cfc on different level? or not understanding purpose of cfc? the new keyword syntactic sugar call: <cfset cfcdashboard = createobject("component", "dashboard")> the rules how coldfusion resolves cfc names in docs . if use cfinvoke or cfobject tag, or createobject function, access cfc cfml page, coldfusion searches directories in following order: local directory of calling cfml page web root directories specified on custom tag paths page of coldfusion administrator you can use dot notation corresponds of defined search paths. <cfset mydashboard = createobject("component", "my.custom.dashboard")> <cfset mydashboard = new my.custom.dashboard()...