Posts

Featured post

What to use insread of Underscore.js ._where() for the arrays of property values -

let's have following data: [ { "name": "experiment type10", "scale": ["whole brain", "cell"], "datatype": "table" }, { "name": "experiment type11", "scale": ["tissue", "cell"], "datatype": "image" }, { "name": "experiment type12", "scale": "tissue", "datatype": "text" } ] with underscore ._where can filter out objects datatype "text", can't filter out objects scale equals "tissue" since it's in array. possible type of filtering elegantly? use filter , contains : var hastissues = function(item){ return item.scale === 'tissue' || _.contains(item.scale, 'tissue'); } var tissues = _.filter(list, hastissues);

How can I do a Facebook Connect with meteor.js? -

i following error when facebookconnect: w20140817-21:48:56.623(2)? (stderr) typeerror: cannot call method 'remove' of undefined w20140817-21:48:56.624(2)? (stderr) @ app/server/oauth.js:2:36 w20140817-21:48:56.624(2)? (stderr) @ app/server/oauth.js:11:3 w20140817-21:48:56.625(2)? (stderr) @ /users/username/copro/chatapp/.meteor/local/build/programs/server/boot.js:161:10 w20140817-21:48:56.625(2)? (stderr) @ array.foreach (native) w20140817-21:48:56.625(2)? (stderr) @ function._.each._.foreach (/users/username/.meteor/tools/cef2bcd356/lib/node_modules/underscore/underscore.js:79:11) w20140817-21:48:56.625(2)? (stderr) @ /users/username/copro/chatapp/.meteor/local/build/programs/server/boot.js:82:5 how can fix error?

javascript - plugin that auto img's height got an EXAMPLE -

i looking plugin arrange images that: http://milli.wpengine.com/ i have trying have not succsed... http://build-net.co.il/aba/ thanks guys. sorry bad english you want use jquery plugin masonry , allows stack images or it's more commonly known being used on: pinterest.

Export Excel Charts as Images using Powerpoint VBA -

i have below code have written export "chart1" excel sheet called "sheet1" new slide in created instance of powerpoint: sub chartstopowerpoint() dim pptapp powerpoint.application dim pptpres powerpoint.presentation dim pptslide powerpoint.slide dim pptslidecount integer dim ws worksheet dim intchnum integer dim objch object 'open powerpoint , create new presentation. set pptapp = new powerpoint.application set pptpres = pptapp.presentations.add 'set chart , copy new ppt slide set objchart = worksheets("sheet1").chartobjects("chart 1").chart objchart.chartarea.copy set pptslide = pptpres.slides.add(pptslidecount + 1, pplayoutblank) pptslide.shapes.pastespecial pppastejpg 'format picture size/position. j = 1 pptslide.shapes.count pptslide.shapes(j) if .type = msopicture .top = 87 .left = 33 .h

javascript - Loop through a <select> tag and append the content to JSON object -

i have <select> tag on site contains multipe choises options. need append these options in <select> tag existing json object. my html code: <form onsubmit="return false;" role="form"> <div class="form-group"> <label for="groupselector">group:</label> <select class="form-control" id="groupselector"> <option value="guests">guests</option> <option value="members">members</option> <option value="vips">vips</option> <option value="mods">mods</option> <option value="admins">admins</option> <option value="owners">owners</option> </select> </div> <div class="form-group"> <input type="text" placeholde

sql server - Change Default Name of Relations -

i have 2 tables below structure : *table user* id int identity username varchar role varchar *table ticket* id int identity admin_id int user_id int admin_id , user_id foreign keys user table. set relation name relations in mssql diagram, when create model database, relations : user , user1 . when i'm changing them manually, going ok, after refreshing model or re-create ticket table, user , user1 back. how can set final name relations in ef model?even refresh or delete entire model, want ef model relation name being same diagram relation name. there no way force entity framework names of properties relation names, instead takes table name property name (with integer suffix multiple properties). now issue, in scenario renamed properties change original names when ever update model database . we can stop entity framework not reset property names renamed them our own. way is, open model file (.edmx) go association folde

top.location.pathname stopping jquery working on other pages -

i have added following statement above plugin plugin work on specific pages. if (top.location.pathname === '/' || top.location.pathname === '/tickets/sell/' || top.location.pathname === '/contact/') { !function ($) { the problem since have added statement jquery work on pages listed above. i.e following statement in on master page run on login page if login url added plugin statement. <script> $(function () { if (location.href.match('login/?redirect=/basket/')) { $('div#sign').show(); } else { $('div#sign').hide(); } }); </script> any / advice appreciated! i guess added these if cases top of plugin. have care did added if using post-back way works if uses partial request(ajax) script link may not work.(browser not download js file). guess question can