Posts

Showing posts from February, 2015

c# - How to layer one window on top of another with transparency(Overlay) or how to do aplha-blending on two windows using directx? -

i trying achieve alpha blending of 2 windows have 1 window contains image , window contains webpage. want alpha blend these 2 windows gives overlay effect , want top window transparent window underneath seen. later want save in video(preferably using direct x). have read several tutorials on internet regarding direct x alpha blending have not been able find want achieve. example/source code achieve or pointer towards right direction appreciated. finally found answer myself. further research lead me this,this thread looking for. might useful else , might save lot of head banging on research.

java - Simple TextToSpeech code -

i want make simple texttospeech code. code here: texttospeech tts = new texttospeech(this, this); tts.setlanguage(locale.us); tts.speak("this alert application", texttospeech.queue_add,null,null); but getting error: error:(100, 28) error: no suitable constructor found texttospeech(mainactivity,mainactivity) constructor texttospeech.texttospeech(context,oninitlistener,string) not applicable (actual , formal argument lists differ in length) constructor texttospeech.texttospeech(context,oninitlistener) not applicable (actual argument mainactivity cannot converted oninitlistener method invocation conversion) what missing? need put in code? if allow of thread sleep , after sleep calling tts.speak(). if so, @ point looking @ code, tts not seem initialized , null crash exception. this code should prevent exception, if initialization of tts engine takes long, won't loading. also, guessing 5 second (which long time btw) sleep allow initialized? code

html - grunt SVG to webfont -

i'm trying generate webfont svgs using grunt-webfont . the issue need task valid on windows , linux machines. in order achieve need use node engines doesn’t work svg files . i know if there way convert svgs proper svg format supported grunt plugin or alternatively there better grunt plugin/s achieve this i have task able take svgs (created in illustrator) , output webfont files (.eot,.svg,.svg,...) , css file (like icomoon export) thanks. perhaps artboard small. recommend checking have 512pt x 512pt artboard each icon. stumbled upon gem ( https://www.fourdigits.nl/blog/using-a-webfont-to-display-icons ) when grunt-webfont documentation left me alone in forest.

java - simplified regex solution for version with format <0-999>.<0-999>.<0-999> -

