Posts

Showing posts from February, 2013

jquery - How to split string containing comma using span tag -

there string containing tags separated comma: <div class="article" id="1"> <span class="tags">dog, cat, bird, pig</span> </div> <div class="article" id="2"> <span class="tags">asia, africa, australia, europe</span> </div> .... i wrap each item using span tag within tags class each of them can individually styled this <span class="tags"><span>dog</span><span>cat<span>...</span> $('.tags').html($('.tags').html().split(', ').map(function(el) {return '<span>' + el + '</span>'})) fiddle here

javascript - JS Function executing too fast -

i'm doing json call this: var desc = getitemdescriptions(xxx); function getitemdescriptions(xxx) { var url = "xxx; var info = {}; request({ url: url, json: true }, function (error, response, body) { if (!error && response.statuscode === 200) { info ["..."] = body.result[xxx].yyy; info ["..."] = body.result[xxx].yyy; info ["..."] = body.result[xxx].yyy; info ["..."] = body.result[xxx].yyy; info ["..."] = body.result[xxx].yyy; } }) return info; } my problem is, json request need time response back... , function doesn't wait response. function returns empty array without waiting. how can wait response , return filled array? thx its not executing fast, way javascript runs statement after statement. data need in success callback function, data available when server response comes asynchronous call time response comes javascript executes next statemen

java - Restlet conditional routing to different resources -

