Posts

CakePHP: finding data after save -

CakePHP: finding data after save - i'm working on edit method. after saving data, email sent out changes made during edit. works except 1 infuriating crucial bug. here distilled downwards simply: $data = $this->supportticket->readforview($st_id); $this->supportticket->id = $st_id; if ($this->supportticket->save($this->request->data)) { //call custom model method pull view info $data = $this->supportticket->readforview($st_id); //do info } the issue $data comes out pre-save data. seek new info doesn't work. can't utilize $this->request->data because doesn't have total info want in it. the save work. if refresh view method same record, shows updated. it's saving, when find after saving giving me old data. any ideas? update: doesn't happen findbyid($st_id) must custom method. code: public function readforview($id) { $data = $this->find('first', array( 'cond...

javascript - dc.js Number Display Widget -

javascript - dc.js Number Display Widget - i'm new dc.js... , have little clue what's going on number display widget. tried looking @ illustration , copied sections of verbatim code hoping work (but knowing wouldn't). goal display average of line graph (sat scores) (that alter based on crossfilter). suggestions?... var ndx = crossfilter(csv); var = ndx.groupall(); var bysat = ndx.dimension(function(d) { homecoming d.compositesat; }); var boxnd = dc.numberdisplay("#number-box"); var satavgnum = bysat.group().reduce( function (p, v) { ++p.n; p.tot += v.compositesat; homecoming p; }, function (p, v) { --p.n; p.tot -= v.compositesat; homecoming p; }, function () { homecoming {n:0,tot:0}; } ); var average = function(d) { homecoming d.n ? d.tot / d.n: 0; }; boxnd .formatnumber(d3.format(".3s")) ...

C++ pointer to class method -

C++ pointer to class method - i want this: struct cli_command{ cli_command(char* s, void (*h)(void)){ command_string = s; handler = h; } char* command_string; void (*handler)(void); }; class cli { public: cli(); private: cli_command cli_table[no_cli_commands] = { cli_command("command1", handler1), cli_command("command2", handler2) }; void handler1(){}; void handler2(){}; }; i know need similar cli::*handler, can't syntax right. maintain running errors this: "error: no matching function phone call 'cli_command::cli_command(const char [4], <unresolved overloaded function type>)" this illustrates right syntax: class cli; struct cli_command { cli_command(char* s, void (cli::*h)(void)) { command_string = s; handler = h; } char* command_string; void (cli::*handler)...

excel vba - Class of a Class -

excel vba - Class of a Class - i'm getting killed trying create class of class. have shopped around site , seen several examples maybe because 1:43 having hard time understanding them. i able utilize class automate huge info entry project @ work. created class called catdist category distribution of types of agricultural products company manufacture or sell. catdist contains 6 properties: private selfworth string private q1 double private q2 double private q3 double private q4 double private activated boolean they have standard , allow codes. there 48 possible categories. have module creates 48 instances of them 48 different values selfworth (e.g "cottonseed", or "maize" etc), , sets q1 through q4 0 . module worked userform type in values , nail enter. if saw had entered value within particular textbox (yes there 48x4 textboxes) set activated true , changes relevant q's values entered. what want now. it great success. wa...

traversal - Java - finding a parent of a node in a Binary Tree? (converted from a general tree) -

traversal - Java - finding a parent of a node in a Binary Tree? (converted from a general tree) - i have binary tree converted general tree. meaning, left node of given node node's child, , right node of given node node's sibling. my question - how can write method take node , find parent? (by traversing entire tree guess) thanks! this help you private static binarynode getparent(anytype x, binarynode<anytype> t, binarynode<anytype> parent) { if (t == null) { homecoming null; } else { if (x.compareto(t.element) < 0) { homecoming getparent(x, t.left, t); } else if (x.compareto(t.element) > 0) { homecoming getparent(x, t.right, t); } else { homecoming parent; } } } java traversal

68000 - TRAP 14 on 68000 and TRAP 15 on EASy68K -

68000 - TRAP 14 on 68000 and TRAP 15 on EASy68K - are these same? trap 15 on easy68k same trap 14 on 68000 board. ive tried looking reply , under notion right create sure. could somone please confirm this? what mean "the same"? the instruction trap , takes 4-bit immediate vector index controls handler invoked. so of course of study 2 instructions trap #14 , trap #15 not same. the handlers can of course of study same, causing 2 instructions have same result, that's impossible reply since don't specify software. 68000 easy68k

jquery - How to do a custom transition using Javascript -

jquery - How to do a custom transition using Javascript - so developing site scratch (first time ever) , i've made general layout psd made , great, @ point want refine site bit javascript effects-functions. when @ index page, have banner, sidebar , content (articles). when press articles goes article (obviously) want create custom loading page @ 0:22: https://www.youtube.com/watch?v=k1q6y_snurw#t=20 i've got create or find gif i've done that, how add together site? the articles in class although guess have utilize id each specific article go respective article. edit: pop in file , add together reference in every page has link: class="lang-js prettyprint-override"> function loadxmldoc(name) { var xmlhttp = new xmlhttprequest(); xmlhttp.addeventlistener("load", transfercomplete, false); xmlhttp.open("get", name, true); document.getelementbyid("loading").style.display = "block"; xmlhttp.s...