Posts

Showing posts from June, 2014

c# - How to extract from exe file the same .ico file as the one used to create this exe? -

i'm trying make kind of sfx: make program generating wrapping.exe around wrapped.exe. wrapping.exe embed wrapped.exe resource and, when executed, wrapped.exe saved temporary folder, executed specific command line arguments , deleted. wrapped.exe not .net program , don't have source code it. wrapping.exe should done in .net 3.5 usable on windows 7 sp1 , upper without prior .net installation. wrapping.exe generated c# program using roselyn in .net 4.6. i need wrapping.exe visualized wrapped.exe explorer. i've made successful test hardcoded .ico file. code (simplified): var compilation = csharpcompilation.create(...); var resourcedescription = new resourcedescription( resourcename: "sfx.resourcename", dataprovider: () => file.openread("wrapped.exe"), ispublic: false); using (var iconstream = file.openread(@"wrapped.ico")) usi

excel - POI-XSSF: user defined data formats -

i reading excel , seems have user defined data formats . example has data format : "yyyy"e , displays date in yyyy format followed letter e. now, format not part of built in ,available formats. so, seems when try set dataformat of cellstyle , doesn't work. first read workbook , create dataformat workbook. xssfworkbook wb = new xssfworkbook(exceltoread); xssfdataformat df = wb.createdataformat(); the df object has user defined data formats (checked printing till 200). now, try create new cell in same workbook, new style this: xssfcell celltemp = row.createcell(0); xssfcellstyle styletemp = wb.createcellstyle(); styletemp.setdataformat(df.getformat(cell.getcellstyle().getdataformatstring())); celltemp.setcellstyle(styletemp); celltemp.setcellvalue(cell.getstringcellvalue()); system.out.print(formatter.formatcellvalue(celltemp)+" "); but, formatter not give me correct string value, instead gives me underlying integer value of date (which gue

php - Everything is ok but it says Severity: Notice Message: Undefined variable: categories -

//controller: private function getall() { $data['categories'] = $this->registrant_model->getalldepartment(); $this->load->view('systemadminuser/registrant', $data); } //model: public function getalldepartment() { $this->db->select('*')->from('patient_db'); $query = $this->db->get(); return $query->result_array(); } //view: <?php foreach($categories $c):?> <tr> <td><?php echo $c['id'];?></td> <td><?php echo $c['phone'];?></td> <td><?php echo $c['name'];?></td> </tr> <?php endforeach;?> this code. every time says undefined variable , invalid argument supplied foreach. please you need pass $data array view controller $data['categories'] = $this->registrant_model->getalldepartment(); $this->load->view('systemadminuser/registrant&

@NotNull and @Nullable, contradicting java annotations -

it happened me accidentally did this: @javax.annotation.nullable @javax.validation.constraints.notnull the compiler didn't complain , seemed work well. now wondering internally happening when 2 or more annotations contradict each other. furthermore, order matter? is this @nullable @notnull the same this? @notnull @nullable how working annotations in general? wins? edit: looking general answer, not these 2 annotations annotations don't bring logic code. each annotation should processed proper annotation processor. annotation processor guy makes annotation meaningful. check official tutorial : annotations, form of metadata, provide data program not part of program itself. annotations have no direct effect on operation of code annotate. annotations have number of uses, among them: information compiler — annotations can used compiler detect errors or suppress warnings. compile-time , deployment-time processing — software too

WPF StackPanel Size -

i have following wpf window. why stackpanel not taking size of groupbox ? how can force auto take size of groupbox ? thank you xaml <window xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:local="clr-namespace:styletrigger" xmlns:local2="clr-namespace:comboboxdata" xmlns:sys="clr-namespace:system;assembly=mscorlib" xmlns:ig="http://schemas.infragistics.com/xaml" x:class="styletrigger.mainwindow" mc:ignorable="d" title="mainwindow" height="350" width="525"> <grid> <grid.columndefinitions>

php - Adding more number values to CAPTCHA -

