Posts

amazon web services - How to set EC2 tags on AWS Opsworks -

i've been using various community cookbooks set stack. i'm aware aws opsworks sets tags (stack name, layar name), need set tags myself. there doesn't appear way set them through opsworks api, i'll assume need use cookbook/recipe set them somehow. is there existing method/cookbook so, or need go , learn chef? the lwrp listed on : https://github.com/opscode-cookbooks/aws - works. add in recipe tags required specific instances. lwrp : aws_resource_tag

sql - Invalid Identifier with Joins -

i don't tend ask questions regarding errors 1 happening me on every report doing. there fundamentally wrong approach , need solution , explanation if possible. need convert multiple reports , on getting error in 1 way or another. here code. i getting invalid identifier on: inner join unit_instance_occurrences uio on uio.offering_organisation = ou.organisation_code what don't understand ou identifier has been defined. here full code: select pu.calocc_code, ou.fes_full_name, pu.uio_id, uio.fes_uins_instance_code ||' '||uio.long_description crse_desc, ebs_tutorgroupslist_sel(pu.id,pu.uio_id) grp, pu.person_code, p.forename, p.surname, upper(p.surname) ||', '||p.forename||' ('||pu.person_code||')' student, pu.progress_code, pu.progress_status, pu.progress_date, marks.absent, marks.late, marks.not_expected, marks.present, marks.notified_absence, marks.blanks, sum( marks.absent+ marks.late+ marks.no...

knockout.js - Knockout js Binding to drop down list -

i learning knockout js yesterday only. seeming new me. somehow managed it. let saving country list, state list database using knock out js. have done first task saving country list. problem started in second page saving state list. here binding countries drop down list in state.aspx page, after dont understand how proceed. let me give code: <div id="state_container"> <table border="0" cellpadding="0" cellspacing="0" class="form" data-bind="with:statemodel" width="300px"> <tr> <td> <span>statename&nbsp; </span> &nbsp;<input type="text" name="statename" data-bind="value:statename" /> </td> </tr> <tr> <td> <span>short name</span> <input type="text...

c++ - init a thread which is a member variable inside of an constructor -

i trying write resourcecach should have thread loads , unloads objects of different types. started idea of having thread member variable , list wich std::string s represent path files load / unload. there method called work() should executed thread. enaugh talk. the question is: how init thread inside of constructor? .h class resourcecach { public: resourcecach(); ~resourcecach(); void init(); bool stopthread(); void load(std::string path); void unload(std::string path); private: thread m_worker; // ptr? reference? right? vector<std::string> m_toload; vector<std::string> m_tounload; void work(); }; and cpp should (this not work) resourcecach::resourcecach() { init(); } resourcecach::~resourcecach() { } void resourcecach::init() { m_worker(resourcecach::work, "resourcecach-thread"); } void resourcecach::work(){ } bool resourcecach::stopthread(){ if (m_worker.joinable()) { m_worker.jo...

android - How to stop an activity from starting while checking if a user is logged in? -

i trying achieve following when user starts app: 1- if user not logged in show login screen. 2- if user created account , there valid token show start screen. to end have implemented custom authenticator based on tutorial found here http://www.udinic.com/ . the code works, issue shows current activity ui briefly switches add account ui provided accountauthenticator. how can fixed this? this code: @override public void onstart(){ super.onstart(); gettokenforaccountcreateifneeded(accountgeneral.account_type, accountgeneral.authtoken_type_full_access); } @override protected void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); setcontentview(r.layout.main); maccountmanager = accountmanager.get(this); } /** * auth token account. * if not exist - add , return auth token. * if 1 exist - return auth token. * if more 1 exists - show picker , return select account's auth token. * @param accounttype * @param authto...

c# - How to put a MessageBox to display my Fibonacci sequence vertically -

here's finished code, need little advice , how insert desired messagebox. needs display finished sequence vertically, thanks. using system; using system.collections.generic; using system.linq; using system.text; using system.windows.forms; class program { public static double fibonacci(double n) { double = 0; double b = 1; (double = 0; < n; i++) { double sum = a; = b; b = sum + b; } return a; } static void main() { (double = 0; < 12; i++) { console.writeline(fibonacci(i)); } } } if want show messagebox, try: static void main() { list<double> nums = new list<double>(); (double = 0; < 12; i++) { nums.add(fibonacci(i)); } messagebox.show(string.join(system.environment.newline, nums)); } a console application can display messagebox if you've included right libraries, , looks include system.windows.forms , should set. although honestly...

Highcharts: Not plotting correctly with Y-Axis label formatter -

when use y-axis label formatter, points don't plot correctly. point "6.8" plotting above 6.8 line. also, y-axis ticks not equal intervals (7.8, 7.5, 7.3, 7.0, 6.8, 6.5). removing label formatter clears issue. know work-around can keep label formatter? with label formatter: http://jsfiddle.net/3tkdt/1/ without label formatter: http://jsfiddle.net/3tkdt/2/ label formatter: yaxis: { labels: { formatter: function () { return highcharts.numberformat(this.value, 1); } } } using numberformat function on y-axis labels wasn't idea. rounding tick marks , representing intervals incorrectly. removed label formatter.