Posts

jquery - Javascript is not rendering in my SPA -

i have following written in home.js file: define(['services/logger'], function (logger) { var vm = { activate: activate, title: 'home view' }; return vm; //#region internal methods function activate() { logger.log('home view activated', null, 'home', true); return true; } //#endregion var editor, html = ''; function createeditor() { if (editor) return; // create new editor inside <div id="editor">, setting value html var config = {}; editor = ckeditor.appendto('editor', config, html); } function removeeditor() { if (!editor) return; // retrieve editor contents. in ajax application, data // sent server or used in other way. document.getelementbyid('editorcontents').innerhtml = html = editor.getdata(); document.getelementbyid('contents').style.display = ''; // destroy editor. editor.destroy(); edi...

excel vba - Concatenate multiple ranges using vba -

i hoping can me problem. basically, have number of ranges need concatenate independently , put values of concatenated ranges different cells. example want to: concatenate values in range a1:a10 , put result in f1 want concatenate range b1:b10 , put result in f2 want concatenate range c1:c10 , put result in f3 etc i have tried use following macro. stuck; macro seems doing concatenating range a1:a10 , putting results f1 (which want). stores information first concatenation memory when next concatenation, in cell f2 concatenated results of f1 , f2 joined. i have tried searching lots of forums, since code made myself can't find solution, sure common problem , doing wrong possibly not setting variable correctly. thanks in advance help, sub concatenate() dim x string dim y string m = 2 5 y = worksheets("variables").cells(m, 5).value 'above has range information e.g. a1:a10 in sheet variables each cell in range("" & y & "...

c - EXPORT_SYMBOL in header causes "exported twice" errors -

i have header file declaration of several global variables in following format: constants.h #ifndef constants_h #define constants_h extern unsigned var; export_symbol(var); #endif constants.c #include "constants.h" unsigned var = 10; foo.c #include "constants.h" when try compile kernel module, following error each respective exported symbol: warning: /home/vilhelm/proj/constants: 'var' exported twice. previous export in /home/vilhelm/proj/foo.ko i suspect symbols being exported every time include constants.h header file, don't understand why. shouldn't include guard in constants.h prevent export_symbol(var) being read multiple times? shouldn't include guard in constants.h prevent export_symbol(var) being read multiple times? the include guard prevents header being included more once in same source file. can't prevent being included via multiple source files. remember objects sources linked single ...

html - How can I get height: 100% to account for existing pixel-heighted elements within the same div? -

i have container defined height containing 2 divs, first has pixel-defined height , second fill remaining space of container, i.e. 100% minus first div's pixel-defined height. is there solution problem doesn't involve javascript? can use javascript solution (and in fact javascript changing container's height brought me here), seems should have lower-level support, , looks might become quite cascading problem. example http://jsfiddle.net/h3gsz/1/ html <div id="container"> <div id="top_content"></div> <div id="remaining_content"></div> </div> css #container { width: 400px; height: 400px; border: 5px solid black; } #top_content { background-color: blue; width: 100%; height: 50px; } #remaining_content { background-color: red; width: 100%; height: 100%; } edit an answer provided original fiddle, in simplifying question allowed answer introduce new p...

c - How to properly set up serial communication on Linux -

i'm attempting read , write data , fpga board. board came driver create terminal device called ttyusb0 whenever board plugged in. on fpga, asynchronous receiver , transmitter implemented, , seem work. however, there seems issue on c side of things. i've been using test vectors test if fpga outputting proper information. i've noticed few things things: the device not open correctly the terminal attributes fail retrieved or set. the read non-blocking , doesn't retrieve proper value. below how set terminal , file descriptor options. of taken here: http://slackware.osuosl.org/slackware-3.3/docs/mini/serial-port-programming any advice or comments why program may failing helpful. #include <stdio.h> // standard input/output definitions #include <string.h> // string function definitions #include <unistd.h> // unix standard function definitions #include <fcntl.h> // file control definitions #include <errno.h> // error numbe...

forms - how to save to a local server and email a php webform as a pdf -

i work company uses large amount of web forms on our intranet (based on apache server) i need way able generate pdf these web forms, save file on our server, , send copy specified email addresses. php forms put html email template , sent when submit button pressed. the saved forms need have individual file name (eg storename.date.formname.submittedby.pfd) can keep record of important ones. im still noob programming, might need simple answers. thanks! your question not 100% clear. email forms html. assume mean data user has entered. have wkhtmltopdf great , easy user html pdf converter. maybe helps getting started.

verilog - Trouble with VGA Controller on CPLD -

Image
what attempting create vga controller lattice machxo cpld in verilog. the problem i attempting display color red resolution of 640x480 @ 60hz using 25.175 mhz clock internal cpld; however, when plug cpld monitor "out of range" message; no monitor try can understand resolution like. what i've tried i have simulated code in modelsim (pictures included), , appears save 1 issue. when count amount of time steps have occurred during v-sync display zone (when h-sync drawing) , divided frequency of h-sync, 479 pulses -- 1 short of 480 lines should drawing. don't understand coming i've check timings many times, , suspect may symptom of problem, i'm not sure. the numbers i'm using generate numbers timings tiny vga: tinyvga.com/vga-timing/640x480@60hz below code, , pictures of timings modelsim, thanks. module top(reset, h_sync, v_sync, red); input wire reset; output wire h_sync; output wire v_sync; output wire red; wire rgb_e...