i wrote few months ago , other day realized made mistake. captcha displays lowercase characters a-z (97-122). how add uppercase a-z (65-90) , 0-9 (48-57)? have area in need of repair separated rest. i first tried doing: ($i = 0; $i < captchacharas; $i++) { $passphrase .= chr (rand (48, 57)); $passphrase .= chr (rand (65, 90)); $passphrase .= chr (rand (97, 122)); } but made things twice long "a-z". tried: ($i = 0; $i < captchacharas; $i++) { $passphrase .= chr (rand (48, 57), (65, 90), (97, 122)); } with no success. replaced ), ( ) + ( , didn't work. help. php captcha: <?php session_start (); // sets important definitions define ("captchacharas", 7); // number of characters in pass-phrase define ("captchawidth", 100); // width of image define ("captchaheight", 40); // height of image // generates random pass-phrase $passphrase = ""; // characters used ($i = 0; $i < captchacharas

c - How does netstat know the number of bytes received and sent? -

Image
i want create simple application displays number of bytes downloaded , uploaded. noticed netstat (when using -e switch): how netstat knows information, call windows api function or something? netstat uses 1 ip helper api , part of core windows networking api. running dumpbin /imports on netstat produces: (snipped brevity) iphlpapi.dll 140007000 import address table 1400080a0 import name table 0 time date stamp 0 index of first forwarder reference a3 internalgetboundtcp6endpointtable a4 internalgetboundtcpendpointtable c2 internalgetudptablewithownermodule b5 internalgettcp6table2 b9 internalgettcptable2 b6 internalgettcp6tablewithownermodule bb internalgettcptablewithownermodule internalgetudp6tablewithownermodule 8

android - Can someone help me with this JSON Parsing? -

there problem when retrieve individual elements the json. : "t":"sbin" the json-url follows : http://finance.google.com/finance/info?q=bse:sbin and other resources follows : public class refreshstock extends asynctask<string, string, list<stockmodel>> { @override protected list<stockmodel> doinbackground(string... params) { try { url = new url(params[0]); connection = (httpurlconnection) url.openconnection(); connection.connect(); inputstream = connection.getinputstream(); bufferedreader = new bufferedreader(new inputstreamreader(inputstream)); stringbuffer = new stringbuffer(); string line = ""; while ((line = bufferedreader.readline()) != null) stringbuffer.append(line + "\n"); string data = stringbuffer.tostring(); return parsejson(data); } catch (

javascript - How to toggle a section of a page so goes from one passage of text to another passage of text? -

i create section of page (a passage of text) toggles through passages of text have without reloading page or loading page. ideally, use left , right arrows. so, suppose have ten passages of text, passage a, passage b, , on, if clicks right arrow, want move passage passage b, if click right arrow again, want move passage b passage c. left arrow used go previous passages. how can this? i comfortable using css, html, javascript, jquery, , bootstrap. i cannot take credit this: i googled "bootstrap text slider" , wa-la link popped http://jsfiddle.net/technotarek/gxn2u/ javascript setcarouselheight('#carousel-example'); function setcarouselheight(id) { var slideheight = []; $(id+' .item').each(function() { // add slide heights array slideheight.push($(this).height()); }); // find tallest item max = math.max.apply(null, slideheight); // set slide's

ROS Service How to pass array with different types? -

is possible make ros service call such following (with different data types inside array)? rosservice call /node_name/srv_name 'parameter: [one 2 3.3 4 5 6.6]' what corresponding ros message like? i found work-around. calling service via rosservice call /node_name/srv_name 'parameter: ["one" "2" "3.3" "four" "5" "6.6"]' the .srv-file can written as string[] parameter and 1 have parse strings later in c++ or python. idea behind int main(int argc, char** argv) .

singularitygs - Using Singularity with LibSass -

is there thing can this? tips on start looking? singularity works fine libsass - until debug mode turned on @ point generates bus error: 10 (using grunt). https://github.com/at-import/singularity/issues/215

android - Getting the fragment from the current activity -

hey guys have fragment @override public view oncreateview(layoutinflater inflater, viewgroup container, bundle savedinstancestate) { // inflate layout fragment return inflater.inflate(r.layout.recordings, container, false); } here layout <relativelayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" android:id="@+id/recordinglayout"> how fragment object without adding activity? or add something, instance button fragment's layout activity class? an activity cannot reference fragment has not been instantiated somehow. can instantiate fragment via fragment tag in xml, or create 1 programmatically in java. i suggest take close @ documentation on creating (and referencing) fragments :)

Installed Node.js and Sublime Text But Keep Getting Errors -

i'm beginner @ trying learn web development. downloaded node nodejs.org website , downloaded sublime text 3 website well. my code sublime follows: $ node console.log("who's you're daddy?"); when try run on node.js error says: "syntax error, unexpected identifier." this literally step 1 , i'm messing up. how have set wrong? from trying seems want print "some string" in console using nodejs. in nodejs can create javascript logic first , can execute logic using node. create file somefile.js write following code in file: console.log('who's daddy?'); in terminal , execute: node /location/of/the/file/somefile.js it should print 'who's daddy?' in console. to learn more nodejs , started can refer how started node.js

grid - colspan and collapse for the same header - possible? -

Image
i developing table using dhtmlx grid. need achieve below table construction. tried many way achieve wasn't able apply colspan , collapse same td element in header. please check attachment , me exact output. such output not available using column_collapse extension. can place html content in header , hide required columns on clicking it. draft: function hiding(){ if (!collapse){ mygrid.setcolumnhidden(2,true) mygrid.setcolumnhidden(3,true) mygrid.setcolumnhidden(4,true) document.getelementbyid("collapse").value="show" collapse=true } else { mygrid.setcolumnhidden(3,true) mygrid.setcolumnhidden(2,false) mygrid.setcolumnhidden(3,false) mygrid.setcolumnhidden(4,false) document.getelementbyid("collapse").value="hide" collapse=false } } mygrid.setheader("<input type='button' id='collapse' value='hide' onclick='

sockets - A very simple TCP server/client in C# occasionally drops packets. What can I do to prevent this? -

i've got intra-pc communication server / client set send , receive data 1 program - in case, custom server listening text commands , unity3d. for part, works, every once in awhile, drop packets, , unity not them without multiple attempts. packets seem sent lost, see "sent message" console log. following code server , client: server: class tcpgameserver { public event eventhandler error; public action<data> adelegate; tcplistener tcplistener; tcpclient tcpclient; client activeclient; networkstream networkstream; streamwriter returnwriter; streamreader streamreader; timer systemtimer = new timer(); timer pingtimer = new timer(); int port = 8637; public tcpgameserver() { tcplistener = new tcplistener(ipaddress.loopback, port); systemtimer.elapsed += streamtimer_tick; systemtimer.autoreset = true; systemtimer.interval = 2000; pingtimer.elapsed += pingtimer_tick;

ios - How to create menu from UITableView, with unknown number of sub-menus? -

how display multi-level menu uitableview in swift i'm trying display multi-level menu series of uitableview s, each object may have unknown number of children, may have n number of children, , on. i'm attempting work closure callback (below), running problems once i'm two-levels deep menu hierarchy. the relevant code: tableviewcontroller override func tableview(tableview: uitableview, didselectrowatindexpath indexpath: nsindexpath) { var selectedobject:dictionary<string, anyobject> if (self.haschildren) { selectedobject = self.childrenobjects![indexpath.row] } else { selectedobject = self.tableviewdata![indexpath.row] } self.selectioncallback!(tableview: tableview, indexpath: indexpath, selectedobject: selectedobject, doeshavechildren: self.haschildren) } menuviewcontroller override func viewdidappear(animated: bool) { super.viewdidappear(true) let menutableviewcontroller:tableviewbuilder = tableview

javascript - Can't get objects to be equal -

i'm getting following fail message mocha: uncaught assertionerror: expected object { name: 'john doe' } object { name: 'john doe' } + expected - actual here test code: describe("a user gets registered", function () { it('should create single user on /api/register post', function (done) { //calling register api server .post('/api/register') .send({ name: "john doe", username: "john", password: "open" }) .expect("content-type", /json/) .expect(200) .end(function (err, res) { var data = { "name": "john doe" }; res.status.should.equal(200); res.body.should.equal(data); done();

Insert variable into video in Matlab -

i have 2 scripts. 1 plots luminescence of pixel in video on time , horizontally merges 2 videos. first video original video , second same video has been processed. wanted insert luminescence variable on second video in comparison video, in bottom right hand corner. think may have gotten lost somewhere though: close clc clear vid1 = videoreader('original.avi'); vid2 = videoreader('result.avi'); videoplayer = vision.videoplayer; row = vid2.height/3; col = vid2.width/2; outputvideo = videowriter('comparison.avi'); outputvideo.framerate = vid1.framerate; open(outputvideo); while hasframe(vid1) && hasframe(vid2) result_vid = readframe(vid2); r = result_vid(row, col, 1); g = result_vid(row, col, 2); b = result_vid(row, col, 3); lum = 0.2126 * r + 0.7152 * g + 0.0722 * b; l = [l lum]; text_str = l; position = [vid2.width 10]; original_vid = readframe(vid1); imgt = horzcat(original_vid, result_vid); p

java - how to change the Node of a TriplePath in Jena? -

i want change node of jena triplepath (org.apache.jena.sparql.core.triplepath), haven't found manner. imagine have code: triplepath tp = null; .... //tp has been defined , not null node domain = tp.getsubject(); node predicate = tp.getpredicate(); node range = tp.getobject(); node newnode = nodefactory.createuri("http://www.example.com/example/example"); //and now? how can set node (domain/predicate/range) of tp? the question is, how can set node (domain/predicate/range) of triplepath tp newnode i've created? there manner? you need create new path , assign tp . triplepath s immutable, rest of sparql algebra in jena (any ways defeat should not used!). for more complex setups, have template variables , use: triplepath substitute.substitute(triplepath triplepath, binding binding)

Docker --add-host flags not working for registry 2.0 webhooks notifications -

i had connect docker host (where application running @ 8080) within registry container. enable this, passed docker host's ip address container using "--add-host" flag. followed github issue , command line reference . enabled application endpoint:8080 in below config.yml send webhooks notifications registry. this set working until yesterday application received kinds of push/pull event notifications in docker version 1.8.2. however, stopped working today. tried upgrading 1.8.2 1.8.3 see if fixes it, no luck far. not sure if related docker 1.9 release updates. any inputs/suggestions/pointers appreciated. docker version: $ docker version client: version: 1.8.3 api version: 1.20 go version: go1.4.2 git commit: f4bf5c7 built: mon oct 12 06:06:01 utc 2015 os/arch: linux/amd64 server: version: 1.8.3 api version: 1.20 go version: go1.4.2 git commit: f4bf5c7 built: mon oct 12 06:06:01 utc 2015 os/arch: linux/am

parsing - What are these odd errors that occur when I attempt to generate C# with ANTLR4? -

i'm (now) trying use antlr4 , c# design language, , far i've been fiddling around it. in process, decided try , create simple mathematical expression evaluator. in process, created following antlr grammar it: grammar calculator; @parser::members { protected const int eof = eof; } @lexer::members { protected const int eof = eof; protected const int hidden = hidden; } program : expr+ ; expr : expr op=('*' | '/') expr | expr op=('+' | '-') expr | int | '(' expression ')' ; int : [0-9]+ ; mul : '*' ; div : '/' ; add : '+' ; sub : '-' ; ws : (' ' | '\r' | '\n') -> channel(hidden) ; when try generate c# code using command: java -jar c:\...\antlr-4.2-complete.jar -dlanguage=csharp .\...\grammar.g4 i these odd errors: error(50): c:\users\ethan\documents\visual studio 2015\projects\cypresslang\cypresslang\source\.\grammar\cypres

android - access to activity from a broadcast receiver class -

i want protect features behind device password. if users try use feature, have confirm password again. this code in activity class. context appcontext = activity.getapplicationcontext(); restrictionsmanager rmanager = (restrictionsmanager) appcontext.getsystemservice(appcontext.restrictions_service); rmanager.requestpermission(restrictionsmanager.action_request_permission, "someid", new persistablebundle()); this code handle response password-confirmation dialog in permissionresponsereceiver class. public class permissionresponsereceiver extends broadcastreceiver { @override public void onreceive(final context context, intent intent) { ...... } } is there simple way reference original activity in permissionresponsereceiver.onreceive(...). have keep track of activity instance , provide public static method it, seems hacky , i'm looking alternative. have suggestions? thanks. use local broadcast communicate between permissionresponse

python - unionAll resulting in StackOverflow -

i've made progress own question ( how load dataframe python requests stream downloading csv file? ) on stackoverflow, i'm receiving stackoverflow error: import requests import numpy np import pandas pd import sys if sys.version_info[0] < 3: stringio import stringio else: io import stringio pyspark.sql import sqlcontext sqlcontext = sqlcontext(sc) chunk_size = 1024 url = "https://{0}:8443/gateway/default/webhdfs/v1/{1}?op=open".format(host, filepath) r = requests.get(url, auth=(username, password), verify=false, allow_redirects=true, stream=true) df = none curr_line = 1 remainder = '' chunk in r.iter_content(chunk_size): txt = remainder + chunk [lines, remainder] = txt.rsplit('\n', 1) pdf = pd.read_csv(stringio(lines), sep='|', header=none) if df == none: df = sqlcontext.createdataframe(pdf) else: df = df.unionall(sqlcontext.createdataframe(pdf)) p

java - removeMouseListener method not working -

the removemouselistener not working: if click on old jlabel still adding variable score. every time time lapse passed old object should have mouselistener removed , new 1 should 1 it. timer pictimer = new timer(1000, new actionlistener(){ int oldrr=0; int oldrc=0 ; final int[] score = {0}; @override public void actionperformed(actionevent e) { mouseadapter act = new mouseadapter(){ @override public void mouseclicked(mouseevent e){ score[0]++; lbltimer.settext(string.valueof(score[0])); } }; arraywm[oldrr][oldrc].removemouselistener(act); arraywm[oldrr][oldrc].seticon(null); random random = new random(); arraywm[oldrr][oldrc].seticon(null); int rr = random.nextint(3 - 0 + 1) + 0; int rc = random.nex

file io - C# How should I save a large database of information? -

i wrote code serialize object containing data, save it, , load next time program run. (using binaryformater) however program takes insanely long time load data (at 100 entrys, takes around 15-30 seconds), , need file store more @ around 300,000 entrys. save time isn't great either faster loading. i'd know sort of options there saving , loading database's , differences between them. have read xml pretty slow, know how lazy loading works (load needed), , file formats can applied to. here code saves , repopulates data: static void saveasbinary(string fullpath, object data) { // create new, empty data file. string filename = fullpath; if (file.exists(filename)) { console.writeline(filename + @" exists!"); if (file.exists(filename + ".bak")) { file.delete(filename + ".bak"); } file.move(filename, filename + ".bak&quo

c - Why the realloc did not work properly in this case? -

#include<stdio.h> #include<string.h> #include<stdlib.h> char *func(char * str){ int len; len=strlen(str)+3; str = (char *)realloc(str,len); return str; } void main(){ printf("str:%s",func("hello")); } the final ans prints (null),instead of printing string: "hello". can please explain why so? unable identify error. can rectify error, , me working code. please! your program invokes undefined behavior because you're passing pointer, not returned dynamic memory allocator family of functions, realloc() . according c11 , chapter §7.22.3.5, the realloc function , ( emphasis mine ) if ptr null pointer, realloc function behaves malloc function specified size. otherwise, if ptr not match pointer earlier returned memory management function , or if space has been deallocated call free or realloc function, the behavior undefined. [...] that said, for hosted environment, void mai

java - Cannot find symbol with mutators and accessors -

i'm pretty knew java don't quite understand i'm looking when i'm trying find errors in program. i'm trying create player class game , i'm getting "cannot find symbol" error. did research prior asking question don't understand responses. i errors such as: playerclass.java:51: cannot find symbol symbol : variable getlevel location: class playerclass playerclass.setlevel(playerclass.getlevel + 1); ^ playerclass.java:51: setlevel(int) in playerclass cannot applied (<nulltype>) playerclass.setlevel(playerclass.getlevel + 1); ^ playerclass.java:93: cannot find symbol symbol : variable getname location: class playerclass if (name.equals(playerclass.getname)) ^ 3 errors but here's class: import io.*; //class: player public class playerclass { //class fields: name, level, damage, health, kills //constructors: private static int level, h

Can't ping VM after live migrate proxmox 4.2 -

i set drbd between 2 computers in cluster. in proxmox gui online, migrated vm other node while running continuous ping on vm. getting 1ms replies, when migration completed pings timed out. tried migrating original node never got reply during ping. after shutting down , restarting vm, can ping again. how can live migrate vm without losing connectivity?

objective c - Embedded Python 3 not creating .pyc files when using importlib -

i'm trying embed python 3 interpreter in objective c cocoa app on mac, following instructions in this answer (which extends this article ) , building python , pyobjc hand. i'd able run python code plugins. don't want rely on stock apple python (v2.7). have of working can't seem reliably load plugin scripts. looks embedded python interpreter unable create __pycache__/*.pyc files. may symptom, or cause. if import plugin file manually python3 repl (via import or imp or importlib modules) .pyc generated , plugin loads correctly. if don't manually .pyc not created , receive valueerror "unmarshallable object" . i've tried loosening permissions on script directory no avail. cache_tag looks ok, both repl , within bouncer script: >>> sys.implementation.cache_tag 'cpython-35' py_compile raises cocoa exception if try , compile plugin file manually (i'm still digging that). i'm using following: os x 10.11.5 (e

excel vba - number of characters in text form field causing a runtime error 13 (type mismatch) -

programming novice here. kindly given piece of vba code while enabled me export text form field data , radio button data word excel. when macro runs, places selected output set of radio buttons in single excel worksheet , text output text form fields worksheet in same document. excel file .xlsm macro enabled. the code works dream if txt responses provided relatively short, couple of sentences @ most. however, if run macro include 1 of longer text form fields responses (which includes 529 characters) results in runtime 'type mismatch' error (13). i'm guessing must exceeding kind of character limit? or format of text? properties on txt form field set 'unlimited' , 'regular text'. here code: option explicit sub exportresponsestoexcel() dim arroptionbuttons() string dim dicoptionbuttons object dim dicformfields object dim oinlineshape inlineshape dim oinlineshapes inlineshapes dim ooptionbutton optionbutton dim oformfields

javascript - How do I get a value from a check box with PHP? -

i have form there check box, on selecting box values different page gets loaded through ajax, after loading these values user can select them , submit , save in database. values getting loaded properly, when submit form, values not getting carried backend. <!doctype html> <head> <script> $(document).ready(function () { $('#drive').change(function () { if ($(this).is(':checked')) { var catid = $('#drive').val(); console.log($('#drive')) if (catid != 0) { lodinganimate(); $.ajax({ type: 'post', url: 'c_datetime.php', data: { id: catid }, cache: false, success: function (returndata) { $(&#

angular - Unit Test to see if class methods are defined -

i want test if class methods defined, e.g.: export class goalsettingspage { public goal: goal; constructor( ) { this.goal = this.navparams.get('goal'); } saveform(event) { this.viewctrl.dismiss(this.goal); } unit test sth like: xit('should have methods defined', () => { let g = new goal() let np = new navparams() let vc = new viewcontroller() let e = new events() let fb = new formbuilder() let settingmodal = new goalsettingspage(np,vc,fb,e); expect (settingmodal.saveform(e).tobedefined; }) isn't working. to test existence of method in class instance should be expect(settingmodal.saveform).tobedefined() or, more precisely, expect(settingmodal.saveform).tobe(jasmine.any(function));

html - Background with opacity set is solid and not transparent in Chrome and Opera -

i have div text , background after scrolling down going on home slider.i want have transparency. ok in firefox layer transparent opacity set. in chrome , opera solid , slider not visible under. use: background:rgba(255,255,255,0.5); i event tried use transparent png solid. problem preview how can make background transparent in chrome , opera? for such problem there 1 of 2 things can do. method 1 body,html { /*or whatever selector had*/ background-color:rgba(255,255,255,0.5); /*note property background color*/ } method 2 see link

r - Inserting a numeric value into a where statement -

i got following code works pretty smooth: sql_cag <- sprintf("select * `cag_table` `comp_id` = 1"); df <- dbgetquery(con, sql_cag) what replace 1 parameter. this: sql_cag <- sprintf("select * `cag_table` `comp_id` ='%a'", competitie_id); df <- dbgetquery(con, sql_cag) with parameter competitie_id competitie_id <- 1 competitie_id <- as.numeric(competitie_id) but returns empty dataframe. somehow seems go wrong '%a'. thoughts mights go wrong?

javascript - Manually trigger slickgrid events -

i want manually trigger slickgrid event. eg: want change current cell move down when press down arrow. can achieve when slickgrid in focus, once focus lost web page, pressing down arrow not change active cell. i tried this: <!doctype html> <html> <head> <meta http-equiv="content-type" content="text/html; charset=iso-8859-1"> <title>slickgrid example 1: basic grid</title> <link rel="stylesheet" href="mycss/slick.grid.css" type="text/css"/> <link rel="stylesheet" href="mycss/smoothness/jquery-ui-1.8.16.custom.css" type="text/css"/> <link rel="stylesheet" href="mycss/examples.css" type="text/css"/> </head> <body> <div> <p id="p_title"></p> <p id="p_duration"></p> <p id="p_complete"></p> <p id="p_start">&

Does a nested anonymous function in Javascript associated with an event handler not work? -

if use named function instead,it : <script type="text/javascript"> window.onload = function(){ var img = document.getelementbyid('im'); img.onload = fun(); } function fun() { alert("image loaded"); } </script> <img src="picture.png" id="im"/> but, question when try same using an anonymous function ( as shown below ),why not work? <script type="text/javascript"> window.onload = function(){ var img = document.getelementbyid('im'); img.onload = function(){ alert("image loaded"); } } </script> <img src="picture.png" id="im"/> in first example fun called when event handler attached image (after image has loaded). in second example, anonymous function attached image after image has loaded. to see behaviour want, try: <script type=&q

php - Is there any way to submit a form from my server to Google Apps Script (.gs) file -

i want submit form web site on gscript file on google drive , have take form values, , generate pdf file , email it. have working using google forms, google sheet, goal here have data stored in mysql relational database data not duplicated, , fill in our form data auto-populate if exists, or can choose list on left fill in pertinent informaton. donation receipt system nonprofit organization. the key separate donor information donations. want able store our donor info, things birthdays, anniversaries, , other miscellaneous information can send out birthday cards, etc not store data on , on again because made several donations. is there way can move form on secured portion of own server, , submit data on .gs file parses data , puts pdf document, mailchimp, , backwards mysql database, , sends appropriate emails. cut out of work on google side, , of except pdf , email own server, , handle rest google if can submit data post or request or json .gs script. i cannot find anywhere.