Posts

Showing posts from February, 2013

php - "Missing php5ts.dll" error when installing Saxon/C -

i'm trying install saxon/c (beta version 0.3.1) on windows 7 machine after following the instructions , when attempt restart php windows dialog box pops saying; the program can't start because php5ts.dll missing computer. try reinstalling program fix error. followed by; php startup: unable load dynamic library 'ext\php_saxon.dll' - specified module not found. i'm using; windows 7 32-bit php 5.4.27 (thread safety disabled) nginx 1.4.6 i start php command prompt doing; php-cgi -b 127.0.0.1:9000 if remove reference saxon extension=php_saxon.dll php.ini php starts ok saxon/c extension won't work. if put reference php.ini errors appear. it's if saxon/c expecting php running in thread-safe mode, saxon documentation implies should work both thread-safe , non thread-safe; the saxon/c dll library 32-bit version. php extension dll compiled php version 5.4 (ts/nts).

excel - Cannot use hyperlink when protecting sheets without allowing user to select locked cells -

i have worksheet has bunch of dynamic hyperlinks change based on drop down menu. cells drop down menus unlocked. have "select locked cells" unchecked when protect sheet, users can select drop down menus. unfortunately, when this, hyperlinks no longer usable. does know how work around this? update* as requested, code dynamic hyperlink cells: =if(isna(match(b4,'data sheet'!a2:a103,0)),"",hyperlink(vlookup(b4,'data sheet'!a:s,7,false),vlookup(b4,'data sheet'!a:s,5,false)&" - "&vlookup(b4,'data sheet'!a:s,6,false))) 1) cell b4 drop down user selects particular option. hyperlinks change based on selection. 2) 'data sheet' separate sheet houses of reference data in array. this says: value in b4 match first column in data chart? if so, use hyperlink formula using vlookup insert corresponding url formula. this understanding of settings , requirements: settings there protected

Need to add empty Column in Spotfire Table Chart -

i need add few column headers in table chart in spotfire. typically calculated/transformation added creation of new column. need create column name , keep empty since space used fill data after report has been printed. expression make column empty fine want know whether empty column can added you can add new calculated column formula of "" or null make empty

android - Crosswalk (xwalk) pull to refresh not working -

i'm using crosswalk ( xwalkview ) instead of default webview on android seems defalt pull-to-refresh functionality doesn't work on android 4.3. i've tested on 5.0 , it's ok, on 4.3 , 4.2.2 doesn't work. i'm guessing has < 5.0 ?! i've tried enable it, failed work: //disable edge effect , try enable pull refresh in case we're using xwalk webviews if (buildconfig.is_xwalk) { final string init_switches[] = {"xwalk", "--enable-pull-to-refresh-effect", "--disable-overscroll-edge-effect"}; if (!commandline.isinitialized()) { commandline.init(init_switches); } } any ideas ? actually, have jira feature, please track here: https://crosswalk-project.org/jira/browse/xwalk-6277 . it has block issue before, continue investigating how implement it.

c - My program doesn't print a string -

i'm making program delete spaces in c , count how many space deletes. program counts spaces doesn't print string doesn't have spaces. i'll show code: #include <stdio.h> #include <stdlib.h> /* * */ char delete_spaces(char oracion[100]) { int i; (i=0;oracion[i]!='\0';i++){ if (oracion[i]==' '&&oracion[i+1]==' '){ oracion[i]=oracion[i+1]; } } return(oracion[100]); } int count_spaces(char oracion[100]) { int i,number_spaces=0; (i=0;oracion[i]!='\0';i++){ if (oracion[i]==' '&&oracion[i+1]==' '){ number_spaces+=1; } } return(number_spaces); } int main(void){ char frase[100],frase2[100]; int num_spaces; printf("write here phrase:"); gets(frase); frase2[100]=delete_spaces(frase); num_spaces=count_spaces(frase); printf("%s",frase2); printf("%d&quo

