Posts

Showing posts from April, 2014

c++ - first and last char in multiple strings -

please guys need help! need compare first , last char in multiple strings. have no clue how that. strings kind of generated randomly. for example: user types differents strings , program needs compare first , last charachter of each string . example: 3 strings. "money" "dad" "generating". ... goal positive value on "dad" , "generating" cuz first char , last char of string "dad" , "generating" same. begginer. please help. here code have stuck. sry bad english. :( #include <stdio.h> #include <string.h> #include <conio.h> #include <stdlib.h> char funkcija() { file *c; c = fopen("datoteka.txt", "r"); if (c == null) { printf("error in opening!"); getch(); exit(1); } int = 0; char polje[100]; while (fscanf(c, "%s", polje) == 1) { int duljina = strlen(polje); if (polje[0]

playframework 2.3 - Play 2.3 requireJs optimization and shim for multiple modules -

this current setup play 2.2.x requirejs. continue work after 2.3? can't find requirejs or requirejsshim anywhere in 2.3 documentation. requirejs ++= seq("mainaccount.js", "mainorg.js", "mainpublic.js"), // tells play optimize file , dependencies requirejsshim += "build.js", // tells play read requirejs "shim" configuration build.js requirejsfolder := "js" instead of requirejs use: rjskeys.modules := seq( webjs.js.object("name" -> "mainaccount"), webjs.js.object("name" -> "mainorg"), webjs.js.object("name" -> "mainpublic") ) instead of requirejsshim use rjskeys.mainconfig := "build" i think can omit requirejsfolder baseurl considered either js or javascripts default. see here: https://github.com/sbt/sbt-rjs/blob/master/src/main/scala/com/typesafe/sbt/rjs/sbtrjs.scala#l104 if want change else, use rjske

javascript - Background script being re-run for each page navigated to -

i've written google chrome extension called " word welter " demonstrates typoglycemia. this extension uses background script toggle word scrambling on , off. however, whilst works on web page, if user turns functionality on , browses different page (i.e. clicks on hyperlink in current page), chrome button goes it's initial state (although button's tooltip text functionality still on!) , scrambling functionality off. looks though content script executed once (i.e. when toggle executed). i want scrambling functionality remain active user navigates other pages , i'd hoped use of background script work isn't. know how can fix issue? note scrambling feature worked fine (i.e. every page user navigate to) before introduced toggle button. toggle button need gets annoying if every page scrambled! the background script (background.js) follows: var toggle = false; chrome.browseraction.onclicked.addlistener(function(tab) { toggle = !toggle; if(toggle

html - Why is the text not working? -

i experimenting html/css. positioning h5 isn't working. when position it, top bar scoot down. should flush top of container. here's code. <!doctype html> <html lang="en"> <head> <meta charset="utf-8" /> <title>hello world!</title> <link rel="stylesheet" href="css/main.css" type="text/css"/> <script src="js/site.js"></script> </head> <body> <!-- window wrapper --> <div id="wrapper"> <!-- top bar --> <div id="top_bar"> <!-- title --> <h6 class="title">hello</h6> </div> </div> </body> </html> now css. body { font-family: "he

c# - ASP.NET MVC 4 call a controller method from another controller -

i stuck on issue. have 2 controllers, userscontroller , homecontroller trying call controller method userscontroller controller (homecontroller) doing this: userscontroller userscontroller = new userscontroller(); but error: generate constructor stub in 'cthrc.roti.web.ui.controllers.userscontroller' i not understand error. here userscontroller: using system; using system.io; using system.text; using system.collections.generic; using system.linq; using system.net; using system.net.http; using system.net.http.headers; using system.web; using system.web.http; using cthrc.roti.domain.api.services; using cthrc.roti.domain.model; namespace cthrc.roti.web.ui.controllers { public class userscontroller : apicontroller { protected readonly usersservice usersservice; public userscontroller(usersservice usersservice) { usersservice = usersservice; } [httpget] public dynamic get(int userid) {

Does the Gmail REST API have access to label colors? -

is possible label colors through new gmail rest api? many of our users color code emails , great able carry color coding on our applications. it doesn't per docs label consists of: { "id": string, "name": string, "messagelistvisibility": string, "labellistvisibility": string, "type": string } see: https://developers.google.com/gmail/api/v1/reference/users/labels that seem useful enhancement though.

shell - Why emacs --batch Org-Mode pdf export doesn't work as expected? -

i'm trying org-export-as-pdf org file in batch mode (org version > 8). $ emacs --batch --file test.org -f org-export-as-pdf-and-open loading 00debian-vars... loading /etc/emacs/site-start.d/50auctex.el (source)... loading /usr/share/emacs/site-lisp/auctex.el (source)... loading /usr/share/emacs/site-lisp/preview-latex.el (source)... loading /etc/emacs/site-start.d/50css-mode.el (source)... loading /etc/emacs/site-start.d/50dictionaries-common.el (source)... loading debian-ispell... loading /var/cache/dictionaries-common/emacsen-ispell-default.el (source)... loading /var/cache/dictionaries-common/emacsen-ispell-dicts.el (source)... loading /etc/emacs/site-start.d/50html-helper-mode.el (source)... loading /etc/emacs/site-start.d/50org-mode.el (source)... loading /etc/emacs/site-start.d/50pymacs.el (source)... loading /etc/emacs/site-start.d/50python-docutils.el (source)... loading /etc/emacs/site-start.d/50python-mode.el (source)... overview loading vc-hg... exporting pdf..

php - receive returned value by class in oop -

i have class : <?php class connection { public $db; public function __construct() { $this->db = new mysqli('localhost', 'root', '', ''); if($this->db->connect_errno > 0){ die('error ' . $this->db->connect_error); } $this->db->set_charset("utf8"); } } class masssave extends connection { public $sql; public function insert_all { // works if ( $sql = $this->db->query("insert $db_name ($str_db_value) values ($str_form_value_found) ")) { return true; } else { return false; } } } ?> in masssave class seted $sql public , want use class in pages , register page $save = new masssave; if ( $save->sql = true ) { echo 'ok'; } else { echo 'failed'; } but upper code not working , echo 'ok' query failed , i use if ( $save

capistrano3 - First deploy fails in Capistrano 3 with a /var/www/XXX permission error -

i running first deploy machine via cap staging deploy . of cap3, deploy:setup no longer needed. yet, strangely, mkdir permissions error: info[cb348f12] running /usr/bin/env mkdir -pv /var/www/myapp/shared /var/www/myapp/releases on ec2-xx-xx-xx-xx.us-west-2.compute.amazonaws.com debug[cb348f12] command: /usr/bin/env mkdir -pv /var/www/myapp/shared /var/www/myapp/releases debug[cb348f12] mkdir: debug[cb348f12] cannot create directory ‘/var/www’ debug[cb348f12] : permission denied debug[cb348f12] debug[cb348f12] mkdir: debug[cb348f12] cannot create directory ‘/var/www’ debug[cb348f12] : permission denied debug[cb348f12] cap aborted! sshkit::runner::executeerror: exception while executing on host ec2-xx-xx-xx-xx.us-west-2.compute.amazonaws.com: mkdir exit status: 1 of course, go create , chmod directory myself, that's not point. cap3 supposed take care of itself. i'm confused why doesn't that. should note had same setup succeed

c# - populating xml template at run time from object collection at runtime -

i have xml template having header , details section within it. have populate data xml template @ run time object collection. details part repeating adding details part xml document in foreach loop. using xmldocument read xmldocument occupies more memory , makes process slow on increasing size of xml file. please suggest me best approach. tempalte example <document> <header> <orgname></orgname> <orgaddress></orgaddress> </header> <detail> <empid> </empid> <empname></empname> <address> <stree1></stree1> <stree2></stree2> <pin></pin> <city></city> </address> <detail> </document> expected result <document> <header> <orgname>abc</orgname> <orgaddress>asd dfs 999 dfsd</orgaddress> </header> <detail> <empid>100 <

javascript - submitting a form via jquery removes submit input variable -

here's html: <script src="//ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script> <form id="test" method="get" action=""> <input type="hidden" name="var1" value="true" /> <input type="submit" name="var2" value="submit" /> </form> <script> $("#test").submit(); </script> the resultant request that makes has var1 in not var2. question why , can var2? here's live demo: http://www.frostjedi.com/terra/dev/submit.php try: method="post" in form or use <button type="submit"></button>

javascript - How to stop animation after last slide? -

i have created custom plugin image slider. pass parameter of no of images display. how stop animation once last image visible? issue previous click also. me optimize code. css .imgpresentation { width: 520px; height: 110px; overflow: hidden; border: 1px solid #ddd; position: relative; } .imgpresentation img { float: left; padding: 5px; } .imgpresentation .prev { left: 0; position: absolute; top: 40%; } .imgpresentation .next { right: 0; position: absolute; top: 40%; } .slidethemimgpresentation { position: absolute; } js <script> $.fn.imgslider = function(nimages) { var imgw = $(this).find('img').outerwidth(), imgh = $(this).find('img').outerheight(), imgl = $(this).find('img').length, = $(this), container = that.find('.slidethemimgpresentation'); that.append('<a href="#" class="prev">previous</a>'+ ' <a href="#" class="next">next</a>').cs

java - Extending LdapLoginModule is not authorizing user -

i trying install custom authentication(required in application) using jaas. standalone.xml looks like <security-domain name="other" cache-type="default"> <authentication> <login-module code="com.app.user.extendedsec.extendedldapextloginmodule" flag="optional"> <module-option name="java.naming.factory.initial" value="com.sun.jndi.ldap.ldapctxfactory"/> <module-option name="java.naming.provider.url" value="ldap://app.user.in:389"/> <module-option name="java.naming.security.authentication" value="simple"/> <module-option name="password-stacking" value="usefirstpass"/> <module-option name="principaldnprefix" value="cn="/>

How to convert the Powershell cmdlet standard output to other format? -

i have output below powershell command line, sno id computername name lastmodifiedby state priority description --- -- ------------ ---- -------------- ----- -------- ----------- 1 adf abcrtc test user453 normal low test activity1 2 arf abcrrr te12 user453 normal low test activity2 3 aff abcree te23 user453 normal low test activity3 4 cdf abcrvv te45 user453 normal low test activity4 i'm trying convert following format, i'm not getting due spaces in last column description 1;adf;abcrtc;test;user453;normal;low;this test activity1 2;arf;abcrrr;te12;user453;normal;low;this test activity2 3;aff;abcree;te23;user453;normal;low;this test activity3 4;cdf;abcrvv;te45;user453;normal;low;this test activity4 i

How to get video id from embed URL using PHP? -

this question has answer here: get youtube video id html code php 5 answers i having youtube embed url this <object width="420" height="315"> <param name="movie" value="//www.youtube.com/v/whtwjg4zijg?version=3&hl=en_us"></param> <param name="allowfullscreen" value="true"></param><param name="allowscriptaccess" value="always"></param> <embed src="//www.youtube.com/v/whtwjg4zijg?version=3&hl=en_us" type="application/x-shockwave-flash" width="420" height="315" allowscriptaccess="always" allowfullscreen="true"> </embed></object> now want id of video using php. please help you use id of youtube link: $your_url='http://www.youtube.com/watch?var1=bla

java - How to manipulate all active threads in a JavaFX application -

system.out.println(thread.activecount()); prints number of active threads. right start application, says running 6 threads. how 1 go manipulate (say, priority of) these threads? putting system.out.println(thread.currentthread().getname()) in code prints javafx application thread . you can use enumerate method of thread class. allow threads of thread group , copy them array. a working example import javafx.application.application; import javafx.stage.stage; public class threaddemo extends application { public static void main(string[] args) { launch(args); } @override public void start(stage stage) throws exception { int count = thread.activecount(); system.out.println("currently active threads = " + count); thread th[] = new thread[count]; // returns number of threads put array thread.enumerate(th); // set priority (int = 0; < count; i++) { // priority

html - Text absolute positioning within styled bar at 100% -

i have layout header bar 100% width , footer 100% width, content centered , 800px wide. i attempting make text float justified content area upon window stretch, can't figure best way to this. example i've tried absolute positioning , relative positioning within header div when window stretches, either text 1 staying in same spot, or left justifies within text 1 bar. thanks in advance you can try this you can remove width: 100% block element take full width. and add 1 more div inside header , footer width: 800px , margin: 0 auto center inner content. html <div class="container"> <header> <div class="cnt">header text</div> </header> <div class="content"> div content...... </div> <footer><div class="cnt">footer text</div> </footer> </div> css .container{ height:100%; } header,footer{ height:50px; bo

cannot access value of attribute using xpath -

i not able value of second attribute based on first attribute. try value of content attribute. i.e. 4,450 out of following xml: <meta itemprop="price" content=" 4,450" /> tried xpath: //meta[@itemprop=\"price\"][@content] i'm getting output similar input xml. you need slash before content attribute: //meta[@itemprop='price']/@content

android - Service gets stops after closing an Activity in which it is created? -

i have created service , started using activity on button click, service gets stops after closes activity . should keep running service without gets stopped? mainactivity.java public void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); setcontentview(r.layout.main); } public void startservice(view v){ intent = new intent(this, notstickyservice.class); startservice(i); } public void stopservice(view v){ intent = new intent(this, notstickyservice.class); stopservice(i); } service.java public class notstickyservice extends service{ mediaplayer mp; @override public void oncreate() { showtoast("oncreate"); super.oncreate(); } @override public int onstartcommand(intent intent, int flags, int startid) { showtoast("onstart"); mp = new mediaplayer(); assetfiledescriptor descriptor; descriptor = getassets().openfd("msg.mp3&qu

android - Class init failed in newInstance call : for IntentService called from alarmManager -

i trying use intentservice alarmmanager schedule alarms. have used broadcast reciever further calls intentservice here code : setting alarm: public static integer createscheduledalarm(calendar calendar, int intervalseconds, context context) { alarmmanager alarmmanager = (alarmmanager) context .getsystemservice(context.alarm_service); int id = (int) system.currenttimemillis(); intent intent = new intent(context, com.stressfree.alerts.timealarm.class); pendingintent pendingintent = pendingintent.getbroadcast(context, id, intent, pendingintent.flag_update_current); if (intervalseconds > 0) { alarmmanager.setrepeating(alarmmanager.rtc_wakeup, calendar.gettimeinmillis(), intervalseconds * 1000, pendingintent); } return id; } here broadcast reciever class: public class timealarm extends broadcastreceiver { @override public void onreceive(context context, in

c# - Unable to compare database schema using SSDT Visual studio 2012 "Unable to determine the database platform type. The database may be unavailable.." -

i have created database project in visual studio 2012 version 11.0.60610.01 update 3. using database project comparing , publishing database on sql server 2008 r2 version 10.50.4000.0 my database project target platform set sql server 2008. my ssdt version 11.1.20627.00 now sql server version upgraded sql sever 2012 version 12.0.2000.8 after changed database project target platform sql server 2012. but not allowing me compare database schema or publish database. it throws following error error 345 validation error in target: db_name unable determine database platform type. database may unavailable.. i have checked edit connection wizard using test connection button database connection successful. can please me on this? there more configuration need set changing database platform type? version 12.0.2000.8 of sql server means you're on sql server 2014. it's confusing sql server 2012 == version 11, sql server 2014 == version 12. to resolve this,

c++ - is there any difference between f+=1 and f+=1.0 if f is a double? -

suppose have double f; is difference between f+=1 , f+=1.0 ? how compiler handler these situations? i tried on computer , loop 10 10 times, elapsed time same referring c++03 here. 4.9 floating-integral conversions [conv.fpint] an rvalue of integer type or of enumeration type can converted rvalue of floating point type. result exact if possible. otherwise, implementation-defined choice of either next lower or higher representable value. if system can represent 1.0 (and looks can), expressions same.

Emulate Navigation Drawer Icon on Android ActionBar without Navigation Drawer -

i used slidinglayer library in android proyect , want emulate home button if used navigation drawer. using actionbar too, how this? find blog post looks similar question public void updatenavigationdrawericon(drawable drawable) { method sethomeasupindicator; try { sethomeasupindicator = actionbar.class.getdeclaredmethod("sethomeasupindicator", drawable.class); sethomeasupindicator.invoke(getactionbar(), drawable); } catch (nosuchmethodexception e) { log.e("check", "no such method"); view home = findviewbyid(android.r.id.home); viewgroup parent = (viewgroup) home.getparent(); int childcount = parent.getchildcount(); if (childcount == 2) { final view first = parent.getchildat(0); final view second = parent.getchilda

f# - Web Pages issue with azure when servicestack is deployed -

i trying deploy servicestack application azure website. application asp.net host , razor view engine. here final deployed version. , github project now, working fine in local without issue. giving problem after deployment. if forcefully load assembly in web.config azure can't load it. , if don't servicestack crashed nullpointer exception. i checked application setting, per azure sites running webpages version 3.x.x.x. please let me know if further information needed. here stack trace of error [nullreferenceexception: object reference not set instance of object.] servicestack.httphandlerfactory..cctor() +336 [typeinitializationexception: type initializer 'servicestack.httphandlerfactory' threw exception.] servicestack.httphandlerfactory..ctor() +0 [targetinvocationexception: exception has been thrown target of invocation.] system.runtimetypehandle.createinstance(runtimetype type, boolean publiconly, boolean nocheck, boolean& canbecached, r

How to capture the screens on recording and playback using Jmeter? -

currently, recording , playback test plan in jmeter? working fine?and now, needs capture screen of web page while recording , playback test plan. possibilities in jmeter or other plugins configure, please let me know. jmeter on it's own not , not have screen capture capabilities. might possible jmeter webdriver plugin: take screenshot selenium webdriver http://jmeter-plugins.org/wiki/webdrivertutorial/ http://blazemeter.com/blog/jmeter-webdriver-sampler

Wpf How to set Grid Column ActualWidth -

is possible in grid control set actualwidth of column ? property has getter. may there other way assign value it? i can set minwidth , can set width , think logical have possibility set actualwidth . set column's width property: column.width = new gridlength(100, gridunittype.pixel);

java - Statement Closed: Next Oracle Migration 11g -

i migrating application oracle 10g oracle 11g , having trouble on method included on "osubjectsqlmapdao" (the application uses ibatis 2). public list retrievelist(string user, string flag)throws exception { try{ logger.info("retreving list"); java.sql.resultset rs = null; map map = new hashmap(); map.put("user",user); map.put("flag",flag); map.put("listretrieved",null); list listretrieved = new arraylist(); queryforobject("dblistretrieved",map); rs = (java.sql.resultset)map.get("listretrieved"); logger.info("hasmap map " + map.size()); logger.info("hasmap map " + map.isempty()); logger.info("listretrieved map " + map.get("listretrieved ")); logger.info("listretrieved map getclass" + map.get("listretrieved ").getclass()); osubject subject = nul

gruntjs - Use Foundation instead of Bootstrap with SASS in a yeoman created application -

i've created angularjs application yeoman. want switch front-end framework bootstrap foundation. after installed foundation bower install foundation --save grunt add following line index.html file. <link rel="stylesheet" href="bower_components/foundation/css/foundation.css" /> how can force grunt use sass way. for sass way index.html untouched (except js files) main.scss file nedds following line or simliar @import "../bower_components/foundation/scss/foundation" to work sass. here grundfile.js trigger bower.json watch: { bower: { files: ['bower.json'], tasks: ['wiredep'] }, } and here wiredep task , compass task // automatically inject bower components app wiredep: { options: { cwd: '<%= yeoman.app %>' }, app: { src: ['<%= yeoman.app %>/index.html'], ignorepath: /..\// }, sass: { src: ['<%= yeoman.app %>/styles/{,*/}*.{scss,s

python - How to call a function from a class from another class in kivy Pong ball game -

i'm practicing kivy ponggame code given in tutorial. want know how call function - serve_ball2() in class ponggame newly created class - pongsample. in below code created class pongsample serve second ball once first ball collide paddle. update : can call serve_ball2() pongsample serve_ball2() doesn't function intended i.e doesn't serve ball. i've shared complete code below. in advance pong.py: from kivy.app import app kivy.uix.widget import widget kivy.properties import numericproperty, referencelistproperty,\ objectproperty kivy.vector import vector kivy.clock import clock, time threading import thread class pongpaddle(widget): score = numericproperty(0) def bounce_ball(self, ball): if self.collide_widget(ball): vx, vy = ball.velocity offset = (ball.center_y - self.center_y) / (self.height / 2) bounced = vector(-1 * vx, vy) vel = bounced * 1.1 ball.velocity = vel.x, vel.y + o

twitter bootstrap 3 - aligning list items of equal width -

i want align list items of equal width.... following jsfiddle code: http://jsfiddle.net/277yd/ thanks in advance <div class="row"> <div class="col-sm-2 text-center ">courses</div> <div class="col-sm-2 text-center oval-shape img-responsive"> <a>post graduate</a> </div> <div class="col-sm-2 text-center oval-shape img-responsive"> <a>graduate</a> </div> <div class="col-sm-2 text-center oval-shape img-responsive"> <a>honours</a> </div> <div class="col-sm-2 text-center oval-shape img-responsive"> <a>tiger studio</a> </div> <div class="col-sm-2 text-center oval-shape img-responsive"> <a>others</a> </div> </div> .oval-shape { background: #ff9900; border-radius:50px; padding:10px;

javascript - Print json data in a table -

i have wrote following function i'm pretty sure there error. error when try execute chunck of code typeerror: 'undefined' not function (evaluating 'callback.apply( obj[ ], args )') jquery function receive data json list correctlu $("#result_times") .find("tr") .remove() .end(); $("#result_times") .find("table") .each(data, function(){ $(this).append($("<tr>")); $(this).append($("<td></td>")).text(data.airport_city_source); $(this).append($("<td></td>")).text(data.airport_city_dest); $(this).append($("<td></td>")).text((data.departure_date)); $(this).append($("<td></td>")).text((data.arrival_date)); $(this).append($("</tr>")); }); this dom <div id='result_times'> <table> </

dropdown list in javascript & php (symfony 1.4) -

here's problem : in default dropdown list have value "1". problem when select in dropdown list value "2", page reloads correctly in view gives me value "1" in list. code javascript : function filter(){ var id = document.getelementbyid('liste-biens').options[document.getelementbyid('liste-biens').selectedindex].value; var url = "<?php echo html_entity_decode($url); ?>"+id; window.location =url; } code php : <select id="liste-biens" onchange="javascript:filter();"><?php foreach($datalevels $level){ $lib_immeuble_value = $level->getattribute('lib_immeuble'); $codimm_immeuble_value = $level->getattribute('cod_immeuble'); $codimmcop_immeuble_value = $level->getattribute('cod_imm_cop'); if ($libimm->getdisplay()){ ?><option <?php if($current

c++ - How can I avoid code repetition without losing the interfaces? -

below current code design (sample). how can avoid repetition of code "methodparent()" (in implementation of both child classes) without losing interface classes? //interfaces //======================================================= class interfaceparent() //interface class { public: virtual void methodparent() = 0; }; class interfacechild1() : public interfaceparent //interface class { public: virtual void methodparent() = 0; virtual void methodchild1() = 0; }; class interfacechild2() : public interfaceparent //interface class { public: virtual void methodparent() = 0; virtual void methodchild2() = 0; }; // concrete classes //========================================================= class child1() : public interfacechild1 // concrete class { public: void methodparent() { cout << "parent_method"; } void methodchild1() { cout << "child_1_method"; } }; class child2() : pu

mysql - Command to insert into with select -

i have table: create table student(name varchar(20), surname varchar(20), age int); first, insert table fields: insert student values ("jhon", "smith", null); insert student values ("mark", "william", null); now, how insert age=28 name = 'jhon'?? you have use update below : update student set age = 28 name = "jhon"; notice : it change age of people name = "jhon" it's far better define primary key (id) column perform commands specific id.

Jira start up failed with custom plugin using rest api (jersey) -

we working on jira custom plugin uses rest api. after installing custom plugin, when restart jira, fails. we facing following exception in logs: org.springframework.beans.factory.beancreationexception: error creating bean name 'activator' defined in url [bundle://109.0:0/meta-inf/spring/atlassian-plugins-components.xml]: invocation of init method failed; nested exception com.sun.jersey.spi.service.serviceconfigurationerror: com.sun.jersey.spi.headerdelegateprovider: class com.sun.jersey.core.impl.provider.header.localeprovider implementing provider interface com.sun.jersey.spi.headerdelegateprovider not instantiated: cannot cast com.sun.jersey.core.impl.provider.header.localeprovider com.sun.jersey.spi.headerdelegateprovider @ org.springframework.beans.factory.support.abstractautowirecapablebeanfactory.initializebean(abstractautowirecapablebeanfactory.java:1338) @ org.springframework.beans.factory.support.abstractautowirecapablebeanfactory.docreatebean(abstractautowir

c# - BindingProxy: binding to the indexed property -

i have bindingproxy bind visibility-property of datagridcolumns of datagrid value in dictionary ("columnsvisibility"). have context-menu, should make possible hide/show columns of grid. <datagrid name="dgmachines" itemssource="{binding hvmachinelist, updatesourcetrigger=propertychanged}" autogeneratecolumns="false" > <datagrid.resources> <local:bindingproxy x:key="proxy" data="{binding}"/> <contextmenu x:key="datagridcolumnheadercontextmenu"> <menuitem header="names"> <checkbox content="name" ischecked="{binding data.columnsvisibility[elementname], source={staticresource proxy}, updatesourcetrigger=propertychanged, mode=twoway}"/> </menuitem> </contextmenu> </datagrid.resources> <datagrid.colum