CopyPastor

Detecting plagiarism made easy.

Score: 0.8028769493103027; Reported for: String similarity Open both answers

Possible Plagiarism

Plagiarized on 2019-09-14
by CopsOnRoad

Original Post

Original - Posted on 2010-06-10
by kennebec



            
Present in both answers; Present only in the new answer; Present only in the old answer;

I'm not sure if I got you properly. Try this code.

class _MyHomePageState extends State<MyHomePage> { @override Widget build(BuildContext context) { final _width = MediaQuery.of(context).size.width; final _height = MediaQuery.of(context).size.height; return Consumer<UserModel>(builder: (context, userModel, child) { return StreamBuilder<DocumentSnapshot>( stream: Firestore.instance.collection(Provider.of<UserModel>(context).uid).document(Provider.of<UserModel>(context).uid).snapshots(), builder: (context, snapshot) { if (snapshot.hasData) { return Stack( children: <Widget>[ new Container( color: Colors.blue, ), new Image.network( snapshot.data['photourl'].toString(), fit: BoxFit.fill, ), new BackdropFilter( filter: new ui.ImageFilter.blur( sigmaX: 6.0, sigmaY: 6.0, ), child: new Container( decoration: BoxDecoration( color: Colors.blue.withOpacity(0.9), borderRadius: BorderRadius.all(Radius.circular(50.0)), ), )), new Scaffold( appBar: new AppBar( title: new Text(widget.title), centerTitle: false, elevation: 0.0, backgroundColor: Colors.transparent, ), drawer: new Drawer( child: new Container(), ), backgroundColor: Colors.transparent, body: new Center( child: new Column( children: <Widget>[ new SizedBox( height: _height / 12, ), new CircleAvatar( radius: _width < _height ? _width / 4 : _height / 4, backgroundImage: NetworkImage(snapshot.data['photourl']), ), new SizedBox( height: _height / 25.0, ), new Text( snapshot.data['name'], style: new TextStyle(fontWeight: FontWeight.bold, fontSize: _width / 15, color: Colors.white), ), new Padding( padding: new EdgeInsets.only(top: _height / 30, left: _width / 8, right: _width / 8), ), new Divider( height: _height / 15, color: Colors.white, ), new Row( children: <Widget>[ rowCell(snapshot.data['totalquestions'], 'Answers'), rowCell('£ ${int.parse(snapshot.data['totalquestions']) * 2}', 'Earned'), ], ), new Divider(height: _height / 15, color: Colors.white), ], ), ), ), ], ); } else { return CircularProgressIndicator(); } }, ); }); } }
Opera, Safari, Firefox and Chrome now all share a set of enhanced Array methods for optimizing many common loops.
You may not need all of them, but they can be very useful, or would be if every browser supported them.
Mozilla Labs published the algorithms they and [WebKit][1] both use, so that you can add them yourself.
**filter** returns an array of items that satisfy some condition or test.
**every** returns true if every array member passes the test.
**some** returns true if any pass the test.
**forEach** runs a function on each array member and doesn't return anything.
**map** is like forEach, but it returns an array of the results of the operation for each element.
These methods all take a function for their first argument and have an optional second argument, which is an object whose scope you want to impose on the array members as they loop through the function.
Ignore it until you need it.
**indexOf** and **lastIndexOf** find the appropriate position of the first or last element that matches its argument exactly.
(function(){ var p, ap= Array.prototype, p2={ filter: function(fun, scope){ var L= this.length, A= [], i= 0, val; if(typeof fun== 'function'){ while(i< L){ if(i in this){ val= this[i]; if(fun.call(scope, val, i, this)){ A[A.length]= val; } } ++i; } } return A; }, every: function(fun, scope){ var L= this.length, i= 0; if(typeof fun== 'function'){ while(i<L){ if(i in this && !fun.call(scope, this[i], i, this)) return false; ++i; } return true; } return null; }, forEach: function(fun, scope){ var L= this.length, i= 0; if(typeof fun== 'function'){ while(i< L){ if(i in this){ fun.call(scope, this[i], i, this); } ++i; } } return this; }, indexOf: function(what, i){ i= i || 0; var L= this.length; while(i< L){ if(this[i]=== what) return i; ++i; } return -1; }, lastIndexOf: function(what, i){ var L= this.length; i= i || L-1; if(isNaN(i) || i>= L) i= L-1; else if(i< 0) i += L; while(i> -1){ if(this[i]=== what) return i; --i; } return -1; }, map: function(fun, scope){ var L= this.length, A= Array(this.length), i= 0, val; if(typeof fun== 'function'){ while(i< L){ if(i in this){ A[i]= fun.call(scope, this[i], i, this); } ++i; } return A; } }, some: function(fun, scope){ var i= 0, L= this.length; if(typeof fun== 'function'){ while(i<L){ if(i in this && fun.call(scope, this[i], i, this)) return true; ++i; } return false; } } } for(p in p2){ if(!ap[p]) ap[p]= p2[p]; } return true; })();
[1]: http://en.wikipedia.org/wiki/WebKit

        
Present in both answers; Present only in the new answer; Present only in the old answer;