Posts

Showing posts from September, 2015

javascript - Create websocket without connecting -

is there way create websocket without connecting right away? far think var ws = new websocket("ws://ws.my.url.com"); creates , connects right away. i'd create socket, define callbacks, , connect once user clicks connect button. thanks no. creating websocket means you've created connection server (or started process of connecting). there no such thing creating websocket isn't connecting yet. you create object store configuration parameters , tell object connect when wanted to, though i'm not sure why that's better creating actual websocket when connect made. or create function setup work , call function later when user clicks connect button.

how to do line continuation in perl debugger for entering raw multi-line text (EOT)? -

i learning perl. trying in debugger define variable, here-document. not know how enter same code in perl script, in debugger. due new lines present inside eot, makes hard in interactive debugger. here small example. have script: >cat ex1.perl #!/usr/bin/perl -w $s =<<'eot'; first line second line eot print $s now run , gives expected output: >perl ex1.perl first line second line now want same in debugger. tried this: >perl -de0 loading db routines perl5db.pl version 1.39_10 db<1> $s =<<'eot';\ cont: first line\ cont: second line\ cont: eot can't find string terminator "eot" anywhere before eof @ (eval 6) [/usr/share/perl/5.18/perl5db.pl:732] line 2. @ (eval 6)[/usr/share/perl/5.18/perl5db.pl:732] line 2. eval 'no strict; ($@, $!, $^e, $,, $/, $\\, $^w) = @db::saved;package main; $^d = $^d | $db::db_stop; $s =<<\'eot\'; first line second line eot; ' called @ /usr/share/perl

Android SDK Manager freezes after installation of OSX 10.11 El Capitan public Beta -

i've installed public beta of el capitan os x (10.11). the issue i'm having after upgrade installation yosemite android sdk manager. when launch android sdk manager within android studio 1.2.2 checks , parses via network call. after clicking on of individual modules, sdk manager freezes , colourful wheel of death. way force close application. i've tried restarting macbook pro , force quitting , relaunching sdk manager , still issue persists. sdk manager working without issues prior upgrade of 10.11 edit: i've noticed none of emulators work el capitan cpu acceleration status: hax not installed on machine (/dev/hax missing). i've tried using genymotion , doesn't work either. i in trouble same thing, too. workaround fix, use no-ui option: $ android update sdk --no-ui other option available here: http://tools.android.com/recent/updatingsdkfromcommand-line

android - Linear layout children not scrolling -

i'm trying add image views linear layout @ runtime. <linearlayout android:id="@+id/llfolderlayout" android:layout_width="match_parent" android:layout_height="0dp" android:layout_weight=".65" android:orientation="horizontal" android:scrollbars="horizontal" > </linearlayout> linearlayout llfoldertabs = (linearlayout) myfolder.findviewbyid(r.id.llfolderlayout); imageview imgtab = new imageview(activity); imgtab.setid(i); imgtab.settag(i); imgtab.setimagedrawable( mcontext.getresources().getdrawable(r.drawable.icon_folder_inactive)); if (i == 0) { imgtab.setimagedrawable( mcontext.getresources().getdrawable(r.drawable.icon_folder_active)); // imgtab.setpadding(10, 0, 4, 0); linearlayout.layoutparams lp = new linearlayout.layoutparams( 74, layoutparams.match_parent); lp.setmargins(15, 0, 0, 0); imgtab.setlayoutparams(lp); } else { // imgtab.

Image not being inserted into mysql database from php -

i trying insert image mysql database php. using following code so. $file= file_get_contents($_files['file']['tmp_name']); $id=$_session['id']; $sql="update mainadmin set photo='$file' id='$id'"; mysql_query($sql); $_session['photo']=$file; but image not being inserted mysql database. being stored in session variable , shown properly. when going image database saw previous image still stored , no update taken place in database. can me find mistake i found solution problem. here updated code. using addslashes() method solved problem $file= file_get_contents($_files['file']['tmp_name']); $filei=addslashes($file) ; $id=$_session['id']; $sql="update mainadmin set photo='$filei' id='$id'"; mysql_query($sql); $_session['photo']=$file;

sharepoint - Accessing files across a shared directory using a Windows service -

