Posts

Showing posts from May, 2013

jdbc - Glassfish 2.1 never reuses statements with Postgresql and Eclipselink? -

we using glassfish server 2.1 eclipselink jpa 2.1 , connect postgresql database 8.4.8. problem in log file of postgres see prepare of statements created em.createquery or em.createnamedquery. seems no statement has been prepared reused. therefore performance bad. i tried setting default jdbc setting preparethreshold 5 1. changed unnamed statements named. still not reused. i tried several settings connection pooling prepared statements connection dependent returned default org.postgresql.ds.pgsimpledatasource , javax.sql.datasouce. i enabled statement caching in persistence.xml: <property name="eclipselink.jdbc.cache-statements" value="true"/> does glassfish 2.1 support statement caching? , if settings missed? any hints appreciated. considering this: http://www.youtube.com/watch?v=hfx_m0p0kom seems 2.1 not support statement caching.

javascript - HTML 5 UI component markup libraries (like jQuery Mobile) -

i have been using jquery mobile , love how microformated html5 beautiful ui components , formatting. need know html , can great immediate , feel awesome prototyping . i'm wondering if there other microformat ui component libraries non mobile sites? clarification: when microformat mean using structured , semantic markup possibly meta-data attributes create ui in declarative fashion . there similar libraries not same: dojo (this may have changed) provides declaritive markup create components. jsf libraries server side , i'm looking client side. some jquery ui widgets must of them programmatic. xaml , xul ... again jsf , not html. there many css libraries out there , of them layout. microformatting seems more data mining. seem looking or more maybe. http://www.blueprintcss.org/

lucene - Apache Solr multiple phrase queries with OR -

i using apache solr 1.4 dismax, , trying execute search following 2 phrases: "call number" "dewey decimal" i want match documents contain either of phrases. matches if search phrases separately, not together. i tried queries like: title:("call number" or "dewey decimal") title:["call number" "dewey decimal"] any ideas? did test following query ? (title:"call number" or title:"dewey decimal")

How can I programmatically refresh Visual Studio WPF designers? -

is possible programmatically refresh wpf designer windows in visual studio e.g. using dte? i have design-time behaviour refresh wpf designer windows after file system changes have detected. i have tried: dte.itemoperations.openfile(file) //where file xaml file but has no effect. update i looking solution not close , re-open xaml file, heavy-handed. i'm looking way of getting wpf designers reload\refresh when solution rebuilt. the best can think of is dte.activedocument.close(vssavechanges.vssavechangesno); dte.itemoperations.openfile(filename);

php - jquery, animating dynamic page load -

