Sunday, 15 August 2010

jquery - How to stop image target page jumping to image -



jquery - How to stop image target page jumping to image -

i have searched improve part of 2 days reply , nil working. have little image gallery on page. when selecting 1 of little images, jumps big image on page, causes page scroll downwards , creates disjointed experience. trying stop page jump. research far seems not possible stop css. total noob java script, have attempted of solutions proposed on site. however, none of them working.

i have tried sourcing http://code.jquery.com/jquery-latest.js creating own .js file source without success. must doing wrong. here illustration of code working with. help!

<!--plant images--> <div class="imageright"> <a href="#one" class="menucontrol"><img src="plantpics/abeliaxgrandiflorasmall1.jpg"></a> <a href="#two" class="menucontrol"><img src="plantpics/abeliaxgrandiflorasmall2.jpg"></a> <a href="#three" class="menucontrol"><img src="plantpics/abeliaxgrandiflorasmall3.jpg"></a> </div> </div> <script> var anchors = document.getelementsbytagname("a"); for(var = 0; < anchors.length; i++) { if ( anchors[i].classname == "menucontrol" ) { anchors[i].setattribute("onclick", "return false"); } } ​ </script> <!--preview image--> <section class="gallery"> <article id="one" class="target"> <figure> <a href="abeliaxgrandiflora2.html"><img src="plantpics/abeliaxgrandifloralarge1.jpg" alt="abelia x grandiflora"></a> </figure> </article> <article id="two" class="target"> <figure> <a href="abeliaxgrandiflora3.html"><img src="plantpics/abeliaxgrandifloralarge2.jpg" alt="abelia x grandiflora"></a> </figure> </article> <article id="three" class="target"> <figure> <a href="abeliaxgrandiflora4.html"><img src="plantpics/abeliaxgrandifloralarge3.jpg" alt="abelia x grandiflora"></a> </figure> </article> </section>

jquery css

android - Performance/memory consumption for saving infos in DB or prefs -



android - Performance/memory consumption for saving infos in DB or prefs -

i need store lot , variable number of checkboxes status of android application. every 5-10 mins need retrieve status of single checkbox (that should changed user interaction in other activity). know can store them on sharedpreferences or in sqlite db. number or checkboxes variable 10 (infinite-1).

my first thought store statuses in 1 single string:

chk1:true,chk2:false,chk3:false,chk4:false,chk5:true

delimited : , ,. can retrieve in 1 single getstring() call, checkboxes stasus.

i left solution because checkboxes growing in number , think it's not performing have single string one thousand of data.

my sec thought store every chk in separate preferences. left solution because cause need retrieve may times checkboxes status.. imagine getstring() called 10000 or more times it's waste of resource.

my 3rd thought store single status in sqlite db.

id status 1 t 2 f 3 f 4 f 5 t

in solution don't need access db lots of time.

what's best solution (performance , memory consumption) if need retrieve checkbox status every 5 mins infinite? db or sharedpref? if db, need open every time db , instantiate cursor, or should instantiate @ origin of activity?

i'd go sqlite.

both shared preferences , sqlite have cache mechanisms, sqlite designed retrieval , storage of big amounts of info whereas shared preferences more suited simple application... well... preferences.

moreover sqlite particularly useful if info model ever changes (and believe me, happens time). sqlite cache used fragments of info (technically: pages of database) - adapt actual usage pattern of data.

as opening db - i'd recommend opening 1 time , reuse created connection multiple times - save overhead of opening database each time (which costly operation) , allow sqlite larn (adapt) how cache info based on how utilize (e.g. order of access, particular sql statement cache, etc.)

android performance sqlite sharedpreferences

mysql - Security implications of storing email attachments on Centos Server -



mysql - Security implications of storing email attachments on Centos Server -

there application working on requires processing incoming mails cs@company.com. company.com mail service accounts beingness run via google apps business. fetch incoming mails via imap , store attachments on server filesystem. attachments downloadable users of application. server centos 6.3 , web interface of application based on apache/php/mysql.

my questions : 1. kind of security risks exposed storing attachments on server filesystem? 2. safer store attachments external storage (for e.g. amazon s3)? 3. safer store attachments in db?

mysql apache security centos email-attachments

c# - VS2008 debugs old ASP.NET web service -



c# - VS2008 debugs old ASP.NET web service -

i'm writing asp.net web service, in c#. before yesterday if wanted debug press f5, , asp.net development server start hosting service. breakpoints enabled , work. functionality gone. when start debugging, development server started old version of web service hosted, , breakpoints not work. warning versions not match.

it not help if rebuild everything, or alter assembly version, or alter file name of dll. it not help if delete whole temp folder %temp%\temporary asp.net files. old web service pulled out knows where, , stored in temp folder again.

major alter before yesterday had installed iis. web service installed there works expected, need debug well. thought problem installed web service (with vdproj), uninstalled it, did not help either.