Enter data in rails before controller action -

i have transactions controller , view. when click link "transactions", show transactions. how add before display transactions such enter start , end dates? what need ransack gem. you can add custom filtering mechanism in controller this: def index @q = transaction.ransack(params[:q]) @transactions = @q.result(distinct: true) end and using in view simple this: <%= search_form_for @q |f| %> <%= f.label :start_date %> <%= f.search_field :created_at_gteq %> <%= f.label :end_date %> <%= f.search_field :created_at_lteq %> <%= f.submit %> <% end %> and let filter transaction data using created_at param filter. modify form accordingly if need filter using date / datetime param model.

vb.net - How to create a pfx instead of an snk key -

i have old 2010 vb.net project signed using .pfx file. didn't realise new gitignore has rule ignore *.pfx files. @ machine develop additional features , clone of project's repository has left me unable build due lack of key. on machine have visual studio 2015 community edition. trying create new key replace old 1 locally. however, when try create new signature file in signing section of project properties create .snk file. i don't desktop development , have forgotten signing thing about! think added before allow me publish build executable (there lot less hoops jump through in vs6 executable!). i hoping use same file type , names signing file there minimum of fuss anytime have switch development machines again. possible me make vs 2015 ce generate , use .pfx signature file instead of .snk ? fiddled around short while , found can use create test certificate button on same signing section create .pfx file , select that. made sure name suited project

php - Populate dropdown with phpexcel -

i'm running following problem. im trying results database , want insert results dropdown list. in examle file following example: $objvalidation->setformula1('"item a,item b,item c"'); so results have comma seperated , total results have between "". here code far: $configurations = db::getinstance()->queryresults('select * configurations', array($sitenumber)); $objphpexcel->getactivesheet()->setcellvalue('b7', "list:"); $configs = '"'; foreach($configurations $config) { $configs .= $config->configuration_name . ', '; } $configs .= '"'; $objvalidation = $objphpexcel->getactivesheet()->getcell('b8')->getdatavalidation(); $objvalidation->settype( phpexcel_cell_datavalidation::type_list ); $objvalidation->seterrorstyle( phpexcel_cell_datavalidation::style_information ); $objvalidation->setallowblank(false); $objvalidation->setshowinpu

ios - get Height Value from NSLayoutConstraint -