i want achieve that: click on link in navbar fadeout part of site, load page link animate wrap match new site height fadein new content. i found neat solution ( here ) this, site build in different way. my index.php : <?php include ('includes/header.php'); echo '<div id="wrapper">'; if ($_get['page'] == 'about' ){ include 'includes/navbar.php'; include 'includes/about.php'; }else if ($_get['page'] == 'login' ){ include 'includes/navbar.php'; include 'includes/login.php'; }else if ($_get['page'] == 'register' ){ include 'includes/navbar.php'; include 'includes/register.php'; }else if ($_get['page'] == 'member-index'){ include 'includes/navbar.php'; include 'includes/member-index.php'; }else if ($_get['page'] == 'login-failed'){ include 'includes/navbar...

java - MDP JMS Transaction rolls back then reprocesses message in an endless loop -

if enable transaction management on defaultmessagelistenercontainer specifying sessiontransacted=true or transactionmanager=jmstransactionmanager , whenever exception occurs in mdp, transaction rolled , message placed on queue. causes message processed again, transaction roll again on , on again creates endless loop. i guess question ... missing here? why want message go on queue if means processed on , on again? <!-- jms connection factory --> <bean name="jmsconnectionfactory" class="org.springframework.jndi.jndiobjectfactorybean"> <property name="jndiname" value="java:connectionfactory" /> </bean> <!-- jms transaction manager --> <bean id="jmstransactionmanager" class="org.springframework.jms.connection.jmstransactionmanager"> <property name="connectionfactory" ref="jmsconnectionfactory" /> </bean> <!-- destination inbound_email_q --...

mysql - python saving to db error: 'ascii' codec can't decode byte -

i'm having problem when writing part of xml code database unicodedecodeerror: 'ascii' codec can't decode byte 0xe4 in position 1679: ordinal not in range(128) how can fixed? you want encode unicode string 'utf8' before writing db. data.encode('utf8')

ruby on rails - How to parse nested ul/li tags using Hpricot -

Image
i have following html structure <div id='my_categories'> <ul> <li><a href="1">animals, birds, & pets</a></li> <li><a href="2">ask expert</a> <ul> <li><a href='21'>health care providers</a></li> <li><a href='22'>influnza</a> <ul> <li><a href='221'>flu viruses (2)</a></li> <li><a href='222'>test</a></li> </ul> </li> </ul> </li> </ul> </div> this how web page looks what need is, have categories table fields category_name, category_url , parent_id. i need save each category , sub-category. parent_id denotes under category sub-category comes under. how can parse through html structure using hpricot , save data da...

extjs4 - extjs closing a Ext.window.Window on ESC -

i'm working on extjs4. have grid panel. on selecting row of grid panel, create simple window. close when user hits esc. if user clicks in window , clicks esc, window closed. if user didn't touched window yet, esc not close window. idea how that? var win = ext.create('ext.window.window', { title: 'details', width: 400, layout: 'fit', iconcls: 'details-icon', items: simple }).show(); maybe it's no foucus @ win. or try use this: listen window show event, , add keymap document: var map = new ext.util.keymap(ext.getbody(), [{ key: ext.eventobject.esc, defaulteventaction: 'preventdefault', scope: this, fn: function(){win.close()} }]);

.net - Opening Word Document through code in Visual Studio C# -

i developing office development visual studio. , receive error below error: ** unable cast com object of type 'microsoft.office.interop.word.applicationclass' interface type 'microsoft.office.interop.word._application'. operation failed because queryinterface call on com component interface iid '{00020970-0000-0000-c000-000000000046}' failed due following error: no such interface supported (exception hresult: 0x80004002 (e_nointerface)). ** code: (also @ https://gist.github.com/1056809 ) if (file.exists((string)strdocpath)) { word.application wdapp = new word.application(); wdapp.visible = true; //error thrown here object readonly = false; object isvisible = true; object omissing = system.reflection.missing.value; //open word document //error thrown on line below. word.document adoc = wdapp.documents.open(ref strdocpath, ref omissing, ref readonly, ref omissing, ref omissing, ref omissing, ...

java - Using an Interface in another interface -

i not sure how proceed adding element priority queue. don't want code spoon feed me, can explain me how use interface passed interface parameter , class implementing 1 of method. please give me pointers, , learn how implement code. queueitem class public interface queueitem { /** * returns priority of item. priority guaranteed * between 0 - 100, 0 lowest , 100 highest priority. */ public int priority(); } priorityqueue class public interface priorityqueue { /** * inserts queue item priority queue. */ public void insert(queueitem q); /** * returns item highest priority. */ public queueitem next(); } quickinsertqueue class public class quickinsertqueue implements priorityqueue { @override public void insert(queueitem q) { // todo auto-generated method stub } @override public queueitem next() { // todo auto-generated method stub return null...

logging - Which is the best viewer for NLog? -

which best viewer nlog? log2console sentinel other ? although old question, same question has been haunting me last couple of weeks. here little contribution hive-mind: i found lightweight client or client/server application using simplistic, lightweight log viewer log2console nlogviewer target ' filled additional parameters fields made both easy use/setup , customize, while being readable , easy find info looked for. i used udp listener in log viewer, , following target definition in nlog configuration: <target xsi:type="nlogviewer" name="logviewer" address="udp://localhost:7071" onoverflow="split"> <parameter name="message&#9;&#9;" layout="${message}" /> <parameter name="callsite&#9;&#9;" layout="${callsite:includsourcepath=true}"/> <parameter name="exception&#9;" layout="${exception:separator=&#13;&#...

selenium 2 - C# SelectElement not selecting in Chrome -

i'm using following code in c# select value in dropdown list: new selectelement(driver.findelement(by.name("element"))).selectbyindex(2); this works firefox , ie8 not chrome, nothing gets selected. there know issues selectelement? alternatives work in chrome? i'm using standalone server 2.0rc3 , chrome 12 this known issue chrome driver. iwebelement.select() , .toggle() methods deprecated in 2.0rc3, requiring use .click() instead. selectelement support class updated handle change; however, chromedriver.exe (which built , provide chromium team) has yet catch up. using iwebelement.click() on element doesn't yet work in chrome.

Apache mod-wsgi django problem -

i got error messages while trying deploy django app under mod-wsgi in apache. [thu jun 30 23:03:35 2011] [error] [client 127.0.0.1] mod_wsgi (pid=4152): exception occurred processing wsgi script 'c:/djangoprojects/tryserver/apache/django.wsgi'. [thu jun 30 23:03:35 2011] [error] [client 127.0.0.1] traceback (most recent call last): [thu jun 30 23:03:35 2011] [error] [client 127.0.0.1] file "c:\\python27\\lib\\site-packages\\django\\core\\handlers\\wsgi.py", line 250, in __call__ [thu jun 30 23:03:35 2011] [error] [client 127.0.0.1] self.load_middleware() [thu jun 30 23:03:35 2011] [error] [client 127.0.0.1] file "c:\\python27\\lib\\site- packages\\django\\core\\handlers\\base.py", line 39, in load_middleware [thu jun 30 23:03:35 2011] [error] [client 127.0.0.1] middleware_path in settings.middleware_classes: [thu jun 30 23:03:35 2011] [error] [client 127.0.0.1] file "c:\\python27\\lib\\site-packages\\django\\utils\\functional....

jQuery plug in question -

i'm using following script mark current page a.active on url. $(function () { var menus = $('#menu >li > a'); menus.removeclass('active'); var matches = menus.filter(function () { return document.location.href.indexof(this.href) >= 0; }); matches.addclass('active'); }); i have following website: website as can work on menu items exept 'massage treatments' - why?? any appreciated. pete i guess <script type="text/javascript" src="js/index.js"></script> missing on 'massage treatments' page

c# - Should Password fields retain their values if a form does not pass validation? -

i have typical sign-up form 2 password fields. <form> <%= html.textbox("email", null) %> <%= html.password("password", null) %> <%= html.password("confirmpassword", null) %> <input type='submit' /> </form> if form fails validation , redisplayed, text field retains value password fields blank. why shouldn't password fields retain values? , more importantly, there reason shouldn't override behavior? i feel behavior decreases usability, , prefer password fields behave same way textbox fields -- keeping entered value when validation errors exist. i'm using asp.net mvc, question pertains more usability , security. understand i'm seeing expected behavior, , taking @ password(...) method shows me explicitly ignores value in modelstate . you can send value on regular input type=password field. however, if using .net input control, clear contents of value pri...

SQLite: Numeric values in CSV treated as text? -

i imported huge text file table, using .import command. ok, except fact seems treat numeric values text. instance, conditions such where field > 4 met. did not specify datatypes when created table, doesn't seem matter when small tables created. any advice welcome. thanks! edit/conclusion: turns out of values in csv file blanks. ended solving being bit less lazy , declaring datatypes explicitly. the way sqlite handles types described on page: http://www.sqlite.org/datatype3.html in particular: under circumstances described below, database engine may convert values between numeric storage classes (integer , real) , text during query execution. section 3.4 (comparison example) should give concrete examples, explain problem have. example: -- because column "a" has text affinity, numeric values on -- right-hand side of comparisons converted text before -- comparison occurs. select < 40, < 60, < 600 t1; 0|1|1 to avoid af...

build - Job inheritance in Jenkins jobs -

how handle mapping jenkins jobs build process, , have been able build in cascading configurations on inheritance? for given build i'll have @ least 3 jobs (standard continuous integration/nightly, security scan, coverage) , downstream integration testing jobs. configuration slicer plugin handles aspects cross jobs each jobs still own individual entity no relationship other jobs in group. i saw quickbuild , has job inheritance parent jobs can define standard group of steps , children can override , specialize. jenkins, have copies of jobs, fine until need change something. quickbuild relationship between jobs allows me spread changes little effort. i've been trying figure out how handle in jenkins. use parameterized build trigger plugin allow jobs call others , override aspects. i'd harvest data called jobs caller. suspect i'll run series of problems there aspects can't override force me implement jenkins functionality in own script making jenkins less usef...

java - Spring FileInputStream buffer sporadically contains incorrect characters -

i using fileinputstream in spring mvc read chunk of file byte[] buffer. i write (using filecopyutils.copy) buffer response stream. i notice response written stream (what user receives) looks similar file, there blemishes. before file data, there '2000' (without quotes) @ top of file. this '2000' string sporadically present throughout file the file ends '0' none of these exist in original file being read from. can me rid of these have accurate output stream? here's example of incorrect ouput looks like: 2000 line of data line of data line of data line of data line of data line of data line o 2000 f data line of data 2000 line of data line of data 0 it should be: a line of data line of data line of data line of data line of data line of data line of data line of data line of data line of data thanks! my guess stream specified chunked transfer encoding , reading is

trim - PHP, Triming leading 0s problem -

so here problem getting hex number input filed looks ffff, 000ca3, blah blah blah while trim these down easy $var = ltrim('0',$var); my problem when user type in '0000' , such trims whole string nothing. if statement on after trim result check string become null , add 0 if does. there other neat trick out there can solve in 1 statement? thank in advance. here's 1 can think of: $var = dechex(hexdec($var)); hexdec() converts strings actual numeric values, insignificant zeroes — insignificant. dechex() converts them strings once zeroes dropped. if require uppercase hex a-f digits strange reason, tack on strtoupper() call dechex() produces hex digits in lowercase: $var = strtoupper(dechex(hexdec($var)));

c++ - Constructor and anonymous union with const members -

is possible have anonymous union const members? have following: struct bar { union { struct { const int x, y; }; const int xy[2]; }; bar() : x(1), y(2) {} }; with g++ 4.5 error: error: uninitialized member ‘bar::<anonymous union>::xy’ ‘const’ type ‘const int [2]’ this problem in gcc fixed in version 4.6. code works fine. it still depends on gcc extension because uses anonymous struct, compilers support them now. also, following code builds -pedantic : struct bar { union { const int x; const int y; }; bar() : x(1) {} }; that code accepted clang , visual studio 2010 (but fails 2008).

linux - Universal System Mount on Android -

i've written app modifies file system contents. 1 of requirements mounting system read-write. here , other sources, i've found accepted command this: mount -o rw,remount -t yaffs2 /dev/block/mtdblock3 /system i'm hoping can better explain how works. understood mean we're working yaffs2 file system , going mount directory /dev/block/mtdblock3 /system. when issue mount command on phone though, /system listed ext3, not yaffs2 (if substitute ext3 yaffs2 command works equally well). also, /dev/block/mtdblock3 not existing directory. this may more of linux question android, i'm sure knows this. importantly, how universal command? i'm planning on releasing huge variety of devices, need accomodate other file systems? or "just work"? the location of device corresponding /system partition device-specific, filesystem in use; there no single standard command. moreover, there no guarantee filesystem mutable @ all; it's possible root fs on c...

php - How to express the difference between two dates in a human-readable format -

if have 2 dates - $end_date , $start_date , how can express difference between 2 in format such "2 years : 4 months : 2 days"? i know can difference between 2 dates so: $dif=strtotime($end_date)-strtotime($today); but how can convert result human-readable format, shown above? this how can format timestamp: echo date('d-m-y', strtotime($end_date)) // dd-mm-yyyy format are looking calculate difference between 2 dates, in number days? edit : code find difference between dates in "xxyear yymonth zzday". code assumes start , end dates in yyyy-mm-dd format. if that's not case you, please either change them yyyy-mm-dd format, or change arguments mktime() accordingly. $enddate = '2011-03-01'; $startdate = '2011-02-02'; $daysperyear = 365; $dayspermonth = 30.4; $diffday = $diffmonth = $diffyear = 0; $enddatets = mktime(0, 0, 0, substr($enddate, 5, 2), substr($enddate, 8, 2), substr($enddate, 0, 4)); $startdatets = mkti...

javascript menu not performing correctly in explorer 8 (works fine in chrome and explorer 8 compatability mode) -

i'm building website template can see here: http://davewallace.net/sunschool/template-test.asp all going until checked in explorer (8) on pc (i use chrome on pc) the problem relates (left hand) side menu... i noticed upon clicking second parent item in side menu (that during 1 session, clicking on 1 parent menu item after clicking on another) , every successive parent menu items clicked, contents of former parent menu clicked not disappear when should, instead staying on screen moving up, aligned top parent item. works fine in chrome however, in explorer. * update! * did more research , viewed page again in explorer running "compatibility mode" , worked fine! have isolated problem down explorer 8 running in standard mode only. update * ibu, have fixed couple of (relatively minor) html errors thought may have been causing problem. unfortunately not case * ** believe javascript issue , kind of code clash between side menu , top menu code... trying best r...

c# - Is it possible to redirect to another action passing it as well our current Model as HttpPost? -

so, experimenting asp.net mvc , have following code: public class trollcontroller : controller { public actionresult index() { var trollmodel = new trollmodel() { name = "default troll", age = "666" }; return view(trollmodel); } [httppost] public actionresult index(trollmodel trollmodel) { return view(trollmodel); } public actionresult createnew() { return view(); } [httppost] public actionresult createnew(trollmodel trollmodel) { return redirecttoaction("index"); } } the idea have index page shows age of our troll name. there's action allows create troll, , after creating should index page time our data, instead of default one. is there way pass trollmodel createnew(trollmodel trollmodel) r...

Facebook cookie issue in IE9 and Chrome and FacebookWebClient initialization -

i playing facebook c# sdk use asp>net application, , using facebookwebcontext.current.isauthorized method after login on client side javascript sdk procceed further actions (retrieve user info, friends list,etc). working on beginning stop week ago. facebookwebcontext.current.isauthorized method false now. checking further found working in safari , firefox 4, fails in ie9 , chrome. it seems ie9 doens't see facebook cookie fbs_applicationid. testing different examples in javasdk console on facebook site shows facebook fb.cookie.load method doesn't return value in ie9 , chrome. so question, there other way "auhtorize" application on server side using sdk? facebook side issue specific browsers? fb.login callback function return session info, how can use on server side activate facebookwebclient? i have same problem, behavior odd. working yesterday , not working in chrome , ie9. fbwebcontext.accesstoken null , there's no fbs_xxxxx cookie. it's ...

winapi - C++ thread termination with waiting window -

so, code goes somehow this: main(){ /*waiting window class declaration*/ threadinfo* othread=new threadinfo(); //an object me know when finish thread queueuserworkitem((lpthread_start_routine)waitingwindow, (void*)mthread, wt_executelongfunction); function_that_takes_time(); othread->setterminated(); //set member terminated bool true /*continue other things*/ } and waitingwindow function run on thread msg msg; hwndwaiting=createwindow(...) // here window created while (msg.message != wm_quit) { if (peekmessage(&msg, null, 0u, 0u, pm_remove)) { translatemessage(&msg); dispatchmessage(&msg); } else { if(othread->isterminated()) // isterminated returns bool true if terminated { delete othread; exitthread(0); } } } exitthread(0); is exitthread way remove waiting window, , safely remove thread? (at l...

java - What is the use of QName and Operator class? -

can explain use of qname, operation , stub class in j2me giving simple , understandable examples? i didn't use before. see following java documents. may helps you. qname operation stub

Getting rid of java.util.Iterator -

my problem related java. don't java.util package because of optional methods. instance, don't that, when return list , have prevent user modify list; return list implements, say, interface unmodifiablelist (yes, know collections.unmodifiablelist() , many reasons, don't encapsulate list). on other hand, when given list external piece of code, list a1) unmodifiable, a2) modifiable side-effects on object returned me list, or a3) modifiable without side-effects, , b1) immutable (assuming elements in list immutable well) or b2) mutable , unsafe use key. i can rewrite existing classes (just copy/paste java.util package) , introduce interfaces unmodifiablelist , modifiablelist , etc. without effort. however, have following problem: forall mechanism for (final object o: listofobjects) { // } which uses class java.lang.iterable , uses java.util.iterator . so problem is, how should cope iterator class? i have several possible solutions looking elegant. is ...

oracle11g - Bulk update of column values of entire table -

we have oracle 11g database table around 35 million rows. in situation have update values of 1 column. column indexed. i have script can generate updated values , can populate in text file. i'm looking strategy bulk update table. can afford downtime of around 10 hours. will idea to dump entire table flat file update values using scripting language reload entire table rebuild indexes what pitfalls 1 can encounter? i'm not competent in pl/sql. there way solve in pl/sql or way "within" database itself? thanks, prabhu the fastest way create external table based on flat file of update values , then: create table new_table select o.col1, o.col2, o.col3, ..., x.value coln old_table o join extern_table x on ...; (make sure join returns rows old_table. join may need outer join.) -- drop foreign key constraints reference old_table alter table child1 drop constraint fk_to_old_table1; ... drop table old_table; rename new_table old_t...

scheduled tasks - Programming language for developing multi platform daemon -

i developing application needs perform lots of batch processing (for example whois request). ensure best performance, split job between different computers. this, planning write program query job queue on main server, fetch 1 job, processes , updates main server result. actual processing done php. program need poll job queue , invoke local php script. job needs run every few seconds, hence cannot use cron. can suggest programming language can create such daemon easily? there program available this? thanks a few notes you can use cron run every few seconds(using hacks though) you need sort of distributed queue hold jobs (rabbitmq 1 or can use zookeeper) depending on queue pick, there api's in many programming languages remove jobs queue. there many open source tools similar things, depend on how sophisticated needs are. hadoop complex product let implement this workerpool python library simple use, multithreaded , run single machine. on simple end of sp...

visual studio 2010 - Show console window when debugging Win32 MFC application in VS2010 -

here have mfc project. want see console window when press f5. can see output. could configuration in project setting enable without changing code? thanks. [solved] open project's property pages dialog box. details, see setting visual c++ project properties. click linker folder. click system property page. modify subsystem property. console (/subsystem:console) if using vc6, steps similar: project->settings select link tab at bottom in project options text box, /subsystem:windows setting. modify read /subsystem:console recompile, , when launch application launch console window.

watir - How to locate the table which doesn't have id or name -

i need locate table,then locate tr , td,but table doesn't have id , name,so how locate table?i know should use index,unfortunately doesn't work. there 10 tables in page,i want locate "refesh" in row of table,may easy,but cannot resolve it...i don't know how locate particular table...,no id,no name,how can judge table want locate there part of code: <table cellspacing="0" border="0" style="height:63px; width:"> <tbody> <tr> <td style=" "> <table cellspacing="0" border="0" style="margin-top:14px; width:112px; padding-left:15px;"> <tbody> <tr> <td style="" rowspan="2"></td> <td id="tdrefresh" style="height:28px;" colspan="2"> <div align="center" onclick="refresh(this,13652,1,1,0,...

Arrays in PowerBuilder -

i have code n_userobject inv_userobject[] = 1 dw_1.rowcount() inv_userobject[i] = create n_userobject . . . next dw_1.rowcount() returns 210 rows. odd in range of 170 up, application stop , crashes on inv_userobject[i] = create n_userobject . question, there limit on array or userobject declaration using arrays? try destroying after loop check if possible solution, still crashing. or how can able somehow refresh userobject? or there out there encounter this? thanks help. first, memory problem. you're not running array limit. if take guess, 1 of instance variables in n_userobject isn't being cleaned (i.e. pointing class isn't being destroyed when parent class destroyed) or pointing class doesn't clean up. if you've got pb enterprise, i'd profiling trace smaller loop , see being garbage collected (there's utility called cdmatch helps process). secondly, let's face it, you're doing avoid writing reset method. if functio...

reporting services - Display Multiple Record values in SSRS -

i have 2 tables like id name 1 xyz 2 pqr id value 1 x 2 y 1 p 2 q i need output follows in ssrs report xyz pqr x y p q just create stored procedure generate "join" on "id" column. use stored procedure datasource new "dataset" in ssrs report. on sidenote, why report require grouping laid out horizontally?

c# - How To Add Values Group By Colum In a Data Table? -

i trying add kw vales group data in data table cant?? have filterd values in data table group date cant add adding them 1 know how add them?? datatable _ghdt = _hdt.defaultview.totable(true, "date"); this line filtering date while _ghdt , _hdt data tables hopes suggestions regards, i not sure if understood corectly want write groupby on datatable you can . if didnot understand question please try spend more time explaining , data have , have tried etc..

What are the questions that a good android programmer should be able to answer -

i have undergone android question , answer books hardly got of them good. can of suggest android questions android programmer should able answer or can improvise knowledge of android programmer, what questions android programmer should able answer what state app activity in /or states go through; if hit 'home' button within app?

.net - Internal workflow of MasterPages -

can provide me documentation or link internal workflow , architecture of master pages in asp.net ? nested asp.net master pages walkthrough: using nested master pages in asp.net nested master pages asp.net master pages asp.net master pages tutorials

RSS Viewer web part not selectable in Sharepoint Designer -

i want place rss viewer web part page layout i've created. in sharepoint designer (sharepoint 2010) using "advanced edit mode" tried add rss viewer web part cannot find in list. under "insert>web part" find many other web parts 1 need missing, under "more web parts..." cannot found. the web part installed (i activated feature). web part can manually added page web part zone when don't use designer edit page directly in browser of course not need have put in page layout. anyone got idea why web part not selectable/visible in list? as i've learned not web parts available in listing. the workaround manually add desired web part webpart zone on page (not in designer) , open page in designer can copy/paste web part relevant code page layout of desire.

How do I tell TeamCity to get the sources needed by a solution and not just a TFS server path? -

i want teamcity download latest version tfs based on given visual studio solution not path on tfs server. build server should not files on tfs forgot add correct solution. specify solution build file goto teamcity administration -> configuration -> runner (msbuild) -> build file path vcs root settings -> client mapping: specify folders tc should copy files

Why some attribute names start with double underscore in JavaScript? -

i see attributes of objects in javascript start double underscore. example, __definegetter__ or __definesetter__ or __proto__ . convention defined ecmascript specification? or maybe it's convention in developer community? these properties defined specific browser , are not defined ecmascript . therefore, name collision needs avoided. if called property definegetter , there no guarantee website's code didn't define property same name -- , cause many problems. however, appending 2 underscores has become defacto way define browser specific properties (since it's less website use convention). you may notice other browsers start using same naming convention others (like using __proto__ ), that's still not universally guaranteed between browsers (eg, ie not define __proto__ property ). also: convention of using 2 underscores "system-defined" identifiers (as opposed programmer-defined identifiers) harkens long time, don't know when conv...

java - Design a session manager -

do have spec standard designing session manager? imo, these session should process: a unique id each session should assigned (session id); should able maintain attributes in form of pairs; should able check client's availability (for instance, client exits); should able destroy session; anything more? do have example of session manager?

WCF throwing CommunicationException when FaultException is thrown -

solution: a bit of tracing showed communicationexception being thrown because there issue exception t not serializing correctly; because, 2 layers deep, had anonymously typed object, unserializable. removing , bubbling changes appeared fix it. there somethinge else small did before that, can't remember life of me was, wasn't done in config. i getting messages traces such as: type 'rebuiltwcfservice.requests.helloworldrequest' data contract name 'helloworldrequest:http://schemas.datacontract.org/2004/07/rebuiltwcfservice.requests' not expected. consider using datacontractresolver or add types not known statically list of known types - example, using knowntypeattribute attribute or adding them list of known types passed datacontractserializer. original post i've encountered seemingly strange issue today cant't find answer to! the problem: service throwing communicationexception when throw faultexception! does not if don't throw except...

iphone - Objective-C when to declare what methods in @interface -

when , methods should declared in @interface section of class? understand, methods describe class should declared in @interface section, other "helper" methods should not declared. correct understanding side? you should add methods .h file when want external class have access (public methods). when they're private (only used internally class) put them in .m file. anyway, it's pattern. objective-c works messages, if don't set method in .h file external file can access it, @ least auto-complete won't show it.

ASP.net MVC Listbox -

i have number of html.listbox controls on view being populated ienumberable<selectlistitem> is there way when data populated, items automatically selected? the particular selectlist items in ienumerable marked selected = true, yet not convey view. the view such: <%= html.listbox("projects", model.projects)%> thanks. sure start defining view model represent information show on particular view: public class myviewmodel { public string[] selecteditems { get; set; } public ienumerable<selectlistitem> items { get; set; } } then controller: public class homecontroller : controller { public actionresult index() { var model = new myviewmodel { selecteditems = new[] { "1", "3" }, items = new[] { new selectlistitem { value = "1", text = "item 1" }, new selectlistitem { value = "2", text = ...

android - Show a toast on clicking an overlay -

i have used following code displaying overlay p = new geopoint((int) (addresses.get(0).getlatitude() * 1e6), (int) (addresses.get(0).getlongitude() * 1e6)); controller = mapview.getcontroller(); controller.setzoom(12); mapoverlay mapoverlay = new mapoverlay(map.this, p); list<overlay> listofoverlays = mapview.getoverlays(); listofoverlays.add(mapoverlay); controller.animateto(p, new runnable() { public void run() { controller.setzoom(12); } }); mapview.invalidate(); and file overlay drawn following... super.draw(canvas, mapview, shadow); point screenpts = new point(); mapview.getprojection().topixels(p, screenpts); bitmap bmp = bitmapfactory.decoderesource(context.getresources(), r.drawable.overlay); canvas.drawbitmap(bmp, screenpts.x, screenpts.y - 32, null); could please tel...

javascript - Get Function not implemented error when using ssi's and using window.onload -

i error message error message: not implemented when doing , using statement in server side include. window.onload=readinsubsysteminformationfromfile(); it works if click ok button on error message, annoying error message pops up. so question is, there function checks if readinsubsysteminformationfromfile() has been initialized? if method (in other words shall of type onload) if not, wait until ready. thanks in advance =) to check if function has been defined yet: if(typeof readinsubsysteminformationfromfile == 'function'){ // exists readinsubsysteminformationfromfile(); } also, try jquery it's onload method... works in pretty browsers , works well. it's hard thing right. $(document).ready(function(){ // code here }); http://api.jquery.com/ready/

php - Command to `phpdoc` an entire directory? -

what command line generate phpdoc entire project? directory structure /users/macuser/sites/my-project/ index.php config.php includes/ class/ test.class.php include-a.php docs-go-in-here/ i have installed pear phpdoc , able create documentation single php file, cannot find out how entire directory. phpdoc -h friend: -d --directory name of directory(s) parse directory1,directory2

c# - How to multiple tabbed interface work in asp.net -

i have web application in using tabbed interface control in have create 4 tabs in each tab having .aspx application,so each application having "required field validators" when click button in tab2 page check validations tabbed apllication.how can solve problem please me.. the reason happening because tab submitting form, causing javascript fire on validators. simple fix have link not submit , redirect new page.

jquery - Jeditable with TinyMCE and a Character Count/limiter -

i've been trying fathom day no joy.... hope oni wan konobi! i've looked @ max_chars plugin tinymce works fine if tinymce implemented on own. jeditable has ability count/limit characters using custom type. see here: http://www.appelsiini.net/projects/jeditable/custom.html again works great if implemented on own. i need implement tinymce jeditable. i've managed , works great. in order there had custom type tinymce. here code type: $.editable.addinputtype('mce', { element : function(settings, original) { var textarea = $('<textarea id="'+$(original).attr("id")+'_mce"/>'); if (settings.rows) { textarea.attr('rows', settings.rows); } else { textarea.height(settings.height); } if (settings.cols) { textarea.attr('cols', settings.cols); } else { textarea.width(settings.width); } $(this).append(textarea); return(textarea); }, ...

How to write output of child process in Java -

i have written java code in eclipse , developing plug-in embed button on workbench. when button clicked, opens batch file (located in c:/program file/prism 4.0/bin ) the code opens .bat file ! next task write output of batch file on console. using eclipse ide version 3. my code is messageconsolestream out = myconsole.newmessagestream(); out.println("we on console ! \n shubham performed action"); try { processbuilder pb=new processbuilder("c:\\program files\\prism-4.0\\bin\\prism.bat"); pb.directory(new file("c:\\program files\\prism-4.0\\bin")); process p=pb.start(); int exitval=p.waitfor(); out.println("exited error code "+exitval+" shown , action performed \n"); out.println("shubham process successful"); out.println("printing on console"); } catch (exception e) { out.println(e.tostri...

c# - Is this a good practice to handle the displaying of the progress of data processing in a Class library? -

i developed c# class library, of methods shows information of processing progress because read , write millions of records, , user asked knowing how process going , time should wait. using dependency injection avoid "if console app write progress on console else if wpf app display progress bar", (1) have got displaying on console time every 1 million records processed if method invoked console application , (2) have got displaying progress bar on gui if method invoked wpf application. the question here is, practice doing or, there better/correct alternative matter? my best regards. please don't this. if building class library, should make 0 assumptions ui interacting user. your solution sounds might work if have console window or wpf application, if it's being called website or inside service? i've seen many service brought down beause rogue class library trying display dialog there nobody around click ok. the better solution raise event...

android - Exporting MySQL data into SQLite database format and store in SQLite database -

i have use remote mysql database information in android application. is there way can translate mysql data sqlite format , store them in sqlite db access mobile application. need update sqlite db content when modification happen mysql data. have decided when application loads, check modification happened , change sqlite db accordingly. possible. any sample coding/ idea/link highly appreciated. thanks in advance can use mysqldump export information, later import sqlite? mysqldump export data specify, , save file containing bunch of sql statements rebuild data. so example, if run dump on schema 3 tables , bunch of rows in each, end .sql file commands build 3 tables , enter rows. sql can used import mysql database or other sql databases. mysqldump i think create batch script of sort run dump command, use sqlite pick , run .sql file.

javascript - jQuery Mobile Beta: can no longer use $('[data-role=header]')? -

i used able hold of $('[data-role=header]').first().height() in alpha jquery 1.5.2, no longer can in beta jquery 1.6.1. has changed? full code - writes 0 console.log... <!doctype html> <html> <head> <title>page title</title> <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"/> <link rel="stylesheet" href="http://code.jquery.com/mobile/1.0b1/jquery.mobile-1.0b1.min.css" /> <script type="text/javascript" src="http://code.jquery.com/jquery-1.6.1.min.js"></script> <script type="text/javascript" src="http://code.jquery.com/mobile/1.0b1/jquery.mobile-1.0b1.min.js"></script> <script type="text/javascript"> $(document).ready(function() { console.log($('[data-role=header]').first().height()); }); </script> </head> <body...

grails - How do I generically access this Groovy JSON object? -

i'm using grails 1.3.6. read following json variable ... { "abc": { "attr1": "value1", "attr2": "value2" }, "def": { "attr1": "value1", "attr2": "value2" }, "ghi": { "attr1": "value1", "attr2": "value2" }, ... } if, in controller, i'm passed parameter referring 1 part of json object ... def section = params.section; // "abc", "def", 'ghi", ...e how access part of json assuming above gets stored groovy variable named "myjsonobject"? thanks, - dave if used json.parse() create myjsonobject , can do: def value = myjsonobject[section]

java - Parsing a string -

i have string in android code, want parse. have following kind of string: asdfsdfsdfsdftestwerasdfasdfsdf.jpgaasdfsdfasdf.jpgasf.jpg i want out the link jpg file. it starts "test" , ends "jpg" , rest of string dynamicaly changing , there other links behind first. i using pattern: pattern pattern = pattern.compile("test[^j]*jpg"); it works. if there "j" before jpg , naturally wrong output. cannot replace [^j] * . other problems. can give me hint followng test[^jpg]*jpg (it not working way). check jpg not j the string can (now long version): </script> </div> <div id="cttpd"></div> <div id="rcnt"> <div class="lhshdr"> <div class="lshdr" id="leftnavc"><div id=leftnav role=navigation style="position:absolute;top:1px;width:175px" onclick="google.srp&&google.srp.qs(event)"><div id=ms><ul>...