Posts

How to find and replace with regex in excel -

Image
i have excel file 1 column , multiple rows. the rows contain various text, here's example: texts home texts whatever dafds dgretwer werweerqwr texts 21412 texts 346345 texts rwefdg terfesfasd rwerw i want replace "texts *" * after "texts are" specific word, example "texts replaced". how can in excel? as alternative regex, running: sub replacer() dim n long, long n = cells(rows.count, "a").end(xlup).row = 1 n if left(cells(i, "a").value, 9) = "texts are" cells(i, "a").value = "texts replaced" end if next end sub will produce:

angularjs - Declaration or statement expected error when setting up Typescript 1.4 and angularjs2 in Visual Studio 2013 -

Image
i have been trying basic typescript + angular2 application going in visualstudio 2013 . have installed npm , tsd , having no luck following tutorial http://www.codeproject.com/tips/1026938/angularjs-getting-started-with-visual-studio at error i can't figure out why visual studio won't recognize import statement. typescript seems work import statement doesn't. any appreciated thanks

javascript - Enter to Tab script does not pass over a checkbox? -

i trying convert enter tab, , works perfect form fields, not checkbox on page. have ideas why not? enter tab code : <script type="text/javascript"> function tabe(obj, e) { var e = (typeof event != 'undefined') ? window.event : e; // ie : moz var self = $(obj), form = self.parents('form:eq(0)'), focusable, next; if (e.keycode == 13) { focusable = form.find('input,a,select,button,textarea').filter(':visible'); next = focusable.eq(focusable.index(obj) + 1); if (!next.length) { next = focusable.first(); } next.focus(); return false; } } </script> the evil checkbox : <input class="case" type="checkbox" onkeyup="return tabe(this,event);"/> edit: (html code) : <td> <input class="case" type="checkbox" onkeypress="return tabe(this,event);"/> </td> jquery : html += '<td><input c...

python - Roman to Numeral calculator with "for i in X" -

i tried build calculator convert roman numeral can tell me how can choose 2 characters words in high priority? ** roman string #roman numeral calculator def romantodecimal(roman): decimalvalue=0 in roman: if == "cm": decimalvalue += 900 if == "iv": decimalvalue += 4 if == "ix": decimalvalue += 9 if == "xl": decimalvalue += 40 if == "xc": decimalvalue += 90 if == "cd": decimalvalue += 400 elif in roman: if == "i": decimalvalue += 1 if == "v": decimalvalue += 5 if == "x": decimalvalue += 10 if == "l": decimalvalue += 50 if == "c": decimalvalue += 100 if == "d": decimalvalue += 500 if == "m": decimalvalue += 1000 return decimalvalue and ...

javascript - Firebug: How to save rendered Source Code? -

i'm using firebug's inspector view source code. code has been modified javascript. i'd save rendered code file, can more compare unmodified source. i'm having no luck copy/paste. when attempt select code, contents of inspector changes. i'm running osx. how can save rendered source code? hmmm.. expanding html element in fb , hitting cmd+a, cmd+c not help? using js copy inner html of top-most parent?

ruby - how do I kill a port in use -- eventmachine -

i following error: eventmachine.rb:534:in `start_tcp_server': no acceptor (port in use or requires root privileges) i'm not sure process or port , want kill can run script again. how do that? ps ax | grep ruby kill -9 [pid] example: ps ax | grep ruby #=> 857 pts/19 sl+ 0:04 /home/andreydeineko/.rvm/rubies/ruby-2.2.3/bin/ruby bin/rails server #=> 14639 pts/18 s+ 0:00 grep --color=auto --exclude-dir=.bzr --exclude-dir=cvs --exclude-dir=.git --exclude-dir=.hg --exclude-dir=.svn rails #=> 25368 pts/17 sl+ 0:02 /home/andreydeineko/.rvm/rubies/ruby-2.2.3/bin/ruby bin/rails c kill -9 857 ps ax | grep ruby #=> 14639 pts/18 s+ 0:00 grep --color=auto --exclude-dir=.bzr --exclude-dir=cvs --exclude-dir=.git --exclude-dir=.hg --exclude-dir=.svn rails #=> 25368 pts/17 sl+ 0:02 /home/andreydeineko/.rvm/rubies/ruby-2.2.3/bin/ruby bin/rails c

javascript - Ionic, List populating via search -

i using backemnd service (parse in case doesn't matter question) , wanted search it. have textbox upon text being entered searches server , returns array of matchs. my next step display returned objects nicely in list. easy enough ng-repeat because view has been loaded ui won't update reflect array being loading list. make sense? i wondering if there technique refresh list , show returned search elements, , not being greedy here doing in way looks , not clunky. i did lot of googling no luck :( advice amazing. without code provided hard guess wrong. angular has two-way binding, view should updated automatically after changing content of array. if it's not, means did wrong in code. present example code should work in case. controller angular.module('modulename') .controller('viewcontroller', ['viewservice', viewcontroller]); function viewcontroller(viewservice) { var self = this; self.arraywithdata = []; self.sear...