Posts

java - How to store sql DEFAULT timestamp in a preferred format? -

actually searched , found related topics none satisfies need; why i'm asking question. hope can help: i'm writing mysql tables in java; 1 column timestamp , want store timestamp in way want, this: 09 may 2016 14:20:13 utc ,exactly this. actually can part in mysql command: select date_format( from_unixtime( unix_timestamp() ),'%d %m %y %h:%i:%s' ); but don't know how put in java , store timestamp column. could help? thanks in advance, paay

git - Mapping between software version and commit hashes? -

i looking way map deployed software corresponding commit. user clicks on -> info , dialog contains hash number. is there way this? to honest, don't think so. how setting link between commits , deployed software? this simple do. during deploy or build step, need way of querying git on command line , extracting latest commit hash. same process need store hash in file application code programmed read. luck!

java - Spring autowire object with value -

suppose have class named someclass takes value in constructor , populates field. string text; string sometext; public someclass(string text, string sometext){ this.text = text; this.sometext = sometext; } someclass has method creates new object. in java when create new object can instantiate values like classname variable = new classname(text, sometext); and populate fields in classname using constructor public classname(string text, string sometext){ this.text = text; this.sometext = sometext; } but in spring using autowired how can that? @autowired public classname(someclass someclass){ this.text = someclass.text; this.sometext = someclass.sometext; } this wont work. how spring know instance of someclass update: i wrong. not thinking in di way. instead of autowiring someclass . had autowire classname . without di created new object in method of class classname when using di had autowire in method of class classname @autowired classname classname; ...

javascript - Default Select all checkboxes in angularjs -

i creating app in angularjs. have problem while showing checkbox selected when page open. here code: <div class="check_box"> <input type="checkbox" id="checkbox1" name="checkbox" ng-model="selectedallstatus" ng-click="checkalltypes()"> <label for="checkbox1"><span for="checkbox1">all</span></label> </div> </li> <li ng-repeat="customersflowslist in customersflows | unique:'type'" ng-init="checkalltypes()"> <div class="check_box"> <input type="checkbox" id="checkbox1" name="checkbox" ng-model="filter[customersflowslist.type]"> <label for="checkbox1"><span for="checkbox1">{{customersflowslist.type | customertype}}</span></label> </div> </li> here js code: $scope.checkallstatus = function() { ...

pycharm - qfrm module - No module named 'qfrm.Options' (Python 3.5.1) -

i quite newbie in python , trying make qfrm 0.2.0.27 library work. unfortunately there no documentation library. installed using pip , when try import following error: no module named 'qfrm.options' does have solutions this? using python 3.5.1. , pycharm i ran problem. current version in pypi index qfrm-0.2.0.27. the version on website appears qfrm-0.2.0.23. although older, worked without error me. if download ...23 whl file , install 1 (pip install [file_name].whl) may find works better.

formset - How to display Model attribute as a fixed display string in Django InlineFormSet? -

edit: part of question has been answered here remaining part i have django inlineformset allows users edit multiple score objects corresponding report. each score tied indicator (indicates area of performance being scored). this form looks right now. how can extract text of initial indicator choice in indicator dropdown choicefields , display them instead fixed, un-editable text labels score choicefields? my models , views below. models.py class country(models.model): name = models.charfield(max_length=50) # indicators class indicator(models.model): target = models.foreignkey(target) number = models.charfield(max_length=5) # order integer indicating how areas should sequentially ordered # smallest integer should listed first order = models.integerfield(default=0) name = models.charfield(max_length=200) def __str__(self): if self.name: return self.value # reports class report(models.model): author = models.foreignkey(...

javascript - Ember how do I know when a route template is finished loading and fire a callback? -

currently working on chat app ember, going fantastic ember nice work with. i have chat window, many lines of people chatting. i scroll chat window down on initial page load, here's example: <div class="chat-window"> {{ chat-message username="john doe" message="blah" dispic="unknownuser.jpg" }} </div> so how might bind event entire template being loaded (in case index.hbs i know can components through like: import ember 'ember'; export default ember.component.extend({ didinsertelement() { this.$('.button-collapse').sidenav(); } }); which works fine, equivalent doing template. as far know there index.hbs , index.js route file. any information great thanks. send action component route. route retrieve data server , after data retrieved route update data. route can handle loading state. ( from guide ) the code that: import ember 'ember'; export default ember.r...