Posts

join - Microsoft Access: Getting current record & creating child record before insert -

in access, i'd give user datasheet form key in data. datasheet merges 2 tables together, parent ( product ) , child ( book ). i've linked them using id s , share 1-to-1 relationship. however, while entering data, long key in book data, following error message shows up: you cannot add or change record because related record required in table product. and clueless do, thought giving administrator-only metadata product table help. when set "book" , create new row in product , data macro programatically create corresponding row same id in book table. sound feasible? anyway, need retrieve id of current record of book before insertion, wonder how'd able that. make sure foreign key (=field table linked parent table) of book table included in underlying query.

How to keep Firebase in sync with another database -

we need keep our firebase data in sync other databases full-text search (in elasticsearch ) , other kinds of queries firebase doesn't support. this needs close real-time possible, can't export nightly dump of firebase json or that, aside fact rather large. my initial thought run node.js client listens child_changed , child_added , child_removed etc... events of main lists, bit unweildy , reliable way of syncing if client re-connects after period of time? my next thought maintain list of "items changed" events , write every time item created/updated, similar firebase work queue example. queue contain full path data has changed , worker consumes , updates local database accordingly. the problem here every bit of code makes updates has remember write queue otherwise 2 systems out of sync. proxy code shouldn't hard write though. has else done similar success? for search queries, can integrate directly elasticsearch; there no need sync se...

c# - IList in interface, List in implementation -

in interfaces there typically ilist<isometype> represent list-type members , expect implementation supporting add method. but in interface implementation, there ilist<isometype> = new list<isometype>() and everytime use list, have cast, example (this.mylist list<imytype>).addrange(sometype.tolist()); is there better way this? how avoid cast? - edit ask more information - instead of extension method, there small linq expression solve that? ilist<string> list = new list<string>(); var items = new[] { "1", "2", "3" }; items.tolist().foreach(x => list.add(x)); but not being straight forward, inverts being done. (the action on items add, not on list). anything better that? possible can done on list? addrange not method on ilist, add is, can make extension method: public static void addrange<t>(this ilist<t> list, ienumerable<t> values) { foreach(var value in values...

javascript - HTML Blurry Canvas Images -

i use jcrop provide users friendly way of uploading images via ajax. these images have constraint width , height jcrop comes play. sake of brevity im doing follows: input file select via javascript file api loads image img tag. jcrop works image tag , renders result onto html canvas. now dodgy part. canvas image blurry... for arguments sake canvas set 400x200 crop size. if canvas width , height set via css results in blurry image result. around had set width , height via html attributes. have wonderful cropping solution can save images via ajax. crisp , clear:) <canvas id="preview" width="400" height="200"></canvas>

php - Loading bar to next page with bootstrap -

i have 1 question: on website, button "submit" starts loading new page limited time (defined in simple form). that's work perfectly. want when click "start" bar appears , starts loading defined time. use animated loading boostrap: <div class="progress progress-striped active"> <div class="bar" style="width: 40%;"></div> </div> how can that? javascript? how? :( thanks in advance. total data: data-percentage="60" total second: data-second="60" html <div class="progress progress-striped active"> <div class="bar" style="width: 0%;" data-percentage="60" data-second="20"></div> </div> <a id="clickme">click</a> js $('#clickme').click(function () { var me = $('.progress .bar'); var perc = me.attr("data-percentage"); var sec = me....

java - How to get the finalized text after resolving co-references using StandfordNLP -

hi started learning nlp , chose stanford api required tasks. able pos , ner tasks stuck co-reference resolution. able 'corefchaingraph' , able print representative mention , corresponding mentions console. but, know how finalized text after resolving co-references. can 1 me regarding this? example: input sentence: john smith talks eu. likes family of nations. expected ouput: john smith talks eu. john smith likes family of nations. it depends lot on approach take. try , solve looking @ role word plays in sentence , context carried forward. based on pos tags, try , map subject-verb-object model. once have subject , objects identified can build simple context carry forward rule system achieve want. e.g. based on tags below: [('john', 'nnp'), ('smith', 'nnp'), ('talks', 'vbz'), ('about', 'in'), ('the', 'dt'), ('eu.', 'nnp'), ('he', 'nnp'), ('li...

Unable to send Mails through SMTP using Asp.Net -

i need send mails 60 100 students @ time when click on send button. working if have 6 7 students when start sending 60 students code shows following error insufficient system storage. server response was: many emails per connection. here code protected void btnsend_click(object sender, eventargs e) { if (drptopics.selectedvalue == "-1") { response.write(@"<script language='javascript'>alert('please select 1 topic');</script>"); } else { sqlconnection conn = new sqlconnection(); conn.connectionstring = "data source=xxxx; user id=sa; password=xxxx; initial catalog=xxxx; integrated security=sspi;"; conn.open(); sqlcommand cmd = new sqlcommand(); cmd.connection = conn; cmd.commandtext = "select email_1 student_info branch_code='ap' , student_id in(select student_id admissions branch_code='ap' , batch_id='...