Posts

wordpress - What Contact Form 7 action should I hook into for seed submitted data AFTER validation and spam filters? -

i'm building api integration wordpress plugin forwards from's data crm's api. i've got working on contact form 7 adding action after 'wpcf7_submit'. // wpcf7_submit available since contacform7 4.1.2, testes 4.4 add_action("wpcf7_submit", "crm_forward_cf7_to_crm", 10, 2); function crm_forward_cf7_to_crm($form,$result) { // todo has spam been filtered already? // todo has form been validated already? $submission = wpcf7_submission::get_instance(); if ( $submission ) { $posted_data = $submission->get_posted_data(); $posted_data = crm_filter_cf7_data($posted_data); crm_post_form($posted_data); } }; my questions are: has submission been filtered out spam validation (e.g.: akismet) @ point? has cf7 validated form @ point? i'm not sure akimeset (but judging form possible statuses did kind of spam validation time), @ point cf7 has validated it. can check if it's valid , not spam, $result[...

email - PhP e-mail auto e-mail response -

on website have promotion going on users input name , e-mail , send them e-mail same title, same text , voucher image @ end embedded/inserted onto e-mail (not attached). we thought able copy paste on past 6 weeks have sent out on 1000 e-mails , undo able more. we have php code sends info. know add @ end of php when inputs e-mail , name can automatically send e-mail them "template" title, text , image? i have tried many different things programmes newsletter senders not auto-responders. can't use gmail auto response either because receive other e-mails different things well. don't want send promo e-mails us. any help? cheers. check github sendemail repository. allows send emails through php. can can set sendemail repository in project whenever enter email id run php script.for configuring sendemail provided on github . link: https://github.com/mogaal/sendemail script this: $message = "thank interest. possible.<br />sincerely...

git - Get current version of repository -

i'm new git, can't find out how : get version of repository (folder offline) get last version of repository (online) i can compare two, doesn't give me information version. : git status , tell me it's date. how can have : your version : 1.9.0 latest version : 1.10.1 with conky example : https://github.com/brndnmtthws/conky there's no clean way this, since "current" version of repository means different things different people. depends on whether or not tags used. in scenario, if want rely exclusively on tags, can use git tag -l listing of tags, recent 1 created being last entry. if want committed work, you'd have @ branches of own volition , inspect when committed. in case, it's master, you'd need perform log on it. git checkout master && git log

regex - emacs greedy search-backward-regexp -

how make backward regexp search greedy in emacs? for example, have abc 163439 abc in buffer, , run m-x search-backward-regexp following regexp: 163439\|3 . regexp allways find '3' in buffer, newer whole long number. because, when starts search, meet '3' firstly. in second try, start position of '3', inside number, , omit it. how can find longest , closest match? so mean, when meet '3', want check if matched part isn't part of bigger match. i don't think can want. emacs search-backward-regexp searches closest instance matches regular exprssion. not greediness (greediness in regular expressions matching many characters possible when there kleene star operator -- or syntactic variants ? or +). in example, emacs finds first instance matches regular expression. --dmg

jsp - Collect and save submitted values of multiple dynamic HTML inputs back in servlet -

i able display arraylist of beans in jsp form using jstl looping through list , outputting bean properties in html input tag. <c:foreach items="${listofbeans}" var="bean"> <tr> <td><input type="text" id="foo" value="${bean.foo}"/></td> <td><input type="text" id="bar" value="${bean.bar}"/></td> </tr> </c:foreach> how code jsp when page submits updated values in appropriate item of the arraylist ? given simplified model: public class item { private long id; private string foo; private string bar; // ... } here's how can provided ${items} list<item> : <c:foreach items="${items}" var="item"> <tr> <td> <input type="hidden" name="id" value="${item.id}" /> <in...

java - Counting number of lines in test classes -

i'm developing tool recognizes test classes , counts number of lines in classes. tool count lines of business code , compare both results, here code: (file f : list) { if (f.isdirectory()) { walk(f.getabsolutepath()); } if (f.getname().endswith(".java")) { system.out.println("file:" + f.getname()); countfiles++; scanner testscanner = new scanner(f); while (testscanner.hasnextline()) { string test = testscanner.nextline(); if (test.contains("org.junit") || test.contains("org.mockito")) { system.out.println("this test class"); testcounter++; break; } } scanner sc2 = new scanner(f); while (sc2.hasnextline()) { count++; counting business code using (count++) working perfectly, ...

sql server - Can I replace a very complex SQL Select with parameters with a view? -

i have multi table sql select on 150 lines long, 2 input parameters used inside 1 of inner areas of select. not used where's limit data retrieved @ end. parameters used on inner areas of select. right sql select part of stored procedure 2 input params. it's called other stored procedures @ end of them. would idea replace view , if can somehow provide input parameters view? as far know, can't create view parameters. instead, can create function takes input parameters. create function test.func (@parameter varchar(10)) returns table return ( select field1, field2,.... table1 field3 = @parameter ); basically view acts table, , way can add " parameters " table via filter statements when accessing view.