how prevent scheme caching old version of web service. old version stored anyway?

check web settings on asp.net project. using asp.net development server f5 debugging create sure "use visual studio development server" radio button selected under server heading. specify specific port other projects in solution can consistently reference (in case i'm dealing web service). there's chance find "user local iis web server" radio button selected.

hope helps.

edit: problem here not iis, changing target build output folder of web service. must bin\, or development server cannot find it. rebuild did not help because alter dll file in new folder, old file remain undisturbed in bin folder.

c# asp.net visual-studio

Excel Ranking tie issue -



Excel Ranking tie issue -

does 1 know how deal tie records issue in excel? want show record 1 time on first occurrence. if same number found twice, not show show above.

to results shown can utilize "array formula" in aa2

=if(or(z2=0,countif(z$2:z2,z2)>1),"",sum(if(frequency(if(z$2:z$19>z2,z$2:z$19),z$2:z$19),1))+1)

confirm ctrl+shift+enter , re-create formula downwards column

see sample file

excel ranking tie

Oracle Streams: ORA-0001 on dequeue? -



Oracle Streams: ORA-0001 on dequeue? -

in production every , ora-0001 error when dequeuing message. use:

solaris 10 oracle 10g c++ application proc*c dbms_aq bundle queuing operations queues xml payload we handle big volume of messages (1k/min).

any clue why dequeue result in ora-0001 (unique constraint) error?

update: adding code per request.

exec sql execute declare message_properties dbms_aq.message_properties_t; dequeue_options dbms_aq.dequeue_options_t; message_payload xmltype; tmpclob clob; dynamic_sql_string varchar2(512); begin dequeue_options.wait := :ireadtimeout; dequeue_options.dequeue_mode := dbms_aq.remove; dequeue_options.visibility := dbms_aq.on_commit; if :ibuffered = 1 dequeue_options.delivery_mode := dbms_aq.buffered; dequeue_options.visibility := dbms_aq.immediate; :inavigationmode := 0; end if; if :idequeueonly = 1 , :iqueuetype <> 1 dequeue_options.dequeue_mode := dbms_aq.remove_nodata; dequeue_options.wait := dbms_aq.no_wait; dequeue_options.msgid := hextoraw(:pszdequeuemsgid); else if :inavigationmode = 0 dequeue_options.navigation := dbms_aq.first_message; else dequeue_options.navigation := dbms_aq.next_message; end if; end if; dequeue_options.deq_condition := :pszdeqcondition; dbms_aq.dequeue(queue_name => :pszqueuename, message_properties => message_properties, dequeue_options => dequeue_options, payload => message_payload, msgid => :msgid ); if dequeue_options.dequeue_mode <> dbms_aq.remove_nodata execute immediate dynamic_sql_string using out tmpclob, in message_payload; :gpoxmlclob := tmpclob; else :gpoxmlclob := message_payload.getclobval(); end if; end;

oracle stream queue

javascript - How can I set this Input Box with KeyUp to load HTML5 Audio source? -



javascript - How can I set this Input Box with KeyUp to load HTML5 Audio source? -

i have forked couple of jsfiddles have found on here come next 2 scripts:

http://jsfiddle.net/m555r/ - javascript web browser key input box load new page

$('input#url').on('propertychange paste keyup',function(){ var url = this.value; $('#frame').attr('src', "http://"+url); }); $('input#url').keyup();

http://jsfiddle.net/z3vrv/ - html5 sound player hover on box alter source

function changeaudio(song){ sound = document.getelementbyid("sound1"); audio.src = song; audio.load(); audio.play(); } $("#changemytune").mouseenter(function () { changeaudio("http://jeffrey-way.s3.amazonaws.com/zelda.ogg"); }) .mouseleave(function () { changeaudio("http://www.jezra.net/audio/skye_boat_song.ogg"); });

with limited experience have tried, unsuccessfully, combine these 2 examples. acheive sound player type in source , player source updates automatically, per iframe example.

any advice appreciated, particularly if can show me working illustration in jsfiddle.

thank you!

edit: have tried scripting such as:

function changeaudio(song){ sound = document.getelementbyid("sound1"); audio.src = song; audio.load(); audio.play(); } $('input#url').on('propertychange paste keyup',function(){ changeaudio(url); }) }); $('input#url').keyup();

which in head makes sense, unsure of right syntax etc

to set in answer:

here code:

html:

<input type="text" id="url" name="url" value="" /> <br><br> <audio id="sound1" preload="auto" src="http://www.jezra.net/audio/skye_boat_song.ogg" autoplay controls></audio> <div id="status">status</div>

js:

$('input#url').on('propertychange paste keyup',function(){ var url = this.value; $("#status").html(url); changeaudio(url); }); function changeaudio(song){ sound = document.getelementbyid("sound1"); audio.src = song; audio.load(); audio.play(); }

see here

javascript html5