Posts

office interop - What is VSTO exactly? -

i have few add-ins excel , word 2007-2016. , don't understand few things. project use dlls, microsoft.office.tools.common, office.dll, excel, word , common interop's. , these files can found in few places @ same time, different versions of them (like program files, windows/assembly, windows/microsoft.net/assembly). don't know version use. , also, if user has vsto installed, suppose has these files. why need provide them? install when install vsto? part , installation place component? think don't right, because found out excel loads 2 different versions of same file @ same time. those lot of questions, , many of them depend on provide solution... the case of pias ("office dlls") relatively clear cut: you not need (and should not) distribute office pias vsto solution, possible exceptions of 2007 , 2010. in these versions, installing .net support optional , not default. that's why there redistributables these versions, , not others. installe...

arrays - Reverse string using for loop only in php -

if there 1 array: $arr = array('o', 'v', 'e', 'r','f', 'l', 'o', 'w'); and want display output 1st string = revo , 2nd string = flow using for loop only in php. not use inbuilt php function . so how can it? please me. the solution is: $arr = array('o', 'v', 'e', 'r','f', 'l', 'o', 'w'); |_________________| |_________________| ^ ^ reverse half keep half then loop through array create first , second string. $arr = array('o', 'v', 'e', 'r','f', 'l', 'o', 'w'); // reverse first half of array $arrlength = count($arr); for($i = 0; $i < $arrlength / 4; ++$i){ $tmp = $arr[$i]; $arr[$i] = $arr[(($arrlength / 2) - 1) - $i]; $arr[(($arrlength / 2) - 1) - $i] = $tmp; } // loop through array create f...

javascript - JSLint errors: Undeclared 'Image', Undeclared 'Document', out of scope -

with basic javascript knowledge built simple slideshow (code below). works jslint shows following errors: undeclared 'image' slideimages[0] = new image(); undeclared 'setinterval' setinterval(mycounter, 50); 'mycounter' out of scope setinterval(mycounter, 50); undeclared 'document' document.getelementbyid('slide').src =slideimages[step].src; how can overcome issues e.g. declare elements? var slideimages = []; slideimages[0] = new image(); slideimages[0].src = "http://placehold.it/350x150?text=welcome"; slideimages[1] = new image(); slideimages[1].src = "imgs/slide_1.png"; slideimages[2] = new image(); slideimages[2].src = "imgs/slide_2.png"; var step = 0; var c = 0; var = 0; setinterval(mycounter, 50); function mycounter() { 'use strict'; document.getelementbyid('slide').src = slideimages[step].src; if ((c >= 0) && (c < 40)) { c += 1; = c...

angularjs - Jasmine test fails with error from a different suite -

experiencing peculiar behaviour karma-jasmine testing angular app. have test in 1 suite reports failure message comes separate test in test suite file. test result: factory: page should uncheck items failed expected undefined contain '<div class="ui-select-container ui-select-bootstrap dropdown ng-valid" ng-class="{open: $select.open}" ng-model="test.slctbx.selected" theme="bootstrap" ng-disabled="disabled"></div>' that test actually: describe 'factory: page', () -> ... 'should check items', () -> page.checkall null expect(page.actions).toequal {checkall: false} the error comes from: describe 'directive: select', () -> ... 'should replace select box', () -> replacementmarkup = '<div class="ui-select-container ui-select-bootstrap dropdown ng-valid" ng-class="{open: $select.open}" ng-model="test.slctbx...

winapi - C++ GetProcAddress not working -

this question has answer here: getprocaddress function in c++ 3 answers i have following code: typedef int (winapi* fnenginestart)(); int __stdcall enginestart() { bool freeresult = 0, runtimelinksuccess = 0; //variables later use hmodule libraryhandle = 0; //here handle api module/dll stored. fnenginestart fn = 0; libraryhandle = afxloadlibrary(l"flowengine.dll"); //get handle of our api module //so loaded. if (libraryhandle != null) //if library loading successfull.. { fn = (fnenginestart)getprocaddress(libraryhandle, "fnenginestart"); if (runtimelinksuccess = (fn != null)) //if operation successful... { int returnvalue = fn(); //call messageboxa function //from user32.dll } else { messagebox(0, l"error", 0, 0); } freeresult = freelibrary(libraryhandle); //from pr...

TypeScript with Jquery -

i getting error "uncaught referenceerror: $ not defined" please find code below. ///<reference path="jquery.d.ts" /> class test { name: string; constructor() { this.name = "gowtham"; } dispname() { alert("name :" + this.name); } } $(document).ready(function () { debugger; var test = new test(); $('#test').on('click', function() { debugger; test.dispname(); }); }); i having referance reference path="jquery.d.ts" in .ts file. missing here .? you're getting runtime error because haven't loaded jquery properly, if issue typings would've seen compiler error. see existing question: uncaught referenceerror: $ not defined?

reactjs - Why will enabling "pause on caught exceptions" improve my debugging experience? -

Image
couldn't find anywhere why should this: it's simple: if pause on exceptions, can see stack @ time of exception. can see call stack of functions lead exception, current scope's variables, @ time of exception. if don't this, js fail call stack, produce exception in console, , continue running next statement. lead loss of stack information @ time of exception.