Posts

javascript - Remove a Class Element from Third Party Widget -

Image
i have third party widget loads on site via javascript, take example disqus. there class element shown in attached picture below, inside disqus. if delete inspect element, user image / class element gets deleted. i want achieve in real time on page load. page load, site javascript or css should delete or hide these class elements. please let me know if that's possible. thanks, shubham use jquery removeclass method: https://api.jquery.com/removeclass/ $('#foo').removeclass('classtoremove');

c# - Confusing creating HTML List base on array -

i has problem creating html-list base on array in c#. tried using split.string, foreach, , etc,. still can't figured out logic... :(.. can me solve problem ? here array list<string> listmenu = new list<string>(); listmenu.add("dashboard~view1"); listmenu.add("dashboard~view2"); listmenu.add("customer"); listmenu.add("part"); listmenu.add("part~part1~part11"); listmenu.add("part~part1~part12"); listmenu.add("part~part2~part21"); listmenu.add("part~part2~part22"); listmenu.add("part~part3~part31~part311"); listmenu.add("part~part3~part31~part312"); listmenu.add("branch"); and want create html list : <div id=menu> <ul> <li>dahboard <ul> <li> view1 </li> <li> view2 <...

Setting environment variables in cloudformation using command module within cfn-init -

i'm trying set environment variables through commands module within cfn-init. "commands": { "set-env": { "env": { "hostname": "fb-iaas.elevatebilling.com" }, "cwd": "~", "command": "echo \"$hostname\" > test.txt" } }, and output see in cfn-init.log 2016-09-22 10:26:53,638 debug running command set-env 2016-09-22 10:26:53,639 debug no test command set-env 2016-09-22 10:26:53,655 info command set-env succeeded 2016-09-22 10:26:53,655 debug command set-env output: but environment variable hostname doesn't updated. can please explain doing wrong? thanks when variable doesn't updated, how have found out? did open "test.txt" , read piped or did ssh instance , run "echo $hostname"? reason why ask because aws docs o...

javascript - How to get table row data using check box in Angular.js -

i need 1 help.i need checked data table row using angular.js. explaining code below. <tr ng-repeat="gl in gallerydatas"> <td><input type="checkbox" name=""> {{$index+1}}</td> <td><img ng-src="upload/{{gl.image}}" border="0" name="image" style="width:100px; height:100px;" /></td> <td>{{gl.description}}</td> </tr> here need while user clicked check box respective row data retrieving array.please me. use ng-change on checkbox <td><input type="checkbox" ng-change="clickedrow(gl.checked)" name="" ng-model="gl.checked"></td> in controller, $scope.clickedrow = function(checked) { if (checked) { //add list } else { // remove list } }

bash - Cannot write into ~/.m2 in docker maven container -

why aren't files written in /root/.m2 in maven3 docker image persistent during build? a simple dockerfile: from maven:3-jdk-8 run touch /root/.m2/testfilehere && ls -a /root/.m2 run ls -a /root/.m2 cmd ["bash"] produces following output. $ docker build -t test --no-cache . sending build context docker daemon 2.048 kb step 1 : maven:3-jdk-8 ---> 42e3884987fb step 2 : run touch /root/.m2/testfilehere && ls -a /root/.m2 ---> running in 1c1dc5e9f082 . .. testfilehere ---> 3da352119c4d removing intermediate container 1c1dc5e9f082 step 3 : run ls -a /root/.m2 ---> running in df506db8c1dd . .. ---> d07cc155b20e removing intermediate container df506db8c1dd step 4 : run stat /root/.m2/testfilehere ---> running in af44f30aafe5 stat: cannot stat ‘/root/.m2/testfilehere’: no such file or directory command '/bin/sh -c stat /root/.m2/testfilehere' returned non-zero code: 1 the file created @ first command gone when interm...

javascript - How to create factory in angular of an existing service -

i learning angularjs , reading articles on service , factory. 1 example provided on article service fiddle . while reading trying convert service factory, link my factory fiddle . still it's not working expected not sure doing wrong. html <div ng-app="app"> <div ng-controller="calculatorcontroller"> enter number: <input type="number" ng-model="number" /> <button ng-click="dosquare()">x<sup>2</sup></button> <button ng-click="docube()">x<sup>3</sup></button> <div>answer: {{answer}}</div> </div> </div> js var app = angular.module('app', []); app.factory('mathservice', function() { var myfactory = {}; myfactory.add = function(a, b) { return + b }; myfactory.subtract = function(a, b) { return - b }; myfa...

c# - Make different editions of an application with single code base -

i have developed application windows desktop (in wpf). let's assume application has 50 features , let's call ultimate application. i have client demands application 30 features. let's call professional application 20 features, let's call basic now, want maintain single source code editions. my intention users basic edition can't use/see features available in professional edition, , on. how can achieve this? need use conditional compilation or else? generally handled based on product key. algorithms generating , reading version depends developer developer. lets take simple example product keys start prefixing it's version e.g. - ultimate version starts "u" , - uxxxxxxxxxxxx professional version starts "p" , - pxxxxxxxxxxxx , on. now when application loaded, need enable/disable or show/hide menus based on product key version. this helpful, when customer wan't upgrade version, need release new product key upd...