Posts

time series - R-Weekly Forecast -

when use ts <- ts(df, frequency=52, start=c(2007,1)) , print it, got results shown below, instead of 2007.01, 2007.02, 2007.52 ...., got 2007.000, 2007.019, ....which gets 1/52=0.019 mathematically correct not easy interpret, there way label date data frame or @ least 2007 wk1, 2007 wk2 ... time series: start = c(2007, 1) end = c(2014, 11) frequency = 52 week, amount 2007.000, 645575.4 2007.019, 2185193.2 2007.038, 1016711.8 2007.058, 1894056.4 2007.077, 2317517.6 2007.096, 2522955.8 2007.115, 2266107.3 fit <- auto.arima(dmsales[[2]]) fcast<-forecast(fit,h=input$ahead) dfcast<-data.frame(fcast) b<-data.frame(seq(as.date(dmsales[[3]]+7), = "week", length.out = input$ahead)) ffcast<-as.data.frame(cbind(b,dfcast$point.forecast,dfcast$lo.95,dfcast$hi.95)) names(ffcast)<-c("week","forecast","lo-95","hi-95")

angularjs - How to update the $scope variable values with the new Values I'm getting from the Database? -

i have been setting response values every time hit web-service $scope variable on click of button $scope variable not getting updated new values have click button twice $scope variables updated. have checked, each time hit button web-service getting called. controller.js $scope.getdetails = function() { services.getsomedetails($scope.id).then(function(response) { $scope.details= response.data; } } view.html <a ng-click="getdetails();">click me!</a> use $scope.$apply() after scope variable. services.getsomedetails($scope.id).then(function(response) { $scope.details= response.data; $scope.$apply(); }

reactjs - Hiding and showing text in React -

hey guys stupid, i'm having troubles wrapping ly head around. i'm trying show/hide text inside 1 of components, i'm not able it. i clicked! message know function being passed down. missing? need declare visibility css declaration, maybe that's i'm missing. i'm getting cornfused. :/ thanks in advance: snippetlist.jsx import react, { component, proptypes } 'react' import { createcontainer } 'meteor/react-meteor-data'; import snippet './snippet' import { snippets } '../../../api/collections/snippets.js' class snippetlist extends react.component { constructor(props) { super(props); this.state = { visible: false } this.togglevisible = this.togglevisible.bind(this); } togglevisible() { this.setstate( { visible: !this.state.visible } ) console.log('i clicked'); } rendersnippets() { return this.props.snippets.map( (snippet) => ( ...

javascript - Get Alt="" value from the selected radio button with jQuery -

i have following radio buttons within php loop: <form> <table class="table table-bordered optionschk"> <tr> <td colspan="2"> select bench case </td> </tr> <?php foreach($db->getrecordset($sql) $bench){ ;?> <tr> <td class="w5"> <input type="radio" alt="<?php echo($bench['lbl']); ?>" value="<?php echo($bench['sno']); ?>" name="b_sno" id="b_<?php echo($bench['sno']); ?>"> </td> <td class="w95"> <label for="b_<?php echo($bench['sno']); ?>"><?php echo($bench['lbl']); ?></label> </td> </tr> <?php } ?> i displaying values of above following function: function donebenchselection() { try { var benchsno = $("input[type=radio][name=b_sno]:...

jquery - How to populate textbox from bootstrap modal after ajax response appended to bootstrap modal -

whenever click on go button data fetch data database loads table inside bootstrap modal using ajax after loading data how populate textbox selecting data in bootstrap modal <div class="modal fade" id="mymodal1" role="dialog"> <div class="modal-dialog"> modal content <div class="modal-content"> <div class="modal-header"></div> <div class="modal-body"> <table id="records_table"> <tbody id="values"> <tr> ...

javascript - Redux redux-think Load Async data before React component is mounted -

i new redux , reactjs, , having issues load data before react component mounted. i have userpage container linked redux store container/user-page.js class userpage extends page { componentwillmount() { this.props.userlist(); } title() { return 'user management'; } breadcrumb() { return [ { title: 'home', icon: 'fa-users' }, { title: this.title(), active: true } ]; } /** * content loaded page */ content() { console.log(this.props); if(this.props.fetched) { console.log('fetching now...'); console.log(this.props.payload); } return ( <div classname="row"> {/* left column */} <div classname="col-md-6"> {/* general ...

c# - Get real timestamp of frame captured using OpenCV -

i'm using emgucv wrapper opencv capture live video ip camera. i'm trying frame timestamp using function capture _capture = new capture(url); _capture.imagegrabbed += capture_imagegrabbed; private void _capture_imagegrabbed(object sender, eventargs e) { mat frame; _capture.retrieve(frame); double ts = getcaptureproperty(capprop.posmsec); } the function work, return position of frame beggining of capturing , not device clock timestamp. in manual of emgucv , opencv says: getcaptureproperty(cv_cap_prop_pos_msec) returning film current position in milliseconds or video capture timestamp is there way choose if return film position or timestamp? thanks