Posts

jQuery move all children to another div -

i have div many childen. how move of them div using jquery ? code looks like: jquery("body").append("<div id='popupwrapper'></div>"); var myid = $('.floatingframelightblue1').attr('id'); jquery(myid).children().append("popupwrapper"); but doesn't work. i'm doing wrong? here have simple example of it: http://jsfiddle.net/lhr79/ as have told you. need use appendto instead of append , specify selector type (class, id... ) using . or # preceding name. in case: #popupwrapper popupwrapper id , not class.

android - How to show the DrawerLayout when sliding from left to right, no matter where? -

background google has introduced drawerlayout, shows menu on left area of screen when click on "up" button of action bar. because library isn't supported yet on actionbarsherlock, there way overcome using this project . it has variants on many apps: currents, gmail, hangouts, youtube... the question on "currents" app (and in youtube) , when user slides (most-left) page left right , drawerlayout appears, no matter finger has started touch . how can achieve same effect? maybe should use onintercepttouchevent ? there isn't documentation , tutorials of cool things can done , other this link (ok , this one too) . (in part of "give user quick peek") 20dp on left used functionality, can see "currents" work larger area. it seems library still not quite finished, , layout xml file cannot shown in visual ui editor... edit: seems library open sourced. code available on : .../android-sdk\sources\android-18\android\sup...

winforms - paint rectangle on column header in c# -

Image
i have painted datagridview column header , called repaint event in scroll event ,but not seems repaint . text in painted rectangle gets scettered ( see second image) here code, void datagridview1_scroll(object sender, scrolleventargs e) { rectangle rtheader = this.datagridview1.displayrectangle; rtheader.y += 0; rtheader.height = this.datagridview1.columnheadersheight; } rectangle r1; void datagridview1_paint(object sender, painteventargs e) { string[] monthes = { "apple", "mango", "cherry", "grapes", "pineapple" }; (int j = 0; j < this.datagridview1.columncount; ) { r1 = this.datagridview1.getcelldisplayrectangle(j, -1, true); int w2 = this.datagridview1.getcelldisplayrectangle(j + 1, -1, true).width; r1.x += -2; r1.y += 30; r1.width = r1.width + w2 - 1; r1.height = r1.height / 3 - 2; e.graphics.fillrectangle(new solidbrush(t...

How to get javascript values on code behind in c# -

i need javascript values on code behind in c#.i know can use hidden field there no server control on page postback.please tell me how can vales in code behind. here code: <html> <head> <title>facebook logged in user details username,email,profile image</title> <script src="jquery-1.6.2.min.js" type="text/javascript"></script> <script type="text/javascript" src="http://code.jquery.com/jquery-latest.js"></script> </head> <body> <script> // load sdk asynchronously (function (d) { var js, id = 'facebook-jssdk', ref = d.getelementsbytagname('script')[0]; if (d.getelementbyid(id)) { return; } js = d.createelement('script'); js.id = id; js.async = true; js.src = "//connect.facebook.net/en_us/all.js"; ref.parentnode.insertbefore(js, ref); } (document)); // init sdk upon load window...

c# - Can Expression.PropertyOrField be used to access a static property or field? -

the documentation of expression parameter of expression.propertyorfield states can null static members: an expression type contains property or field named propertyorfieldname . this can null static members . (emphasis mine) however, whenever pass null argumentnullexception . the documentation of method contradictory: the documentation of expression parameter states can null static members the documentation of argumentnullexception states thrown if expression null fact is : method can't used access static members, documentation of expression parameter incorrect. when expression correct type supplied, method doesn't work expected, because ever looks instance members. to access static field or property, use expression.makememberaccess instead.

php - Delete MYSQL values past the most recent 80 -

i'm using: select * users order date_time desc limit 0, 80 to display 80 recent usernames, how can make query such deletes other entries past 80? i presume need cron job, kind of query need execute? here different ways: delete users users left join ( select id users order date_time desc limit 0, 80) t1 on users.id=t1.id t1.id null sql fiddle demo and without limit: delete users users left join ( select id ( select id, @currow := @currow + 1 row_number users,(select @currow := 0) r order date_time desc) t row_number<=80 ) t1 on users.id=t1.id t1.id null sqlfiddle demo

java - Can I access an outer class's field from a static inner class? -

i have class has static inner class: class { private list<string> list; public static class b { // want update list here without making list static // don't have object outer class } } as can see other answers need non-static inner class that. if cannot make inner class non-static can add required getter , setter method in outer class , access them creating instance of outer class inside inner static class: public class { private list<string> list = new arraylist<string>(); public list<string> getlist() { return list; } public void setlist(list<string> list) { this.list = list; } public static class b { // want update list here without making list static void updlist() { a = new a(); a.setlist(someotherlist); system.out.println(a.getlist()); } } }