i trying access files on shared directory (sharepoint): \\sitename\sites\path_to_doc\doc.csv so have custom application looks @ files on shared drive , when launch application going folder it's installed - c:\myapp.exe, the application can access them . when corresponding service launched services.msc same user launched executable in previous step, doesn't find files on shared directory. i guess, question is: what general differences launching application interactively double clicking versus launching executable using service , of respect windows permissions , remote shared folders?

Quickblox API Session Creation With User & Signature Error -

quickblox rest api create session function running without user information not working when added user information. signature string:success string signaturestr=string.format("application_id={0}&auth_key={1}&nonce={2}&timestamp={3}", this.application_id, this.auth_key, this.nonce, this.timestamp); signature string:error string signaturestr=string.format("application_id={0}&auth_key={1}&nonce={2}&timestamp={3}&user[login]={4}&user[password]={5}", this.application_id, this.auth_key, this.nonce, this.timestamp,this.user.login,this.user.password); generate signature function public string generatehmacsha1(string key, string body) { system.text.encoding encoding = system.text.encoding.utf8; byte[] keybyte = encoding.getbytes(key); hmacsha1 hmacsha1 = new hmacsha1(keybyte); byte[] messagebytes = encoding.getbytes(body); byte[] hashmessage = hmacsha1.computehash(messagebytes

ruby on rails - FactoryGirl build ignored when testing with Shoulda Matchers -

i've switched on shoulda matchers, can't seem validate factory builds. i've instantiated factory build in before callback, matcher doesn't seem acknowledge it. instance, intentionally set instance's name nil test returns no errors. doing wrong? require 'rails_helper' describe restaurant context 'validations' before { factorygirl.build(:restaurant, name: nil) } should validate_presence_of(:name) end end end for scenario, don't require instance match shoulda matchers; it's going test the usage of validate_presence_of against model definition itself. so, i'd rewrite test thus: require 'rails_helper' describe restaurant { should validate_presence_of(:name) } end

many to many - Updating extra fields pivot table laravel -

i have 3 tables, a pedido(order) table, product table , pedido_product table have field cantidad in pedido_product table i´m trying update each product orderd i'm able update fields hardcode values in update method, cantidad get's updated correctly $productid = 2; $cantidad = 1.1; pedido::find($pedidoid)->products()->updateexistingpivot($productid, [ "cantidad" => $cantidad ]); now have form try update cantidad on each product on same request {!! form::open(array('action' => ['pedidoscontroller@update', $pedido->id],'method' => 'patch')) !!} @foreach ($pedido->products $product) {!! form::text($product->pivot->product_id, $product->pivot->cantidad, ['class' => 'form-control' ,'id' => 'cantidad']) !!} i want, array key refrenced product_id , value of updated cantidad. how bind productid , cantidad in update method array recieve form ,

javascript - Selecting Pseudo Element :focus and :active via JS -

i can't seem pseudo slement select workaround work on :focus styled form text box want change via js function. i know it's matter of adding class, , i've seen examples :after , :before not :focus , , not sure add class js: $(document).ready(function() { function night() { var currenttime = new date().gethours(); if (0 <= currenttime&&currenttime < 5) { $('.text_box').css('text-shadow', '0 0 0 #272727'); $('.text_box:focus').css('background-color', '0 0 0 #fff'); } if (10 <= currenttime&&currenttime <= 24) { $('.text_box').css('text-shadow', '0 0 0 #fff'); $('.text_box:focus').css('background-color', '0 0 0 #272727'); } } night(); }); ccs: .text_box {

android - Swipe Refresh Layout onRefresh working but not displaying refresh indicator -

i've implemented swipe refresh layout onto 1 of list views view not sliding down when swipe , icon not visible. though seems doesn't work, fire off onrefresh listener. also think worth mentioning i'm using listview on fragment i'm initializing listener in fragment activity displayed below. swipe refresh xml <android.support.v4.widget.swiperefreshlayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/swipe_refresh_layout" android:layout_width="match_parent" android:layout_height="match_parent"> <listview android:layout_width="match_parent" android:layout_height="match_parent" android:id="@+id/listview" android:layout_gravity="center_horizontal" android:dividerheight="1sp" android:translationz="5dp" android:background="@color/background_gray"

c# - How to create commands/utilities in a visual studio project -

i have solution in vs 2013 have few utility tasks need done once in while, example rebuild files embedded in output executable. right using test run these, because simple run code ide, don't – it's not test. my question how create utilities or commands can run ide? if can make utilities runnable commandline (for example, if they're in batch scripts or standalone helper executables), can use external tools functionality of visual studio. here's msdn page topic. i don't have vs 2013 handy, i've done previous versions of visual studio. little more natural running test invoke helper utility tasks, although works in pinch. you cobble pre/post-build event runs utility task. it's unclear doing periodically, if it's pretty lightweight operation, might not hurt there.

java - how many times is the println statement executed -

i kind of don't nested loops, can explain me why following code executed 45 times please? shouldn't i++ , j++ increment 1? first loop should (0 * 0), (1 * 1), (2 * 2) , on. for(int = 0; < 10; i++) for(int j = 0; j < i; j++) system.out.println(i * j); that not how nested loops work, - first enter outer loop, execute inner loop till inner loop exits (that j's value becomes equal i) , , after again increment i. so example , if i 5 , enter the outer loop, , j start 0 till 4 (as 5) , values calculated (5*0) , (5*1) , (5*2) , (5*3) , (5*4) , , after exiting inner loop, again increment i 1 , i become 6 , repeat (that j start 0 till 5).

What does 'generated box' in css mean? -

as question title, 'generated box' in css mean? article link: http://www.sitepoint.com/web-foundations/css-box-model/ a "generated box" box associated element in visual formatting structure. word "generate" refers act of creating box , drawing on screen according css properties of element. introduction section 9 of css2.1 spec summarizes nicely: in visual formatting model, each element in document tree generates 0 or more boxes according box model . layout of these boxes governed by: box dimensions , type. positioning scheme (normal flow, float, , absolute positioning). relationships between elements in document tree. external information (e.g., viewport size, intrinsic dimensions of images, etc.). most elements tend generate 1 box, can generate multiple boxes or none @ depending on situation. example, following generates single block box 100 pixels 100 pixels: <div style="width: 100px; height: 100px;

python - Django models: how to handle conceptually similar ideas and somewhat repetitious elements -

i new django , databases. suppose trying create database filled information various nobility on time. so, there number of different countries might have "monarch" position, held various people, male , female, @ different times. several countries might call king/queen while perhaps 1 call tsar/tsarina. these fixed. initial impression modeling might class person(models.model): sex_choices = ( 'm': 'male', 'f': 'female' ) name = models.charfield(max_length=200) birthdate = models.datefield() sex = models.charfield(max_length = 2, choices = sex_choices) titles = models.manytomanyfield(title, through='titleoccupation') class country(models.model): #... class title(models.model): country = models.foreignkey(country) #... class titleoccupation(models.model): title = models.foreignkey(title) date_start = models.datefield() date_end = models.datefield(null = true, bla

Is android-asynct-http library coupled with UI thread? -

i want use awesome library server request in application work on map. my need want make server request every 2 minutes without block user interaction on screen while server requesting process happening , in onsuccess call i'll work on map. how can use library need? , the library coupled android activity , fragment life cycle? please refer site library information. http://loopj.com/android-async-http/ actually that's page linked http://loopj.com/android-async-http/ . theses callbacks executed in ui thread actual request being processed in thread. asynchttpclient client = new asynchttpclient(); client.get("http://www.google.com", new asynchttpresponsehandler() { @override public void onstart() { // called before request started } @override public void onsuccess(int statuscode, header[] headers, byte[] response) { // called when response http status "200 ok" } @override public void onfailure(

c - How to iterate over a char pointer array -

how iterate on files variable in efficient way ? should add null last value, or else ? char *files[] = { "c1.txt", "r1.txt", "t2.c", "d.cpp", }; there several possibilities. you can add null final entry, suggest yourself if array comes source (like file on disk), keep counter of number of lines you're reading but if array given in source, length constant , can check how many elements has (by subtracting line numbers) also, size of constant array sizeof(files) / sizeof(char*) .

c# - Getting interface implementations in referenced assemblies with Roslyn -

i'd bypass classical assembly scanning techniques in framework developing. so, i've defined following contract: public interface imodule { } this exists in contracts.dll . now, if want discover implementations of interface, similar following: public ienumerable<imodule> discovermodules() { var contracttype = typeof(imodule); var assemblies = appdomain.current.getassemblies() // bad var types = assemblies .selectmany(a => a.getexportedtypes) .where(t => contracttype.isassignablefrom(t)) .tolist(); return types.select(t => activator.createinstance(t)); } not great example, do. now, these sorts of assembly scanning techniques can quite under-performaning, , done @ runtime, typically impacting startup performance. in new dnx environment, can use icompilemodule instances metaprogramming tools, bundle implementation of icompilemodule compiler\preprocess folder in project , funky. what target be, use ico

nscopying - Is it better to use -> instead of . in to implement `copyWithZone:` method in objective-c? -

say there's class property p1, , setter p1 has been overwritten. want implement nscopying protocol class a. in understanding since you're "copying" instance of class a, there's no need trigger setter methods in copywithzone: method. copyofinstance -> _p1 = _p1; better copyofinstance.p1 = _p1 . right? yes. forming new object if implementing initializer. rules same. must not use setter method in init... method, must not use setter in copywithzone: .

Unable to forecast linear model in R -

i'm able forecasts arima model, when try forecast linear model, not actual forecasts - stops @ end of data set (which isn't useful forecasting since know what's in data set). i've found countless examples online using same code works fine, haven't found else having same error. library("stats") library("forecast") y <- data$mfg.shipments.total..usa. model_a1 <- auto.arima(y) forecast_a1 <- forecast.arima(model_a1, h = 12) the above code works perfectly. however, when try linear model.... model1 <- lm(y ~ mfg.no.total..usa. + mfg.inv.total..usa., data = data ) f1 <- forecast.lm(model1, h = 12) i error message saying must provide new data set (which seems odd me, since documentation forecast package says optional argument). f1 <- forecast.lm(model1, newdata = x, h = 12) if this, able function work, forecast predicts values existing data - doesn't predict next 12 periods. have tried using append functi

objective c - iOS Swift: iAd Interstitial leaves black screen after dismissed -

i'm trying add ads game, every time user loses present game on view controller. on occasions, when ad loads have full screen interstitial shown on top of game on screen. my problem interstitial doesn't come close button, added 1 user doesn't feel forced tap on ad every time comes up. when user clicks close button, ad dismissed , game on view controller once again shown. problem is, once in while (at random, maybe first time or after couple of runs through) ad dismissed , leaves black screen. any ideas why happening? i've been scratching head few days trying figure out. thanks!! here code: // ad variables var interstitialadview: uiview = uiview() var interstitial:adinterstitialad! var intersitialtracker = false var closebutton:uibutton! override func viewdidappear(animated: bool) { if !intersitialtracker { loadinterstitialad() } } // buttons restart game, , return home screen @ibaction func restartbuttonpressed(sender: anyobject) {

express - node.js module require() twice -- (relative path) -

why qrchannelservice module required twice(mongoose throw overwritemethod error ), why didn't cached ? qrchannelservice path: mit/src/modules/qrchannel/services/qrchannelservice.js require path1: mit/src/controllers/api/qr.js var qrcodeservice = require('../../modules/qrchannel/services/qrchannelservice'); path2: mit/src/modules/qrchannel/common/qrhandlerdispather.js var qrchannelservice = require('../services/qrchannelservice');

php - How do I require a file or class in a vendor library in Yii2 that is not already included? -

i have class yii2 cannot see. other classes work. tried following. commented lines did not work. // use app\vendor\googleads\googleads-php-lib\src\google\api\ads\common\util\errorutils; // require_once util_path . '/errorutils.php'; require_once('../vendor/googleads/googleads-php-lib/src/google/api/ads/common/util/errorutils.php'); use \errorutils; this works, doesn't right. doesn't work in command mode, need. $ yii cron php warning: uncaught exception 'yii\base\errorexception' message 'require_once(../vendor/googleads/googleads-php-lib/src/google/api/ads/common/util/errorutils.php): failed open stream: no such file or directory' in /cygdrive/c/users/chloe/workspace/xxx/models/googleadwords.php:36 how can require or use class in yii2? the library use doesn't provide psr-4 autoloader settings classes. need add autoload classmap classes want load, composer.json in project's root directory following: "autoload&

.htaccess - Prevent direct traffic to URL using htaccess -

i need prevent direct access url ( http://www.example.com/gated-asset ). there way add code htaccess file redirect direct traffic page ( http://www.example.com/form )? i have tried following code in htaccess file, pages, including home page, redirect www.example.com/form. rewriteengine on rewritecond %{http_referer} !^http://go.example.com [nc] rewriterule .* http://www.example.com/form [r,l] the entire .htaccess file looks (it wordpress site): # 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] </ifmodule> # end wordpress rewriteengine on rewritecond %{http_referer} !^http://go.example.com [nc] rewriterule .* http://www.example.com/form [r,l] i have tried following: rewriteengine on rewritecond %{http_referer} !^http://go.example.com [nc] rewriterule ^/$ /form/ [r,l] rewriterule ^/$ /gated-asset/ [r,l

ios - Swift : User ability to post either text or image in a tableview feed with one button -

i'm new comer sof , swift , i've learn lot reading awesome post. challenge: i've added view controller table view , one button tab bar "post button" when users hit post another view-controller appears . tableview contain 3 cells 3 options. my question there simpler way let user add text only or image only or both in one view-controller without creating 3 cells each possible choice? twitter example

javascript - Which method performs fastest while adding an attribute in jQuery, using attr() method, passing attributes as a key-value object, or direct? -

i know 3 ways of adding href attribute contains relative link in jquery: using (1) .attr(), (2) attributes key-value pair in argument, or (3) direct writing (you might know other methods, please tell in answer me learn). using .attr() it below using method. var link = "relative-link.html"; $("<a/>").attr("href",link); using argument like this: var link = "relative-link.html"; $("<a/>", {href: link}); direct like this: var link = "relative-link.html"; $("<a href=" + link + ">"); so, faster performance wise among method? why should choose 1 method on others. consider adding other attributes such class , method should preferred when adding multiple attributes in 1 go. please tell me method better , in case proper reasoning. thanks! this interesting question. looked jquery's code on github , suggest should @ same here purely learning purposes (and

html - what's the difference between $('.p') and $('p') jquery? -

i'm new jquery, when select class html, can $('.p') or $('p') . i'm confused, there difference? these css selectors. can used in jquery is. $('.p') class selector . select elements having class p . in html document, css class selectors match element based on contents of element's class attribute. class attribute defined space-separated list of items, , 1 of items must match class name given in selector. example: <a class="p">...</a> <div class="p anotherclass">...</div> <span class="firstclass p">...</span> <p class="p">...</p> $('p') element/tag/type selector . select p (paragraph) elements. css type selectors match elements node name. used alone, therefore, type selector particular node name selects elements of type — is, node name — in document. example: <p>...</p> <p class="anyclass"&

python - I need to remove o rnot include the ',' in my result -

my problem when query database upperbound.extend(cursor.execute(queryupper, ['sn00010', '2015-05-07 22:16:00.810']).fetchall()) where queryupper grabs upper bounds column database , ['sn00010', '2015-05-07 22:16:00.810'] fills in parameters query result list returns [(15497,), (14957,), (14516,), (14159,), (12164,), (11597,), (11555,), (11513,)] i have query lower bounds column , want use range() find range between bounds. problem returning comma (parenthesis don't think matter) need remove each element or somehow not include when list made. im not sure if matters using pypyodbc , mssql server

javascript - undefined index while submitting the form -

i want submit form empty checkbox want value "no" if checkbox not checked. if($domain_check=="yes") { echo '<div class="col-md-3"> <div class="form-group" style="padding-top:20px;"> domain_check <input type="checkbox" name="domain_check1" value="yes" checked> </div> </div>'; } else { echo '<div class="col-md-3"> <div class="form-group" style="padding-top:20px;"> domain_check <input type="checkbox" name="domain_check1" value="yes"> </div> </div>'; } use hidden input before checkbox set default value same name: <input type="hidden" name="domain_check1" value="no"> <input type="checkbox" name="d

html - My flexbox container has extra padding in Firefox -

Image
this question has answer here: how can ff 33.x flexbox behavior in ff 34.x? 2 answers i'm trying create layout tabs , unordered list expands vertically 100% of container's height. managed working expected in chrome , ie11 without trouble. however, firefox seems have bit of quirk ul expands 20px outside of container in case. view plnkr test case screenshot of what's happening: html: <!doctype html> <html> <head> <link rel="stylesheet" href="style.css"> <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css"> <script src="script.js"></script> </head> <body> <div id="wrapper"> <header>some header...</header> <div class="board-panel"> &l

java - How to deploy a jBPM (jBPM3) project which generates processdefinition.xml file programmatically? -

deploying jbpm project seems easy using eclipse when use designer tool generate processdefinition.xml file. but, wanted generate processdefinition.xml using java. when tried so, works fine, not able deploy directly. as there no deployment option shown in eclipse. how deploy ? use below method 3.2.x in code.. deployprocessdefinition(processdefinition processdefinition) { getgraphsession().deployprocessdefinition(processdefinition); }

How can I write a conditional split expression that separates row by string in SSIS? -

i trying filter data in ssis specific string. row has"csc" following name in column holder_name needs discarded. created conditional split , inputted expression findstring("csc", holder_name, 1) > 0 . yet nothing outputs specified second destination. you have arguments backwards. first argument findstring string searching. second argument text searching for . read documentation next time: https://msdn.microsoft.com/en-us/library/ms141748.aspx

java - Spring passing Class<?> through constructor from xml file -

is possible inject class param through constructor xml file? how done? example public server(class<?>... configuration) {} this class param inject this xml file <constructor-arg index="0"></constructor-arg> but shall next? if parameter of type class<?> , need provide qualified class name <constructor-arg index="0">java.lang.string</constructor-arg> but since have varargs, need add <array> values <constructor-arg index="0"> <array> <value> java.lang.string </value> </array> </constructor-arg>

data filter by date in R -

i have data this: date expiry close 2009-05-01 2009-06-26 12 2009-05-01 2009-05-26 22 2009-05-01 2010-05-23 36 2009-05-01 2009-07-26 32 2009-12-01 2009-12-26 33 2009-12-01 2010-01-24 36 2009-12-01 2010-02-26 32 now want filter data(row wise) dates expiry lies in same month of date or expiry lie in next immediate month of date . if expiry lie beyond next immediate month of date , want exclude them. so here want desired data: 2009-05-01 2009-06-26 12 #next immediate month 2009-05-01 2009-05-26 22 #same month 2009-12-01 2009-12-26 33 #same month 2009-12-01 2010-01-24 36 #next immediate month i have both date , expiry in posixlt format. please help. have such 80000 observations. i'd try readable , straightforward. first, clean dataframe: df <- data.frame(date= c('2009-05-01', &

php - Variable "name" does not exist in UsersListBundle:Default:index.html.twig at line 1 - Symfony 2 -

i getting error using symfony 2 while fetching users database: variable "name" not exist in userslistbundle:default:index.html.twig @ line 1 500 internal server error - twig_error_runtime my code: index.html.twig <!doctype html> <html lang="en"> <head> <meta charset="utf-8"> <title>symfony 2 example</title> <link href="/bundles/userslist/css/main.css" rel="stylesheet" type="text/css" media="all" /> </head> <body> <div id="container"> <h1>user list page</h1> <div id="body"> <p><a href="/">click here</a> homepage</p> <p><a href="users/add">add new user</a></p> <p>all users in users table using: <br /> <strong>$repository = $this->getdoctrine()->getrepository('userslistbundle:us

configuration - how to disable http server in spring boot? -

spring boot documentation claims setting server.port=-1 disables http endpoint , me behaves same if used port=0. want achieve batch spring boot application starts, things , shuts down. right sits there until kill it. how prevent starting http server? or instead - how shutdown spring boot application gracefully code? i'm using version 1.2.4.release. have following annotations on main class: @configuration @componentscan @enableautoconfiguration @enablecaching edit - dependencies: compile( 'redis.clients:sharded-jedis-sentinel-pool:0.2.10.08e7bbe', 'org.springframework.boot:spring-boot-starter-jdbc', 'org.springframework.boot:spring-boot-starter-web', 'mysql:mysql-connector-java:5.1.33', 'org.flywaydb:flyway-core:3.2.1', ) without spring-boot-starter-web spring throws: exception in thread "main" org.springframework.beans.factory.beancreationexception: error creating bean name 'org.springframew