Friday, 15 August 2014

excel - If B2 in sheet 1 matches any cell on sheet 3, copy the next cell from sheet 3. (copying to sheet 1) -



excel - If B2 in sheet 1 matches any cell on sheet 3, copy the next cell from sheet 3. (copying to sheet 1) -

anyone give me excel formula this? give thanks you!

if b2 in sheet 1 matches cell column of sheet 3, re-create cell found on right of (column b).

copying cell in sheet 1.

thanks! (i hope isn't confusing.)

for illustration b2 "8 december". there list of dates on column of sheet 3. on column b of sheet 3 corresponding time. example, on right of 8 dec on sheet 3 8:30, want copied on cell i'm making formula on.

some folk utilize lookup function this, utilize match , index because gives more freedom more advanced formula (such checking if there match or not) , has less requirements (such info doesn't need sorted).

=index(sheet3!b:b, match(sheet1!b2, sheet3!a:a, 0))

if break downwards parts, match(sheet1!b2, sheet3!a:a, 0) returns row number first matching cell in column of sheet sheet3. index(sheet3!b:b, ...) returns value of cell in column b of sheet sheet3 @ specified row number.

if nil matched, you'll #na error value.

excel

node.js - Why does my sailsjs service return "undefined" to the calling controller action? -



node.js - Why does my sailsjs service return "undefined" to the calling controller action? -

i have post api else has developed in order obtain authorization code, , have in several different contexts thought i'd move code handling post , getting response service.

the frustrating thing @ moment seem getting value want api, can't homecoming server calling sails controller.

here's service source code:

module.exports = { getverifycode: function(uuid, ip_addr) { console.log (uuid); console.log (ip_addr); var http = require('http'), querystring = require('querystring'), // info send send_data = querystring.stringify({ uuid : uuid, ip_addr : ip_addr }), // options posting api options = { host: sails.config.api.host, port: sails.config.api.port, path: '/verifycode/update', method: 'post', headers: { 'content-type': 'application/x-www-form-urlencoded', 'content-length': buffer.bytelength(send_data) } }, json_output = "", // post request post_req = http.request(options, function(post_res) { post_res.on('data', function(chunk) { json_output += chunk; }); post_res.on('end', function() { var json_data = json.parse(json_output), verify_code = json_data.verify_code; console.log("code="+verify_code); homecoming ('vc='+verify_code); }); }); post_req.write(send_data); post_req.end(); } }

and here's 2 relevant lines controller action:

var vc = verify.getverifycode(req.session.uuid, req.connection.remoteaddress); console.log('vc='+vc);

the weird thing controller console log gets written before service 1 does:

vc=undefined code=yoar3ofwrifgpoi4crrehp3eh+mhyo3eogvdncrndtc=

any ideas? have much simpler service running (just string manipulation stuff); have feeling issue here relates asynchronous nature of api request , response.

jasper, right in assumption " asynchronous nature of api request , response".

when execute http phone call in verify service, node makes phone call , them moves on rest of code console.log('vc='+vc); , not wait http phone call finish.

i'm not sure end result should can rewrite controller / service include callback (this 1 options, there many ways of course, other people should suggest others)

verify.js

getverifycode: function(uuid, ip_addr, cb) { // bunch of stuff homecoming post_req = http.request(options, cb(post_res}); }

then in controller controller.js

verify.getverifycode(req.session.uuid, req.connection.remoteaddress, function(resps){ // code in here execute when http phone call finished })

node.js function service express sails.js

ruby on rails - Getting very long, cryptic error output from RVM -



ruby on rails - Getting very long, cryptic error output from RVM -

i'm doing fresh installation of rvm on macbook air after having done thought finish uninstall system. now, however, when seek run "rvm update", receive next lengthy output in terminal:

scotts-macbook-air:~ scotthollingsworth$ rvm stable downloading https://get.rvm.io downloading https://github.com/wayneeseguin/rvm/archive/stable.tar.gz upgrading rvm installation in /users/scotthollingsworth/.rvm/ rvm path line found in /users/scotthollingsworth/.profile /users/scotthollingsworth/.bashrc /users/scotthollingsworth/.zshrc. rvm sourcing line found in /users/scotthollingsworth/.bash_profile /users/scotthollingsworth/.zlogin. installing rvm gem in 1 gemsets./scripts/functions/gemset: line 118: 6633 trace/bpt trap: 5 "${rvm_ruby_binary}" -rrubygems -e "$gem_spec" 2> /dev/null error running 'command gem install /users/scotthollingsworth/.rvm/gem-cache/rvm-1.11.3.9.gem --local --no-ri --no-rdoc', showing lastly 15 lines of /users/scotthollingsworth/.rvm/log/1412613795_ruby-2.1.3/gem.install.rvm.log [2014-10-06 11:43:15] command current path: /users/scotthollingsworth/.rvm/src/rvm gem_home=/users/scotthollingsworth/.rvm/gems/ruby-2.1.3@global path=/users/scotthollingsworth/.rvm/gems/ruby-2.1.3@global/bin:/users/scotthollingsworth/.rvm/rubies/ruby-2.1.3/bin:/users/scotthollingsworth/.rvm/bin:/usr/local/heroku/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/opt/x11/bin gem_path=/users/scotthollingsworth/.rvm/gems/ruby-2.1.3@global command(7): command gem install /users/scotthollingsworth/.rvm/gem-cache/rvm-1.11.3.9.gem --local --no-ri --no-rdoc + ./scripts/functions/utility_logging : __rvm_log_dotted() 210 > gem install /users/scotthollingsworth/.rvm/gem-cache/rvm-1.11.3.9.gem --local --no-ri --no-rdoc dyld: library not loaded: /usr/local/lib/libgmp.10.dylib referenced from: /users/scotthollingsworth/.rvm/rubies/ruby-2.1.3/bin/ruby reason: image not found ./scripts/functions/utility_logging: line 210: 6658 trace/bpt trap: 5 gem install gem-wrappers -v >=1.2.4 --no-ri --no-rdoc upgrade of rvm in /users/scotthollingsworth/.rvm/ complete. # scott hollingsworth, # # give thanks using rvm! # sincerely hope rvm helps create life easier , more enjoyable!!! # # ~wayne, michal & team. in case of problems: http://rvm.io/help , https://twitter.com/rvm_io upgrade notes: * no new notes display. rvm reloaded!

does know means, , how prepare errors?

seems similar issue described here. can seek using solution provided in answer.

ruby-on-rails ruby terminal installation rvm

Removing table td space in a html email -



Removing table td space in a html email -

i writing html email. have sliced image in 3 pieces , wrote simple html show them 1 image. fien on browser when send email yahoo/hotmail/outlook creates space after each image (bottom). see code below.

any idea?

<html><body> <table border="0" cellpadding="0" cellspacing="0" height="944" width="580"> <tr> <td height="275" > <a href="http://www.example.co.uk/page/search?q=mistral&amp;searchsubmit.x=0&amp;searchsubmit.y=0" target="_blank"><img height="275" src="http://p4trr.emv2.com/il/0/4/1/1101020041/1951838857.jpg" style="border-width: 0px; border-style: solid; margin: 0px;" width="580" /></a></td> </tr> <tr> <td height="326" > <a href="http://www.example.co.uk/page/search?q=umbrian&amp;searchsubmit.x=10&amp;searchsubmit.y=10" target="_blank"><img height="326" src="http://p4trr.emv2.com/il/0/4/1/1101020041/183118939.jpg" style="border-width: 0px; border-style: solid; margin: 0px;" width="580" /></a></td> </tr> <tr> <td height="343" > <a href="http://www.example.co.uk/page/search?q=balzac&amp;searchsubmit.x=0&amp;searchsubmit.y=0" target="_blank"><img height="343" src="http://p4trr.emv2.com/il/0/4/1/1101020041/1581670867.jpg" style="border-width: 0px; border-style: solid; margin: 0px;" width="580" /></a></td> </tr> </table> </body> </html>

set line height of td 0 like,

css

<style> table td { line-height: 0; } </style>

html

php - Show a pages code including require statements -



php - Show a pages code including require statements -

i trying display code of php file plain html. going except fact 'open up' <?php require 'main_content_bar.php'; ?> statements aswell.

so far have show_source($page); correctly working.

it prints:

<?php require 'main_content_bar.php'; ?> <!-- jumbotron --> <div class="jumbotron"> <h1>property</h1> <p class="lead">cras justo odio, dapibus ac facilisis in, egestas eget quam. fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit down amet.</p> </div> <div class="row"> <div class="col-md-12"> <h2>current properties</h2> </div> </div> <div class="footer"> <p><a href="source_code.php" target="_blank"> <img src="images/codebutton<?php echo $page_lower;?>.jpg" alt="<?php echo $page;?> source"> </img> </a></p> <p>&copy; robin b'stards retail 2014</p> </div> </body> </html>

however, 1 can see, contents of require statements not show. cannot life of me work out how this.

so end looking this:

<!doctype html> <html lang="en"> <head> <meta charset="utf-8"> <script src="jquery-2.1.1.min.js"></script> <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js"></script> <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css"> <!-- <link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/jquery.bootstrapvalidator/0.5.2/css/bootstrapvalidator.min.css"/>--> <!-- <script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/jquery.bootstrapvalidator/0.5.2/js/bootstrapvalidator.min.js"></script>--> <link href="justified-nav.css" rel="stylesheet"> <script> $(function(){ var url = window.location.href; var page = url.substr(url.lastindexof('/')+1); $('.nav a[href*="'+page+'"]').parent().addclass('active'); }); </script> </head> <body> <div class="container" style="width: 1263px"> <div class="masthead"> <h3 class="text-muted">ruthless real estate</h3> <ul class="nav nav-justified"> <li class="menu"><a href="property.php">property</a></li> <li class="menu"><a href="client.php">client</a></li> <li class="menu"><a href="type.php">type</a></li> <li class="menu"><a href="feature.php">feature</a></li> <li class="menu"><a href="multiple_properties.php">multiple properties</a></li> <li class="menu"><a href="property_features.php">property features</a></li> <li class="menu"><a href="images.php">images</a></li> </ul> </div> <!-- jumbotron --> <div class="jumbotron"> <h1>property</h1> <p class="lead">cras justo odio, dapibus ac facilisis in, egestas eget quam. fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit down amet.</p> </div> <div class="row"> <div class="col-md-12"> <h2>current properties</h2> </div> </div> <div class="footer"> <p><a href="source_code.php" target="_blank"> <img src="images/codebutton<?php echo $page_lower;?>.jpg" alt="<?php echo $page;?> source"> </img> </a></p> <p>&copy; robin b'stards retail 2014</p> </div> </body> </html>

note lack of require statements

you cannot show_source, "show code sources" of file.

you need create own function take filename in argument, have analyze source this:

replace require/include/require_once/include_once (what forget?) own content make function recursive (because main_content_bar.php can have other include within it) use highlight_string @ end of function.

edit search & replace, 1 way (there several) is utilize preg_match_all. part of code :

$new_content = file_get_contents('your-file.php'); $base_path = __dir__.'/'; // pattern find require, require_once, include, include_once functions // , grab arguments $pattern = "#<\?php (?:require|include(?:_once)?)\s*'(.*)'; \?>#u"; if (preg_match_all($pattern, $new_content, $matches)) { foreach($matches[0] $pattern_index => $full_pattern) { $file = $matches[1][$pattern_index]; $subcontent = file_get_contents($base_path.$matches[$pattern_index]); $new_content = str_replace($new_content, $full_pattern, $subcontent); } } highlight_string($new_content);

php html file

c++ - Validating input -



c++ - Validating input -

cin >> menuchoice; while (!(cin >> menuchoice)) { cout << "invalid selection, please come in number menu 1" << endl; cin.clear(); cin.ignore(std::numeric_limits<std::streamsize>::max(), '\n'); }

i want 'catch' string programme doesn't crash or go continuous loop entered above while loop. looks good. until entered 0 menu selection - !(cin >> menuchoice) gets called though valid input (i'll utilize loop ensure within range long it's int should fine, that's thought.

i tried

if (menuchoice == 0) menuchoice = 6;

just before while loop no avail.

any assistance?

i'm looking maintain menu , validation part separate (at moment functions i'll changing them in future classes).

the validation part goes:

while (!(cin >> menuchoice)) { cout << "invalid selection, please come in number menu 1" << endl; cin.clear(); cin.ignore(std::numeric_limits<std::streamsize>::max(), '\n'); } while (menuchoice < 1 || menuchoice > 4) { cout << "invalid selection, please come in number menu 2" << endl; cin >> menuchoice; //here there problem while (!(cin >> menuchoice)) { cout << "invalid selection, please come in number menu 3" << endl; cin.clear(); cin.ignore(std::numeric_limits<std::streamsize>::max(), '\n'); } }

while loop 1 - catches initial string input while loop 2 - ensures right range while loop 3 - catches string input user may come in sec time

c++ validation input

eclipse juno - Project creation using GWT+maven(gwt-maven-plugin) compiles following error,normal GWT project creation(without maven)compiles good(luna,GWT sdk2.6) -



eclipse juno - Project creation using GWT+maven(gwt-maven-plugin) compiles following error,normal GWT project creation(without maven)compiles good(luna,GWT sdk2.6) -

this exception while project compilation, environment ubuntu 14.01lts, eclipse luna, eclipse juno, gwt-eclipse-plugin, java 1.7,

but compiles when creating without maven project(new project - > google gwt)

loading inherited module 'com.***.***.application' loading inherited module 'com.google.gwt.user.user' loading inherited module 'com.google.gwt.core.core' loading inherited module 'com.google.gwt.core.compilerparameters' [warn] setting configuration property named compiler.max.vars.per.var in com.google.gwt.core.compilerparameters has not been defined. may disallowed in future. compiling module com.***.***.application [error] unexpected internal compiler error java.lang.arrayindexoutofboundsexception: 0 @ com.google.gwt.dev.jjs.impl.gwtastbuilder$astvisitor.writeenumvalueofmethod(gwtastbuilder.java:2839) @ com.google.gwt.dev.jjs.impl.gwtastbuilder$astvisitor.processenumtype(gwtastbuilder.java:2488) @ com.google.gwt.dev.jjs.impl.gwtastbuilder$astvisitor.endvisit(gwtastbuilder.java:1921) @ com.google.gwt.dev.jjs.impl.gwtastbuilder$astvisitor.endvisit(gwtastbuilder.java:1604) @ org.eclipse.jdt.internal.compiler.ast.typedeclaration.traverse(typedeclaration.java:1441) @ org.eclipse.jdt.internal.compiler.ast.typedeclaration.traverse(typedeclaration.java:1311) @ com.google.gwt.dev.jjs.impl.gwtastbuilder.process(gwtastbuilder.java:3131) @ com.google.gwt.dev.javac.compilationstatebuilder$compilemorelater$unitprocessorimpl.process(compilationstatebuilder.java:127) @ com.google.gwt.dev.javac.jdtcompiler$compilerimpl.process(jdtcompiler.java:346) @ org.eclipse.jdt.internal.compiler.compiler.compile(compiler.java:470) @ com.google.gwt.dev.javac.jdtcompiler.docompile(jdtcompiler.java:880) @ com.google.gwt.dev.javac.compilationstatebuilder$compilemorelater.compile(compilationstatebuilder.java:284) @ com.google.gwt.dev.javac.compilationstatebuilder.dobuildfrom(compilationstatebuilder.java:511) @ com.google.gwt.dev.javac.compilationstatebuilder.buildfrom(compilationstatebuilder.java:434) @ com.google.gwt.dev.javac.compilationstatebuilder.buildfrom(compilationstatebuilder.java:420) @ com.google.gwt.dev.cfg.moduledef.getcompilationstate(moduledef.java:485) @ com.google.gwt.dev.precompile.precompile(precompile.java:241) @ com.google.gwt.dev.precompile.precompile(precompile.java:223) @ com.google.gwt.dev.precompile.precompile(precompile.java:139) @ com.google.gwt.dev.compiler.run(compiler.java:167) @ com.google.gwt.dev.compiler.run(compiler.java:132) @ com.google.gwt.dev.compiler$1.run(compiler.java:99) @ com.google.gwt.dev.compiletaskrunner.dorun(compiletaskrunner.java:55) @ com.google.gwt.dev.compiletaskrunner.runwithappropriatelogger(compiletaskrunner.java:50) @ com.google.gwt.dev.compiler.main(compiler.java:106)

please tell me reason this, in advance! thangaraj

not sure maven, seek delete 2 gwt-unitcache dirs , seek compile again

gwt eclipse-juno eclipse-luna gwt-maven-plugin