Posts

c# - TempData value implicitly cast from List<string> to string[] after RedirectToAction() -

i using tempdata allow error message displayed after redirect. compatibility, using list<string> add messages list of errors in notificationhelper class: if (tempdata["errornotification"] == null) { tempdata["errornotification"] = new list<string> { message }; } else { var data = (list<string>) tempdata["errornotification"]; data.add(message); tempdata["errornotification"] = data; } inside controller, fill tempdata error message , before return redirecttoaction() call, tempdata contains dictionary record list<string> (to exact: system.collections.generic.list`1[system.string] ) value right after call, inside terms() function, value becomes array ( system.string[] ). [httpget] public iactionresult terms() { return view(); } [httpget] public iactionresult index() { notificationhelper.adderrornotification("error!", tempdata); return redirecttoaction("terms...

html - Add a class to a group of elements in Pandoc markdown? -

i use pandoc create content website. for example, have following content on page: # me text. ## hobbies ### hiking text hiking. ### dancing text dancing. ### other text other. ## why love pandoc more text. pandoc parses me , outputs nice html. but want post-process html further, example want hobbies part become accordion. for i'd in own container, e.g. <div class="accordion"> . possible somehow? update by attaching class specific heading, can achieve close need: ## hobbies {.accordion} ... now can target using css (code not tested): h2.accordion ~ *:not(h1, h2) { color: red; } this assumes next heading on same (or higher) level belongs carousel. this can of help. don't know though whether fits requirements, it's start. sure, markdown supports raw html , e.g.: # me text. ## hobbies <div class="hobbies"> ### hiking text hiking. ### dancing </div>

vba - Every time a cell's value changes, copy and paste range to next open column on sheet2 -

Image
i have tried variety of functions try , work bit complicated skill level vba, appreciated. i have workbook 2 worksheets, 1st having large range of data , formulas , 2nd containing 2 empty tables populated specific date sheet1. sheet1 has column of dates range("dk7:dk39") range 5/1/1986 5/1/2018. time first date changed in column ("dk7"), of other dates in following years auto-update same day in given year. these changes, 2 separate columns repopulated new data determined based on date-specific data. i have code cycles target/first date cell ("dk7") through dates need data for: dim date = dateserial(1986, 5, 1) dateserial(1986, 8, 28) range("dk7").value = next i need add code while dates being cycled through , thus, creating new data needs recorded, ranges ("ds7:ds38") & ("dt7:dt38") copied , pasted next open column in 2 respective ranges on sheet2 formatted years 1986-2017 y-axis column , 5/1 through 8/28 x-...

python - how to find if edit box got the focus -

i need verify focus moves edit box after typing "enter" in other edit box. i'am using pywinauto library. tried using 'has_keyboard_focus()' returns 'false' no matter focus is. o = dlg.child_window(title="uut1", auto_id="gbuut", control_type="group"). \ child_window(title="serial # 2 :", control_type="edit").has_keyboard_focus() print(o)

wordpress - Bootstrap Post Carousel blocking other PHP in page-template -

i have created post carousel within wordpress page-template, other php (such advanced custom fields content , such) blocked. wp_debug shows no errors , can't find error within code. below code have used create carousel recent posts custom post type: when entirely remove slider php below work/load, can't seem find mistake in code. <div class="carousel-inner" role="listbox"> <?php $i = 2; global $post; $args = array( 'numberposts' => -1, 'post_type' => 'work', 'orderby' => 'date', 'order' => 'asc', ); $myposts = get_posts($args); if($myposts): $chunks = array_chunk($myposts, $i); $html = ""; foreach($chunks $chunk) { ($chunk === reset($chunks)) ? $active = "active" : $active = ""; $h...

-Xmx2048m is ignored by eclipse.ini -

my eclipse based product eclipse.ini has below entry accommodate 2gb of heap memory : -startup plugins/org.eclipse.equinox.launcher_1.3.201.v20161025-1711.jar -application xx.yy.zz.mm.application.application -showsplash splash.bmp --launcher.appendvmargs -vmargs -dosgi.requiredjavaversion=1.8 -xms512m -xmx2048m when launched exe not working ini entry xmx being ignored. workaround : using batch file below entry: java -dosgi.requiredjavaversion=1.8 -xms256m -xmx2048m -xss4m -jar plugins/org.eclipse.equinox.launcher_1.3.201.v20161025-1711.jar -application xx.yy.zz.mm.application.application -showsplash splash.bmp which working fine solution looks ugly users has launch application not exe batch file. info helpful. using windows7 + 64bit jre + eclipse neon strange part while xmx agrument working fine batch file why not working .exe+ini! don't know if can debug launcher or why ini file ignoring 2048m memory. the ini file fragile, sensitive whitespace , silently i...

excel - Looped call on rows in VBA -

i'm trying run call on top row, delete row , move cells below , run on new top row again. repeat excercise till there no more rows left. , yes know slow way of doing it, call takes 10 secs each row, it's nice way of keeping track of progression (i.e how many rows left). this i've got far, not understanding request delete range a2:c2 , move cells below if there value in range a3. any appreciated! sub loop_through_rows() dim rngquantitycells range set rngquantitycells = range("a2", range("a2").end(xldown)) = 1 rngquantitycells call runsplit if range("a3").value > 0 range("a2:c2”).delete shift:=xlup end if next end sub try this: sub loop_through_rows() dim rngquantitycells range set rngquantitycells = range("a2", range("a2").end(xldown)) = 1 rngquantitycells call runsplit if range("a3").value > 0 range("a2:c2").delete shift:=xlup end if next end sub ...