Posts

Showing posts from August, 2015

Use cloud as mirror to download R package -

Use cloud as mirror to download R package - i'm using r version 2.15.1 on mepis 12. trying install bundle called languager (along 3 more, see below), used in book analyzing linguistic info (r.h.baayen). problem this: > install.packages("languager",repos = "http://cran.r-project.org") installing package(s) ‘/home/nalerive/r/x86_64-pc-linux-gnu-library/2.15’ (as ‘lib’ unspecified) warning in install.packages : bundle ‘languager’ not available (for r version 2.15.1) upgrading not option, unless it's really necessary (i want work lme4 well, have, have no experience in r version yet). so, sent email author , asked him do. reply was: if select cloud mirror, should able install languager, , separately e1071 (it lives on cran), successor of design (rms), , ape (it lives on cran) my question is, then, cloud mirror , can find it? help highly appreciated! languager has r (≥ 3.0.2) in depends (see the cran page). preferably up

matlab - Create depth map from 3d points -

matlab - Create depth map from 3d points - i have given 3d points of scene or subset of these points comprising 1 object of scene. create depth image these points, pixel value in image encodes distance of corresponding 3d point camera. i have found next similar question http://www.mathworks.in/matlabcentral/newsreader/view_thread/319097 however answers there not help me, since want utilize matlab. image values not hard (e.g. compute distance of each 3d point camera's origin), not know how figure out corresponding locations in 2d image. i imagine project 3d points on plane , bin positions on plane in discrete, well, rectangles on plane. average depth value each bin. imagine result of such procedure pixelated image, not beingness smooth. how go problem? assuming you've corrected photographic camera tilt (a simple matrix multiplication if know angle), can follow this example x = data(:,1); y = data(:,1); z = data(:,1); %// bit requires create choices

fminsearch (matlab) taking too much time -

