Posts

Showing posts from September, 2011

Depretieation Warning for CSS in Michael Hartel's Ruby on Rails tutorial 7.7 -

i keep getting error css in section 7.7: deprecation warning: assertion not run because of invalid css unexpected '#' after '[#<nokogiri::css::node:0x000000076e23f8 @type=:element_name, @value=["div"]>]' (called block in <class:userssignuptest> @ /home/ubuntu/workspace/sample-app/test/integration/users_signup_test.rb:14) deprecation warning: assertion not run because of invalid css selector. unexpected '<' after '.' (called block in <class:userssignuptest> @ /home/ubuntu/workspace/sample-app/test/integration/users_signup_test.rb:15) the users_signup_test.rb test below specific problem mentioned in deprecation warning in assert_selects (which lines 14 , 15 in code): test "invalid signup information" signup_path assert_no_difference 'user.count' post users_path, user: { name: "", email: "user@invalid", password: "foo&q

ruby on rails - Why does second terminal tab prompt bundle install -

if run rails s in terminal, works. if open new terminal window or tab , run rails c, following error: run bundle install install missing gems. if type cd .. , cd directory , run rails c again, works. question causing occur?

python 3.x - Nested global variables / Defining a variable in a nested function -

i writing program , stumbled across problem. have 'counter' counting how many wins computer , player. problem is, function nested in another. how accomplish without unboundlocalerror ? put global statement or how accomplish it? def nestedfunction(): print("i nested") score += 1 print(score) again = input("would play again? > ") if again == "yes": function() else: exit() def function(): print("i not nested") nestedfunction() if __name__ == '__main__': score = 0 function() expected output : i not nested. nested. 1 play again? > yes not nested. nested. 2 if want use variable not local put global before access global variable def nestedfunction(): print("i nested") global score score += 1 print(score) again = raw_input("would play again?>") if str(again) == "yes":

python - Online sorting and removing duplicates on two streams of integers -

suppose i'm receiving 2 streams of integers. each stream of integers (1) not guaranteed in increasing order, , (2) occasionally, 1 or more integers missing first stream present on second stream. example: stream 1 - 1, 2, 3, 5, 4, 6, 8, 9, 10, ... stream 2 - 1, 2, 3, 4, 5, 6, 8, 7, 10, ... what data structures and/or algorithms low space-time complexity constructing sorted stream contains every single integer in union (i.e. duplicates removed) set of both streams? is: sorted stream - 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, ... of course, naive approach store every result sort in o(n log n), making final pass in linear scan remove consecutive duplicate elements. requires lot of memory , requires both streams terminate before processing can start. this udp packet sequencer on embedded device, code snippets in c preferable, can read python too. do know integers we're getting, or arbitrary? you're going need sort @ point, don't see way avoid o(n lg n). bes

ajax - Rails .js render html in modal -

i'm passing following parameter modal: "<iframe width="350" height="197" src="http://www.youtube.com/embed/jsexp2ebb4s?feature=oembed" frameborder="0" allowfullscreen></iframe>" then, try render dynamically in modal...in show.js.... $("#modalpostvid").html("params[:vid]") but loads text (i.e. loads string) instead of embedded video. how can make video embeds? thank you. try $("#modalpostvid").html("<%= escape_javascript params[:vid].html_safe %>")

Getting an Error when I try to change file name in PowerShell -

i found similar commands these online. want replace parenthesis in file names either space or empty string. the files i'm trying change following: nehemiah (1).mp3 nehemiah (2).mp3 nehemiah (11).mp3 really i'd them following: nehemiah 01.mp3 nehemiah 02.mp3 nehemiah 11.mp3 here scripts i've tried. dir | rename-item –newname { $_.name –replace “(“,”” } dir *.mp3 | rename-item -newname { $_.name -replace " ("," " } neither of these work. here error message i'm getting. rename-item : input script block parameter 'newname' failed. regular expression pattern ( not valid. @ line:1 char:34 + dir *.mp3 | rename-item -newname { $_.name -replace " ("," " } + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + categoryinfo : invalidargument: (c:\users...ehemiah (1).mp3:psobject) [rename-item], parameter ndingexception + fullyqualifiederrorid : scriptblock

rdf - STRAFTER SPARQL 1.1 function in Virtuoso -

does strafter sparql 1.1 work in virtuoso (version 6.04 june 2012 build)? trying prefix qb: <http://purl.org/linked-data/cube#> prefix iodp: <http://data.oceandrilling.org/core/1/> prefix sdmx-dimension: <http://purl.org/linked-data/sdmx/2009/dimension#> select ?p (strafter(str(?p), "http://data.oceandrilling.org/janus/") ?pshort) <http://data.oceandrilling.org/janus/> { <http://data.oceandrilling.org/janus/ngr_section201_1226> qb:observation ?observation . ?observation ?p ?o . filter (regex(?p, "janus")) . filter (!regex(?p, "leg")) . filter (!regex(?p, "site")) . filter (datatype(?o) = <http://www.w3.org/2001/xmlschema#decimal>) . } at http://data.oceandrilling.org/sparql throws sparql compile error. no not support straft, need build 6.1.5 see release notes .

android - notifyDataSetChanged() not working with custom adapter -

i making edit on list of custom objects, notifydatasetchanged() not updating list. setup: fragment displaying list of states. state edited in dialog fragment , applydialogstate() called on edit action. void applydialogstateedit(int id, string name) { // apply stateeditdialog fragment edits directly mstates state state = mstates.get(id); state.name = name; // write state change saves getactivity().getsharedpreferences("mystates", context.mode_private).edit(). putstring(state.date, mgson.tojson(state)).commit(); mstateadapter.notifydatasetchanged(); } things have looked at: i confirmed method called. sharedpreferences updated - changes visible once activity reloaded. there doesn't seem reference problem. after notifydatasetchanged() called, see debugger internal state list in custom adapter correspond mstates updated correctly... in other case notifydatasetchanged() working... i.e. pub

asp.net - Failed to connect to server in ssis integrationservices in C# upon deployment -

Image
i have code var connectionstring = "data source=" + servername + ";initial catalog=" + databasename + ";integrated security=true"; var connection = new sqlconnection(connectionstring); var integrationservices = new integrationservices(connection); // error here. failed connect server. var package = integrationservices .catalogs["ssisdb"] .folders["myfolder"] .projects["myproject"] .packages["mypackage.dtsx"]; long executionidentifier = package.execute(true, null); executionoperation eo = integrationservices.catalogs["ssisdb"].executions[executionidentifier]; while(!eo.completed) { eo.refresh(); system.threading.thread.sleep(5000); } during development, no error encountered when web deploy it, error occ

python - Accounting for Leap year in simple math based program -

this question has answer here: python question: year , day of year date? 3 answers basically whenever user gives number of days example 10 , starting year 2008 convert days , add years still 2008, how account leap year? example if enter 848 2008 should 2010 2011. far have: def year_checker(days, year): convert = days // 365 year = year + convert return year this question different because messes when trying find days between 2 leap years. https://support.microsoft.com/en-us/kb/214019 this article tells how calculate leap years. implement formula , check leap years, subtract 366 every leap year encountered. hope helps now. improve answer sample code later.

Twitter API Limitation for my Android App -

i working on new android app displays current trending topics , picture popular social media such twitter. however, ran problem several times "rate limit exceeded" the idea of app when ever screen initiated, twitter authorization established , results. if user initiated screen multiple times, he/she error. or if many users used app , initiated screen @ same time, multiple authorization calls established , error eventually. is there work around solve problem? need establish authorization each time user initiate screen?

java - How to understand PriorityQueue? -

Image
this question has answer here: the built-in iterator java's priorityqueue not traverse data structure in particular order. why? 4 answers here code import java.util.*; public class prioritypuzzle{ public static void main(string []args){ priorityqueue<integer> prq = new priorityqueue<integer>(); ( int = 10; > 0; i-- ){ prq.add (i); system.out.print(i+" , "); } system.out.println ( "\n initial priority queue values are: "+ prq); } } result i donnot know why after priority queue become {1,2,5,4,3,9,6,10,7,8} the tostring() method priorityqueue inherits the 1 abstractcollection . iterates on items in collection , prints them. from docs for iterator of priorityqueue : the iterator provid

c# - How to check if SQL Server Management Studio is installed on a system programmatically? -

i need find whether sql server management studio installed on system or not. need specially when instance of sql server express installed on system installing visual studio no management studio installed on system. for more information, can find instances of sql server installed on system need understand management studio installed on system or not. you can check registry key , see if returns null: private registrykey _regsql = registry.localmachine.opensubkey (@"hklm\software\classes\applications\sqlwb.exe", false); if (_regsql == null) //if it's null sql server management not installed { //do } also 2 more registry locations can check: hklm\software\microsoft\microsoft sql server\ssmsee software\microsoft\microsoft sql server\90\tools\clientsetup edit according this documents , while using address software\microsoft\microsoft sql server\90\tools\clientsetup change the number part (90) based on versions want check: 90 | sql

javascript - Bootstrap: Form submit not working in modal box -

below model box , using login. when click on button(both) page reload self. checked in firebug , found this. localhost\index.php?submit=login <div class="modal fade" id="loginmodal" tabindex="-1" role="dialog" aria-labelledby="loginmodallabel" aria-hidden="true"> <div class="modal-dialog"> <form method="post" id="login" name="login" action="login_exec.php" role="form"> <div class="modal-content login-modal"> <div class="modal-header login-modal-header"> <button type="button" class="close" data-dismiss="modal" aria-label="close"><span aria-hidden="true">&times;</span> </button> <font color="#288dcb"><h3 class="modal-titles text-center" i

java - Consequences of creating a large fixed thread pool -

i'm working on standard server application. processing of each request broken down several stages (the second stage requires first finished, , on). now, 1 of these stages takes rather long time can broken down several dozen or tasks, not depend on each other, , hence parallelizable. add thread pool slowstageservice , , wondering how best size it. best thread pool have @ least 1 vacancy of time, implies must process tasks fast or faster server receiving requests; yields reasonable lower bound on size of thread pool. however, generous sizing, since many of numbers involved in calculation change. so question is: downside of making pool large (say factor of 3 or 4), , having many idle threads? understand wastes resources, doesn't reserve cpu , make thereby unavailable other requests, right? how slack in practice 1 can have? i've calculated 6 threads minimum need; safe go 12 on 24-core box under medium load? as i'm writing this, sounds maybe need threadpool

Permissions for git project when using on remote server -

these commands i've ran on server: $ whoami git $ ls -l drwxr-xr-x 3 git git 4096 jan 16 05:48 git $ ls -l git/ total 4 drwxrwxr-x 7 git git 4096 jan 16 05:55 tpro.git then on local machine: $ git remote add origin git@gitserver:/opt/git/t.git then when want push server local machine have following error: $ git push -u origin master fatal: '/opt/git/t.git' not appear git repository fatal: not read remote repository. please make sure have correct access rights , repository exists. you mention tpro.git trying access t.git . make sure path exists. , make sure tpro.git indeed in /opt/git (not /home/git ) then try: git remote set-url origin git@gitserver:/opt/git/tpro.git, git push -u origin master that ensure master pushing origin/master every time, simple git push .

android cts: Why does package run fail but individual tests pass? -

i'm hitting failures when running cts-tf > run cts --package android.holo but when run failed tests individually, like cts-tf > run cts --class android.holo.cts.holotest --method testholowallpapernotitlebar they pass. without knowing internals, i'd expect failed package test fail individual test. if there dependency on previous test, if failed individual test. is cts timing issue, expected holo, or else? if understand it, please enlighten me, i'm new cts . thanks. holo test cases screen resolution of device under test. can ask google wave-off on these tests if running tests on mobile. as per previous answer, there chance previous set of test cases causing issues leading failures of holo tests (but doubt this)

.net - Redirecting the whole site to HTTPS in ASP.net application -

i have done project using asp.net , ready go live. management has decided use ssl reasons , hence site should load in https since project quite big, , pain full check url , redirect https in pages, there simple way can handle globally or in master pages ? so, if website url typed http, should redirected https site. how can achieve ? help needed. if don't want control per iis nate suggested, can redirection in global.asax : void application_beginrequest(object sender, eventargs e) { if (request.url.scheme != "https") response.redirect("https://yoursite.com"); } may not witty solution, job.

android - How to change color of toolbar options background -

Image
i want change light background of options in toolbar section appears when trying copy something. it's bad right now: here styles.xml : <?xml version="1.0" encoding="utf-8" ?> <resources> <style name="mytheme.base" parent="theme.appcompat.light.noactionbar"> !-- customizations not specific particular api-level can go here. --> <item name="windownotitle">true</item> <item name="colorprimary">@color/primary</item> <item name="colorprimarydark">@color/primary_dark</item> <item name="coloraccent">@color/accent</item> <item name="android:textcolorprimary">@color/primary_text</item> <item name="android:textcolorsecondary">@color/secondary_text</item> </style> <!-- application theme. --> <style name="mytheme" parent="myth

java - why this code runs out of order -

this code , gave inputs follows, removed step of giving actual output value user, calculated in code, still same thing happens "1" 1st input "0.5" 1st inputs weight "0" second input "0.6" weight "0" desired output "0.002" defined value "0.23" learning rate. package neural4copy; import java.util.scanner; import java.lang.math; public class demo { // inputs declared private int x[][]=new int[1][2]; //weights declared private double w[][]=new double[1][2]; private double temp; private double z[]=new double[1]; private double desiredoutput; private double actualoutput; private double error; private double definedvalue=0.004; private double weightchange[][]=new double[1][2]; private double learningrate; private double epilision=0.000000001; private static double ztotal; private scanner user_input= new scanner(system.in); public void getdata(){

ember.js - When is filtering in Ember performed? -

this route model: // routes/filter-categories.js import ember 'ember'; export default ember.route.extend({ model() { this.store.findall('product'); var products = this.store.filter('products', function (product) { console.log('filtering product %o', product.get('id')); ... }); return products; }, }); basically, need al products when enter filter-categories route, , need perform client-side filtering on products. taking @ console log, first time visit filter-categories route, see following: filtering product "101" filtering product "102" filtering product "103" ... filtering product "101" ... filtering product "101" ... filtering product "101" ... each product gets filtered 4 times on first entering (the order of processing products not deterministic). expecting each product gets filtered once! from here o

php - Sum values with a check box/radio button -

Image
i have database table of values 1 of columns displays cost of each asset. i'm trying add checkboxes side of each of costs, can select values want , display averages , sum. for example: here sample html , js code should solve problem.... html blow <table width="100%" border="1"> <tr><th>cost</th><th>action</th></tr> <tr> <td>30</td> <td><input type="checkbox" class="check_list" val="30"/></td> </tr> <tr> <td>20</td> <td><input type="checkbox" class="check_list" val="20"/></td> </tr> <tr> <td>25</td> <td><input type="checkbox" class="check_list&quo

css - How to make responsive RTL list? -

i have list of links, looks like: <ul> <li><a href="#">link 1</a></li> <li><a href="#">link 2</a></li> <li><a href="#">link 3</a></li> <li><a href="#">link 4</a></li> <li><a href="#">link 5</a></li> <li><a href="#">link 6</a></li> </ul> and list should 2 colums 3 rows, , list should responsive @ left side of page (in right side have responsive banner). also, content has rtl. , link rtl too. you can use css3 make list in 2 columns. this: html: <ul> <li><a href="#">link 1</a></li> <li><a href="#">link 2</a></li> <li><a href="#">link 3</a></li> <li><a href="#">link 4</a></li> <li><a href="#">l

ios - Clicking on NSURL in a UITextView -

Image
i have uitextview spans 100.0 points across uiview . in uitextview , have links captured following function: - (bool) textview:(uitextview *)textview shouldinteractwithurl:(nsurl *)url inrange:(nsrange)characterrange this works great capture characters have 1 problem: if link last characters in text view, tap pressed way across line. so if have text view following text @test link: // entire remainder of line link (all white space after @test) hello @test how fix this? for me highlights link... missing something? update: here's hacky solution via dummy url's: - (void)viewwillappear:(bool)animated { [super viewwillappear:animated]; nsmutableattributedstring* attributedstring = [[nsmutableattributedstring alloc] init]; [attributedstring appendattributedstring:[[nsattributedstring alloc] initwithstring:@"lorem ipsum dolor sit amet, vim iuvaret blandit intellegebat ut. solet diceret interpretaris eos cu, magna dicat explicari mei ex

save image in database using codeigniter -

i want combine image along other data idnumber, name, , etc. i'm still confuse how can save folder , database cant show it class addstudent extends ci_controller { function indexes(){ if($this->session->userdata('logged_in')) { $session_data = $this->session->userdata('logged_in'); $data['username'] = $session_data['username']; $this->load->view('addstudentinformation',$data); } else{ redirect('welcome', 'refresh'); } if((!isset($session_data) || $session_data !=true)) { redirect('welcome', 'refresh'); } } function do_upload(){ $config['upload_path'] = './uploads/'; $config['allowed_types'] = 'gif|jpg|png|jpeg'; $config['overwrite'] = true; $config['remove_spaces'] = true; $config['max_si

javascript - How to combine two arrays as a cartesian product? -

i have array1 = [1,2,3,4,5]; array2 = ["one","two","three","four","five"]; i want array3 elements of array1 first (and others) element of array2 , etc. for example: array3 = ["one 1", "two 1", "three 1", "four 1", "five 1", "one 2", "two 2", "three 2", "four 2", "five 2"...] i understand need use loop don't know how it. you can use 2 for-loops: var array1 = [1,2,3,4,5]; var array2 = ["one","two","three","four","five"]; var array3 = []; (var = 0; < array1.length; i++) { (var j = 0; j < array2.length; j++) { array3.push(array2[j] + ' ' + array1[i]); } } console.log(array3);

javascript - Select a div if it contains all specified elements -

i'm attempting select .item div contains both tagone , tagtwo span elements. my div structure follows: <div id="items"> <div id="block1" class="item"> <span class="tagone tag">one</span> <span class="tagtwo tag">two</span> </div> <div id="block2" class="item"> <span class="tagone tag">java</span> </div> </div> using following jquery i'm able locate tags (with parent div 's) separately. var blocks = $('#items .item'); blocks.filter('.item').find('[class*="tagone"]').parent(); blocks.filter('.item').find('[class*="tagtwo"]').parent(); however, once try combine them narrow down 1 div contains them both , no results , can't seem work out why! blocks.filter('.item').find('[class*="tag

ruby on rails - Seeding fails: "field can't be blank" but I'm seeding with a value -

i have required field article table: t.string :article_type, null: false and in model: validates :article_type, presence: true enum article_type: [ :type1, :type2, :type3, :type4, :type5 ] in seeds have: books = book.all books.each |book| title = faker::lorem.sentence(3) article_type = ["type1", "type2", "type3", "type4", "type5"].sample book.articles.create!( title: title, article_type: article_type ) end problem: create line produces error: activerecord::recordinvalid: validation failed: article type can't blank . causing this? (i can confirm .sample line works , picks 1 of 5 types) update: if change article_type string integer, works. should do? because isn't integer, it...? rails enum expects corresponding db column integer, yours string. so either change integer or substitute enum value validation.

php - Laravel 5.2 composer update error -

is composer update error today? here error: when run composer update got this php artisan clear-compiled [pdoexception] sqlstate[hy000] [2002] no such file or directory script php artisan clear-compiled handling pre-update-cmd event returned error [runtimeexception] error output: update [--prefer-source] [--prefer-dist] [--dry-run] [--dev] [--no-dev] [--lock] [--no-plugins] [--no-custom-installers] [--no-autoloader] [--no-scripts] [--no-progress] [--with-dependencies] [-v|vv|vvv|--verbose] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--ignore-platform-reqs] [--prefer-stable] [--prefer-lowest] [-i|--interactive] [--] []... also php artisan command doesn't work, too.

ios - Compare dictionary keys with array to extract matching and non matching data -

i trying retrieve facebook friends list , display user if following users or not. using facebookid's stored on parse backend , when user clicks on follow button, add facebookid key value "following" in parse. later retrieve following key array , display user currentuser following or not following. my friend list: var friend = ["902165525": "john", "10204125099": "sam", "153822": "sandy", "475585616": "nito"] i following: var follow = ["10204125099", "153822"] now want extract friend array can see friends "not following" i.e else block. wanttogetthis -> ["902165525": "john", "475585616": "nito"] what have is, func check() { in self.follow { (key, value) in friend { if key.containsstring(all) { print("yes: \(key), \(value)") } else

ipc - Passing data from child to parent after exec in Perl -

i call perl program child.pl in perl program parent.pl , , hope pass data child.pl parent.pl , print these data parent.pl . system("perl child.pl") may not work, since parent.pl nothing until child.pl completes. read the online doc of perlipc , seems pipe() , fork() match of needs, failed find method pass data child process parent after exec . here's code of parent.pl : #!/usr/bin/perl -w pipe(from_child, to_parent); $pid = fork(); if ($pid == 0) { # we're in child process. close(from_child); # send data parent. print to_parent "hello, parent\n"; # can pass data parent before exec exec("perl child.pl"); # how should after exec, in child.pl? exit(0); # terminate child. } elsif (undef $pid) { print "not defined: means error."; } else { # parent process. close(to_parent); $data = <from_child>; print "from child: $data\n";

php - App crashed when save button is clicked -

Image
i wonder possible update image path , image in folder ? i've been stored image path , text mysql android, , save image in directory. php upload image <?php if( $_server['request_method']=='post' ){ if( !empty( $_post['listitems'] ) ){ $listitems = json_decode( $_post['listitems'], true ); $mysqli = new mysqli("127.0.0.1:3307", "root", "", "androiddb"); if( $mysqli->connect_errno ) echo "failed connect mysql"; $sql="insert `staff_benefit` ( `type`, `amount`, `description`, `image`, `ts_id` ) values ( ?, ?, ?, ?, ? )"; if($stmt=$mysqli->prepare($sql )){ $url="http://192.168.1.7:80/android/crud/photoupload/"; foreach( $listitems $item ){ $id = uniqid(); $image_name = $id."

ios - ValueForKeyPath is not work how to fix it? -

animal class definition: @property (nonatomic, strong) nsstring *food; cat class definition: @property (nonatomic, copy) nsstring *name; @property (nonatomic, copy) nsdata *birthday; @property (nonatomic, strong) animal *animal; in main.m file: [cat setvalue:@"fish" forkeypath:@"animal.food"]; nslog(@"cat eat: %@", [cat valueforkeypath:@"animal.food"]); result: 2016-01-16 19:31:33.811 usage of kvc , kvo[6802:201576] cat eat: (null) why null ? thanks i've found problem.add following code can sovled. :) [cat setvalue:[[animal alloc]init] forkeypath:@"animal"];

listview - C# Copy/Move item from listview1 to listview2 with quantity -

i know how copy double-click item listview1 listview2 , far had using code on listview1 mouse double click event. foreach (listviewitem item in lvitemlist.selecteditems) { lvitembuy.items.add((listviewitem)item.clone()); } when double click on item copy selected item listview2 , anyway not want..lets in listview1 got item: id | itemname | quantity 1 | item1 | 100 what want everytime double-click on item on listview1 , quantity should decrease 1, on listview1: id | itemname | quantity 1 | item1 | 99 then added selected item listview2 1 quantity this: id | itemname | quantity 1 | item1 | 1 after double click again on same item, same thing on listview1 dont want duplicate item on listview2 . +1 quantity. there way this? there many ways this. can introduce id's listviewitems. don't close listviewitem direct, instead write method copies properties first listviewitem second one. in method can

JQuery fails to render to page, but no errors -

i'm using jquery modify , replace following html <div class="weather-feed"> <img src="http://l.yimg.com/a/i/us/we/52/32.gif"/><br /> <b>current conditions:</b><br /> sunny, 17 c<br /> <br /><b>forecast:</b><br /> wed - sunny. high: 27 low: 14<br /> thu - sunny. high: 25 low: 14<br /> fri - partly cloudy. high: 26 low: 15<br /> sat - partly cloudy. high: 27 low: 17<br /> sun - partly cloudy. high: 28 low: 17<br /> <br /> <a href="http://us.rd.yahoo.com/dailynews/rss/weather/pretoria__sf/*http://weather.yahoo.com/forecast/sfxx0044_c.html">full forecast @ yahoo! weather</a><br/><br/> (provided <a href="http://www.weather.com" >the weather channel</a>)<br/> </div> this code retrieved onto page (into div specifically) through php session. div th

html5 - How to get a canvas element with JQuery? -

i've read: canvas - use [] var canvas = $("#canvas1")[0]; var x = canvas.getcontext("2d"); x.fillrect(50, 40, 55, 55); /*var d = $("#div1"); d.css("background-color", "blue");*/ why can element, e. g. <div> id, if want canvas, must use [0] ? not work without.

java - Testing playframework 2.4 with spring-data injection out of Eclipse Scala IDE -

i want learn , try set project using play framework 2.4 java spring data eclipse ide i took 'my inspiration' from play-scala-spring-data-jpa showing how load spring data via guice. multiproject showing sub-project configuration (as use @ least 2 applications have common code base, should packaged separately, able deployed different machines) i managed activator run first sub-project, java-port of play-scala-spring-data-jpa . injection magic spring data works provided example ( models.personrepository ) should. now i'm stuck when comes testing. can't manage set test class , inject models.personrepository , when want load , test controller class (e.g. functional test of controllers.application ), but when running test(s) of sub-project core out of eclipse ide ( core eclipse project created executing activator eclipse ). doing activator test works , test shown below runs successfully. public class applicationtest extends withapplication {

javascript - Controlling HTML overflow/visibility -

i'm developing site bootstrap 3 column design, pagination controls need obey following constraints: fit in middle column. remain single line without wrapping multiple lines. be responsive. don't need "full"/"fluid" col-xs col-xl responsive, fluid above col-md , can implement alternative col-xs , col-sm. i'm utterly unable work out how can damn thing behave @ all. the 'base' sort of this: .pagination-button { font-size: 2em; } <!-- bootstrap core css --> <link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css" rel="stylesheet"> <!-- mdb core css --> <link href="http://mdbootstrap.com/mdbcdn/mdb.min.css" rel="stylesheet"> <!-- font awesome --> <link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.4.0/css/font-awesome.min.css" rel="stylesheet"> <!-- jquery --> <script type="