Posts

eclipse plugin - How to programmatically update the selected resource for link-with-editor functionality? -

my eclipse plugin provides editor contains list of files (as result of dependency search). when user selects file in list, file/resource should highlighted in package/resource explorer. this done using link-with-editor functionality of explorer view if there call like: updateselectedresource(iresource) call within editor explicity set active file. actual call? your editor must become iselectionprovider . in eclipse faq complete example, important line registering selection provider getsite().setselectionprovider(viewer); . afterwards selected file in list automatically told selection listeners, including package explorer. if want big picture selection service (which responsible making views react on selections in other views), there eclipse article describing in detail. and if find wanting interact more existing views, may want have @ iadaptable, described here , not necessary package explorer linking.

sql - Find all but allowed characters in column -

i have query i've been trying make, it's supposed pull rows not contain characters not want. select nid notes note '%[^0-9a-za-z#.;:/^\(\)\@\ \ \\\-]%' that should return rows not contain 0-9 a-z a-z . : ; ^ & @ \ / ( ) # but time add 1 of these below fails $ [ ] ? even trying escape them either \ or [[ doesn't seem work properly. have access stock sql install. it's supposed pull rows do not contain characters not want. to find rows contain x can use like : select * yourtable col '%x%' to find rows do not contain x can use not like : select * yourtable col not '%x%' so query should use not like because want rows don't contain something: select nid notes note not '%[0-9a-za-z#.;:/^\(\)\@\ \ \\\-]%' that should return rows not contain 0-9 a-z a-z . : ; ^ & @ \ / ( ) # no. because of ^ @ start, returns rows don't contain characters except those . characters listed...

php - Mysql server has gone away - MySQL error 2006: -

when trying edit table data in 1 of databases, can't apply change because of error "mysql error 2006: mysql server has gone away"` this problem intermittent. did research on , came across post . (note: i'm not @ knowledgeable on databases , php). see mysql_ping pings server connection or reconnects if there no connection. sounds great. issue how apply mysql_ping? go , it? ok apply or effect things? my server runs off windows 2003, iis , have php 5.3.8. i've had here i'm battling understand it. make subroutine/function includes mysql_ping , , use insted of mysql_query . for example <?php function my_query($sql) { if(!mysql_ping()) { if(!mysql_connect( /* add connection parameters here */ )) { trigger_error("database not avaible: " . mysql_error()); return false; } } return mysql_query($sql); } ?>

for xml - SQL Server 2008: How to remove namespace from the elements, but let it display on root -

i using sql server2008 xml clause generate xml file using bcp. when use below query, result fine: with xmlnamespaces ( 'http://base.google.com/ns/1.0' g, default 'http://www.w3.org/2005/atom' ) select id, name "g:name" paymentmethods xml path ('entry'), root('feed') result: <feed xmlns="http://www.w3.org/2005/atom" xmlns:g="http://base.google.com/ns/1.0"> <entry> <id>1</id> <g:name>bpay</g:name> </entry> <entry> <id>2</id> <g:name>cash</g:name> </entry> </feed> but want add static elements, say, title , date after root. able that, then, namespace tags appear in element don't want. please note, want elements namespace prefix eg, query using is: with xmlnamespaces ( 'http://base.google.com/ns/1.0' g, default 'http://www.w3.org/2005/atom' ) select ...

post - Facebook App stream not always showing -

i created new facebook app. when test it, doesn't show stream post. works, when remove app personal facebook , try again doesn't show stream post again. familiar problem? kind regards, mark when reauthorise app, ask read_stream extended permission? https://developers.facebook.com/docs/authentication/permissions/

extjs - custom picker editor with a grid -

using extjs4, have created custom grid. 1 column editable using picker. if wanted editable text field, define row as: {dataindex: 'valuescore', width: 40 text:'value', field: {xtype: 'textfield'}} so think should able this: {dataindex: 'valuescore', width: 40, text:'value', field: {xtype: 'pickerfield'}} but how define picker fields, etc? right way this? thanks sha pointed me in right direction on this. first of all, turns out wanted combobox (single select), not picker. regardless, did not understand (and not find doc for) ext-js create these selection objects (like combobox), , need pass creation parameters in "field" parameter. example: {dataindex: 'valuescore', width: 40, text:'value', field: {xtype: 'combobox', store: mystore, querymode: 'local', displayfield: 'value', valuefield: 'value'} here ...

How to Rails rake multiple commands with one environment? -

is there way multiple rails 3 rake commands on 1 line, requiring environment initiated once? i know possible: rake db:rollback db:migrate but if options passed, rake db:migrate version=0 db:migrate the second 'db:migrate' won't run. i don't think possible. the quickest solution can think of is: rails_env=test rake db:migrate version=0 && rake db:migrate the reason why believe not possible because version constant, not attribute passed db:migrate option. example, of these commands work: rake db:migrate version=0 rake version=0 db:migrate version=0 rake db:migrate and since can't rewrite constant in same action again, call db:migrate version=0 twice.