Posts

html - Auto resizing centre div using css? -

Image
i having difficulty getting 3 divs automatically resize when resizing browser window/page. i have 2 divs of fixed size , want centre div automatically resize fill remaining space , not have third div wrap newline when page size shrinks. i set min-width property on div wraps 3 divs prevent wrapping of third div once middle div 65px wide. does have done javascript because trying achieve css having no luck. the javascript or css expression width = page.width - div1.width -div3.width avoid using js if possible. thanks help! mike you can see expected behavior in attached image. 1) want 2) experiencing on shrinkage i have div re-sizing , textbox inside set @ 100% re-sizes div. however right side div can either 267px shown below or 192px (discrete) should set margin-right code behind on pages? or there way make margin-right dynamic based on size of the div right? eg. html <div id="wrapper"> <div id="left"></div> <div i...

IE7, ckeditor and jQuery adapter not working -

i unable open ckeditor instance in ie7 jquery dialog box. works in firefox, in ie following error in web console: script1002: syntax error config.js?t=b8dj5m3, line 1 character 1 script1002: syntax error en.js?t=b8dj5m3, line 1 character 1 script5007: unable value of property 'options': object null or undefined ckeditor.js, line 49 character 943 any ideas or there way purely not supported? to fix this, created entire instance in jquery, predefining properties , assigned ckeditor each element wanted have editor var properties = {properties in here}; $("#textareaid").ckeditor(properties); i dont think solution entirely helped me editor working :)

Get gateway address in C/C++ -

i use ioctl() set gateway address ( siocaddrt rtf_gateway in flags). what's standard ioctl routine retrieve it? my understanding there no 'standard ioctl routine' gateway address in cross-platform-friendly fashion. on linux might consider looking @ using netlink sockets, described in this post .

.NET Workflow issue -

i calling wf: workflow1 wf = new workflow1() { childrenoption = true, market = "english", server = new uri("http://mysite"), sptags = datatoupdate, }; workflowinvoker.invoke(new workflow1()); but reason getting exception, why? other way how can invoke wf avoid problem? values must bound non-null expression before parallelforeach activity 'parallelforeach<keyvaluepair<tuple<string,string,string>,zalupatag>>' can used. it appears workflow1 has parallelforeach activity in did not provide collection values property.

javascript - "PrimeFaces is not defined" error -

i trying print using primefaces printer functionality. have created new glassfish 3 java ee project , added primefaces 3.1.1 .jar file. the code using follows: <html xmlns="http://www.w3.org/1999/xhtml" xmlns:h="http://java.sun.com/jsf/html" xmlns:p="http://primefaces.org/ui"> <h:head> <title>facelet title</title> </h:head> <h:body> <h:form> <h:outputtext id="a" value="aa" /> <h:commandlink id="btn" value="print"> <p:printer target="a" /> </h:commandlink> </h:form> </h:body> </html> unfortunately, print function isn't working. instead, firebug console shows me following error: primefaces not defined if didnt have head tag error. primefaces requires head tag work. see #2 on faq http://primefaces.org/faq.html

c# - Finding a position in a word document to insert a table -

i working on writing results of database query tables in word. have done code accessing/creating objects results of query , find myself little stuck on writing these word template given me. summary document in have insert tables of data pulled db in correct position in document. instance, document has 4 section headers , under each header, there text after have insert table. 1 such header can like: school records below find table in school records listed: so when go print school record data object, need way somehow insert data in table format right below above line in word document. can tell me how can first find correct position in doc , how create table in word c#? there article how insert images @ specific position in word document. maybe it's useful insert table either.

javascript - Trouble with word-boundary (\b) -

i have array of keywords, , want know whether @ least 1 of keywords found within string has been submitted. further want absolutely sure keyword has been matched, , not similar word. say, example, our keywords [english, eng, en] because looking variation of english. now, input user i h8 eng class , or equally provocative , illiterate - eng should matched. should fail match word england or odd thing chen , though it's got en bit. so, in infinite lack of wisdom believed along lines of in order match 1 of array items input: .match(regexp('\b('+array.join('|')+')\b','i')) with thinking regular expression matches array, presented (english|eng|en) , see whether there zero-width word bounds on either side. you need double backslashes. when create regex regexp() constructor, you're passing in string. javascript string constant syntax also treats backslash meta-character, quoting quotes etc. thus, backslashes stripped out...

makefile - GNU Make using $(eval ...) not working -