Image
in project using autolayout, there 1 uiview subview main view, have set width(using constrains) equal 2 :3 superview's width , height equal view. need view circular shape setting cornerradius heightofview/2. there 1:1 aspect ration of views's height , width. have created outlet of constrain @iboutlet weak var circleheight: nslayoutconstraint now want acces height or width m not gwtting actual value, circleheight.firstitem.frame.width i getting value have stored storyboard, there missing not figured out selected view should circular. when print constain's values gives height , width 214 only i think might fetching value in viewwillappear or viewdidload views frames don't updated when these method gets called so need fetch width or height in viewdidappear method. if height or width in viewdidlayoutsubviews , performance gets degraded gets called many times. here code override func viewdidappear(animated: bool){ super.viewdidappea

Why I obtain this "Arithmetic overflow error converting numeric to data type numeric" into this simple insert query on Microsoft SQL Server? -

i pretty new database , have problem insert query insert record on microsoft sql server . so have qs_tirpolizza table having following fields: id bigint polizzaid bigint bankerid varchar retevendita varchar percentualerendimentodainiziogestione decimal percentualerendimentodainizioanno decimal percentualerendimentodainiziotrimestre decimal datacalcolobf datetime annoriferimento int premioinizialeversato money premiversatiinannoriferimento money importiriscattatiinannoriferimento money cedoleerogateinannoriferimento money controvaloretotale money datariferimentonav datetime risultatoannuoinannoriferimento money premioinizialeversatodainiziogestione money premiversatidainiziogestione money importiriscattatidainiziogestione money cedoleerogatedainiziogestione money risultatoannuodainiziogestione money capitalecasomorte money timestamp datetime quotetotale decimal percentualerendimentodainiziomese decimal percentualerendimentodainiziosemestre

apache - SSL with main domain name not working but subdomains do -

so cannot web server ssl work properly. i've googled 4 hours trying work, i've had no luck. let's domain name example.com. i have main site @ https://example.com , have 4 subdomains 1.example, 2.example,3.example , 4.example. now thing is, can access subdomains fine, when try access main domain says cannot connect site. doing wrong ??. using apache 2.4.20 stable on ubuntu 16.04. here configuration im using virtualhosts: <virtualhost *:443> serveradmin webmaster@localhost loadmodule headers_module modules/mod_headers.so documentroot /var/www/example.com <directory /var/www/example.com> options followsymlinks includes execcgi allowoverride require granted allow </directory> scriptalias /cgi-bin/ /usr/lib/cgi-bin/ <directory "/usr/lib/cgi-bin"> allowoverride none options +execcgi -multiviews +symlinksifownermatch order allow,deny allow </directory> errorlog ${apache_log_dir}/error.lo

swift - Extra \N{...} when using kCFStringTransformToUnicodeName or NSStringTransformToUnicodeName -

let string = "\u{00a0}" // no-break space let transformed = string.stringbyapplyingtransform(nsstringtransformtounicodename, reverse: false) expected result: no-break space actual result: \n{no_break_space} why \n{ , } ? for, , there way remove them, short of regex/scanning/parsing/etc? that's way icu & unicode represent named code points in regular expressions. i'm not surprised output @ all. here link reference syntax @ unicode.org . that's explained in other page @ icu project . ps: \n{} shorter equivalent \p{name=…} — explained in unicode.org page above linked anchor). can see similar syntaxes in regular-expressions.info mention \p{…} syntax defining unicode codepoints using properties.

angularjs - data.data for reading my json -

i have factory: 'use strict'; angular.module('testcon').factory('userservice', function ($http) { return { getall: function () { return $http.get('http://localhost:1337/api/user'); } } }); and controller: 'use strict'; angular.module('testcon').controller('usercontroller', function ($scope, userservice) { $scope.users = []; userservice.getall().then( function (data) { $scope.users = data.data; }, function (err) { } ); }); can somehow avoid data.data have data . forces me data.data in order see in scope? simply can't avoid that. make 1 time change returning response.data getall method. consumer direct data. code angular.module('testcon').factory('userservice', function ($http) { return { getall: function () { return $http.get('http://localhost:1337/api/user').then(function(

How to convert QTextedit's input to int in pyQt4 python -

i new pyqt transitioned tkinter. want ask 2 numbers click button "sum" add both numbers , present output on gui keep getting errors "cant convert str int" or outputs nothing @ all. feel have convert input gotten qtextedit int or float i've tried every possible way know. missing? code below import sys pyqt4 import qtcore, qtgui try: _fromutf8 = qtcore.qstring.fromutf8 except attributeerror: def _fromutf8(s): return s try: _encoding = qtgui.qapplication.unicodeutf8 def _translate(context, text, disambig): return qtgui.qapplication.translate(context, text, disambig, _encoding) except attributeerror: def _translate(context, text, disambig): return qtgui.qapplication.translate(context, text, disambig) class ui_form(qtgui.qwidget): def __init__(self): qtgui.qwidget.__init__(self) self.setupui(self) qtgui.qapplication.setstyle(qtgui.qstylefactory.create("plastique")) def s

javascript - How to differentiate between an unexpected error and planned rejection in angular promises? -

if understand correctly (promises api confusing), error occurred in promise suppressed, following code: $http.post(...) .then(data => { if (data.nogood) { return $q.reject(); } else { // bug. var = {}; return a.a.a > 3; } }) .catch(error => { console.error('bad data'); }); is buggy, baddata not true if 'bad data' logged). the desired behaviour me see console error upon every real runtime error, , leave handling rejections me. missing here? correct approach? checking if error error on each catch block seems tedious. unless rejection explicitly constructed error class or child, rejections can differentiated types. .catch(error => { if (!(error instanceof error)) console.error(error) }); exceptions $q promises handled $exceptionhandler service , logged default , if caught catch . without error instanceof error type check console.error(error) result in

python - No module named 'pymysql' -

i'm trying use pymysql on ubuntu. i've installed pymysql using both pip , pip3 every time use import pymysql , returns importerror: no module named 'pymysql' i'm using ubuntu 15.10 64-bit , python 3.5. the same .py works on windows python 3.5, not on ubuntu. sort of answered in comments, question has answer, problem resolved through running: sudo apt-get install python3-pymysql

c# - Set properties of an object to be relative to another property of the same object -

i have method detects collision between ball , left paddle in classic game "pong". have made variables different parts of ball , paddle, in order make collision detection method easier understand. here method (and work). public bool detectballpaddle1collision() { var ballbottom = _ball.y + ball.width; var balltop = _ball.y; var ballleft = _ball.x; var ballright = _ball.x + ball.width; var paddle1bottom = _paddle1.y + paddle.height; var paddle1top = _paddle1.y; var paddle1left = playerpaddle.x; var paddle1right = playerpaddle.x + paddle.width; if (balltop < paddle1bottom && ballbottom > paddle1top && ballleft < paddle1right) { return true; } else { return false; } } i refactor this, have variables different parts of ball, in ball class, so:

jquery - How to load i18n properties files in my application (based on spring)? -

i need javascript i18n in web application based on spring mvc. when run sample application, works when integrate in application not work. my javascript code not able load properties files. here project structure. jquery in login.jsp: jquery(document).ready(function() { loadbundles('de'); // configure language combo box jquery('#lang').change(function() { var selection = jquery('#lang option:selected').val(); loadbundles(selection !== 'browser' ? selection : null); jquery('#langbrowser').empty(); if(selection === 'browser') { jquery('#langbrowser').text('('+jquery.i18n.browserlang()+')'); } }); }); function loadbundles(lang) { jquery.i18n.properties({ name:'messages', path:'src/m

java - Is there a way I can gray out an ImageButton in Android without maintaining a separate gray copy of the original Image? -

Image
i trying have imagebutton initially has gray effect on & turns original color when selected . i'm trying achieve . know can done in css, wondering if android attribute / function equivalent existed. i read post here seems suggest have maintain different gray copy of same image in order achieve this. consume lot of memory maintain 2 copies of same image if have, lets 100+ imagebuttons. unlike regular button, imagebutton or button has image background not grayed when disabled. have use image or process in way appears grayed. so there no way achieve in android achieved using grayscale in css? thank time!! if using .png images, use imageview color filter attribute. public void setdisabled(imageview imageview) { final colormatrix grayscalematrix = new colormatrix(); grayscalematrix.setsaturation(0); final colormatrixcolorfilter filter = new colormatrixcolorfilter(grayscalematrix); imageview.setcolorfilter(filter); }

php - Homestead 2.0 - Trouble adding new L5 site -

i'm having lot of trouble trying add new l5 site homestead. i've got 2 laravel 4.2 sites running. i've added homestead.yaml, added hosts file , provisioned vm. iv'e ssh'd in , run serve command. even tried destroying vm , re creating it, hosts file issue, if ssh in , ping newsite.dev times out, can ping oldsite.dev. i can see site in /var/nginx/sites-available , /var/nginx/sites-enabled. running osx 10.11.1 does have suggestions further debugging? thanks, charlie for reference: homestead.yaml both prism.app , windsong.app sites work no issue, shop.app problem. ip: "192.168.10.10" memory: 2048 cpus: 2 provider: virtualbox authorize: ~/.ssh/id_rsa.pub keys: - ~/.ssh/id_rsa folders: - map: "~/dev/apps/www" to: "/home/vagrant/apps" type: "nfs" sites: - map: prism.app to: "/home/vagrant/apps/prism/public" - map: windsong.app to: "/home/vagrant/apps/winds

asp.net core - AspNetCore not getting POST data initially in framework 4.6.2 -

i've updated azure web app aspnetcore rc2 aspnetcore 1.0, .net framework 4.6.2 , preview 2 tooling. since change i've had issue first minute or after deploy controller not getting post data. object should contain null. after minute or code begins work expected. response time first web call seems faster now, making me suspect app being sent requests before app initialised. not happen locally, when deployed azure. is there need ensure app initialised before starts receive requests? if try access this.httpcontext.request.body directly throws cannot access disposed object. object name: 'filebufferingreadstream'. my project.json looks in case it's relevant: { "version": "1.0.0-*", "buildoptions": { "emitentrypoint": true }, "runtimeoptions": { "gcserver": true }, "dependencies": { "microsoft.extensions.configuration.json": "1.0.0", "m

java - Parsing a String to 2 Decimal Places to Double -

here's string 37900 that receive through api. however real value of item in double 379.00 also there might items can in same format that. let's say 120000, real value of 1 1200.00 how parse that? string numberasstring = "15,000"; double number = double.parsedouble(numberasstring); number = number/100; here string double. dividing format want.

android - ssl == null, java NullPointerException -

i'm implementing secure websocket in android (client side) using too tallnate websocket library but encountering error: java.lang.nullpointerexception: ssl == null. how can fix it?

c - How to use a function recursively? -

i have program prompts user enter 10 digits. program uses function return sum of divisors of each number entered minus , display until number equal 1 or 0. problem function stops after 45's divisors summed. i'm trying use recursion here because function called 'n' number of times until each 1 equal 0 or 1. makes recursion useful in situations these , how can apply here? there i'm missing way function called? can me? for example, if user types: 25 -4 6 45 (then presses enter) the program should output: 25 1 0 -4 0 0 6 6 45 33 15 9 4 3 1 0 0 6 example of perfect number , repeat, if perfect number occurs should stop summing divisors. when sum equal 0 should print once , stop. -4 out of range should print 0. must greater 1. #include<stdio.h> #include<stdlib.h> int main(void) { //fields int i=0, j=0, k=0, l=0, num = 0, x = 0, count = 0, total = 0, z = 0; signed int b[11] = {0}; char discard; //prompt message

How to receive TCP data (not HTTP) via PHP on WAMP/LAMP? -

i'm playing around gps trackers , send hex server via tcp. i've setup lamp server , process , store data trackers mysql. i've got tons of experience doing http web applications have 0 experience playing w/ tcp sockets , processing data directly , not via http, , dont know if that's possible. 1) i've read around , found support tcp , stuff question is, can php alone process tcp data? kinda thought php on top of apache http only. 2) also, if php support direct tcp processing (or guess should listening), "normally" supported shared hosts? or have request such feature? 3) can recommend open-source package of sort can pretty take care of receiving , storing raw data in mysql? need data mysql , can magic on via php after. ps need tcp way? can change port device sending to, , make port 80. way apache receive , perhaps can have index.php file processing raw data (? ) hoping find guidance , leads me started on right path. :) regards i thi

javascript - Remove specific HTML with jQuery on Tumblr Theme? -

i'm trying mimic new tumblr text post removes blockquotes important text visible in 250px text post without having scroll. of course tumblr hasn't updated entire code blockquotes still wrapped in custom themes. here's have far: http://01244235.tumblr.com/ i unwrapped blockquote tag. want remove links of users have commented. i know there isn't simple way of unwrapping entire thing until tumblr updates codebase. i'm going remove links entirely. so there way pick specific part of code , remove it? don't want remove href links because actual text post might have in it. so want remove every <p><a class="tumblr_blog" href=""></a></p> post. any ideas? in case write: $('p .tumblr_blog').remove(); but why not remove {blockquote} tags theme, rather relying on front end solution. or hide using css: p .tumblr_blog { display:none; }

javascript - I replaced $scope to a variable and now my angular application doesn't work -

i'm doing angular application , read it's practice don't use $scope. replaced variable, , data not appearing on page: this: observatoryapp.controller('appcontroller', function appcontroller($scope, $http){ var $scope = this; $scope.years = []; $http.get('json/years.json').then(function(response){ $scope.years = response.data; $scope.data = $scope.years[0]; }); now this: observatoryapp.controller('appcontroller', function appcontroller($http){ var self = this; self.years = []; $http.get('json/years.json').then(function(response){ self.years = response.data; self.data = self.years[0]; }); and data not showing on index.html page: <body ng-controller="appcontroller"> ... <select class="year form-control" ng-options="year.id year in years" ng-model="data"> </select> ... </body> what i'm doing wrong? i rea

Power fucntion langage C code blockss compiler -

this question has answer here: to power of in c? [duplicate] 7 answers void sommeascf(n) for(i=1; i<=n; i++){ result= result+ 1/i^n } } the problem i'm facing : result = result + 1/i^n how can put power function arithmetic operation ? ^ bitwise xor operator in c . can write expression using pow function - result= result+ 1/(pow(i,n)); note - need include header <math.h>

Reverse a c style string - runtime error -

i've got code try reverse c-style string, getting runtime error , use figuring out why. thanks! void switchedstr(char * str) { char * end = str; if (str) { while (*end) { ++end; } end--; } char temp; while (end > str) { temp = *str; *str = *end; *end = temp; end--; str++; } } if you're passing char *str = "test123"; to switchedstr , give access violation, since such strings constant , compiler puts them in non-writable location (see section 6.4.5 of c99 ). if try modify it, you'd undefined behavior. however, if it's not constant string literal, it'd work, example char str[]="test123"; or char *str = _strdup("test123");

java - How is a bitmap's memory managed on Android? -

i following this article on android developer, quotes : on android 2.3.3 (api level 10) , lower, backing pixel data bitmap stored in native memory. separate bitmap itself, stored in dalvik heap. pixel data in native memory not released in predictable manner, potentially causing application briefly exceed memory limits , crash. of android 3.0 (api level 11), pixel data stored on dalvik heap along associated bitmap. there another article confused me further : a bitmap thin wrapper around native heap memory area stores pixel data. i have multiple doubts : what difference between dalvik heap, native heap , native memory ? how bitmap different pixel data ? understanding image file (unless it's vector image) called bitmap - compressed. android decompresses/decodes information render pixels on screen. if correct, why need compressed bitmap anymore ? how class bitmapregiondecoder work ? understanding entire bitmap decoded/decompressed first, , area

python - Django: Parent Model with multiple child model types -

i've created set of django model cms show series of product s. each page contains series of rows, have generic class productrow(models.model): slug = models.slugfield(max_length=100, null=false, blank=false, unique=true, primary_key=true) name = models.charfield(max_length=200,null=false,blank=false,unique=true) active = models.booleanfield(default=true, null=false, blank=false) then have series of children of model, different types of row: class productbanner(productrow): wide_image = models.imagefield(upload_to='product_images/banners/', max_length=100, null=false, blank=false) top_heading_text = models.charfield(max_length=100, null=false, blank=false) main_heading_text = models.charfield(max_length=200, null=false, blank=false) ... class productmagazinerow(productrow): title = models.charfield(max_length=50, null=false, blank=false) show_descriptions = models.booleanfield(null=false, blank=false, default=false) panel_1_product = models.f

How to set Issuer information (CA) to User-Certificate - using phpseclib? -

i want run certificate authority php interface. backend want use phpseclib. (version 1.0.2 - https://sourceforge.net/projects/phpseclib/files/phpseclib1.0.2.zip/download ) the ca root certificate generated openssl , following script should create valid client certificate issued ca. part csr looks reasonable , csr valid. part sign certificate ca seems fail. certificate user information no issuer given. use example code of website - have no idea do. suggestions? import ca certificate wrong way? <?php set_include_path("../resources/library/"); include('file/x509.php'); include('crypt/rsa.php'); //show errors error_reporting(e_all); ini_set('display_errors', 1); // create key pair. $rsa = new crypt_rsa(); $key = $rsa->createkey(); $privkey = new crypt_rsa(); $privkey->loadkey($key['privatekey']); $pubkey = new crypt_rsa(); $pubkey->loadkey($key['publickey']); $pub

java - Cannot Resolve Method error Android Studio -

i try build method change fragments in frame of activity. in 1 of activities going well, in second activity i've got error. i've copied code first activity , change relevant things in second part error said error:(65, 25) error: no suitable method found add(int,mycarview) method fragmenttransaction.add(fragment,string) not applicable (argument mismatch; int cannot converted fragment) method fragmenttransaction.add(int,fragment) not applicable (argument mismatch; mycarview cannot converted fragment) the code working is: fragment2 = new mycaredit(); fragmentmanager fragmentmanager = getfragmentmanager(); fragmenttransaction transaction = fragmentmanager.begintransaction(); transaction.add(r.id.mycarframe,fragment2); transaction.commit(); and second part of code not working is- fragment3 = new mycarview(); fragmentmanager fragmentmanager = getfragmentmanager(); fragmenttransaction transaction2 = fragmentmanager.begintransaction(); transaction

I want to get id from database and use it in other class in Android app -

in database have written following code id . public int getid(){ string[] columns = new string[]{id}; cursor c=ourdb.query(table_name, columns, null, null, null, null, null); if(c.getcount()==0) return 1; c.movetolast(); int id=c.getint(0); return id+1; } and in class did int id = info.getid(); but id not incrementing after each entry , stays 1.

hyperlink - php preg_replace reuse of subject -

i've got big problem , can me out... i'd code plugin. plugin should search on website (for example www.example.com/index.php specific word example number1 . afterwords word found should replaced hyperlink. link should guide extern website example www.example2.com/index.php . according current website, found word should added hyperlink. if current site www.example.com/index.php , found word number1 , hyperlink should this: www.example2.com/index.php/number1 and shouldn't same hyperlink, created dynamic word plugin finds. beneath current code. hope can me out. thanks. public function oncontentprepare($context, &$row, &$params, $page = 0) { $text = $row->text; $pattern = array(); $pattern[0] = '/number1/'; $pattern[1] = '/number2/'; $pattern[2] = '/number3/'; $subject = array(); $subject[2] = 'https://www.example.com/index.php/'; $subject[1] = '(...)'; $subject[0] =

Step debugging collapses my expanded arrays in Eclipse's Debug View (C++) -

i've googled brains out , can't find addressed anywhere, hope here can me. i'm coding in c++ using nsight eclipse edition in centos linux 7.1, , whenever i'm step debugging, i've found every step take through code causes expanded arrays , structs in variables view collapse. frustrating because interested in watching contents of arrays , structs. , behaves same way if try watch them in expressions view. has else seen , found way keep expanded things open? thanks

javascript - ui route, node, express, 404 html files -

i can't figure out life of me. i'm using node, express, angular , ui.route. i'm trying accomplish following, have index.html master have some.html partials i setup application use ejs instead of jade (don't know if matters @ all)? error i'm getting can't find localhost:3000/views/partial-home.html 404, tried types of different paths in routing, (function(){ var app = angular.module('routerapp', ['ui.router']); app.config(function($stateprovider, $urlrouterprovider) { $urlrouterprovider.otherwise('/about'); $stateprovider .state('home-about', { url: '/home-about', templateurl: '/views/partial-home.html' }) .state('about', { }); }); }()); i not have particular in app.js file handle html or in route/index.js , think it's using index.ejs well. steps missing in usin

Moving SAS dataset into SQL Server WITHOUT using SSIS packages -

i have vb.net 2010 project remotely run prepared ssis package exports sas 9.3 dataset sql server 2012 database. far can tell, process tested fine. however, told not use (because ssis packages unreliable?), there alternatives doing this? i have looked sas odbc see if can sas end, not sure of dsn argument, example looked this: libname sql odbc dsn='sqlsrv_nt' schema=mssqltips; besides not being sure dsn applicable me, not administrator on workstation so can't play odbc settings - i'm not that's way go. you can either use driver or dsn (customized shortcut data source connection object configurations/settings set). once connected, append data local remote source. * dsn; libname mssqldata odbc datasrc="dsn name" user="username" password="password"; * driver; libname mssqldata odbc complete="driver={sql server}; server=servername; user=username; pwd=password; database=databasename;"; ** append database ta

With how many spark nodes should I use Mesos or Yarn? -

i run cluster 4 spark nodes , 1 solr node. want expand cluster 20 nodes , afterwards around 100. not sure @ cluster size make sense use mesos or yarn? make sense add yarn or mesos when have less 100 nodes? thanks mesos , yarn can scale upto thousands of nodes without issue. it the workload decides used, if workload has jobs/tasks related spark or hadoop only, yarn better choice, else if have docker containers or else run mesos better choice. there many other advantages , disadvantages using mesos, please find them in comparison here . spark standalone cluster provide same features other cluster managers if running spark. if run spark alongside other applications, or use richer resource scheduling capabilities (e.g. queues), both yarn , mesos provide these features. of these, yarn preinstalled in many hadoop distributions. if have less 100 nodes , not going run other applications alongside spark spark standalone cluster better choice not overkilling. it again

php - What's the difference between watching and downloading from a developer's perspective? -

what's difference between watching , downloading say, youtube, or other website similar nature? i'm curious if determine if watching content or downloading (through plugin/application grabber) player provided on website wanted create. does data transfer point (host) point b (client) differ downloading , watching? unless check speed of transfer of file, don't think allow check if user downloading or viewing. browsers download , buffer. technically, impossible detect. the browser request same buffering request or download request. hence, it not possible detect.

java - Plain While Screen while running application -

i'm making dialer application , i'm following guide simple dialer application difference i'm using fragments(with support libraries) rather activity approach. when try run app compiles fine displays plain white screen. fragments not implemented correctly or i'm somehow getting infinite loop? please appreciated in advance! here's mainactivity.java: package com.heroicjokester.android.haid; import android.support.v4.app.fragment; import android.support.v4.app.fragmentmanager; import android.os.bundle; import android.support.v4.app.fragmentactivity; public class dialeractivity extends fragmentactivity { @override protected void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); setcontentview(r.layout.activity_dialer); fragmentmanager fm = getsupportfragmentmanager(); fragment fragment = new dialerfragment(); if(fragment == null){ fragment = new dialerfragment(); fm.begintransaction()

javascript - How to add input values -

i have 4 text boxes namely customer_phy_tot , customer_che_tot , customer_bio_tot . i'm trying add , display 3 input boxes values 4th input, customer_pcb_tot . customer_bio_obt.blur(function(){ var customer_pcb_tot = isnan(parseint($("#customer_phy_tot").val() + $("#customer_che_tot").val() + $("#customer_bio_tot").val())) ? 0 :( $("#customer_phy_tot").val() + $("#customer_che_tot").val() + $("#customer_bio_tot").val()) $("#customer_pcb_tot").val(customer_pcb_tot); }); the problem instead of adding code treating string. suppose have values 10 , 15 , 5 respectively. it's supposed display 30 in 4th box in case showing 10155 . any appreciated. you're using parseint() already, need use on string values returned each individual val() call. note use of ternary expression redundant. try this: customer_bio_obt.blur(function() { var customer_pcb_tot = parseint($("#custom