Posts

php - Language locale does not change with App::setLocale but updates on Session::put() in laravel 5.2 -

am working on multi-lingual support laravel app, materials have seen online passing locale app facade , calling setlocale method translates website, have tried no luck. in routes file, have this route::group(['middleware' => ['web']], function () { route::get('change-locale', ['uses' => 'homecontroller@changelocale', 'as' => 'locale.change']); }); homecontroller@changelocale have... namespace gudaapp\http\controllers; use illuminate\http\request; use gudaapp\http\requests; use gudaapp\http\controllers\controller; class homecontroller extends controller { public function changelocale(request $request) { if(empty($request->locale)) { redirect()->back()->withmessage('unknown locale, please, if problem persists, contact admin.'); } session()->put('locale', $request->locale); return redirect()->back()->withmessage('your locale has been changed <b>'.$...

android - Gradle use RES dir from outside location -

how can set in gradle file use whole res dir specific location? using android studio 1.5.1 , gradle 0.4.0 experimental. is there official documentation gradle experimental plugins? have found this: http://tools.android.com/tech-docs/new-build-system/gradle-experimental#toc-multiple-ndk-projects is there documentation more complete , contains more info? you should use somenthing that: android.sources { main { manifest.source { srcdir 'folder' include 'androidmanifest.xml' } resources.source.srcdir 'folder/res' java.source.srcdir 'folder/src' } }

search - Solr: One word query does not match three word indexed value -

one of documents has title attribute value poésie pour pouvoir . when query q=title:poesie , no results found. q=title:poesie pour finds document, though. title of type text . excerpt schema.xml: <fieldtype name="text" class="solr.textfield" positionincrementgap="100"> <analyzer type="index"> <tokenizer class="solr.whitespacetokenizerfactory"/> <filter class="solr.asciifoldingfilterfactory" /> <filter class="solr.stopfilterfactory" ignorecase="true" words="stopwords.txt"/> <filter class="solr.worddelimiterfilterfactory" generatewordparts="1" generatenumberparts="1" catenatewords="1" catenatenumbers="1" catenateall="0" splitoncasechange="1"/> <filter class="solr.lowercasefilterfactory"/> <filter cl...

php - How to apply multy word search in mysql -

i need points on how make php script not 1 word or multiple ( john doe ). script find 1st word "john" pointed table. here script: $query = $_get['query']; $min_length = 1; if (strlen($query) >= $min_length) { $query = htmlspecialchars($query); $query = mysql_real_escape_string($query); $raw_results = mysql_query( "select * filmi (`title` '%".$query."%') or (`description` '%".$query."%') or (`nomer` '%".$query."%')" ) or die(mysql_error()); if (mysql_num_rows($raw_results) > 0) { while ($results = mysql_fetch_array($raw_results)) { echo " print results "; } } else { echo "no results"; } } else { echo "minimum length " . $min_length; } use code, have added new line. this added wild cards % in place of space modify existing qu...

ios - How to change TabBar items Navigation Title -

i'm facing problem ! have been struggling days ! problem i'm not able change title of navigation in tabbar items. first i'm pushing uitabbarviewcontroller app delegate if user signed in. let currentuser = pfuser.currentuser() if currentuser != nil { let mainstoryboardipad : uistoryboard = uistoryboard(name: "main", bundle: nil) let homeview : uiviewcontroller = mainstoryboardipad.instantiateviewcontrollerwithidentifier("4") let navigationcontroller = application.windows[0].rootviewcontroller as! uinavigationcontroller navigationcontroller.pushviewcontroller(homeview, animated: false) } else { } then in first item viewcontroller i'm using change titleview image example. let logo = uiimage(named: "logo.png") let imageview = uiimageview(image:logo) self.navigationcontroller!.topviewcontroller!.navigationitem.titleview = imageview and in second item viewco...

html - Table column fixed width -

i'm having problems setting fixed width table columns. have @ jsfiddle example: http://jsfiddle.net/stylock/jj6dk/ the middle column should 300px wide, , left column should 80px wide, reason 3 columns same width. knows how fix that? remove css style of table , should work: table-layout: fixed; demo: http://jsfiddle.net/jj6dk/6/ when set table-layout: fixed table take these algorithms: the horizontal layout depends on table's width , width of columns, not contents of cells allows browser lay out table faster automatic table layout the browser can begin display table once first row has been received

scatter plot - Add pair lines in R -

Image
i have data measured pair-wise ( e.g. 1c, 1m, 2c , 2m), have plotted separately (as c , m). however, add line between each pair ( e.g. line point 1 in c column point 1 in m 'column'). a small section of entire dataset: pairnumber type m 1 m 0.117133 2 m 0.054298837 3 m 0.039734 4 m 0.069247069 5 m 0.043053957 1 c 0.051086898 2 c 0.075519 3 c 0.065834198 4 c 0.084632915 5 c 0.054254946 i have generated below picture using following tiny r snippet: boxplot(test$m ~ test$type) stripchart(test$m ~ test$type, vertical = true, method="jitter", add = true, col = 'blue') current plot: i know command or function need achieve (a rough sketch of desired result, of lines, presented below). desired plot: alternatively , doing ggplot fine me, have following alternative ggplot code produce plot similar first 1 above: ggplot(,aes(x=test$type, y=test$m)) + geom_boxplot(outlier.shape=na) + geom_jitter(po...