Posts

Step through a word table selection with VBA -

i've been trying write macro changes formatting in big tables in word me. tried find information, there tables, information excel. so situation got this, got table 6 columns. first 2 columns selected, macro started. i'd read first cell of selection top left, manipulation/calculations it, i'd write manipulated data, move on cell right, read data, manipulate it, write , till end of selection. can me code skeleton? awesome! here's possible skeleton, loops through columns 1 , 2 of preexisting table. sub testtable() dim wordapp word.application dim docdocument word.document dim tbltable word.table dim c word.cell dim sstring string dim icolumnnumber integer set wordapp = createobject("word.application") set docdocument = wordapp.documents.open("<location of document e.g. c:\mydoc.doc>") set tbltable = docdocument.tables(1) icolumnnumber = 1 2 each c in tbltable.columns(1).cells sstring = c.range.text 'do...

socket.io - Calling socket.emit('init', 'data') from client side javascript function does not execute. -

this question has answer here: how invoke server-side function client-side using socket.io? 2 answers on client side: <a href='javascript:callinit();'> init </a> client side html includes following script above: <script src="/socket.io/socket.io.js"></script> <script>var socket = io.connect('http://localhost:3000'); function callinit(){ alert('inside callinit'); socket.emit('init', 'data'); } </script> on server-side: io.sockets.on('connection', function(socket) { console.log('socket connection established'); socket.on('init', function(data){ console.log('init invoked'); init(); }); }); in above code: alert('inside callinit') executes. console.log('socket connection established'); executes. console....

jsf 2 - faces component content which contains jsf components is not evaluated -

created taghandler , added facelet. facelet content still not evaluated. html code contains ui:fragment text. @override public void encodebegin(facescontext context) throws ioexception{ responsewriter writer = context.getresponsewriter(); content = benefits.getcontent(type); writer.write(content); } <content type="short"> <data><![cdata[ <ui:fragment rendered="#{true}"> <a id="" href="a.xhtml> </ui:fragment> <ui:fragment rendered="{false}"> <a id="" href="b.xhtml"> </ui:fragment> <img src="a.png" alt="" /> </a> ]]></data> public class cardholderbenefitstaghandler extends taghandler { private final tagattribute src; public cardholderbenefitstaghandler(tagconfig config) { super(config); tagattribute attr = null; attr = th...

android - google cloud messaging errors on some devices -

i'm developing android app should use gcm deliver notifications. at moment, i'm encountering problems devices <= android 4.0.4. with galaxy nexus (4.3), nexus 7" (4.3) , fujitsu tablet (4.1.1) receive correctly broadcast gcm , show notification. but htc incredible s (4.0.4) , htc flyer (3.2) application doesn't receive nothing. trying debug mode in eclipse, infact, application run on these devices doesn't enter in onreceive() method. here's androidmanifest.xml <?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.xxx.yyy" android:versioncode="3" android:versionname="1.2" > <uses-sdk android:minsdkversion="8" /> <uses-feature android:glesversion="0x00020000" android:required="true" /> <uses-feature android:name=...

FONT.COLOR returns NULL in conditional formatting excel vba -

i have sub routine gets conditional formatting properties cell cell in sheet "source" , applies them in sheet "result" in same workbook. works when font.color , font.tintandshade returns null, in result sheet conditional formatting have black font color. (you can check in result sheet conditional formatting > mange rules). the error "invalid use of null" maybe because of type of values. error occurs here: fcfontc = xarr(i, j).formatconditions(ii).font.color fcfontt = xarr(i, j).formatconditions(ii).font.tintandshade here code: sub formatcondition1() dim fc formatcondition dim fcfontc long dim fcfontt integer dim fcc long dim fct integer dim ii integer dim wks1 worksheet, wks2 worksheet dim xarr range, yarr range dim integer, j integer 'dim k integer, l integer worksheets("source").activate worksheets("result").select set yarr = worksheets("result").range("a1:c2") yarr.range("a1:c2")....

php - How to print a mysql query to view what's being sent -

i'm trying view (print or echo) on page actual query being sent following: $req1 = mysql_query('select m1.id, m1.title, m1.date_time, count(m2.id) reps, users.username userid, users.username pm m1, pm m2,users ((m1.user1="'.$_session['username'].'" , m1.user1read="no" , users.id=m1.user2) or (m1.user2="'.$_session['username'].'" , m1.user2read="no" , users.id=m1.user1)) , m1.id2="1" , m2.id=m1.id group m1.id order m1.id desc'); i've tried looking on net way "echo $req1" returns resource id. wrong, username variable, , it's returning no records. please explain how actual query, it's running username variables, etc. print? can't figure out how it. thank in advance genuis!!! :) $sql = 'select m1.id, m1.title, m1.date_time, count(m2.id) reps, users.username userid, users.username pm m1, pm m2,users ((m1.user1="'.$_session['username...

sql - Stored Procedure Parameters and Crystal Reports -

i creating stored procedure used data source crystal report. the stored proc takes 2 input parameters - int , comma delimited string list create procedure sp_ap_ytd_payments1 @year int, @companies nvarchar(max) -- sp code here i realize have convert string list array before using in clause. i have 2 questions : how pass parameters sp using exec sp_ap_ytd_payments1 ? from crystal reports, how should user enter second argument ? comma delimited list? i found answer myself. exec sp_ap_ytd_payments1 2013, '925,926,txr' from crystal, user enter comma-dlimited list companies parameter.