Posts

excel - Error when select multiple cells and press delete/backspace -

i have following code. stuff when [g,g,y,y,r,r] pressed , there error handling in case other keys pressed well. works fine! however, when multiple cells in column 11 selected , delete/backspace pressed "run-time error '13': type mismatch". private sub worksheet_change(byval target range) dim testcell dim re object dim rematches object dim cell1_1 string dim today string dim cell string thisrow = target.row 'action happens when typing [g,g,y,y,r,r] if target.column = 11 set re = createobject("vbscript.regexp") re .multiline = false .global = false .ignorecase = true .pattern = "[g,g,y,y,r,r]" end each testcell in target.cells set rematches = re.execute(testcell.value) if rematches.count > 0 , len(target.value) = 1 if len(cells(1, 1).value) = 1 today = now() cell1_1 = sheets("input").cells(1, 1).value range("l" & thisrow) = cell1_1 + ": " + format(toda...

Coldfusion site - Chrome tries to link to https version of files that don't exist -

a couple coldfusion-based sites run having problem in chrome. i'm using <link rel="stylesheet" type="text/css" href="<cfoutput>#request.rootpath#</cfoutput>_data/styles/website.css"> refer stylesheet. when go site using chrome, stylesheet doesn't load, , when in source, link pointing https url instead of http . somehow, thinks stylesheet link should start https , when site regular-ol' http . http://www.preston-hanley.com/ , http://www.fmchosp.com/ it seems returning https time use <cfoutput>#request.rootpath#</cfoutput> ... any idea why , how can fix it? search through code base , see request.rootpath defined, since don't think defined coldfusion. deduced cgi scope , saw dave quested tweeted yesterday latest chrome reports different cgi.https . quote from: https://twitter.com/davequested/status/623968823276761089 chrome 44.0.2403.89 appears change cgi.https behaviour in #...

java - Don't you have to use the same parameter names when calling a method? -

in code below, i've written 2 methods: one has variable test defined string one returns 2 different outcomes depending on typed i have variable named test in userinputhere while parameter in hello named message . in userinputhere use test instead of message - why work? does parameter not matter when invoke hello method? i when entering method returns something, has defined , parameters define further method going work on, so, had assumed that, when calling said method method, have use same parameters, doesn't seem case. import java.util.scanner; public class methodsandparameters { static scanner input = new scanner(system.in); public static void main(string[] args){ userinputhere(); } public static void userinputhere(){ string test = input.nextline(); system.out.println(hello(test)); } public static string hello(string message){ if (message.equalsignoreca...

angularjs - Are Angular directive controllers only meant for exposing publicly? -

from angularjs directive documentation: best practice: use controller when want expose api other directives. otherwise use link. is case use controllers inside directives? what init functionality such defaulting variable , scope values? should go link, unless publicly exposed? i use "link" when have implement deeper dom manipulation. "regular" component should use controllers. idea use "link" when don't have other option it's more involved , requires deeper understanding of how angular sj works.

bash - Pipe One Serial Port to Another in Linux -

i looking means pipe 1 serial ports data (regardless of data type) serial port. in case trying take in data 1 serial port , output through radio connected serial port in real time. i know ports using , have looked program called socat, should able handle there no examples of how , have not been able figure out how it. has been able use socat or bash scipt/some other method accomplish in linux?? i running ubuntu 14.04. assuming serial port reading /dev/ttys0 , , other writing (where radio connected) /dev/ttys1 shall do: cat /dev/ttys0 > /dev/ttys1 or dd if=/dev/ttys0 of=/dev/ttys1 bs=1 of course before should set serial ports' parameters using stty command.

c# - Getting one or more error occured exception in downloading via HttpClient and Parsing with XElement -

i creating news app need support news of multiple language in visual studio xamarin c#. using code below. list<feeditem> feeditemslist = new list<feeditem>(); try { httpclient wc = new httpclient(); var html = wc.getstringasync(new uri(url)).result; xelement xmlitems = xelement.parse(html); // need create list of elements list<xelement> elements = xmlitems.descendants("item").tolist(); // we're putting informations got in our listbox in xaml code // have use foreach statment able read elements // description , link , title attributes in rssitem class i've added list<feeditem> aux = new list<feeditem>(); foreach (xelement rssitem in elements) { feeditem ...

c# - Shorter syntax for List construction -

with c# 6.0, given static method: public static list<t> list<t>(params t[] items) => new list<t>(items); and appropriate using : using static listtest.listutils; i can use list construct lists: var lsint = list(10, 20, 30); var lsstr = list("abc", "bcd", "cde"); without list method, construction can done via: var lsintinitializer = new list<int>() { 10, 20, 30 }; the name list being used both class , method. seems work fine, besides not being considered idiomatic, there technical reasons why shouldn't use list method name here? i can use list , that's not idiomatic in different way, in methods tend capitalized. note, have no problems going non-idiomatic route, if there's accepted practice in area, i'd know it. of course, c# 6.0 using static brave new world, perhaps there's not yet enough community experience around sort of thing. the language-ext project uses similar approach...