i have post request assign different resources depending on body content. if body contains non empty token : "token":"1q2w3e4r5t" rout request tokenedresource, otherwise rout nontokenresource . i thought using filter ( @beforehandle ) it, indication filter returns continue or stop ... any suggestions? to need extend restlet routing. latter responsible determine route matches particular request basing on computed score. in particular routing involves 2 classes need override: router , templateroute . router 1 responsible of creation of template route. if want provide custom template route, need provide custom router. within custom template route, implement own algorithm regarding route score. here implementation of custom router: public class customrouter extends internalrouter { public customrouter(context context) { super(context); setfinderclass(customfinder.class); } protected templateroute createroute(st

html - Putting OGP tags, it occurs 'The 'og:type' property is required, but not present.' -

i'm putting ogp tags on website below. http://en.come-to.tokyo/ every time check on facebook debugger here, same error come up. "the 'og:type' property required, not present." though og:type there, how can it? in advance. you need fix html errors, following lines include semicolon should not there: <meta property="og:url" content="http://en.come-to.tokyo"; /> <meta property="og:image" content="http://en.come-to.tokyo/images/logo-movie-bg.png"; /> correct: <meta property="og:url" content="http://en.come-to.tokyo" /> <meta property="og:image" content="http://en.come-to.tokyo/images/logo-movie-bg.png" /> you should consider using larger image og:image , check out docs specifications: https://developers.facebook.com/docs/sharing/best-practices#images

javascript - ensure all prerequisite components in .js file // example page malfunction -

i tried setup basic index.html page, seems it's broken. i can't find questions people had similar issue. the page renders looking if it's merely ill-formatted html. maybe have include additional libraries? link in different way? in this question alvaro, createur, himself seems much, doesn't specify how. thus far i've directly copied example this video not working, switched , implemeted demo page , still no improvement. see my site maybe indication of problem. is there prerequisite need install make file work in this way : <head> <meta http-equiv="content-type" content="text/html; charset=utf-8" /> <title>fullpage.js 1 page scroll sites</title> <meta name="author" content="alvaro trigo lopez" /> <meta name="description" content="fullpage plugin alvaro trigo. create fullscreen pages fast , simple. 1 page scroll iphone website." />

css - Expand table background-color inside div -

i have table inside div. code: https://jsfiddle.net/2cg29xlc/ html <div> <table> <thead> <!-- example 2 columns --> <tr> <th>col1</th> <th>col2</th> </tr> </thead> <tbody> <tr> <td>foo</td> <td>this</td> </tr> <tr> <td>bar</td> <td>that</td> </tr> </tbody> </table> css div { width: 99%; } table { border-top: 2px solid #000; border-bottom: 2px solid #000; } thead tr:nth-child(odd) { background-color: #ffc0cb; } tbody tr:nth-child(even) { background-color: #ffc0cb; } my situation: want expand table's background-color , border match div's width. this: https://jsfiddle.net/2cg29xlc/7/ my headache: can't set table's width: 99% because de

bash - Removing specific strings from strings in a file -

i want remove specific fields in strings in semi-colon delimited file. the file looks :- texta1;texta2;texta3;texta4;texta5;texta6;texta7 textb1;textb2;textb3;textb4;textb5;textb6;textb7 textc1;textc2;textc3;textc4;textc5;textc6;textc7 i remove positions 2, 5 , 7 strings in file. desired output :- texta1;texta3;texta4;texta6 textb1;textb3;textb4;textb6 textc1;textc3;textc4;textc6 i trying write small shell script using 'awk' code not working expected. still seeing semicolons in between & @ end not being removed. (note- able 'sed' file has several hundred thousands of records & sed code taking lot of time) could please provide on ? in advance. most cut : cut -d \; -f 1,3-4,6,8- filename or cut -d \; -f 2,5,7 --complement filename i think --complement gnu-specific, though. 8- in first example not necessary file 7 columns; include columns eighth forward if existed. included because doesn't hurt , provides more general solu

java - Not Always Showing Wait Cursor on Mac -

i implementing "load file" functionality in java application - file might on network share can take little while read. once user has selected file load, changing mouse cursor cursor.wait_cursor . works fine on windows, getting strange results on both java 7u75 , 8u45 on mac os 10.9.5. have tried changing cursor on both jframe component glasspane , seeing same results. basically, on mac os, if mouse interacts jfilechooser in way cursor isn't changed, if use keyboard select file works expected , cursor changed. this looks bit bug like, lookig wisdom might have come across before , conquered it? have put sscce below demonstrate problem. import java.awt.*; import java.awt.event.*; import javax.swing.*; public class sscce extends jframe implements actionlistener { private final sscce t = this; private component gp = getrootpane().getglasspane(); private jmenubar mbar; private jmenu mfile; private jmenuitem miload; public sscce() { settitle("s

spring - Disable csrf using Java configuration -

good day, i trying learn spring. doing guide: http://spring.io/guides/gs/consuming-rest/ i have followed instructions, however, when try run application, 403 forbidden displayed. i searched net , found out due csrf protection. , so, proceeded search net how disable csrf. here java configuration: @enablewebsecurity public class websecurityconfig extends websecurityconfigureradapter { @override protected void configure(httpsecurity http) throws exception { http .csrf().disable(); } } my question is, how use configuration? specifically, @ part of code should insert it? here other 2 classes stated in tutorial. of them belong same package (hello). @jsonignoreproperties(ignoreunknown = true) public class page { private string name; private string about; private string phone; private string website; public string getname() { return name; } public string getabout() { return about; } public

c# - Can this approach to code separation in MVC be improved? -

firstly not professional programmer , learning c#, mvc , web development. much of describe here self taught , comes lots of googling , posts on stack overflow. have adopted approach outlined in mike brind's recent blog post question: can of more experience me critically @ approach , let me know if there better ways or improvements can make? cant think there better way implement service layer there seem lot of replicated code. my code snippets vehicleworksrequest model i start model reflects entity contained in database. using system; using system.componentmodel.dataannotations; using system.componentmodel.dataannotations.schema; using system.web; namespace atas.models { public class vehicleworkrequest : icontrollerhooks { [key] public int requestid { get; set; } public bool closed { get; set; } public bool critical { get; set; } [display(name = "fleet number")] public int? vehicleid { get; set; }

wpftoolkit - Extended Wpf Toolkit: TableView.Theme broken in version 2.4? -

having installed "extended wpf toolkit" (community edition) via nuget in visual studio 2013 professional in project, update attempt current version 2.4 causing system.windows.markup.xamlparseexception @ runtime same code worked in version 2.3 here. as turned out, exception being caused xcdg:tableview theme property assignment, see repro sample pasted below. and removing assignment cure symptom. since unable find on issue in web, actual question whether there way apply datagridcontrol / tableview themes "extended wpf toolkit" community edition version 2.4? the following simplified version reproduces issue me in mainwindow.xaml of "test" project after having installed current version 2.4 of extended wpf toolkit via nuget , starting via f5 key: <window x:class="testxceed24.mainwindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xa

c++ - Correct function signature template for member function -

following on question asked, there might unnecessary stuff in there example small, want (and of course if can think of other cool ways this, please share thoughts), allow user activate non virtual non interface correlating child method using specific type (please, let's concentrate on how , not why :) ). my last error concerns member function signature , not selection actually, can't figure how allow perfect forwarding, i've tried current solution can never work(copies), , i've tried transfer args_t&& , forward, did not work either, suggestions on how transfer member function correctly? suspect activate function defenition wrong one... i've added code demonstrates compilation error, can change activate args_t input parameter args_t&& , forward(args)... see second... thanks. struct type { enum value { one, 2 }; }; struct {}; template<typename type_t, typename r, typename... args_t> auto activate(r (type_t::*

javascript - Sticky menu quickly jump to the top while header is not fully hidden or scroll to top -

i trying create sticky navigation using jquery. navigation jump top while header not yet hidden or scrolled top. want header scrolled top before navigation stick position. question: how can make navigation stick position after header flow hidden top after scrolling? this jsfiddle link http://jsfiddle.net/rodgefhi/577br99o/ illustration. this code <style type="text/css"> .clearer { clear: both; margin: 0; padding: 0; } .header { width: 84%; margin: 0 auto; } .dummy-content { width: 10%; margin: auto; } .fixed { position: fixed; top: 0; } .nav-placeholder { width: 84%; margin: 0 auto; background: transparent; height: auto; } nav { width: 84%; background: red; } nav ul li { list-style: none; float: left; padding: 10px; text-align:

angularjs - How do I integrate Auth0 with my Supersonic (Appgyver) hybrid app? -

i'm attempting build first hybrid mobile app using supersonic . want use auth0 handle app login feature. how can accomplish this? it seems there (and should) way given auth0's support cordova, phonegap, , ionic. i'm using supersonic's default angularjs framework. you can follow ionic guide since it'll work supersonic (cordova + angular = ionic || supersonic :)). https://auth0.com/docs/native-platforms/ionic did not work in way? cheers!

Need a expression to pass as parameter in c# -

i using external dll reference. when try consume method asking expression parameter filter results. its expecting type follows expression<func<template, bool>> type parameter. the template type has name , group id properties. i trying create expression check if object equal group id , if name contains in list of items follows. expression<func<template, bool>> filtertemplatesdestination = tmplt => stselectedtemplates.contains(tmplt.name) && tmplt.templategroupid == stdestgroupid; but when assign expression method getting exception. if use group id filter work fine. expression throwing exception when use condition check if name exists in condition. i guess nullreferenceexception, don't see other possible exception in code. try this: expression<func<template, bool>> filtertemplatesdestination = tmplt => (stselectedtemplates!= null && tmplt.name!=null && stselectedtempla

Dictionary of swift classes with strings -

i have class identity , dictionary of instances of them strings keys. want access 1 of instances string , change of properties. i'm trying use switch statement access instances in dictionary depending on value of string. class identity { let provider: string let uid: string? let token: string? let name: string? init(provider: string){ self.provider = provider self.uid = nil self.token = nil self.name = nil } } var identities = [string:identity]() identities["twitter"] = identity(provider: "twitter") identities["twitter"].uid = "131241241241" identities["twitter"].name = "@freedrull" let provider: string = "twitter" var i: identity? { switch provider { case "twitter": return identities["twitter"] identity? case "facebook": return identities["facebook"] identity? case "so

c# - How do I store my numbers into an array? -

in code, trying generate 5 numbers. if of numbers equal 4, want store 4 array. i'm having trouble , code not store 4 array. static void main() { random rand = new random(); int total = 0, randint; console.writeline("the computer rolling dice..."); int[] fours = new int[total]; (int = 0; < 5; i++) { randint = rand.next(10); console.writeline("the computer rolls {0:f0}", randint); if (randint == 4) { total +=fours[i]; //here trying store 4 array of 'fours'. } } console.writeline(total); //this prints 0, regardless of 4's random number generator has generated. want print out how many 4's have rolled. console.readline(); } this: total +=fours[i] will attempt increment total int found @ index i of array (which 0, because int defaults 0). this: fours[i] = 4; is ho

android - AlarmManager not creating an alarm -

i'm attempting add "reminders" functionality app. want set alarmmanager , fire notification when alarm happens. i've added few methods create alarm, cancel alarm, , see if alarm active. the following code in settings.class extends activity : private boolean getremindersenabled() { return (pendingintent.getbroadcast(this, 1, new intent(this, main.class), pendingintent.flag_no_create) != null); } private void enablereminders() { alarmmanager alarmmgr; pendingintent alarmintent; alarmmgr = (alarmmanager)getsystemservice(context.alarm_service); intent intent = new intent(this, main.class); alarmintent = pendingintent.getbroadcast(this, 0, intent, 0); calendar calendar = calendar.getinstance(); calendar.settimeinmillis(system.currenttimemillis()); calendar.set(calendar.hour_of_day, mdaystart); calendar.set(calendar.minute, 0); alarmmgr.setrepeating(alarmmanager.rtc_wakeup, cal

arp - Bash script to check if router's IP to mac address has changed from a computer -

i'm trying create script check if router's ip mac address has changed view of computer. trying check if mitm attack taking place. cannot work; ip 172.16.213.254 gateway ip. arp -a 172.16.213.254 | cut -d" " -f 4 >> routersmac.txt if [[ cat routersmac.txt = "00:01:32:23:23:23"]] echo "you safe" else echo "mitm in progress" fi simplifying: arp -a 172.16.213.254 | awk '{if ("00:01:32:23:23:23"==$4) print "ok"; else print "bad"}'

postgresql - How to lookup id values in groups of rows of the same dataset using analytic window SQL function -

--dataset name: jobs week date job_id ---------------------- wk1 01/15 300 wk1 01/15 301 wk1 01/15 302 wk2 01/22 300 wk2 01/22 302 wk2 01/22 303 wk2 01/22 304 wk3 01/29 302 wk3 01/29 304 wk3 01/29 305 i have dataset above. want create 3 additional columns namely: is_job_id_present_in_wk1 is_job_id_present_in_wk2 is_job_id_present_in_wk3 i want write sql query marks each row 1 or 0 each of 3 new columns. don't want use self join. make use of analytic window function. for example, first row in given dataset, values is_job_id_present_in_wk1, is_job_id_present_in_wk2 , is_job_id_present_in_wk3 1 (because job_id 300 present in 3 weeks). for second row in given dataset, values is_job_id_present_in_wk1 1, is_job_id_present_in_wk2 0 , is_job_id_present_in_wk3 0 (because job_id 301 present in week 1). tried till now: select week, date, job_id , case when job_id = first_value(cas

angularjs - Angular Datatable - Filtering or sorting with "Angular Way" deleting rows -

i reduced code smallest version error. the point is, create table, angular way, empty array table rows. after that, fetch data, , add same array (with angular.copy) even though correctly added table itself, if click on column title sort it, or try filter typing in input box, table deletes rows. could problem $digest or $apply? i've created codepen reproduce codepen html <table datatable="" dt-options="datatable.dtoptions" dt-column-defs="datatable.dtcolumndefs"> <thead> <tr><th></th><th>id</th><th>comuna</th><th>proyecto</th></tr> </thead> <tbody> <tr ng-repeat="doc in json"> <td>a</td> <td>b</td> <td>c</td> <td>d</td> </tr> </tbody> </table> javascript $scope.json = []; $scope.lo

c - Difficulties with understanding reallocating using malloc -

i trying increase size of collection structure using malloc instead of realloc . i'm afraid i've made mistakes while assigning variables because i'm getting: malloc: *** error object 0x7fd46b404ac8: pointer being freed not allocated i appreciate if give me helpful hint. void increasecollectionsize(){ collection.size = (collection.size + 1) * reallocate_modifier; char **increasedcollection = malloc(sizeof(char *) * collection.size); char **increasedhead = increasedcollection; for(int = 0; < collection.numberofwords; i++){ *increasedcollection = *collection.words; increasedcollection++; collection.words++; } free(collection.words); // i'm getting error here. collection.words = increasedhead; } typedef struct collection{ char **words; size_t numberofwords; size_t size; } collection; cheers! you free final value of collection.words , pointer end of original memory block (due ++ in loop). void increasecollectionsiz

Aggregate NAs in R -

i'm having trouble handling nas while calculating aggregated means. please see following code: tab=data.frame(a=c(1:3,1:3), b=c(1,2,na,3,na,na)) tab b 1 1 1 2 2 2 3 3 na 4 1 3 5 2 na 6 3 na attach(tab) aggregate(b, by=list(a), data=tab, fun=mean, na.rm=true) group.1 x 1 1 2 2 2 2 3 3 nan i want na instead of nan if vector has nas i.e. want output group.1 x 1 1 2 2 2 2 3 3 na i tried using custom function: adjmean=function(x) {if(all(is.na(x))) na else mean(x,na.rm=true)} however, following error: aggregate(b, by=list(a), data=tab, fun=adjmean) error in fun(x[[1l]], ...) : unused argument (data = list(a = c(1, 2, 3, 1, 2, 3), b = c(1, 2, na, 3, na, na))) in short, if column has nas want na output instead of nan. if has few nas, should compute mean ignoring nas. any appreciated. thanks this close had, replaces mean(x, na.rm=true) custom function either computes mean of non-na values, or

php - Have a yes or no field in database? -

for form such is time known? yes or no if yes asks time input. is time flexible? yes or no if yes asks num of hours input how should form submission recorded in database? should 1 record 4 fields (2 booleans , 2 non-booleans in case) in database? or store 2 non-booleans , store field null if field has no value form? is worth having field in database yes/no submission form? if value of nonboolean field if existence of field no? the said duplicate question doesn't address question of storing booleans fields existence. discusses representation of no data in mysql db table field. in case use single coded column rather multiple booleans. i'd define codes (1=time not known, 2=time known - flexible, 3=time known - not flexible, etc.) , store short (1,2,3,..) values in database. reduce number of fields , simplify lookup in future. can use codes table store these codes reference purposes.

php - Getting More Context Around PHPUnit Test Failures -

in phpunit, let's this: $this->asserttrue( $some_variable == "foo" ); when run tests code in failing state, phpunit tells me: failed asserting false true. fine , good, , can track down why test failing. but... i'm wondering if there way phpunit display more context me when test fails. example, possible phpunit output like: failed asserting false true. when test ran $some_variable equal "bar" . allow me more track down why test failed. i'd love if see context right in cli. there setting can apply phpunit make happen? using asserttrue the asserttrue method has second parameter, can specify message assertion should throw when assertion negative: $this->asserttrue($somevariable == "foo", '$somevariable should have been "foo"') using specialized assertion functions phpunit offers myriad of specialized assertions (for equality, identity, array elements , many more), produce reasonable error messa

r - For n rows, subtract one number; then next set of n rows switch to a new number to subtract from -

i have series of readings within 1 large dataframe shown below: plate_id day well_id name x590_mean x590_sd x750_mean x750_sd 1 mcba15 001 0 spl1 water 0.196 0.003 0.145 0.004 2 mcba15 001 0 spl2 pyruvic acid methyl ester 0.202 0.001 0.143 0.000 3 mcba15 001 0 spl3 tween 40 0.214 0.036 0.158 0.026 4 mcba15 001 0 spl4 tween 80 0.196 0.000 0.144 0.002 5 mcba15 001 0 spl5 ?-cyclodextrin 0.217 0.012 0.161 0.012 ... 33 mcba15 001 1 spl1 water 0.209 0.008 0.111 0.003 34 mcba15 001 1 spl2 pyruvic acid methyl ester 0.371 0.007 0.148 0.003 35 mcba15 001 1 spl3 tween 40 0.481 0.127 0.285 0.088 36 mcba15 001 1 spl4 tween 80 0.242 0.011 0.108 0.002 37 mcba15 001 1 spl5 ?-cyclodextrin 0.277 0.002 0.138 0.001 basically, need subtract mean values ( 590 , 750 ) in water rows each plate , day rows share same variables (ie. ever

sqlalchemy - Stop random "Parent instance is not bound to a Session" -

i know simmilar questions have been answered here, thing is: i have unit tests , run okay, "parent instance not bound session" so how start debugging if happens randomly. oh, , call before error db.session.add(my_item) . how happens? starting point put breakpoint of favorite python debugger (pdb) on line exception thrown. then, when encounter error inspect application state in python debugger, step in stack frames , figure out how application ended in such state. also extensive use of python loggers , writing out debug log level messages pinpoint actual cause of error.

javascript - Making a list in HTML from value of textarea -

i need make list using javascript. what i’m trying if user clicked submit button elements in textarea making list in html. html : <body> <div class="container"> <div id="main"> <img src=""> </div> </br> <div class="box"> <h3>guest list:</h3> <textarea id="text"></textarea> </br> <button id="submit" onclick="submit()">submit</button> </div> <div class = "guestlist"> <div id="list"></div> </div> <script src="main.js"></script> </body> javascript : function submit(){ var guestname = document.getelementbyid('text'); var listdata = [guestname]; var listcontainer = document.getelementbyid('li

database - How is cache conscious B+tree stored? -

i new database , wish implement cache conscious b+tree. lot of reading suggest storing nodes , leaves continuous memory. assuming when b+tree created, nodes , leaves stored in heap, , copied disk read write operation? cache conscious b+tree tell os give set of continuous physical pages? think answer no b/c applications shouldn't know how physical pages allocated, , continuous memory referring primary memory page? the 'cache-consciousness' bit refers special discipline of page layout tries maximise utilisation of first-level data cache of cpu, optimised specific cache line size (e.g. 64 bytes). one standard technique (independent of cache line size) use offset-value coding in indirection vector, combined 'poor man's normalised keys' (e.g. typically 2 or 4 bytes of key material starting first byte not shared predecessor). reduces necessity of accessing data outside indirection vector - i.e. actual key data kept in heap elsewhere on page, , quite few

C does not go to the next line while reading .ppm -

so have .ppm file , goal read each pixel corresponding r[] g[] , b[] elements. code reads first line (idk correct or not), not go further. i'm unsure if need these getc(fp); in order skip spaces. reading each line , parsing int not option. help. int main(int argc, char** argv) { int height; int width; int max; file *fp; fp = fopen("vit_small.ppm", "r"); fscanf(fp, "%*[^\n]\n", null); fscanf(fp, "%d %d", &width, &height); printf("width %d height %d \n", width, height); fscanf(fp, "%d", &max); printf("maximum value %d \n", max); int r [height][width]; int g [height][width]; int b [height][width]; int hist [5]; int w = 0; int h = 0; char buffer [1000]; (;w<height;w++) { printf("row number %d \n", w); (;h<

Removing duplicated in mongodb not behaving as expected -

i have table in mongodb have realized has duplicated due required data parsing update based on underlying source data. due change in source, code having unexpected behavior , inserting many duplicates. the following query should return single value: db.opts.find({ $query: { ticker: "vxx", date: 20150423, callput: "p", strike: 27, maturity: 20150424 }, $orderby: { maturity: 1 } }) yet due bug in code, have multiple entries observation unfortunately. 1 of observations looks this: { "_id": objectid("55396c1c44fea47bde858c78"), "date": 20150423, "ticker": "vxx", "callput": "p", "last": 6.1, "vol": 25, "chg": 0.43, "maturity": 20150424, "symbol": "vxx150424p00027000", "open int": 809, "strike": 27, "ask": 6.1, "bid": 5.85 } now,

php - AVADA Wordpress Custom Taxonomy Sidebar -

i have custom wordpress taxonomy called 'directory-category' posts sitting in each relevant category within taxonomy. i'm using avada template hope use sidebar mechanism, i'm unable modify (successfully) code not list page ancestors, rather, listing categories within taxonomy , posts within categories. here current sidebar helper function building sidebar menu based on pages / page ancestors; $html = '<ul class="side-nav">'; $post_ancestors = get_ancestors( $post_id, 'page' ); $post_parent = end( $post_ancestors ); $html .= '<li'; if( is_page( $post_parent ) ) { $html .= ' class="current_page_item"'; } if( $post_parent ) { $html .= sprintf( '><a href="%s" title="%s">%s</a></li>', get_permalink( $post_parent ), __( 'back parent page', 'avada' ), get_the_title( $po

ios - SLComposeViewController won't set initialText for SLServiceTypeFacebook -

it seems bug in social framework, won't set initial text facebook service type. implementation using swift: let view = slcomposeviewcontroller(forservicetype: slservicetypefacebook) if view.setinitialtext("some text") { nslog("success") } else { nslog("failure") } view.addurl(nsurl(string: "https://google.ro")) self.presentviewcontroller(view, animated: true, completion: nil) what works: the url shows both, facebook , twitter the initialtext works correctly twitter what doesn't work: the initialtext won't show facebook, though code above outputs "success" update 2 it seems facebook doesn't want developers set initial text of message when sharing it's impossible sdk. in app implementing i've chosen screenshots app (uploaded images) letting user share progress on facebook. update the solution use facebook sdk ios, feature of social framework not supported facebook anymore.

css - Using flexbox to display tournament brackets -

i trying use flexbox display tournament bracket ncaa bracket. here plunk : @import "//maxcdn.bootstrapcdn.com/bootstrap/3.3.2/css/bootstrap.min.css"; .game { width: 50px; height: 20px; background-color: lightgrey; margin: 2px; } .game:after { content: 'game'; } .container { display: flex; flex-direction: column; justify-content: space-around; height: 384px; } <div class="row"> <!--round 1--> <div class="container col-sm-1"> <div class="game"></div> <div class="game"></div> <div class="game"></div> <div class="game"></div> <div class="game"></div> <div class="game"></div> <div class="game"></div> <div class="game"></div> <div class="game"></div&