Posts

.htaccess - mod_rewrite - change top level domain -

im trying find out issue following mod_rewrite rule: on account on "strato" (hoster) rule working, not working on "1und1" (another hoster). there wrong rule? # rewrite rule rewriteengine on rewritebase / rewritecond %{http_host} ^.*original-domain.de [nc] rewriterule /* http://new-subdomain.anotherdomain.de%{request_uri} [p] # end rewrite rule is there perhaps or better way redirect done? the goal user visiting http://www.original-domain.de (with or without www.) should see content of http://new-subdomain.anotherdomain.de original-domain adress still stays in adressbar of browser. in other words, user won't recognize got redirected. and, question: stands [p] after rewrite rule? if change [l] redirect works new-subdomain.anotherdomain.de adress beeing displayed in browser? couldn't find website describes properly. thanks in advance!

android - How to show Toolbar's logo, icon, title, subtitle when wrapped in a CollapsingToolbarLayout? -

Image
after android support design library released, wanted implement effect page of twitter profile , in toolbar 's title , subtitle changed screen scrolled vertically. tried use coordinatorlayout , appbarlayout , collapsingtoolbarlayout , toolbar android support design library achieve effect. worked expected except toolbar 's content couldn't showed or changed wanted. should have been wanting display collapseicon , navigationicon , title , subtitle of toolbar , didn't show though had set them in layout , programmatically. blog said, note in cases, should call settitle() on collapsingtoolbarlayout, rather on toolbar itself. if have checked doc , find out collapsingtoolbarlayout focus on settings of title , can nothing collapseicon , navigationicon , subtitle . so tell me how achieve effect toolbar , collapsingtoolbarlayout ? if couldn't able, other things be? has ideas this? any tips appreciated. in advance. this issue reported here ...

ios - Reset background in UIPageViewController -

i have uipageviewcontroller displaying uiimageview . i can swipe , displayed correctly: image 1 there "edit" button pushes viewcontroller on screen: self.navigationcontroller!.pushviewcontroller(editpictureviewcontroller, animated: true) when editpictureviewcontroller closed: either clicking button or calling done button navigationcontroller?.popviewcontrolleranimated(true)) the background of uipageviewcontroller not white anymore: it's "image 1" (the image displayed before editpictureviewcontroller pushed). if swipe see previous image, background not white. see here: image 2 what's problem background? ok found issue... initiating uipageviewcontroller in viewwillappear instead of viewdidload :-/

c# - How to put generic Type (T) as parameter? -

i have error: severity code description project file line error cs0246 type or namespace name 't' not found (are missing using directive or assembly reference?) on method signature method: public static void sendmessage(string queuname, t objeto) { queueclient client =queueclient.createfromconnectionstring(connectionstring, "empresa"); brokeredmessage message = new brokeredmessage(objeto); message.contenttype = objeto.gettype().name; client.send(new brokeredmessage(message)); } you forgot specify type parameter. can in 2 ways: either define them @ method definition (which way go in case, because method static): public static void sendmessage<t>(string queuname, t objeto) or can specify them on class definition (for instance methods): class myclass<t>{ public void sendmessage(string queuname, t objeto){} }

java - Does it make sense to Unittest wrapper methods -

this question philosophical. given have method this: public list<string> getstuffbyname(@notnull string name) throws someexception { return somedependency.createquery().byname(name).list().stream() .map(execution -> execution.getprocessinstanceid()) .collect(collectors.tolist()); } basically call dependencies method , process using stream api. a unittest - in strict understanding(?) - testing 1 isolated unit. mock dependencies, assume tested units themselves. if go through this, end method exclusively consists of stuff tested elsewhere. eg jmockit test this: public void test_get_processes_for_bkey_2(@mocked executionquery query, @mocked list<string> processes, @mocked list<execution> executions, @mocked stream<execution> e_stream, ...

opencart - Open cart edit checkout functionality -

i new opencart. want add functionality in open cart site. want create pdf file text , order number after check out process. know it's possible edit check out model , controller files. have doubt lose when upgrade opencart? if there other solution requirement? please me you can create function in checkout/order.php model, handle pdf generation operations. before upgrading, can save pdf generator function file keep it. i can recommend http://dompdf.github.com/ html pdf generator.

java - How to force View to recalculate it's position after changing parent -

Image
it has been days since have problem. this reformulation of this question considering behavior describe on this answer . please, note question states less specific case, , answer useful many different scenarios. i'm moving 1 chip left point right point, , writing original , new coordinates: so failing: public void ontouch(view view) { int[] aux = new int[2]; //get chip view movingchip = findviewbyid(r.id.c1); //write it's coordinates movingchip.getlocationonscreen(aux); ((textview)findviewbyid(r.id.p1t1)).settext("(" + aux[0] + "," + aux[1] + ")"); //move ((linearlayout)findviewbyid(r.id.p1)).removeview(movingchip); ((linearlayout)findviewbyid(r.id.p2)).addview(movingchip); movingchip.requestlayout();//#### adding didn't solve //write it's coordinates movingchip.getlocationonscreen(aux); ((textview)findviewbyid(r.id.p2t4)).settext("(" + aux[0] + "," + au...