fminsearch (matlab) taking too much time - function a=obj(b,y, yl, tempcyc, cyc, yzero, age, agesq, educ, ageav, agesqav, educav, qv, year1, year2, year3, year4, year5, year6, year7, workregion1, workregion2, workregion3, workregion4, workregion5, workregion6, workregion7, workregion8, workregion9, workregion10, workregion11, workregion12, workregion13, workregion14, workregion15, workregion16, qw) a=0; i=1:715 s=0; m=1:12 p=1; t=1:8 p=p*(normcdf((2*y(i,t)-1)*(b(1)*yl(i,t)+b(2)*tempcyc(i,t)+b(3)*cyc(i,t)+b(4)*yzero(i,t)+b(5)*age(i,t)+b(6)*agesq(i,t)+b(7)*educ(i,t)+b(8)*ageav(i,t)+b(9)*agesqav(i,t)+b(10)*educav(i,t)+b(11)*1+b(12)*sqrt(2)*qv(m,1)+b(13)*year1(i,t)+b(14)*year2(i,t)+b(15)*year3(i,t)+b(16)*year4(i,t)+b(17)*year5(i,t)+b(18)*year6(i,t)+b(19)*year7(i,t)+b(20)*workregion1(i,t)+b(21)*workregion2(i,t)+b(22)*workregion3(i,t)+b(23)*workregion4(i,t)+b(24)*workregion5(i,t)+b(25)*workregion6(i,t)+b(26)*workregion7(i,t)+b(27)*workregion8(i,t)+b(28)*workregion9(i,t)+b(29)*workregi

python - How to sort a numpy array based on the values in a specific row? -

python - How to sort a numpy array based on the values in a specific row? - i wondering how able sort whole array values in 1 of columns. i have : array([5,2,8,2,4]) and: array([[ 0, 1, 2, 3, 4], [ 5, 6, 7, 8, 9], [10, 11, 12, 13, 14], [15, 16, 17, 18, 19], [20, 21, 22, 23, 24]]) i want append first array sec 1 this: array([[ 0, 1, 2, 3, 4], [ 5, 6, 7, 8, 9], [10, 11, 12, 13, 14], [15, 16, 17, 18, 19], [20, 21, 22, 23, 24], [5, 2, 8, 2, 4]]) and sort array appended row either this: array([[1, 3, 4, 0, 2], [6, 8, 9, 5, 7], [11, 13, 14, 10, 12], [16, 18, 19, 15, 17], [21, 23, 24, 20, 22], [2, 2, 4, 5, 8]]) or this: array([[ 2, 1, 3, 4, 0], [ 7, 6, 8, 9, 5], [12, 11, 13, 14, 10], [17, 16, 18, 19, 15], [22, 21, 23, 24, 20], [ 8, 5, 4, 2, 2]]) and remove appended column get: a

java - Struts JSP/html inserting current date -

java - Struts JSP/html inserting current date - this question has reply here: showing current date using jstl formatdate tag 2 answers my question simular one: is possible access struts2 variable in jsp scriptlet? in .jsp page have form in preset text field current date. issue "value" not back upwards runtime expressions when using struts - makes sense want maintain much java out of jsp possible. leaves me struggling variable out of action. running on tomcat v7.0 , eclipse java ee ide web developers. version: kepler service release 2. in .jsp page have: <s:set var="currentdate" value="currentdate"/> <s:property value="currentdate"/> <s:form action= "updateaction"> <s:textfield name="dateupdated" key="label.dateupdated" size="20" value="%{curr

node.js - SOLVED Waterline (Sails.js). Rows with 'updatedAt' greater than a given value -

node.js - SOLVED Waterline (Sails.js). Rows with 'updatedAt' greater than a given value - i want new rows model. rows have been created after given date. query should easy: where updatedat >= givendate but it's not working :( my code: // date client var lastdate = req.param("date"); // parse date moment? have tried , without this. lastdate = moment(lastdate).format('yyyy-mm-dd hh:mm:ss'); var query = message.find().where({ updatedat: { '>=': lastdate } }); query.exec(function(err, messages) { // messages, :( res.send(messages); }); thanks in advance. solved. i created date instance , passed clause: // date client: date in ms (new date().gettime()) var lastdate = req.param("date"); // create date lastdate = new date(lastdate); var query = message.find().where({ updatedat: { '>

c++ - Include mouse cursor in screen capture -

c++ - Include mouse cursor in screen capture - i utilize createdc / bitblt / getdibits etc. capture screen, cursor not captured. there simple argument or have included? further give-and-take occurred in comments, had chance farther investigate question. result, came next code grab current cursor's hbitmap , draw screen. since cursor is hicon, comes mask. initially, did simple bitblt - however, got 32x32 black sqaure cursor in top left 1/4 or so. i investigated using maskblt. depending on cursor when app started, either wait cursor, ns resize cursor, or standard pointer. guess start timer , add together wm_timer handler fire couple of times sec in order real-time update of cursor used in other windows in system. seemed mere curiosity didn't bother. edit: did start timer in wm_initdialog , handle in wm_timer. can see image updated 10 times second. reason, i-beam cursor doesn't seem displayed @ - case farther investigation needed, guess. here's

c - Reading a mapped file and storing it in a buffer -

c - Reading a mapped file and storing it in a buffer - can kindly explain how can implemented mread function, using read() scheme call. method needs read contents found in mmapped file , read them buffer. have access both mmapped file , buffer means of pointers. (i.e. void *addr , void *buff). your help v.much appreciated. try far: int fd; if ((fd = open("file.hole",o_rdwr, "rb")) < 0) { perror("create .hole file error"); exit(exit_failure); } if (write(fd, addr, count)!= count) { perror("cannot write address"); exit(exit_failure); } buff = (char*)malloc(count * sizeof(char *)); if (read(fd, buff, count)) { perror("cannot read file descriptor buffer"); exit(exit_failure); } sorry, might not finish solution, don't have sufficient reputation add together comments. if need read info mmaped file (assumed have called mmap() on file), don't need read() scheme call; need r

java - What does the exception 'expected: START_TAG' mean, that appears when calling a webservice -

java - What does the exception 'expected: START_TAG' mean, that appears when calling a webservice - i calling webservice in android using next code: public class main { private static final string namespace = "urn:sap-com:document:sap:rfc:functions"; private static string url = "http://hr_develop:unrwa2013@10.130.105.8:8000/sap/bc/srt/wsdl/flv_10002a111ad1/srvc_url/sap/bc/srt/rfc/sap/ztm_ws_get_emp_holidays/520/officialholidays/binding?sap-client=520"; private static final string method_name = "z_tm_etm_get_empl_holidays"; private static final string soap_action = "urn:sap-com:document:sap:rfc:functions:ztm_ws_get_emp_holidays:z_tm_etm_get_empl_holidaysrequest"; // private static final string soap_action = namespace + "/" + method_name; public static void main(string args[]) { soapobject request = new soapobject(namespace, method_name); propertyinfo arg1 = new propertyinfo()

php - Refresh Table When Action Create, Read, Update,Delete (CRUD) in datatables -

php - Refresh Table When Action Create, Read, Update,Delete (CRUD) in datatables - i have problem how refresh tables when action create, read, update,delete (crud) in datatables screnshot tables : http://prntscr.com/3voq2l header code / head code <style type="text/css" title="currentstyle"> @import "../stylesheets/demo_table_jui.css"; @import "../stylesheets/ui-lightness/jquery-ui-1.8.4.custom.css"; </style> <script type="text/javascript" language="javascript" src="assets/js/jquery.js"></script> <script type="text/javascript" language="javascript" src="assets/js/jquery.datatables.js"></script> <script type="text/javascript"> var rw = jquery.noconflict(); rw(function() { rw('#ff').form({ success:function(data){ rw.messager.alert('info', data,

R data.table fread suppress messages -

R data.table fread suppress messages - when utilize fread read big info files (lets 250mb) using next statement myfile<-fread(rawfile,skip=1,sep=",",header=false) it gives read status of file like read 2859078 rows , 6 (of 6) columns 0.272 gb file in 00:00:05 i tried methods suppressmessages suppress this. doesn't work. is there data.table specific command this? use fread(file,..., showprogress = false) r data.table

html - How can I give links in pdf for a page, which is in collapsible div -

html - How can I give links in pdf for a page, which is in collapsible div - i want give link in pdf, of page under collapsible div. please see code <div class="pdfgrp" id="nomination"> <div class="pdfhd">nomination forms</div> <div class="pdfname"><a onclick="mm_openbrwindow('pdfs/loans/form_da1.pdf')" style="cursor: pointer;">form da 1</a></div> <div class="pdfname"><a onclick="mm_openbrwindow('pdfs/loans/form_da2.pdf')" style="cursor: pointer;">form da 2</a></div> <div class="pdfname"><a onclick="mm_openbrwindow('pdfs/loans/form_da3.pdf')" style="cursor: pointer;">form da 3</a></div> </div> please help html asp.net

wamp - apache aliasmatch return 404 -

wamp - apache aliasmatch return 404 - i have next line in httpd.conf file: aliasmatch ^/myproject/src/foobar/(?:.*)$ /myproject/src/foobar/index.html what i'd happen url matches pattern of http://localhost/myproject/src/foobar/(.*)$ redirect index.html file have hanging out in @ http://localhost/myproject/src/foobar/ . instead, 404 when seek access file within foobar folder. gives? syntax: aliasmatch regex file-path|directory-path examples: aliasmatch ^/one c:/wamp/www/index.php [windows] aliasmatch ^/icons(.*) /usr/local/apache/icons$1 [linux] apache wamp alias

ruby on rails - Design a Book model with several editions in a database -

ruby on rails - Design a Book model with several editions in a database - i have textbook model , i'd have several editions of same textbook (allowing each edition have different title, price, etc) , able retrieve editions particular textbook. how design relation? my thought create first instance of book root book , associate subsequent book editions it. , if delete root book, example, arbitrary root should chosen automatically existing editions. i've looked @ ancestry gem, looks overkill given tree have maximum depth 1. again, i'm not sure tree construction right solution. in real world, books messy. i'm not sure i've ever seen multiple editions of 1 book had different titles, guess there's no law against that. if can happen, need think along lines of set of editions beingness arbitrary collection of titles. let's start this. imagine titles might different different editions, although aren't actual book. (larson's calculus ,

c# - Access windows service / WCF service from other machine on LAN -

c# - Access windows service / WCF service from other machine on LAN - please bear me beginner windows service / wcf service. after much research have not been able find satisfactory solution problem. allow me describe problem in brief: i want run 1 windows service / wcf service on machine on lan. want create service consumed applications running on machines on lan, provided next conditions must satisfied : 1) should not need host windows service / wcf service iis. 2) url of service should configurable in applications running on other machines on lan. should not have hard code url anywhere in applications (e.g. in app.config or so). service url should accepted application user. @ best, application should find machine on service running , should phone call service there. (as side note, applications running on other machines in-browser silverlight applications.) is tall order? if not, of windows service , wcf service suit requirements? please provide me resource if have.

.net - Assigning property of ViewModel to property of another ViewModel in C# WPF desktop app -

.net - Assigning property of ViewModel to property of another ViewModel in C# WPF desktop app - i'm developing c# wpf mvvm app. i'm new to mvvm , not using toolkits/libraries, actioncommand class implements icommand interface , baseinpc class implements inotifypropertychanged (my viewmodels derive class). my model has dataset class string inputpath property (the location of dataset file). in mainview , have menu on top view of it's own ( menuview ), implemented using usercontrol has it's datacontext set it's corresponding menuviewmodel . each menu item bound actioncommand basic io operations, such openfiledialogs loading files etc. menuviewmodel has selectedpath property holding location of file. my problem this: when select file using menuview (i.e. setting selectedpath property in menuviewmodel ), want set dataset.inputpath selectedpath . dataset class instantiated in mainviewmodel , not menuviewmodel , pretty much i'm stuck. is

For loops to take specific values only in MATLAB -

For loops to take specific values only in MATLAB - i have matlab programme uses 2 for loops iterate 5 times. however, want matlab utilize (1 1), (2 2), (3 3) , on. here program: syms l = [0 1 0 0 1 0;1 1 1 0 1 1;1 0 0 0 1 1;1 1 1 0 0 1;0 1 1 0 1 1]; n = [2 1;1 1;1 1;1 1;2 1]; l = 1:5 = 1:5 j = n(l,1); if a(i,j) == 0 a(i,j:end) = circshift(a(i,j:end),[n(l,2) n(l,2)]); j = n(l,1):n(l,1)+n(l,2) a(i,n(l,1)) = 1; end else a(i,j:end) = circshift(a(i,j:end),[n(l,2) n(l,2)]); j = n(l,1):n(l,1)+n(l,2) a(i,n(l,1)) = 0; end end break; end break; end i want matlab programme work this: first l = 1 , = 1; sec l = 2 , = 2; 3rd l = 3 , = 3; 4th l = 4 , = 4; and on... @rodyoldenhuis answered question, , i'm flattered hasn't made actual answer! simply take code , alter inner for loop index matches outer lo

c# - How do I call my Un-installer from start Window in Window 8 -

c# - How do I call my Un-installer from start Window in Window 8 - i have msi wpf app. able install it. after app in windows 8 start window. right click on app icon their. after right click, un-installer alternative come, when click on un-installer, goes command panel. can un-install app. want start un-installer without going command panel. possible? if yes, how can this? c# wpf

ios - BackgroundColor of UItableviewCell Notworking -

ios - BackgroundColor of UItableviewCell Notworking - i setting background color of uitableviewcell like cell.contentview.backgroundcolor = [uicolor colorwithred:8.0 green:210.0 blue:11.0 alpha:1.0]; its not working, however, if cell.contentview.backgroundcolor = [uicolor graycolor]; it works then. help uicolor has defined between 0 , 1 rgb value work (uicolor class reference): cell.contentview.backgroundcolor = [uicolor colorwithred:8.0f/255.0f green:210.0f/255.0f blue:11.0f/255.0f alpha:1.0f]; ios uitableview uibackgroundcolor

c# - Using Directives or Assembly Reference -

c# - Using Directives or Assembly Reference - i added buttons form, doubled clicked wrong 1 , took me code editor. i decided delete generated code resulted clicking wrong button. did rebuild , ended getting error: error 1 'xxxxx' not contain definition 'xxxxx' , no extension method 'subtraction_checked' accepting first argument of type 'xxxx' found (are missing using directive or assembly reference?) how resolve this? when double click on button , creates event handler in designer generated code as: this.button1.click += new system.eventhandler(this.button1_click); and in code editor see this: private void button1_click(object sender, eventargs e) { } now, if remove handler, error. resolve need remove event designer generated code i.e. this.button1.click += new system.eventhandler(this.button1_click); same goes checkboxes, textboxes , other controls well. c# winforms

Merge and minify javascript files by closure compiler in phpstorm -

Merge and minify javascript files by closure compiler in phpstorm - i using closure-compiler minify , merge javascript files in /js/app/* /js/minified.js i found file watchers in phpstorm settings , want automatically, not familiar ui there. can please help me, change, work excepted? thanks.! phpstorm ui closure-compiler you need specify total path closure compiler compiler.jar programme other options depend on preferences. default setup should work out of box, free modify arguments/output paths in way like javascript phpstorm google-closure-compiler

javascript - Knockout template and unique ID within complex web app causing problems -

javascript - Knockout template and unique ID within complex web app causing problems - knockout templating scheme great, in web app there several separated contexts ("views") loaded ajax, 1 issue appears: templates rely on id this means if chance have 1 template same name on view on view loaded , still existing in webapp context, knockout (because browser this) take first matching #templateid element. on our webapp, eliminated id of our elements, , when needs used, it's id javascript determined not have duplicates. some views can loaded multiple times in lifetime of app, no, can't "simply check if id used before making html code" our team members. the other thing check if specific template loaded, , if not load in async, apply bindings. simplicity purpose , way our project set right now, can't apply js amd-like dependency manager. questions is possible specify straight dom reference template directly? data-bind="temp

javascript - Js Active link not working in php when I am trying to use GET -

javascript - Js Active link not working in php when I am trying to use GET - i have used js active link,this working fine below line <a href="http://www.google.com" class="list-group-item menu cp_btns" target="blank" ><?php echo $row['title']; ?></a> but below line working loading time, after load page it's not working. <a href="index.php?u=<?php echo $row['title']; ?>" class="list-group-item menu cp_btns" ><?php echo $row['title']; ?></a> here url index.php?u=google i have used js code here <script> $(document).ready(function(){ $('a.cp_btns').click(function(){ $('a.cp_btns.active').removeclass("active"); $(this).addclass("active"); }); }); </script> have there solution prepare problem ? javascript php jquery

windows - Running proxy server through localhost -

windows - Running proxy server through localhost - i've been looking everywhere can't seem figure out how configure localhost , proxy ip. basically have localhost @ 127.0.0.1, , mapped myserver.local. want able run test application on localhost (myserver.local) when connected via proxy ip address in chrome. i'm running windows. thanks! help appreciated! windows proxy ip localhost configure

Windows visual c++ why is 'Start Debugging' disabled? -

Windows visual c++ why is 'Start Debugging' disabled? - i've set build configuration 'debug'. builds without error. output debug exe file there , in debug directory. debug->'start debugging' alternative greyed out can't select it. 'start without debugging' there , selectable. needed add together project 'set startup project' windows visual-c++ visual-studio-debugging

java - How to save byte data in Blob column of database -

java - How to save byte data in Blob column of database - i trying execute code in java in somewhere project class="lang-sql prettyprint-override"> insert registered_user (user_image,user_email,phone_no,pin) values ('"+blob+"','"+reqdata.getemail()+"' ,'"+reqdata.getphoneno()+"','"+reqdata.getpin()+"') i declared blob as byte[] b=(rqdata.getuserimage());// getter method , has length of 6439==>b.length blob blob=blob=new serialblob(b); reqdata.getuserimage (pojo class) byte[] userimage; public byte[] getuserimage() { homecoming userimage; } public void setuserimage(byte[] userimage) { this.userimage = userimage; } also, others getters , getting values but getting on console @ execution time statement class="lang-sql prettyprint-override"> insert registered_user (user_image,user_email,phone_no,pin) values ('javax.sql.rowset.serial.serialb

java - WSO2 ESB - Proxy service with ws security implemented -

java - WSO2 ESB - Proxy service with ws security implemented - i have question registering existing web service ws security implemented in wso2. this image represent have , need. i utilize client invoke original service , ok. create proxy service (pass through proxy) existing wsdl , when invoke service same client (i alter wsdl , end point in client) response is: <env:envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"> <env:header></env:header> <env:body> <env:fault xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"> <faultcode>wsse:invalidsecurity</faultcode> <faultstring>missing &lt;wsse:security&gt; in soap header</faultstring> <faultactor></faultactor> </env:fault> </env:body> </env:envelope> i need implement policy or create configuration scenari

gnu make - Makefile command modification -

gnu make - Makefile command modification - i modify makefile command: -rm -f $(objs) -rm -f $(objs:.o=.mod) the first removes filenames.o , sec removes filenames.mod. however, modify sec such get: mod_filenames.mod, i.e., add together string "mod_". i tried: -rm -f mod_$(objs:.o=.mod), affected first file in list. i'm jet guessing here. if suggest wide site such programming explained, grateful. gnu create manual. there gnu create unleased book , gnu create standard library. see 8.3 functions file names of manual, can utilize $(addprefix ...) (there other ways) get: -rm -f $(objs) -rm -f $(addprefix mod_,$(objs:.o=.mod)) it improve utilize $(rm) (it's rm -f ): -$(rm) $(objs) -$(rm) $(addprefix mod_,$(objs:.o=.mod)) makefile gnu-make

javascript - ng-click Angular JS issue -

javascript - ng-click Angular JS issue - new angular js, trying access click event using ng-click. html: <button ng-click="selectnav($event)">click</button> js: angular.module('app').controller('ctrl', function(){ $scope.selectnav = function($event){ console.log($event); } }); on click of button, not giving value of $event. can 1 allow me know going wrong. i've noticed didn't pass $scope controller. seek prepare maybe angular.module('app').controller('ctrl', function($scope){ $scope.selectnav = function($event){ console.log($event); } }); javascript jquery angularjs

python - Storing the unknown Id of an html tag -

python - Storing the unknown Id of an html tag - so trying scrape html using beautifulsoup, having problems finding tag id using python 3.4. know tag ("tr") is, id changing , save id when changes. example: <div class = "thisclass" <table id = "thistable"> <tbody> <tr id="what want"> <td class = "someinfo"> <tbody> <table> <div> i can find div tag , table , , know tr tag there, want extract text next id , without knowing text going say. so far have code: soup = beautifulsoup(url.read()) divtag = soup.find_all("table",id ="thistable") = 0 in divtag: trtag = soup.find("tr", id) print(trtag) = i+1 if help me solve problem appreciate it. you can utilize css selector : print([element.get('id') element in soup.select('table#thistable tr[id]'))

sql - Get Month columns from datetime column and count entries -

sql - Get Month columns from datetime column and count entries - i have next table: | id | name | datea | timetowork | timeworked | |:--:|:----:|:----------:|:----------:|:----------:| | 1 |frank | 2013-01-01 | 8 | 5 | | 2 |frank | 2013-01-02 | 8 | null | | 3 |frank | 2013-01-03 | 8 | 7 | | 4 |jules | 2013-01-01 | 4 | 9 | | 5 |jules | 2013-01-02 | 4 | null | | 6 |jules | 2013-01-03 | 4 | 3 | the table long, every person has entry every day in year. each person have date worked ( datea ), hours has work according contract ( timetowork ) , hours worked ( timeworked ). can see days person didnt work on day had to. when person took total day overtime. what seek accomplish next table out of first 1 above. | name | jan | feburary | march | ... | sum | |:----:|:----------:|:--------:|:-----:|:---:|:---:| |frank | 2 | 0 | 1 | ... | 12

ios - Loss quality image in UIView -

ios - Loss quality image in UIView - i've got problem images on app. in slide-out menu, i've got header set image "header.png" exist in 2 version "header.png" , "header@2x.png". here code how implement in app: - (uiview *)tableview:(uitableview *)tableview viewforheaderinsection:(nsinteger)section { uiimage *originalimage = [uiimage imagenamed:@"header.png"]; cgsize destinationsize = cgsizemake(320, 150); uigraphicsbeginimagecontext(destinationsize); [originalimage drawinrect:cgrectmake(0,0,destinationsize.width,destinationsize.height)]; uiimage *newimage = uigraphicsgetimagefromcurrentimagecontext(); uigraphicsendimagecontext(); uiimageview *headerview = [[uiimageview alloc] initwithimage:newimage]; headerview.frame = cgrectmake(0,0, 320,150); homecoming headerview; } when run app on phone (iphone 4s), image pixelate, border blowed , it's not clean... don't know comes from. my

c++ - Why does this snippet not work in VS 2013? -

c++ - Why does this snippet not work in VS 2013? - is there wrong code? #include <memory> class foo { }; class bar { std::unique_ptr<foo> foo_; }; int main() { bar bar; bar bar2 = std::move(bar); } i'm getting error: 1>c:\users\szx\documents\visual studio 2013\projects\consoleapplication1\consoleapplication1\main.cpp(13): error c2280: 'std::unique_ptr<foo,std::default_delete<_ty>>::unique_ptr(const std::unique_ptr<_ty,std::default_delete<_ty>> &)' : attempting reference deleted function 1> 1> [ 1> _ty=foo 1> ] 1> c:\program files (x86)\microsoft visual studio 12.0\vc\include\memory(1486) : see declaration of 'std::unique_ptr<foo,std::default_delete<_ty>>::unique_ptr' 1> 1> [ 1> _ty=foo 1> ] 1> diagnostic occurred in compiler generated function 'bar::bar(

javascript - Include library with require.js -

javascript - Include library with require.js - i've added external library spin.js project,built require.js , backbone . i've added path in main.js : require.config({ paths: { jquery: 'libs/jquery/jquery-min', underscore: 'libs/underscore/underscore-min', backbone: 'libs/backbone/backbone', templates: '../templates', handlebars: 'libs/handlebars/handlebars', codebird:'libs/codebird-js-develop/codebird', oauth:'libs/oauth', **spin:'libs/spin'** } }); require([ 'app', ], function(app){ app.initialize(); }); and called library in view,but console tells me spinner (function in library) not defined: define(["spin"], function (spin) {} after defining paths seek add together shim config like:- shim: { spin: { deps: ['jquery'], exports: 'spin' } } i don't know whether spin.js requires jquery or not, it's example, spin.js requires other lib

java - Eclipse SWT GUI - StyledText control - Equal width for each character -

java - Eclipse SWT GUI - StyledText control - Equal width for each character - i need create swt styledtext command shows human readable characters equal spacing each character see in "notepad". but when create text styledtext outputtext = new styledtext(scrolledcomposite_2, swt.multi | swt.border | swt.h_scroll | swt.v_scroll); scrolledcomposite_2.setcontent(outputtext); scrolledcomposite_2.setminsize(outputtext.computesize(swt.default, swt.default)); outputtext.settext(data.tostring()); outputtext.setstylerange(new stylerange(0, data.tostring().length(), cmfutils.green, cmfutils.white)); when styledtext displayed in displays data, width of each character different. example, width of 'i' or ' ' (space) smaller other characters 's', causes me problems while pointing errored character using '^' in next line. example: output>>>> blah-blah-blah-sdlfk-blah ................^ as can see, error in a

Google pie chart (any chart) not working inside an ASP.Net AJAX Update Panel -

Google pie chart (any chart) not working inside an ASP.Net AJAX Update Panel - i facing problem google pie chart , update panel. 1 tab container within update panel has 2 tab panels. each tab panel contains div , script plot google pie chart. when first time page gets load works properly. if alter tab pie chart doesn't work. have used "sys.application.add_load(methodname) within each tab panel. have used script in google play. in advance. the phone call google.load loads visualization api , fires callback first time called only. subsequent calls google.load same bundle nothing. if charts draw in callback google loader in sec tab, callback not fire, need utilize callback update process instead. asp.net-ajax google-visualization pygooglechart

Scroll jquery function -

Scroll jquery function - i want scroll smoothly when click navbar, have href of #blahblah go. my current code, won't work, follows: $(".menu").click(function() { var href = $(this).attr('href'); $('html, body').animate({ scrolltop: $(href).offset().top }, 2000); }); i think want this, you're selecting id: scrolltop: $('#' + href).offset().top jquery

java remove lines from file based on line number -

java remove lines from file based on line number - is there java library remove lines based on line number? my aim remove lines based on line numbers. example pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit down amet, ante. donec european union libero sit down amet quam egestas semper. aenean ultricies mi vitae est. mauris placerat eleifend leo. quisque sit down amet est et sapien ullamcorper pharetra. vestibulum erat wisi, condimentum sed, commodo vitae, ornare sit down amet, wisi. aenean fermentum, elit eget tincidunt condimentum, eros ipsum rutrum orci, sagittis tempus lacus enim ac dui. donec non enim in turpis pulvinar facilisis. ut felis. praesent dapibus, neque id cursus faucibus, tortor neque egestas augue, european union vulputate magna eros european union erat. aliquam erat volutpat. nam dui mi, tincidunt quis, accumsa

java - Jaspersoft Studio complains class cast exception when using JRBeanCollectionDataSource -

java - Jaspersoft Studio complains class cast exception when using JRBeanCollectionDataSource - i have weird problem jaspersoft studio , custom jrbeancollectiondatasource. every time seek access kid object of parent object, exception this: net.sf.jasperreports.engine.jrexception: net.sf.jasperreports.engine.fill.jrexpressionevalexception: error evaluating look : source text : $f{test}.getfirst() + " " + $f{test}.getsecond() @ com.jaspersoft.studio.editor.preview.view.control.reportcontroler.fillreport(reportcontroler.java:466) @ com.jaspersoft.studio.editor.preview.view.control.reportcontroler.access$18(reportcontroler.java:441) @ com.jaspersoft.studio.editor.preview.view.control.reportcontroler$4.run(reportcontroler.java:333) @ org.eclipse.core.internal.jobs.worker.run(worker.java:54) caused by: net.sf.jasperreports.engine.fill.jrexpressionevalexception: error evaluating look : source text : $f{test}.getfirst() + " " + $f{tes

javascript - Knockout with HTML table issue -

javascript - Knockout with HTML table issue - basically, have page displays multiple tables, populated knockout. rows show in grid unless populated info (special status rows). have ko subscribed observable observes whether or not there info in row. within subscription function says: self.requestsubscription = self.hasrequest.subscribe(function (newvalue) { if (newvalue) { $("[rowid = '6']").show(); // 6 hardcoded } else { $("[rowid = '6']").hide(); } }); problem is, function goes through every grid on page (cause forgot that's how jquery works) , hides row in every grid. how can cut down hiding grow in current grid? problem can't hardcode id's grids because don't know how many grids show on page load. ideas? thanks! here html minus unnecessary content. markup grid itself. problem is, when hide tr id "6" jquery above, every 1 of these grids on pag

java - Save multiple strings into one string -

java - Save multiple strings into one string - i want save multiple strings in one. thing is, don't know how many strings may be. i'm creating programme reads calories text file , stores them in corresponding arrays. here parts of text: description of nutrient fat nutrient energy carbohydrate protein cholesterol weight saturated fat (grams) (calories) (grams) (grams) (milligrams) (grams) (grams) apples, raw, peeled, sliced 1 cup 0 65 16 0 0 110 0.1 apples, raw, unpeeled,2 per lb1 apple 1 125 32 0 0 212 0.1 apples, raw, unpeeled,3 per lb1 apple 0 80 21 0 0 138 0.1 apricot nectar, no added vit c1 cup 0 140 36 1 0 251 0 now nutrient name, have array foodname. read whole string un

ios - Observe location services updates -

ios - Observe location services updates - how can observe , phone call method when location services options change? example, app runs location services in background, i.e. alternative in settings set always. if user changes alternative while app still running, how can observe changes , create changes in app accordingly? implement cllocationmanagerdelegate method - (void)locationmanager:(cllocationmanager *)manager didchangeauthorizationstatus:(clauthorizationstatus)status from docs: "this method called whenever application’s ability utilize location services changes. changes can occur because user allowed or denied utilize of location services application or scheme whole." ios ios7 ios8 location-services

Google Drive Viewer URLs now give Google Drive Error -

Google Drive Viewer URLs now give Google Drive Error - starting today i'm getting "google drive has encountered error" when users follow urls nowadays preview documents stored on google drive. files typically excel , word. same links have worked months , months. if seek going google drive web app select relevant docs , right click, "open > google drive viewer" same error page. has changed/broken? edit: issue has been fixed. this bug google drive viewer affecting files uploaded through drive api. engineering science team has been alerted problem. google-drive-sdk

javascript - Google pie chart shows opposite colors -

javascript - Google pie chart shows opposite colors - i have pie chart looks in javascript: function drawcurrentpiechart(title,days) { var name = document.getelementbyid("dropdownsubcategories").value; $ .ajax({ url : "piechartlist/", type : "get", aync : true, datatype : "json", info : {days:days, categoryname : name + ""}, error : function(e) { alert(e.message + "error "); }, success : function(response) { var jsondata = response; if (response == "") { alert("error: threshold not valid or there no status in database within 24 hours."); } else { var info = [["count","color"]], colors = []; for(var c in jsondata){ data[data.length] = [jsondata[c]["color"],jsondata[

python - Many-To-Many Relationship in ndb -

python - Many-To-Many Relationship in ndb - trying model many-to-many relationship ndb. can point illustration of how this? at here illustration of have @ moment: class person(ndb.model): guilds = ndb.keyproperty(kind="guild", repeated=true) class guild(ndb.model) members = ndb.keyproperty(kind="person", repeated=true) def add_person(self, person): self.members.append(person.key) self.put() person.guilds.append(self.key) person.put() is right way go it? have had around can't seem find documentation on subject. in datastore viewer, can see relationship beingness stored list of keys, expect. however, when seek utilize them in person class methods this: for guild in self.guilds: i get: typeerror: 'keyproperty' object not iterable no. not right way go it. you can model many-to-many relationship 1 repeated property: class person(ndb.model): guilds = ndb.keyp