Posts

Showing posts from August, 2012

php - Smaller image divs shrinking inside a container div on Print Preview (Divception) -

Image
i have div holds number of smaller divs. these smaller divs used displaying pictures... not sure best way of explaining is, i'll add couple of images anyways, in design view, have divs looking perfectly, or @ least near example above. lined looks whatever element. however... when go print view, pictures divs shrink in size. lot of time isn't much, barely noticable, enough throw layout off. have tried on both chrome , firefox, , have downloaded opened in adobe; every time comes out same way. i've thrown can think of @ haven't been able figure out why happening. here's css in regards larger div: .image-grid{width:274mm;height:99.5mm;padding:3mm 0 0 7mm;} .image{width:34.5mm;height:20mm;background-repeat:no-repeat;background-position:center center;background-size:cover;margin-right:2.99mm;margin-bottom:3mm;float:left;padding:0;} .image-end{width:34.5mm;height:20mm;float:left;background-repeat:no-repeat;background-position:center center;backgroun

java - Spring MVC @RequestMapping to return nothing, simply close -

i'm working on jsp gathers info , after it's submitted page closes , goes confirmation page. don't want confirmation page. after clicking submit on jsp, want window close. return value on controller needs value. can put in there allow end? controller: @controller //@sessionattributes({"resultboard", "filterboard"}) public class newemployeecontroller { newemployeeservice newempservice; @autowired public newemployeecontroller(newemployeeservice service){ this.newempservice = service; } @requestmapping(value = "newempinput", method = requestmethod.get) public string promptemployee(model model) { //jsp can reference 1 object, need reference many objects. put many classes inside employeeformwrapper wrapper class. model.addattribute("myform", new employeeformwrapper()); return "newempinput"; } @requestmapping(value = "newempinput", method = re

node.js - Express middleware - router.use issue -

