Posts

excel - VBA Testing two values, if one is different, copy -

i having fair amount of trouble code below: sub testemail() dim long dim lastrow long dim worksheet dim b worksheet dim strtext dim objdata new msforms.dataobject set = workbooks("book2").worksheets(1) set b = workbooks("book1").worksheets(1) lastrow = a.cells(rows.count, "a").end(xlup).row = 2 lastrow if not iserror(application.match(a.cells(i, 7).value, b.columns(3), 0)) , iserror(application.match(a.cells(i, 4).value, b.columns(11), 0)) a.range("d" & i).copy objdata.getfromclipboard strtext = replace(objdata.gettext(), chr(10), "") b.range("k" & ).value = b.range("k" & ).value & " / " & strtext end if next end sub i face 2 problems, 1 has me stumped , other due lack of knowledge: the line after if supposed check if 2 values (numbers) in both workbooks match, , if 2 ...

c# - How to send e-mails using NLog? -

i'm using nlog, , i'm pretty new @ logging. created log files somehow have problem send e-mails. followed instructions can't make it. mail settings in configuration tags in web.config: <system.net> <mailsettings> <smtp deliverymethod="specifiedpickupdirectory" from="some@some.org"> <network host="localhost"/> <specifiedpickupdirectory pickupdirectorylocation="d:\tmp\email"/> </smtp> </mailsettings> </system.net> and target inside nlog.config: <target name="mail" xsi:type="mail" html="true" subject="error received" body="${message}" to="some1@some.com" from="some@gmail.com" encoding="utf-8" smtpusername="some@some.com" enablessl="false" smtppassword="password" smtpauthentication="basic" smtpserver="smtp.some.com" smtp...

excel vba code to export a Microsoft Excel 97-2003 .xls file -

i trying open file user specified path using vba function. when paste content of file desired worksheet, pastes weird unrecognizable characters in worksheet. can figure out doing wrong? here code: sub x_macro() '****************declaring relevant variables****************' dim t range dim path: path = application.getopenfilename("xls files (*.xls), *.xls") dim cht1 chartobject 'dim button_click vbmsgboxresult application.screenupdating = false sheets(2).activate if path = false exit sub activesheet.querytables.add(connection:="text;" & path, destination:=range("a1")) .fieldnames = true .rownumbers = true .filladjacentformulas = false .preserveformatting = true .refreshonfileopen = false .refreshstyle = xlinsertdeletecells .savepassword = false .savedata = true .adjustcolumnwidth = true .refreshperiod = 0 .textfilepromptonrefresh = false ...

javascript - Suggestion box only displays , , -

i making mashup website involves map, , search textbox in javascript. title says, no matter inputted search box, 2 commas appear in suggestion box , when suggestion clicked on, turn map gray , unusable. whats problem? javascript file, function located in configure function // google map var map; // markers map var markers = []; // info window var info = new google.maps.infowindow(); // execute when dom loaded $(function() { // styles map // https://developers.google.com/maps/documentation/javascript/styling var styles = [ // hide google's labels { featuretype: "all", elementtype: "labels", stylers: [ {visibility: "off"} ] }, // hide roads { featuretype: "road", elementtype: "geometry", stylers: [ {visibility: "off"} ] } ]; // options map // https://developers.google.com/maps/documentation/javascript...

html - Bootstrap row with columns of different height -

Image
i have like: <div class="row"> <div class="col-md-4">content</div> <div class="col-md-4">content</div> <div class="col-md-4">content</div> <div class="col-md-4">content</div> <div class="col-md-4">content</div> <div class="col-md-4">content</div> <div class="col-md-4">content</div> <div class="col-md-4">content</div> <div class="col-md-4">content</div> </div> now assuming that, content boxes of different height, same width - how keep same "grid based layout" , yet have boxes line under each other, instead of in perfect lines. currently twbs place next line of col-md-4 under longest element in previous third row., each row of items aligned clean - while awesome want each item fall directly under last element ...

python - how to make timer for quiting from python3 -

i have script , doesn't work proper, in bash let script in while loop , wanna script can close after while, tried use threading.timer code wont run quit() or exit() command, please me? #!/usr/bin/env python3 import threading time import sleep def qu(): print("bye") exit() t=threading.timer(5.0,qu) t.start() while(true): sleep(1) print("hi") you use os._exit function instead of exit() getting code follows: #!/usr/bin/env python3 import threading import os time import sleep def qu(): print("bye") os._exit(0) t=threading.timer(5.0,qu) t.start() while(true): sleep(1) print("hi") anyways suggest checkout this question similar yours.

mysql - Select data from the last complete row -

i have spreadsheet being migrated mysql database. in future spreadsheet won't filled in. data uploaded directly database. spreadsheet in 2 tables. one, called piles, contains info on product. other, called cubes, contains test results performed on products. sample data 2 tables below: piles: +----------+------------+---------+-----------------+ | id | date | mouldid | stockcode | +----------+------------+---------+-----------------+ | 23a42895 | 2017-06-09 | 23a | 250cdj09.0/0412 | | 23b42895 | 2017-06-09 | 23b | 250cdj07.0/0412 | | 642895 | 2017-06-09 | 6 | 250cdj09.0/0412 | | 8642895 | 2017-06-09 | 86 | 250cdj07.0/0412 | | 842895 | 2017-06-09 | 8 | 250cdj09.0/0412 | +----------+------------+---------+-----------------+ cubes: +---------+------------+-------------+---------+ | id | date | conctotalm3 | mouldid | +---------+------------+-------------+---------+ | 2342895 | 2017-06-09 | 18.1 | 23 | | ...