here makefile: libdirs += ./librelease libdirs += ./sharedarcgis/depfileslinux64/libreleaselinux64/skia libdirs += ./sharedarcgis/depfileslinux64/libreleaselinux64/libtess libdirs += ./sharedarcgis/depfileslinux64/libreleaselinux64/sqlite statics = $(wildcard $(libdirs:=/*.a)) targeta = libruntimecorejava.a targetd = libruntimecorejava.so targetd1 = $(targetd).1 targetd2 = $(targetd).1.0 targetd3 = $(targetd).1.0.0 ar = ar cqs ar_extract = ar -x link = g++ symlink = ln -f -s ldflags = -shared -wl,-soname,libruntimecorejava.so extract = : $(targetd) $(targeta) $(targetd) : clean mkdir -p ./obj ./librelease $(foreach lib, $(statics), cp $(lib) ./obj;) $(eval extract := $(wildcard ./obj/*.a)) echo $(extract) $(foreach lib, $(extract), $(ar_extract) $(lib);) $(foreach lib, $(extract), rm -f $(lib);) #$(cxx) $(ldflags) $(objs) ...

javascript - creating image tag in html and adding css -

i creating image in jquery border attribute doesn't seem work... syntax wrong? var img = $('<img>', { 'title': 'event (event '+wavy_counter+')', 'class': 'listed_event', 'id': 'wavy_event_'+wavy_counter+'', 'data-count': ''+wavy_counter+'', 'src': 'final_tutorial_buttons/wavy.png', 'height': '50', 'width': '50', 'border': 'solid', 'border': '2px', 'border': 'red', 'onclick': 'highlight.call(this);', 'data-start': '', 'data-end': '' }); i border black instead of red. i think should be: 'style': 'border: 2px solid red', it'...

c - how to convert "0xbff18c08" to 0xbff18c08 int? -

i looking native function c libraries or code example implement it: have string contains byte values want convert int value. how this? tried using atoi() , atol() 0 0xbff18c08 . thanks. then looking strtoul(str, null, 16) .

apache - mod_rewrite writing local routes -

you see, want redirect [r] http://www.domain.com/dir1/ http://www.domain.com/ . i want accept http://www.domain.com/dir1/([0-9]+) , [l] requests dir1.php?query=$1. , [l] http://www.domain.com/dir1/(.+ ) root. so these rules: rewriterule dir1/([0-9]+) dir1.php?query=$1 [l] rewriterule dir1/(.+) $1 [l] rewriterule dir1/ . [r,l] the problem last 1 (and tried many variations of it) redirects http://www.domain.com/home/domain/www/ . mean, inserts local directory. want redirect http://www.domain.com/ thanks, use path slash redirect client absolute path. rewriterule dir1/ / [r,l] the mistake using . instead of / . this comes straight rewriterule examples: inside per-directory configuration /somepath (/physical/path/to/somepath/.htacccess, rewritebase /somepath) request ``get /somepath/localpath/pathinfo'': given rule resulting substitution ---------------------------------------------- ---------------------------...

c# - MonoTouch.Dialog search filter not working properly for MessageElement cells -

i have following code example demonstrate simple monotouch.dialog table using messageelement cells. issue having when enable automatic search feature in dialogviewcontroller . whenever doing search displays blank table. if replace messageelement cells stingelements cells search works fine. does there need additional code search messageelement cells properly? any issue appreciated. using system; using monotouch.uikit; using monotouch.dialog; using monotouch.foundation; namespace messageelementsearch { public class messagetable : dialogviewcontroller { public messagetable(rootelement root) : base(root) { section sec = new section(); root.add(sec); (int = 0; < 10; i++) { messageelement me = new messageelement(); me.sender = "sender " + i.tostring(); me.subject = "subject " + i.tostring(); me.body = "body ...

caching - Issue Displaying Updated Webpage -

i using adobe dreamweaver web develop. have uploaded files via ftp web server, went on web sever confirm files uploading. when going view webpage in browsers, changes aren't there. possibly wrong? know it's not uploading files files updating , uploading on web server. i found solution! issue aname under domain settings. works perfect now.

windows phone 7 - Update live tile when exiting app - any restrictions/best practices -

i have app update live tile when user leaves app. first question if bad idea? if user starts app 20 times per day bad idea or in way affect background service? second question if there limit how long or resource intensive might be. guess put code in onnavigatedfrom, os kill app if updating of live tile takes long? need create image, save isolated storage, read image , update tile. really looking forward thoughts on this. edit 1: reason me asking if above works fine. if exit app when starts black tile instead of tile background image. impression code doesn't finish. how can avoid that? edit 2: since i'm creating live tile dynamically think problem loading of background image. load background image , add text it. when tile goes black can still see text there must loading of background image used background tile. edit 3:here complete code creation of image used background image. tried simplify little reduce code. grid grid = new grid(); stackpanel sp = new stackpa...

.htaccess - 301 redirect with custom conditions -

i want redirect url .htaccess file. some examples better understanding, 1) http://www.mydomain.com/salary/account-manager-salary-jobs http://www.mydomain.com/salary/account-manager-salaries 2) http://www.mydomain.com/salary/software-enginner-salary-jobs http://www.mydomain.com/salary/software-enginner-salaries i want rewrite rule condition pattern matching. create .htaccess file in $document_root , put code: options +followsymlinks -multiviews # turn mod_rewrite on rewriteengine on rewritebase / rewriterule ^(salary/.*-salary)-jobs$ $1 [l,nc]

asp.net - ObservableArray not notifying when item changed -

i try bind observablearray div on page , ok. array contains simple json objects, not observable, obtained webservice . after that, want able modify objects in array , view refreshed each modification. example, when checkbox gets clicked change flag on json object (this seems work automatically right) , @ same time ui should updated, not happen. provide me reason (is because objects simple, not observable?) , solution? var documentcontentmodel = function () { var self = this; self.content = ko.observablearray(); self.elementapprovalchanged = function (element) { documentservice.dosomething( element.id, function (result) { if (!result) { var negatedapproved = !element.approved; element.approved = negatedapproved; } }, function (error) { alert(error); }...

android - Dynamic Button Onclick Listener -

i trying create dynamic buttons. when clicking button should go specified url assigned text of button. for testing, first tried id, if equal prints value of i . whenever clicked 1 button, instead of telling particular i value, enters whole loop, , prints values of i starting 1 19 (the number of buttons dynamically created) and after printing values 1 19, program getting force closed saying null pointer exception . i tried placing handler code outside oncreate() , i'm still getting same error. for ( = 0; <itemlist.gettitle().size()-1; i++) { title[i] = new textview(this); title[i].settextcolor( -16711936 ); title[i].settextsize(18); title[i].settext("title = "+itemlist.gettitle().get(i)); description[i] = new textview(this); description[i].settextcolor(-16776961); description[i].settext("description = "+itemlist.getdescription().get(i)+"......"); more[i]=new button(this); more[i].settext(itemlist.getl...

Apache HTTP Server Location directive - exclude url -

i've apache http server used proxy (over https) jboss-deployed webapp. i've following entry in conf file: <location "/app"> proxypass http://localhost:8080/app proxypassreverse http://localhost:8080/app authtype basic authname "private documentation repository" authuserfile <path-to-file> require valid-user </location> as can see, valid user required access /app. question is: how write directive exclude 1 particular file jboss webapp, access file won't require valid user e.g.: <location "/app/some-file.xyz"> proxypass http://localhost:8080/app/some-file.xyz proxypassreverse http://localhost:8080/app/some-file.xyz </location> i mean: when user requests (app/) /app/some-file.xyz he/she prompted password, otherwise apache enable user download some-file.xyz. appreciated. <location "/app/*.xyz"> allow satisfy pro...

java - SQL - how to return multiple rows with one SQL query? -

i have managed bean makes sql queries oracle database. simple example how make sql queries. table structure: globalsettings --------------------------------- sessionttl varchar2(40 byte) maxactiveusers number activeusers varchar2(20 byte) i use table store application settings. in example listed below can fetch 1 string 1 sql statement. want sql query fetch content of 3 rows - sessionttl, maxactiveusers, activeusers. possible? public string checkuserdb(string usertocheck) throws sqlexception { string storedpassword = null; string sql_statement = null; if (ds == null) throw new sqlexception(); connection conn = ds.getconnection(); if (conn == null) throw new sqlexception(); try { conn.setautocommit(false); boolean committed = false; try { sql_statement = "select passwd users username = ?"; preparedstatement passwordquery ...

jquery - ajax request per div -

i have 10 divs on page , each div render own ajax request when page loads. know can make max 2 ajax requests , have wait (based on browser) before next request gets fired. wondering best way design such page. should create ajax request inside divs can pass div context ajax reponse? this: <div id="request1"> make ajax request </div> <div id="request2"> make ajax request </div> , on...... is there chance result may mixed , wrong div render result different request? --edit-- i cannot make single call make calls separate service , service may or may not available. ajax asynchronous, way, if call 10 ajax requests using either $.get , $.post or $.ajax , requests fire independently without waiting previous ones. unless have special requirements need avoid that, go ahead