i have simple code: var express = require('express'); var router = express.router(); router.get('/', function (req, res, next) { req.lectalapidata = { model: email, conditions: req.query }; router.use(function(req,res,next){ //this not executing console.log('do that') res.json({ok:'ok'}); }); }); i doing wrong, according docs, says can use syntax: http://expressjs.com/guide/routing.html what doing wrong? perhaps it's because router.use nested inside router.get - so question becomes - how create more middleware same route inside router.get middleware? just keep adding functions router.get('/', , executed in order. don't forget call next . router.get('/', function (req, res, next) { req.lectalapidata = { model: email, conditions: req.query }; next(); // pass off next middleware }, function(req,res,next){ console.log(&

.net - Have they removed the Interval and Timer operators in Rx 3.0? -

Image
i can't find interval operator , timer operator in rx 3.0. have these been removed? i installed system.reactive nuget package console application in visual studio 2015 , not see them. please see picture below. they present until week ago when used nuget package manager rx-main. got me v2.2.5 of assembly. however, when search nuget rx-main, doesn't turn in results. infer due announcement on 16th june rx made part of .net foundation , new nuget package called system.reactive. have these been moved? interval , timer can found in static observable namespace. not extension methods iobservable .

Visual Studio 2015 Update 3 - Setup Blocked -

Image
i trying install visual studio 2015 update 3 offline installer (iso file) , error: i running on window 7 have visual studio 2013 update 2013 on system. here log: [0e68:1238][2016-07-05t17:24:07]i000: mux: detect completed [0e68:1238][2016-07-05t17:24:07]i000: mux: wait view loaded [0e68:1238][2016-07-05t17:24:07]i000: mux: view loaded [0e68:1238][2016-07-05t17:24:07]i000: mux: checking update... [0e68:1238][2016-07-05t17:24:07]i000: mux: setup update feature enabled. evaluating conditions determine whether run setup update. [0e68:1238][2016-07-05t17:24:07]i000: mux: checking http://go.microsoft.com/fwlink/?linkid=659005 update. [0e68:1238][2016-07-05t17:24:11]i000: mux: failed download update xml file http://go.microsoft.com/fwlink/?linkid=659005 setup not updated. [0e68:1238][2016-07-05t17:24:11]i052: condition 'not (currentoperation = "uninstall")' evaluates true. [0e68:1238][2016-07-05t17:24:11]i052: condition 'not (currentoperation = &q

c# - Consume data returned from a WCF Service Application in HTML Lightswitch -

i have wcf service application hosted in iis. service queries clients on our network wmi data on demand. consume data in lightswitch html application hosted in iis on same server. need use wcf ria service? have little no knowledge of ria. looked this tutorial , i'm not sure if solution applies. data that's being returned service isn't coming database. guidance on how consume data wcf service in lightswitch html appreciated. lightswitch won't directly connect wcf service , wrap in: a) ria service b) odata web api controller

wpf - Caching MEF Components -

is there way cache mef components graph per-application startup (wpf), maf avoid discovering directories , constructing components graph every application startup. in order speed application startup. maf uses addinsstore store addins, when new addin discovred store rebuilt , saved again. possible modular application designed mef? edit: in project architecture have extension, modules , managed services have different exports like(iextension, imodule, imanagedservice), , handling start dependencies of components, want precisely ex(the extensions directory) contains many dlls , may not dlls contains (exports/imports) because of dlls references extensions. default discovering behavior of mef searching exports/imports in assemblies in extension directory, want modify behavior looking @ first time dlls , catch types , names , dlls use them in next startup time. catch directly load components(exports) mef know available components , places without loading , searching dlls. seems dicti

QGIS Oracle-Spatial-GeoRaster-Plugin not working -

i having trouble oracle-spatial-georaster-plugin in qgis (running on windows 7 professional n 64bit). connection database on external oracle-server works shows containing rasters in database. try open raster error message comes information connection not established. should check connection options , make sure gdal-georaster-plugin installed. i tried 3 independent standalone versions of qgis (all 64bit): - qgis 2.14.3 running gdal 2.1.0 - qgis 2.12.2 running gdal 1.11.3 - qgis 2.10.1 running gdal 1.11.2 on system installed gdal 2.1.0 gdal-oracle-oci-driver (with osgeo4w) , know load oracle rasters in qgis earlier version of qgis. when updated gdal-version on system not working more. my questions: - there plugin apart "oracle-spatial-georaster"-plugin written in error message ("gdal-georaster)? don't find it. - gdal-version qgis running? thought qgis installs own gdal-version , doesn't use system-gdal, apparently not working more since installed recent g

vb.net - how to show a error when the textbox is empty -

how show error when textbox empty private sub button1_click(sender object, e eventargs) handles button1.click dim numofmon integer numofmon = textbox4.text if textbox4.text = ?? messagebox.show("error") end if end sub please help you trying parse integer value, better cheking if textbox text empty, directly should call integer.tryparse function evaluate whether text, emptyness or not, translated integer value. dim numofmon integer if not (integer.tryparse(textbox4.text, numofmon)) messagebox.show("error") else ' logic here... end if note numofmon passed refference, if integer.tryparse success assigns value given variable.

angularjs - Open ionicModal on stateChangeStart -

i have been reviewing different methods authorization/authentication in framework. trying assign value state, use ui-routers ability detect state change using $statechangestart. injecting ionicmodal service app.js .run function , creating modal , attaching $rootscope. when try , open following error: cannot read property 'show' of undefined here app.js: angular.module('authlyapp', ['ionic', 'authlyapp.controllers', 'authlyapp.services']) .run(function($ionicplatform, $ionicmodal, $rootscope) { $ionicplatform.ready(function() { if (window.cordova && window.cordova.plugins.keyboard) { cordova.plugins.keyboard.hidekeyboardaccessorybar(true); cordova.plugins.keyboard.disablescroll(true); } if (window.statusbar) { statusbar.styledefault(); } }); $ionicmodal.fromtemplateurl('templates/login.html', { scope: $rootscope }).then(function(modal) { $rootscope.modal = modal; });

macros - Defining functions using backslash in c++ -

i saw people using backslash when define functions in macros as: #define classnamenodebug(typenamestring) \ static const char* typename_() { return typenamestring; } \ static const ::foam::word typename i did easy test. got bunch of errors. testing code follows: in testmacro.h file: #define declearlarger(first,second) \ double whichislarger(double first,double second){ return (first>second) ? fisrt : second;} in main() function: int second =2; int first =1; cout << declearlarger(first,second) << endl; the errors are: /home/jerry/desktop/backslash/backslash_test/testmacro.h:7: error: expected primary-expression before 'double' double whichislarger(double first,double second){ return (first>second) ? fisrt : second;} ^ /home/jerry/desktop/backslash/backslash_test/testmacro.h:7: error: expected ';' before 

PHP Form not working at root level - JS Validation issue, maybe -

i totally stumped one. php form works fine when within folder on server see here http://getnice.co.uk/formtest/ but same code @ root level not work. yes pointing right places, not that. http://getnice.co.uk/form.html below code.. think server issue? correct me if wrong. <!-- contact start --> <section id="contact" class="pfblock pfblock-gray"> <div class="container"> <div class="row"> <div class="col-sm-8 col-sm-offset-2"> <div class="pfblock-header"> <h2 class="pfblock-title">contact us</h2> <div class="pfblock-line"></div> <div class="pfblock-subtitle"> tell business , needs are: </div> </div> </div> </div><!-- .row

javascript - Hybrid Application closes without giving any error in logcat while uploading images -

i trying upload lot of images server 100 images each of size 300 kb. when try upload image, of images 15-18 images gets synced server application closes(just exists) without app crash message or error in logcat. is memory issue. may not freeing memory used individual images. here code syncing image function syncimage(imagename, trycount) { var basicpath = localstorage.getitem('imagepath'); var filename = imagename; var src = basicpath + filename + "?" + new date().gettime(); // var src = "image.jpg"; var mycanvas = document.createelement('canvas'); var context = mycanvas.getcontext('2d'); var img1 = document.createelement('img'); img1.onload = function() { var imgwidth = img1.width; var imgheight = img1.height; mycanvas.width = imgwidth; mycanvas.height = imgheight; context.drawimage(img1,10,10,imgwidth,imgheight); //console.log("

php echo not working as expected -

the following code not working expected, echo statement never return response client side , hang. $query = "insert tasks (projectid,title,start,end,percentcomplete,parentid,orderid,summary,expanded,lastupdate) values($project_id, '$title','$start','$end','$percentcomplete',$parentid,'$orderid','$summary','$expanded',now())"; $result = mysqli_query($con, $query); if ($result) { $last_id = mysqli_insert_id($con); echo json_encode(array(id => $last_id, title => $title, start => $start, end => $end, percentcomplete => $percentcomplete)); } however, if added 1 more line of echo follows, both echo statement able received on client side. $query = "insert tasks (projectid,title,start,end,percentcomplete,parentid,orderid,summary,expanded,lastupdate) values($project_id, '$title','$start','$end',

json - chown illegal group name & getting Error for bower -

in command line when entering: sudo chown joannak:joannak~/.config/configstore/insight-bower.json i chown: joannak: illegal group name. i doing because having issue trying install bower. keeps giving me error: error: eacces: permission denied, open '/users/joannak/.config/configstore/insight-bower.json' error: eacces: permission denied, open don't have access file. i working on mac , administrator. how can fix this. help! i updated syntax , stopped getting illegal group name following: sudo chown joannak: ~/.config/configstore/insight-bower.json i need verify if bower working now. i updated syntax , stopped getting illegal group name following: sudo chown joannak: ~/.config/configstore/insight-bower.json

actionscript 3 - Can't stop the particles from overshooting -

Image
i trying create simple particle simulation. there 2 types of particles static , moving. static particles attract moving particles towards centre. static particles have strength attribute dictates how hard pulling moving particles var angle:number = math.atan2(moving.y - static.y , moving.x - static.x); var dist = point.distance(new point(moving.x,moving.y) , new point(static.x,static.y)); moving.velx += math.cos(angle + math.pi) * static.strength / dist; moving.vely += math.sin(angle + math.pi) * static.strength / dist; the problem when particle passing through centre distance small results in large velocity values. i added check distance before calculating velocity. if (dist < 1) dist = 1; but problem still persists. cant figure out problem. here snapshot of overshoot happening. normal force fields use square of distance modifier, here use single power of distance, of course force field performs differently. should change var dist line following:

how to change the bootstrap multidate property dynamically -

i using bootstrap datepicker follows, $('#columnvalue').datepicker({ format: "mm/dd/yyyy", autoclose: false, multidate: true }).on('changedate', function () { }); depending on condition want set multidate property false. i have tried following code without success $("#data").on("change", function () { $('#columnvalue').datepicker({ format: "mm/dd/yyyy", autoclose: true, multidate: false }); }); what proper way this? thanks well figured out $("#data").on("change", function () { $('#columnvalue').datepicker('remove'); $('#columnvalue').datepicker({ format: "mm/dd/yyyy", autoclose: true,

vaadin - How to know that Download has been completed -

i sending file download @ client browser using following code:- filedownloadresource fdr = new filedownloadresource(file, app); btnget.getwindow().open(fdr); everything works fine when add file.delete(); after that, exception file or directory not exist . can understand before download component done file, file getting deleted. there way notification download complete , safe delete file server?

android - Using the open source machine learning Datumbox framework -

i working in intelligent android news application, app should extract news topics contain specific keywords published news on web , , classify them categories, haven't idea how implement naive bayes classifier in app, , think implementing open source machine learning datumbox framework, body knows framework "datumbox" or used before? on java or android? if body knows way implement nave bayes classifier, please let me know. here link example in java right datumbox, used , good. https://github.com/datumbox/naivebayesclassifier/blob/master/src/com/datumbox/opensource/examples/naivebayesexample.java

c# WCF [Simple Injectior] injection pattern -

i have seen lots of examples on how this, newbie di, thought best ask question issues. again, apologize if has been asked already. we have c# wcf service working, have been asked implement di framework reuse ability. after looking around have chosen simple injector. so service compiles , can view wsdl browser. to start have placed initialization code sets container in global.asax file in application_start function. within function have following code: var container = new container(); container.options.defaultscopedlifestyle = new wcfoperationlifestyle(); followed registrations: container.register<ipersonmanager, personmanager>(); etc.... finally, run: simpleinjectorservicehostfactory.setcontainer(container); this runs correctly, no errors , can break point onto fisrt line above , step through code. i have been told should use different location initialization code , not use global.asax file. not sure if should change this. ok. when @ constructor perso

swift - Save Parse notification - iOS -

i want have notification sent in uitableview. because user can delete notification (in notification center) without launching app, have store notification in parse database. so how can programmatically save notification i'm sending in database. don't want send notification , enter manually notification in database. hope it's clear. thanks this code save push notification parse class before sending push notification. pfobject *messageactivity = [pfobject objectwithclassname:kpapactivityclasskey]; [messageactivity setobject:kpapactivitytypereceivedmessage forkey:kpapactivitytypekey]; [messageactivity setobject:[pfuser currentuser] forkey:kpapactivityfromuserkey]; [messageactivity setobject:self.user forkey:kpapactivitytouserkey]; [messageactivity setobject:textfield.text forkey:kpapactivitycontentkey]; pfacl *messageacl = [pfacl aclwithuser:[pfuser currentuser]]; [messageacl setpublicreadaccess:yes]; [messageacl setwriteacce

android - RecyclerView inside of a GridView's item ruins the GridView's OnClickListener -

Image
i have disposition of layout: which gridview recyclerview s inside of each item of gridview. i haven't found anywhere solution since think never happened before. not found in or google groups, example. so, problem is, when set recyclerview , method onitemclick of gridview doesn't called, if don't set recyclerview gets called. these 2 codes (one setting recyclerview , 1 hiding it): setting recyclerview on gridview 's item @override public view getview(int position, view convertview, viewgroup viewgroup) { viewholderitem viewholderitem; if(convertview == null) { convertview = ((layoutinflater)getactivity().getsystemservice(context.layout_inflater_service)).inflate(r.layout.item_mipeticion, viewgroup, false); viewholderitem = new viewholderitem(); viewholderitem.palabra_tv = (customtextview)convertview.findviewbyid(r.id.palabra_tv); viewholderitem.recyclerview = (recyclerview)conv

How can I utilize `this.userId` from a Meteor Method call? -

currently have 2 apps, 'alpha' , 'bravo', split-up reduce code size. need 'bravo' app call meteor method written in 'alpha' app (from client) , needs utilize this.userid security. however, this.userid null if called 'bravo' app. the 'bravo' app creates users duplicating createuser code , sharing same database. user can log each app no issues. connects alpha using: alphaddp = ddp.connect(alpha_server_url) however when in bravo app if call alphaddp.call('updatedoc', docid, newdata) this.userid value prints out null in alpha logs. assumed when connect ddp.connect authenticate connection. doesn't seem case. after googling came across meteor.call("login") appears won't work if user isn't using email/password log in. i tried experimenting new accountsclient couldn't make headway. also caveat need work accounts sms login , accounts need created on 'bravo' app. any ideas on how thi

c# - AES pads byte array with \0 when decrypting -

whenever decrypt file end \0 in between each character (this text file) original fine, , decryption successful without errors. when open file ; "hello" become "h\0e\0l\0..." here decryption function: (i came fix of converting byte array utf8 manually removing nulls, not solution. ) public static void decryptfiletofile(string fromfile, string tofile, byte[] key) { byte[] encryptedfile = io.convertfiletobyte(fromfile); using (aes aesalg = aes.create()) { byte[] dataiv = encryptedfile.take(16).toarray(); //first 16 bytes iv byte[] encrypteddata = encryptedfile.skip(16).take(encryptedfile.length-16).toarray(); aesalg.key = key; using (var decryptor = aesalg.createdecryptor(key, dataiv)) { byte[] final = performcryptography(decryptor, encrypteddata); string result = system.text.encoding.utf8.getstring(final); result = result.replace("\0", string.empty);

node.js - How to include typescript in javascript -

i have node.js server.js var http = require('http'); var port = process.env.port || 1337; http.createserver(function (req, res) { res.writehead(200, { 'content-type': 'text/plain' }); res.end('hello world\n'); }).listen(port); say have typescript t.ts var = 123; console.log(a); i have 2 questions: is possible call t.ts server.js (assume must use server.js)? is possible convert server.js server.ts (becomes typescript)? normally should possible if script exports class or module. wrap functionality in function, , export in ts. export function dothing() { var = 123; } // server.js: var dothing = require('t'); dothing(); typescript uses javascript syntax can rename file .ts , of work, albeit few things having unknown types start with. may need replace keyword var import in require() lines. don't think there's "automatic conversion" program though.

How to define & access a nested dictionary data across multiple namespace C# -

this question has answer here: merging dictionaries in c# 18 answers i have following data, want define in elegant way , fast access. dictionary<string, string> mydictionary = new dictionary<string, string> { {"a", "1"}, {"b" "2"} }; now "1" , "2" defined in 2 different modules x , y. i'm thinking of nested dictionary here. i'm looking elegant way define. my thinking: //filea - namespace1 dictionary<string, string> dca = new dictionary<string, string> { {"loc1", "addr1"}, {"loc2", "addr2"} }; //fileb - namespace1 dictionary<string, string> dcb = new dictionary<string, string> { {"loc3", "add3"}, {"loc4", "add4&quo

C++ string of "1" does not match "1" (tried regex and boolean '==') -

Image
see gif (visual studio debugger showing variables): http://www.elanhickler.com/transfer/regex_does_not_match.gif bool stob(string s) { regex e("1"); bool b1 = (s == "1"); // false bool b2 = (string(s) == "1"); // false bool does_it_match1 = regex_match("1", e); // true bool does_it_match2 = regex_match(string(s), e); // false bool does_it_match3 = regex_match(string("1"), e); // true return does_it_match1; } why not matching? image shows input of s "1", more characters of 49("1") , 0("\0") ideone: https://ideone.com/b8luzf (this demosntrates problem, figured out answers below). #include <iostream> #include <regex> #include <string> using namespace std; int main() { regex e("1"); string s = "1,"; s.back() = '\0'; cout << regex_match("1", e) << endl; cout << regex_match

c# - What's the correct way to retrieve the DPI of secondary monitors? -

problem on windows 8.1 (and newer) dpi setting per-monitor. can see in system settings primary display (laptop) set 125% dpi, , alternate display set 100% dpi. application written entirely in c#, , every api call i've tried results in incorrect dpi secondary monitor. keep in mind, calling method in initialization of process , have specified dpi aware in manifest: (shcore.dll) setprocessdpiawareness(process_dpi_awareness::process_per_monitor_dpi_aware); attempts (shcore.dll) getdpiformonitor(hmonitor, monitor_dpi_type::mdt_effective_dpi, &dpix, &dpiy) (result 120 regardless of hmonitor handle) (user32.dll) intptr dc = createdc(...); double logx = (double)getdevicecaps(dc, logpixelsx); double logy = (double)getdevicecaps(dc, logpixelsy); (result 120 regardless of device name createdc) monitor layout 1 other thing confuses me, first monitor @ rect {0,0,1920,1080} second monitor @ {2400,0,2400,1350} , makes actual desktop size of {4800x1350} , virtual des

json - Mongodb query string array to see if contains keyword -

i doing ecommerce website , have product collection using mongodb. product have 2 fields: taxonomies: ['clothes', 'female', 'fashion'] attributes: [{'color': 'red'}, {'size': 'large'}, ...] now when user tries search products entering keyword, want query documents see if elements of product's taxonomies or attributes contains searching keyword. let's search keyword 'fa', since product provided above example has 'fashion' taxonomy contains 'fa', product should included in search results. same applies attributes. how may accomplish that? taxonomies array , attributes array of objects. use combination of $or: , $regex: follows: var searchre = /.*fa.*/; // create regular expression, in case contains db.products.find({ $or: [ { taxonomies: { $elemmatch: { $regex: searchre }}}, { attributes: { $or: [ { $elemmatch: { color: { $regex: searchre }}}, { $elemmatch: { size: {

symfony - Is there a reason Commands are Slower than normal Requests? -

i refactoring code transform actions in commands in symfony 2.7 application. at first, making request endpoint, corresponding controller making call service , responded 200 http response. now, want execute service command interface use console component of symfony. the problem is: command way very, slow. there reason that? commands, default, run in dev environment, meaning more logging, capturing data profiler... try appending --env=prod .

reactjs - Generate Table dynamically display error Uncaught Error: Invariant Violation -

i'm creating table uses data json, json "policies" change when click on different links in page, thing when click , state change, have generate table again new json, uncaught error: invariant violation: processupdates(): unable find child 1 of element. means dom unexpectedly mutated (e.g., browser), due forgetting <tbody> when using tables, nesting tags <form> , <p> , or <a> , or using non-svg elements in <svg> parent. try inspecting child nodes of element react id .0.1.0.2.3.1.1.2.0.1 . the first time page loads table correctly generated. module.exports = react.createclass({ onpolicieschange: function (policiesstore) { this.setstate(policiesstore); }, getinitialstate: function () { return { policies: [] }; }, componentdidmount: function () { this.unsubscribealertsstore = alertsstore.listen(this.onpolicieschange); }, componentwillunmount: function () { this.unsubscribealertsstore(); }, cols: [

Method to calculate prime numbers - [JAVA] -

i need build method calculates prime number homework. implemented algorithm proposed professor it's not working. eclipse gives message: the local variable prime may not have been initialized , not compile. can me? public static boolean itsprime(int nbtest){ boolean prime; if (nbtest <= 1){ prime = false; } else if (nbtest == 2){ // 2 number prime prime = true; } else if ((nbtest != 2) && (nbtest % 2 == 0)){ // if it's , different 2 not prime prime = false; } else { for(int = 3; <= math.sqrt(nbtest); = i+2){ if (nbtest % == 0){ prime = false; } else { prime = true; } } } return prime; } just initialise when declare variable. eg boolean prime = false;

ios - How can I add data to core data using one-to-many relationship? -

Image
i wanting add day week record. have setup entities , relationship within xcode unsure on next step. am right in thinking need manually set automatically generated foreign key field? currently save code dat follow: if let managedobjectcontext = (uiapplication.sharedapplication().delegate as? appdelegate)?.managedobjectcontext{ day = nsentitydescription.insertnewobjectforentityforname("days", inmanagedobjectcontext: managedobjectcontext) as! days day.day = text! day.restday = restday do{ try managedobjectcontext.save() print("saved day sqlite") } catch { print(error) return } } model(s) if auto-generated code model (by letting xcode create subclasses of nsmanagedobject), you're set. need have instance of weeks available (say, parameter function) when creating days instance, , add line before saving context: day.dayweek = week // assumi

c# - Ambiguous Call Between Same Library? -

i attempting upgrade asp.net 5 project beta7 beta8. got runtime , switched various packages in project.json over. compiling, except i'm getting few errors have been unable resolve. in particular, 1 has me stumped , preventing me going forward: dnx,version=v4.5.1 error cs0121: call ambiguous between following methods or properties: 'microsoft.data.entity.sqlserverdbcontextoptionsextensions.usesqlserver(microsoft.data.entity.dbcontextoptionsbuilder, string)' , 'microsoft.data.entity.sqlserverdbcontextoptionsextensions.usesqlserver(microsoft.data.entity.dbcontextoptionsbuilder, string)' at line of code in startup.cs services.addentityframework() .addsqlserver() .adddbcontext<mycontext>(options => options.usesqlserver(configuration["data:defaultconnection:connectionstring"])); i know in past, typically appears version of library in gac. however, don't believe case on osx. did check ~/.dnx/packa

A rudimentry way to store comments on a proposal webpage using sqlite -

i software engineer new database , trying hack tool show demo. have apache server serves simple web page full of tables. each row in table has proposal id , link web page proposal explained. 2 columns. ---------------------- | id | proposal | |-------------------- | 1 | foo.html | | 2 | bar.html | ---------------------- now, want add third column title comments user can leave comments. ------------------------------------------------ | id | proposal | comments | |----------------------------------------------- | 1 | foo.html | x: great idea ! | | | | y: +1 | | 2 | bar.html | z: not release | ------------------------------------------------ i want hack show demo , feedback. planning use sqlite create table per id , store userid, comments in table. people can add comment @ same time. planning use lock perform operation on sqlite database. not worried scaling want show , feedback. guys

javascript - Keep focus on dropdown list while writing in input text -

i kind of new in angularjs , bootstrap, , help. i trying create dynamic dropdownlist filters input text. here code: <input id="selectedcountry" type="text" class="btn btn-primary dropdown-toggle" data-toggle="dropdown" aria-expanded="true" ng-model="pass" autocomplete="off" /> <ul class="dropdown-menu"> <li data-ng-repeat="r in countrycodes | myfilter *my filter in app.filter. works fine*"><a href="#" data-ng-click="selectedcountry.value=r.value">{{r.name}}</a></li> </ul> i everytime user clicks on down arrowkey focus on dropdownlist (which not happening automatically, why?), wrote code: $(document).on('shown.bs.dropdown', function (event) { var dropdown = $(event.target); $("input").keydown(function (e) { if ((e.which && e.which == 40) || (e.keycode && e.keycode == 40)) {

canvas - How to find unconnected room groups? -

Image
on process of building dungeon generator need solve several problems involving unconnected rooms, , can't find solution last 1 found: i can detect unconnected rooms, when comes unconnected rooms groups have no idea of do. here picture of happens... if @ top-right corner may see unconnected group of rooms, i need detect , connect unconnected groups of rooms rest. system the way works simple, there array contain tile objects , it's properties. change stuff need access objects inside array. dungeon generation: create tiles of type floor(gray blocks). place random rooms don't overlap , have minimum distance of 1 tile each other. place walls around rooms. place walls on floor blocks minimum distance of 1 tile room walls. place empty blocks on wall blocks distance of 1 tile walls. map legend white = room blocks gray = floor blocks || corridor blocks black block, gray border = wall blocks brown || red = door blocks full black = empty blocks