Posts

apache - Wordpress .htaccess doesn't remove www from website's URL -

looking @ code, should working (its working other websites/subdomains i'm working on) # begin wordpress <ifmodule mod_rewrite.c> rewriteengine on rewritebase / rewriterule ^index\.php$ - [l] rewritecond %{request_filename} !-f rewritecond %{request_filename} !-d rewriterule . /index.php [l] rewritecond %{http_host} ^www\.(.*)$ [nc] rewriterule ^(.*)$ http://%1/ [r] </ifmodule> # end wordpress edit: website on redirect loop now. fixed going wordpress settings > general > website url , adding "www." domain :)

tkinter - Basic Python Messagebox size change -

how change size of window message-box appears in? built box myself allow me change option "thanks". here code far: def messagewindow(): win = toplevel() win.title('warning') message = "this delete stuff" label(win, text=message).pack() button(win, text='thanks!', command=win.destroy).pack() you use geometry method set dimensions of window. example: win.geometry("500x500")

bash - Asterisk: How to convert time to seconds -

i want print result when $9 greather 1 hour how can convert seconds? can use 3600sec check. $9 = duration of call 00:00:00 asterisk -rx "core show channels verbose" | awk '$9 > "01:00:00"' | awk '$6 == "dial"' | wc -l > test.txt as mentioned, easiest thing check if first 2 digits of time not "00". this: asterisk -rx "core show channels verbose" | awk '$9 !~ /00:..:../ && $6 == "dial"' | wc -l that means match , record "01:00:00" may not want :-( . matches "$9 greater or equal 1 hour". this match "greater than" condition: asterisk -rx "core show channels verbose" | awk '$9 !~ /00:..:../ && $9 != "01:00:00" && $6 == "dial"' | wc -l

java - null pointer exception in getstrings method hadoop -

getting null pointer exception in driver class conf.getstrings() method. driver class invoked custom website. below driver class details @suppresswarnings("unchecked") public void doget(httpservletrequest request, httpservletresponse response) throws servletexception, ioexception { configuration conf = new configuration(); //conf.set("fs.default.name", "hdfs://localhost:54310"); //conf.set("mapred.job.tracker", "localhost:54311"); //conf.set("mapred.jar","/home/htcuser/desktop/resumelatest.jar"); job job = new job(conf, "resumesearchclass"); job.setjarbyclass(helloform.class); job.setjobname("resumeparse"); job.setinputformatclass(fileinputformat.class); fileinputformat.addinputpath(job, new path("hdfs://localhost:54310/usr/resumedirectory")); job.setmapperclass(r...

robotframework - What does "--dryrun" do in Robot Framework pybot command? -

i have used --dryrun along pybot command; want know validates in testcase or in library. it parses of test suites , executes tests. not execute keywords, parse them correctness. main benefits listed user guide are: using keywords not found. using keywords wrong number of arguments. using user keywords have invalid syntax. in addition these failures, normal execution errors shown, example, when test library or resource file imports cannot resolved. for more information see http://robotframework.org/robotframework/latest/robotframeworkuserguide.html#dry-run

sql server - check if first and last character of each word in a string is same -

i need set of names 1st & last letter of each part of name(first name, middle name, last name) matches. name can have 5 parts. if names are: croc lil brob tart cron lee bro tasr it should result: croc lil brob tart declare @name varchar(70) = 'cron lee bro tasr test' select @name, substring(@name,1,1) "first letter of first name", substring(@name,charindex(' ',@name) +1 -2,1) "last letter of first name", substring(@name,charindex(' ',@name) +1 ,1) "first letter of second name", substring(@name,charindex(' ',@name, charindex(' ',@name) + 1) +1 -2 ,1) "last letter of second name", substring(@name,charindex(' ',@name, charindex(' ',@name) + 1) +1 ,1) "first letter of third name", substring(@name,charindex(' ',@name, charindex(' ',@name,charindex(' ',@name) + 1) + 1 +1)+1 -2 ,1) "last letter of 3rd name", subs...

java - Serializing an object which contains a list of other objects -

Image
background : implementing game needs serialize model objects (events) able send them on network clients playing game. problem : 1 of model classes eventshowcards , subclasses event (declared serializable). public class eventshowcards extends event { private final player player; private final list<itemcard> cards; public eventshowcards(player player, list<itemcard> cards) { super(); this.player = player; this.cards = cards; } public player getplayer() { return player; } public list<itemcard> getcards() { return cards; } @override public void accept(visitor visitor) { visitor.visit(this); } } however, when serialize object , send client, client receives object , list of itemcard s empty. no exceptions thrown . event shown server (before serialization): event shown client (after serialization): in order serialize/deserialize using standard objectoutputstre...