Posts

javascript - Filter td elements in a tr out, that are not displayed -

i have datatable in asp.net want modifiy. select <tr> rows of datatable jquery: var rows = $("#dginformation tr:gt(0)"); however, <tr> elements have multiple <td> elements , of them marked display:none . how can rows -variable without hidden cells? the purpose of check cells if different each other , 1 line each difference should displayed. if dont filter not displayed elements, compared , have lines, visually same. update works adding css class <td> -elements should hidden. have clean dom-tree (i hope can call way) in firebug. whole function below reference: function filtertable() { var rows = $("#dginformation tr:gt(0)"); var prevrow = null; var counter = 2; rows.each(function (index) { if (prevrow !== null) { var = 1; var changes = 0; $(this).children("td:visible").each(function () { if(i > 2)...

Django Cache Implementation -

well, i'm designing web application using django. application allow users select photo computer system , keep populating onto users timeline. timeline view have list/grid of photos user has uploaded sorted chronologically, showing 50 photos , pull refresh fetch next 50 photos on timeline.the implementation works multiple users. now fast user experience of app i'm considering caching. sites store timeline of user onto cache whenever user logs in first place check information request served out of cache , if not available there go db query information. primarily in 1 line i'm trying cache timelines different users in cache now. i'm done building of webapp minus cache part. , question how cache timelines of different users?? there big difference between public caching , caching of private data. feel data private , needs different strategy. there nice overview of different ways implement testing and, more importantly, different things need take account: ...

c# - Sqlite: appropriate use of commit -

in server application(written in c#) multiple requests come simultaneously , server both read , write operation on sqlite db. now problem when server tries insert database @ time of other request reading database transaction.commit() throwing exception database locked , executenonquery() executing successfully. problem committing database. we committing after every insert , update query. can problem avoid committing once(keep database in memory , commit on application close)? or there other way handle situation. it seems need implement busy callback or busy timeout , sql lite has lock entire database when writing: multiple processes can have same database open @ same time. multiple processes can doing select @ same time. 1 process can making changes database @ moment in time, however. can multiple applications or multiple instances of same application access single database file @ same time?

android - TextView.getLineCount() in custom BaseAdapter -

i need show view when mtxttext has maxlinescount or more lines. checked these questions: first , second what have result in getview method: mtxttext.settext(html.fromhtml(output)); mtxttext.getviewtreeobserver().addongloballayoutlistener( new ongloballayoutlistener() { @suppresswarnings("deprecation") @override public void ongloballayout() { if (build.version.sdk_int < build.version_codes.jelly_bean) { mtxttext.getviewtreeobserver() .removeglobalonlayoutlistener(this); } else { mtxttext.getviewtreeobserver() .removeongloballayoutlistener(this); } if (iscollapseon && mtxttext.getlinecount() >= maxlinescount) { mtxtexpand.setvisibility(view.visible); } else { mtxtexpand....

c# - Converting UTC to local time returns strange result -

Image
i have solution of 3 projects: core outlook add-in asp.net website both, outlook add-in , website use same methods core project data sql server. when write data database, convert datetime values of 2 tables utc time: poll_start poll_end 2013-07-31 12:00:00.000 2013-08-01 12:00:00.000 and pick_date 2013-07-31 12:00:48.000 2013-07-31 13:00:12.000 when data in outlook add-in, correct result : when opening same in website, picks fine: but start , end time "broken" - offset added, bute wrong hours used: here's code converting, both, outlook , website, use: private static void converttolocaltime(poll item) { item.poll_start = item.poll_start.fromutc(); item.poll_end = item.poll_end.fromutc(); } private static void converttolocaltime(pick pick) { if (pick.pick_date != null) pick.pick_date = ((datetime)pick.pick_date).fromutc(); } and implementation of datetime.fromutc() : public static datetime fromutc(this dateti...

html - Divs should not overlap -

i have small problem. webpage i'm working on has 3 areas: on left navigation, should on left side a content area in middle, should in middle of browser the logo area on right side, should in top right corner here's code have right now: css html, body { height: 100%; min-height:100%; padding: 0em; margin: 0em; } body { font-family: segoe ui, arial; font-size: 12px; color: #616a71; line-height: 15px; letter-spacing: 0.5px; overflow-y: scroll; background-color: #ccc; } div#navigation { position: absolute; float: left; width: 220px; left: 5px; top: 70px; z-index: 2; padding-bottom: 50px; background-color: red; } div#content { position: relative; width: 1014px; margin: 0 auto; top: 70px; padding: 10px; background-color: #f6f6f3; box-shadow: 0 0 5px rgba(0,0,0,0.2); border-radius: 2px; line-height: 20px; } div#right { positio...

javascript - Upload files without refreshing the page by using ajax post -

i have page file-upload.jsp code snippet below: <form action="" id="frmupload" name="frmupload" method="post" enctype="multipart/form-data"> <input type="file" id="upload_file" name="upload_file" multiple="" /> <input type="submit" value="update" /> </form> i have 2 questions: the moment select files, i.e onchange event of input type file , file(s) should uploaded. i have java page receives multipart request parameter , uploads file said location. problem form submission onchange , java file can proceed further operations. i googled , went through lot of articles. it's not possible upload files directly via ajax, submit form iframe via ajax/jquery. i tried lot of code internet, such this: $(document).ready(function(){ $('upload_file').change(function(){ var data = new formdata(); data.appen...