before everything, i have gone through several other regex related questions , came solution looks there might simpler solution i beginner regex i using java execute server side version should of format "< major >.< minor >.< beta >" either of them having range <0-999> my desired behaviour follows 0 - 0.0.0 1 - 1.0.0 000.0.0 - 0.0.0 ..9 - 0.0.9 00007 - 7.0.0 090876 - validate false 9.00098000.00 - validate false 9.0900000.00 - 9.09.0 -13.0.4 - validate false 1a.0.4b - validate false my solution follows if (stringutils.isblank(version)) { //set error } else { if (!this.version.trim().matches("\\d+") && !(this.version.trim().matches("^-+")) && !(this.version.trim().matches("^+"))) { string[] versionsplit = this.version.split("\\."); // in format <major>.<minor>

javascript - Why does this event listener not work? -

i tried adding event listener cars3 id'd paragraph when click paragraph should execute getvalue() method not work. don't understand why. thanks. <!doctype html> <html lang="en"> <head> <script> function getvalue() { var x=document.getelementbyid("cars").value; document.getelementbyid("cars2").innerhtml = x.tostring(); } document.getelementbyid("cars3").addeventlistener("click", getvalue()); </script> </head> <body> <h1 id="myheader" onclick="getvalue()">"click here !" </h1> <p id="cars3">afaf</p> <select id="cars" name ="cars"> <option value="volvo">volvo</option> <option value="saab">saab</option> <option value="mercedes">mercedes</option> <option value="aud

ajax - Get the value of hidden input in the for with jquery -

hello guys (sorry english) i work symfony 2 , i' meet difficulty jquery, explain: i value of hidden input when mouse on item when doing : <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script> <script> $(function(){ $(".item").each(function(){ $(this).mouseover(function(){ var value = $(".id_sous_item").val(); var data = { id: value }; console.log(data); $.ajax({ url: "{{ path('sous_item_page') }}", cache: false, data: data, success: function(msg){ $(".item_right .description").append(msg);

html - Can't get my CSS to Float right -

i'm following udemy complete web development course. i'm supposed making clone of bbc website i'm having couple of issues. first of font bigger this, set same 0.75em. h1 tag seems to right of tag guessing i've messed flow somewhere can't see how. http://jsbin.com/yowoyohaja/1/edit?html,output from can gather, header above date? if that's case move h1 tag above date in html , ensure open tags closed, h1 tag left open. see updated jsbin: http://jsbin.com/cetokibuva/1/edit

javascript - Table.rows.cell[i] properties not working in chrome -

i have javascript table manipulation code not working in chrome working fine in ie8 here code //tbl == html table var firstrow = tbl.rows[0]; c = firstrow.cells[0]; var n = c.all.length; // not working in chrome. any hint?

c# - Disable image paste in RichTextBox in Winforms -

we have usercontrols herits richtextbox . forbid user enter image(with copy paste) in user control. i found several places speaking of this: this doesn't work winforms this not work when doing right-click -> paste currently i've solution: protected override bool processcmdkey(ref message msg, keys keydata) { if (keydata == (keys)shortcut.ctrlv || keydata == (keys)shortcut.shiftins) { if (clipboard.containsimage()) { return false; } } return base.processcmdkey(ref msg, keydata); } which works copy paste ctrl+c-ctrl+v, not contextual menu. edit i tried given proposition: public class customrichbox : richtextbox { private const int wm_paste = 0x0302; protected override void wndproc(ref message m) { if (m.msg == wm_paste ) { if (clipboard.containsimage()) { return; } } base.wndproc(ref m); } } but when ct

.htaccess - PHP URL Routing - Using Database Entries in Class -

orginal query - updated query below in process of building custom application in php. know there have been many questions asked routing etc. on here , have spent many of hours reading them all. how got routing elements work in first place. 1 thing cant fit project peoples suggestions on how route urls based on database entry. the application working fine , have url routing in place works how want it. issue have when add new products database have trigger generates seo friendly url , stores in field in database. all product urls structured in same way. /north/productdetails/productname /south/productdetails/productname /northeast/productdetails/productname etc. looking not have manually write new url route routes.php file every time product added. this .htaccess rewriteengine on rewritebase / rewritecond %{request_filename} !-f rewritecond %{request_filename} !-d rewriterule ^(.+)$ index.php?uri=$1 [qsa,l] and index.php file contains: <?php header("cache-

cllocationmanager - CLLocation manager not working iOS 8 -

i'm trying follow google maps tutorial: http://www.raywenderlich.com/81103/introduction-google-maps-ios-sdk-swift like many others have hit roadblock cllocationmanager not seem fire startupdatinglocation() . i have updated plist nslocationalwaysusagedescription , nslocationwheninuseusagedescription in accordance location services not working in ios 8 , still no location being fired. code below - appreciated! import uikit class mapviewcontroller: uiviewcontroller, typestableviewcontrollerdelegate, cllocationmanagerdelegate { @iboutlet weak var mapview: gmsmapview! @iboutlet weak var mapcenterpinimage: uiimageview! @iboutlet weak var pinimageverticalconstraint: nslayoutconstraint! var searchedtypes = ["bakery", "bar", "cafe", "grocery_or_supermarket", "restaurant"] let locationmanager = cllocationmanager() override func viewdidload() { super.viewdidload() locationmanager.deleg

Can you extend Message processors with JavaScript in Mule ESB? -

i interested hear how of java code can writen in javascript in mule project. when want custom message processor can extend java class, can same javascript? i unclear trying evaluate here. depends on choice of scripting language. mule supports several scripting languages , can using scripting components can using java. regards, rupesh sinha

visual studio 2013 - Error "index was out of range. Must be non-negative and less than the size of the collection" C# WPF vs2013 -

i have problem: c# wpf (vs 2013 pro, .net framework 4.0) standalone desktop application works on windows operating systems 1 exception: on windows xp error: "index out of range. must non-negative , less size of collection". the error comes out on datagrid (event mousedoubleclick or contextmenu), in tabcontrol (there 26 tabs, letters in latin alphabet (a, b, c....)) when choose record modify datagrid , open form data record (like formname.showdialog()). strange thing me numbers ok, mean index 0 (the first record of datagrid) , real id of record ok. this code (the error on showdialog); tried insert try catch around showdialog() see happens , got error. private void datagridelencopazienti_mousedoubleclick(object sender, mousebuttoneventargs e) { persona paziente = getrigapaz(); if (paziente == null) { messagebox.show("prova selezionare la riga cliccando col pulsante sinistro e poi col destro e quindi selezionare l'

mysql - SQL nested select sum returns wrong integer -

i have following select statement: select t.name, c.name competence_name, thc.competence_level_id requiredlevel, (select sum(uhc.competence_level_id) user_has_competence uhc inner join user u on u.id = uhc.user_id competence_id = c.id , u.title_id = t.id group t.id) current_level, (select round(sum(uhc.competence_level_id)/ count(uhc.user_id)) user_has_competence uhc join user u on u.id = uhc.user_id competence_id = c.id , u.title_id = t.id group t.id) - thc.competence_level_id gap, c.id title_has_competence thc join title t on t.id = thc.title_id join competence c on c.id = thc.competence_id this returns following result: 'head of it', 'office', '7', '16', '1', '524' 'head of it', 'empatisk', '2', '5', '1', '527' 'head of it', 'målrettet

java - Log4j2 smtp appender doesn't work for root logger -

i'm using log4j2.2 in app. i'd receive email when there error in application. so configured smtp appender: <smtp name="mailer" subject="ecall logs" to="${receipients}" from="${from}" smtphost="${smtphost}" smtpport="${smtpport}" smtpprotocol="${smtpprotocol}" smtpusername="${smtpuser}" smtppassword="${smtppassword}" smtpdebug="true" buffersize="200" ignoreexceptions="false"> </smtp> and added root logger: <root level="error"> <appender-ref ref="console" /> <appender-ref ref="asyncfile" /> <appender-ref ref="mailer" /> </root> unfortunately configuration never receive email when there errors in app. in fact i've others custom loggers: <logger level="info" name="org.flywaydb" additivity=&quo

wpf - Re establishing clients connection with WCF service -

i have wpf application communicates wcf service provides data updated wpf application on ui on continues basis. service hosted on nettcp. now, if reason wcf app loses lan connection , after few seconds connection established again, wpf app not able resume connection service. welcomed. you make socket on wpf client, accept connection service, if service online again sends data packet in collection connected, if client recieves packet requests connection service again, "resume" connection

javascript - Displaying a dialog from within a Polymer component -

i've polymer component, inside of 1 of function want display dialog user. tried dialog-paper follows: <template> <link rel="stylesheet" href="../themes/the-graph-dark.css"> <link rel="stylesheet" href="../themes/the-graph-light.css"> <div id="svgcontainer"></div> <paper-dialog heading="title dialog" id="dialog"> <p>lorem ipsum ....</p> <p>id qui scripta ...</p> <paper-button label="more info..." dismissive></paper-button> <paper-button label="decline" affirmative></paper-button> <paper-button label="accept" affirmative autofocus></paper-button> </paper-dialog> </template> ... eventhandler: function(event) { this.$.dialog.toggle(); console.log(event); }, when try toggle dialog when eventhandler invoked nothing shown , uncaught typee

Unable to use Objective-C library in Swift project -

i've tried import objective-c library named ddhotkey in swift project , doesn't work in cases. here steps i've done: download "ddhotkey" repository right-click on project -> "add files %project_name%" -> select "ddhotkey-master" folder "copy items if needed" checkbox , "create folder references" radiobutton enabled according apple documentation, prompt bridging header should appear then, didn'tt-- files copied project's directory i've tried add bridging header project manually (file -> new -> source -> header file) name "bridge.h", set in project's settings (build settings -> swift compiler - code generation -> objective-c bridging header -> "bridge.h") , place following code file: . #ifndef project_name_bridge_h #define project_name_bridge_h #import "ddhotkey-master/ddhotkeycenter.h" #endif now compiles following code: var hotkeyce

javascript - AngularJS Scope variable Unwatch -

i want unwatch 1 angular scope variable after point in program. here following. $scope.oldvar = {data: "something"} $scope.blankarray = [] $scope.blankarray.push($scope.oldvar) now whatever changes doing $scope.oldvar, reflecting changes blankarray viewing on screen. is there way in angular restrict that? use angular.copy you can use angular.copy create new copy of data. prevent data being bound within blankarray . so @ point in application, unbind values, can use angular.copy . $scope.blankarray = angular.copy($scope.blankarray) here dragons the problem unbinding value you'll introducing complexity controller needs aware of when value bound , when isn't bound. introduces state manage , logic needs have awareness. demonstration function ctrl($scope) { $scope.oldvar = {data: "something"}; $scope.blankarray = []; $scope.blankarray.push($scope.oldvar); $scope.withoutcopy = [] $scope.withoutcopy.pu

selendroid - Is there any way to automate scanning of barcode from appium? -

i require app scan barcode automatically , have barcodes, have app required, how can make app read physical bar codes using automation in appium, in manual can scan code pointing out camera bar code. dont know how while executing test suite. got idea of placing mobile device on stand, tripod , placing barcode in front of it. problem can test 1 barcode. want run 100-200 barcodes ans see app performance not decrease, can 1 suggest ways? this interesting case. if want test app scanning bar codes through camera think instead of looking solution through appium have solution match manual process. you can click scan button using appium(i assume) - example can write script click on button every 10 seconds. challenge point camera next barcode first scan complete. possible solutions- believe bar codes can captured in file in pc. copy these bar code images in ppt or using other program these images can automatically displayed 1 one. put device in front of pc planning use tripod s

jasper reports - how to upload jrxml file in jaspersoft studio? sftp -

Image
after editing jaspersoft template in studio version 6.0.3 possible export or upload jrxml file server via sftp directly jaspersoft studio? currently after edits made , saved have go ftp client upload files. try use eclipse rse installing dedicated feature. it's possible jaspersoft studio. need add update site it. suggest use indigo one, because juno (dedicated 4.2.x) may screw ui , other jss capabilities. if eclipse 3.8.2 version, platform used jss product, referred juno, can more bug-fix version of indigo 3.7.x. so add indigo update site: http://download.eclipse.org/releases/indigo/ later can select feature "remote system explorer end-user runtime", install , free try if suits needs. see screenshot below: personally installed, didn't play it. anyhow suggest give following blog post: http://rays-blog.de/2012/05/05/94/use-winscp-to-upload-files-using-eclipses-autobuild-feature/ maybe it's better set-up custom script, user did because not

error handling - How to get parent component's name in React? -

i provide nice error messages of components, react does, example: warning: each child in array should have unique “key” prop. check render method of mycomponent. see fb.me/react-warning-keys more information. this message provides info context of error. know can find in debugger, want make debugging easier me , fellow programmers. while it's not clear how you'd use promise component mentioned in comment, try this: var componentname = this.constructor.displayname || this.constructor.name || undefined; it's inspired this function in reactjs code looks @ constructor build name during react element validation. but, if want parent's name, isn't possible through documented means , fragile if built code depending on specific internal implementation. it's 1 way flow of information child doesn't need link parent way of normal architecture. if need parent name, you'd need value , pass through children i'm sure isn't desirea

Restrict Sharepoint List Items -

i have web part on home page sharepoint announcements. on announcements have public / private option. i want web part show private options users member of permission group. how this? you have 2 web parts on same page , set audience targeting on web part cover 2 groups. user should see web part if they're member of whichever group. example (with made group names) web part might target members of 'managers' other target 'employees'. each see 1 web part. if 2 groups aren't separate presently, you'd have go through central admin create missing audiences include or exclude users necessary.

Jsp code with mysql -

i facing problem in mysql query. query working fine in php admin.whenever implementing through jsp code showing string literal not closed error. here code string query="select * ( (select supplierticketid supplierticketid, tickettype tickettype, supplierticketstatus supplierticketstatus, createdby createdby, suppliertype suppliertype supplierticket) union (select factoryticketid, tickettype, factoryticketstatus, factoryticketcreatedby, suppliertype factoryticket) )t"; plz me..what problem in query..thanks in advance use below query :- string query ="select *

c++ - Missing libclang_rt.san-x86_64.a file for LLVM compiler-rt -

i've built llvm/clang compiler-rt , tried -fsanitize option. strangely link failed since cannot find libclang_rt.san-x86_64.a . /usr/bin/ld: cannot find /home/hongxu/research/llvm-git/obj/bin/../lib/clang/3.7.0/lib/linux/libclang_rt.san-x86_64.a: no such file or directory clang-3.7: error: linker command failed exit code 1 (use -v see invocation) when changed directory /home/hongxu/research/llvm-git/obj/bin/../lib/clang/3.7.0/lib/linux/ , found there other library files # addresssanitizer libclang_rt.asan_cxx-x86_64.a libclang_rt.asan-preinit-x86_64.a libclang_rt.asan-x86_64.a # dataflowsanitizer libclang_rt.dfsan-libc-x86_64.a libclang_rt.dfsan-x86_64.a # leaksanitizer libclang_rt.lsan-x86_64.a # memorysanitizer libclang_rt.msan-x86_64.a # threadsanitizer libclang_rt.tsan-x86_64.a # undefinedbehaviorsanitizer libclang_rt.ubsan_cxx-x86_64.a libclang_rt.ubsan_standalone_cxx-x86_64.a libclang_rt.ubsan_standalone-x86_64.a libclang_rt.ubsan-x86_64.a and can guess function

android - Using StrictMode in app production phase -

i know strictmode designed used in application development phase, according app needs, it's not acceptable anr while it's quite acceptable crash, , strictmode provides way prevent anr dialogs: strictmode.setvmpolicy(new strictmode.vmpolicy.builder().detectall() .penaltylog().penaltydeath().build()); what if used inside app production phase? , happen when app getting anr while strictmode used? freeze, crash, or wait until getting responded again? strictmode disabled default, , users needs enter "developer's mode" in android enable it. makes solution of using strictmode irrelevant. anr's occur in rare occasions out of control, due conditions such low memory or other app choking cpu. however, can minimize likelihood of getting anr's moving every single operation access storage or network asynchronous task. in software add line of code dangerous places: assert !util.ismainthread():"woh! doing on main thread??"

nim - Difference between a const inside a proc vs outside -

this dumb question, other visibility there real difference between const inside proc vs outside? const foo = "foo" proc test() = const bar = "bar" echo foo & bar test() like when inside, stack grow , shrink const every time proc invoked, or because it's const held in static memory location duration of application? i'm asking nim reflections on differences/similarities in other languages welcome too. if @ generated c code, see line: string_literal(tmp139, "foobar", 6); what tells foo & bar evaluated @ compile time. nimbase.h has this: #define string_literal(name, str, length) \ static const struct { \ tgenericseq sup; \ nim_char data[(length) + 1]; \ } name = {{length, length}, str} const in nim more static memory location. seem in case string "foobar" in static memory location. however, if replace these strings numbers, example,

facebook - Reading user's posts to pages -

for given facebook user, there possibility read posts he's made pages? on fb web, these can found in activity log, far couldn't find method them via api. both /user/posts , /user/feeds contain status , profile updates, not posts pages. know can read /page/feed , use paging find user's posts page user likes, how doesn't? no, outside of fql, there nothing in api accomplishes this. i'd imagine pretty data intensive call minimal use cases however, don't think introduced anytime soon.

excel - Change a column in PowerQuery based on another column -

i try make in excel powerquery equal operation sql operation: set columna = "max" columnc = "george" i know can create new colum n m expression if columna = "max" "george" else "something" but don't create third column again , again. any ideas how ? you can chain if statements together, so if [columna] = "max" "george" else if [columna] = "jane" "janet" else "something" you can create record looks names , uses alternate name if exists. can done creating record in 1 query: let source = [max = "george", jane = "janet"] in source let query called names. then, when add custom column, can use expression: if record.hasfields(names, [columna]) record.field(names, [columna]) else "something" hope helps.

javascript - Clear browser cache with query string approach -

i need clear browser cache when push updated javascript file on server. simple answer use below technique of query string. <script type="text/javascript" src="/js/myjsfile.js?{my file version}"></script> it work do need on every single script tag of every single page of application? can @ main screen login loads @ beginning , assume clear cached file new one, work? "do need on every single script tag of every single page of application?" yes do. cache based on file's url, including parameters. adding parameters doesn't remove file browser's cache, more or less sees new, different file. this answers point 2, since having on pages means can't on 1 page.

java - TestNG and Powermockito - cannot mock static void -

i can't powermock work testng. same code adjusted junit works fine, somehow in testng fails. testng version 6.8.21 powermockito version 1.6.1 package p; import org.mockito.mockitoannotations; import org.powermock.api.mockito.powermockito; import org.powermock.core.classloader.annotations.preparefortest; import org.powermock.modules.junit4.powermockrunner; import org.testng.assert; import org.testng.annotations.beforetest; import org.testng.annotations.test; import static org.powermock.api.mockito.powermockito.mockstatic; @preparefortest({footest.class}) public class footest { @beforetest public void setup() { mockstatic(footest.class); mockitoannotations.initmocks(this); } @test public void test() throws exception { powermockito.donothing().when(footest.class,"foo"); footest.foo(); assert.assertequals(1, 1); } public static void foo() throws exception { throw new exception("huh?

javascript - Yii2 add image,css,js files from vendor folder on page from js script -

i try create lib editing pictures. have main js file including other js, css , images files. example, used: $.getscript(site_url + '/vendor/first_folder/second_folder/assets/js/script.js'); i read path web sets @ appasset.php, if ask change @webroot @vendor.. @ extention configuration think wrong. created myasset.php , set there such configurations: namespace app\vendor\first_folder\second_folder; use yii\web\assetbundle; class edikeditorasset extends assetbundle { public $sourcepath = '@vendor/first_folder/second_folder/assets/'; public $css = [ 'css/main.css' ]; public $js = [ 'js/jquery.colorbox-min.js', 'js/main.js' ]; } but cannot include others js, css , image files extention, because js,css , images start including web folder , don't know how go above. can change including js, css, images files vendor folder? p.s. tried change using different paths pa

asp classic - How to get IIS 8.5 to send detailed error messages? -

we trying run classic .asp application on windows 2012 iis 8.5. asp scripts work in general when there error (e.g. include missing or syntax) see: an error occurred on server when processing url. please contact system administrator. if system administrator please click here find out more error. this although have enabled detailed error messages on site , regardless of whether run application remotely or via localhost. we want know script , line of code causing problem. we've tried routing 500 errors error handling .asp page can provide error details no avail. ps: there seems no "asp" feature no way enable debugging or like. thanks @keith useful tip. missing key in case icon asp feature. have start iis manager using "run administrator" before see this. once have can enable "send errors browser" described in link provided above: https://stackoverflow.com/a/5912873/65775

angularjs - Why won't $http set a default header? -

$http.post('http://localhost:7001/v1/sessions', { data: { username: $scope.user.username, password: $scope.user.password, type: 'sessions' } }) .then(function(response) { if(response.data.data.token) { $http.defaults.headers.common.authorization = response.data.data.token; $state.go('app.dashboard'); } else { $scope.autherror = response; } }, function(x) { $scope.autherror = 'server error'; }); i can confirm if condition gets called , response.data.data.token present. it goes app.dashboard state intercepted ui-router : $stateprovider.state('app', { abstract: true, url: '/app', templateurl: 'tpl/app.html', resolve: { current_user: ['$http', function($http) { return $http.get('http://localhost:7001/v1/users/4/entities'); }] } }) that call, however, not have set in header. thought $http.defaults set default value in header. doing incorrectly?

mysql - Select unique rows after union query -

have query: (select status, cb_ebook, product_id, titel, auther, image oc_product status , cb_ebook , titel '%term%') union (select status, cb_ebook, product_id, titel, auther, image oc_product status , cb_ebook , auther '%term%') however, there duplicatie rows in result, want unique product_id - tried group product_id not work. any solutions ? you can try adding distinct after union query, example? select distinct(x.status) status,x.cb_ebook,x.product_id,x.titel,x.auther,x.image ( (select status, cb_ebook, product_id, titel, auther, image oc_product status , cb_ebook , titel '%term%') union (select status, cb_ebook, product_id, titel, auther, image oc_product status , cb_ebook , auther '%term%') ) x

mysql - More nested while loops in PHP -

i tried pull data database need 2 while loops nest (fetch_assoc). problem inner loop doesn't loop gives me first element of array, array length times. <?php $al_num = $_get['album']; $photo_query = "select photo album album_number={$al_num}"; $thumbnail_query = "select thumbnail album album_number={$al_num}"; $photo_result = mysqli_query($connection, $photo_query); $thumbnail_result = mysqli_query($connection, $thumbnail_query); ?> <?php while($photo = mysqli_fetch_assoc($photo_result)): ?> <?php while($thumb = mysqli_fetch_assoc($thumbnail_result)): ?> <li> <a href="images/<?php echo $photo['photo'] ?>" class="highslide" onclick="return hs.expand(this, config1 )"> <img src="images/<?php echo $thumb['thumbnail'] ?>" alt=""/> </a> </li> <?php

c# - Close WPF User Control Popup in MVVM -

i showing user control dialog in wpf-mvvm application. here code. var productview = new product(); var productviewmodel = new productviewmodel(); productview.datacontext = productviewmodel; this.showdialogwindow("add product", productview); and showdialogwindow method this protected void showdialogwindow(string header, usercontrol control) { radwindow window = new radwindow(); window.owner = app.current.mainwindow; window.windowstartuplocation = system.windows.windowstartuplocation.centerowner; window.content = control; window.header = header; window.canclose = true; window.resizemode = resizemode.noresize; window.showdialog(); } now, have button "close" in dialogwindow user control. how can close window using button ? note: wpf user control not window. want close using mvvm only consider leveraging messaging parameters pass around data between objects. you

html - Positioning a div between two buttons -

Image
i'm trying have remote control buttons, , div playing info between 2 of them. but doesn't work. as can see, on actual ipad, renders differently, , don't know how fix it. html: <div id="buttons"> <button id="prev" class="control" onmousedown="skip('prev')"></button> <div id="info"> gfegrbhthehrerhg</div> <button id="next" class="control" onmousedown="skip('next')"></button><br /> <button id="rwd" class="control" onmousedown="changespeed(-2)"></button> <button id="stop" class="control" onmousedown="emitcommand('stop')"></button> <button id="play" class="control" onmousedown="emitcommand('play: loop: true speed: 100')"></button> <button id="ffwd" class="con

excel - Array/Collection not inserting values into cbo on custom userform -

i have read article doug glancy creating flexible chooser form. utilizing code , previous worked code trying dynamically read list of strings, insert them collection , pass collection values chosen in custom combo box. although, not show in combo box when have correct spreadsheet open. below code wrote. doug glancy's article: http://yoursumbuddy.com/a-flexible-vba-chooser-form/ this code used in module: '========================================================================================================================== 'filename: modvulnerabilityreport 'description: module contain functions analyze list of vulnerabilities outputted vulnerability ' remediation asset manager (vram) systems @ site. utilizing built-in worksheet functions, output ' calculation of number of vulnerabilities per category displayed in message box. 'concept taken from: doug glancy 'originally written by: doug glancy, zack barresse 'modif

asp.net mvc - MVC Checkbox not checked when value is true -

i have grid of records contain check box. check box indicates whether transaction has been acknowledged or not. testing purposes, added display text next check box , text indicates boolean true. however, check box not checked. @for (int = 0; < model.transactionlist.count; i++) { <tr> <td class="hidden"> @html.hiddenfor(m => m.transactionlist[i].providertransactionid)</td> <td class="text-center"> @html.displaytextfor(m => m.transactionlist[i].acknowledged) @html.checkboxfor(m => m.transactionlist[i].acknowledged) @html.hiddenfor(m=>m.transactionlist[i].acknowledged) </td> <td> @html.displayfor(m => m.transactionlist[i].fromuictxt) @html.hiddenfor(m => m.transactionlist[i].fromuictxt) </td>

css - How to style a QWizard's button area? -

Image
i have application styles set in qss file. widget backgrounds darker colour , buttons have own styles too. this working throughout software except on qwizard seems have own button area across bottom of wizard default qt widget colour still applied it. i have looked @ various components can apply styles on qwizard none of them seem button area across bottom of form, wondering if has encountered before , found out object need apply style change colour of area. if set wizard style classicstyle qwidgets available colorization qss . wizard->setwizardstyle(qwizard::classicstyle); for default vistastyle painting hardcoded in source of qwizard this: if (wizardprivate->isvistathemeenabled(qvistahelper::vistabasic)) { if (window()->isactivewindow()) painter.setpen(qpen(qbrush(qcolor(169, 191, 214)), 0)); // ### hardcoded else painter.setpen(qpen(qbrush(qcolor(182, 193, 204)), 0)); // ### hardcoded painter.drawline(0, 0, width(), 0