Dima
std::string is retarded
Dima
my implementation is much more faster lol
Dima
I told you before
божн бляьь відкрий нахуй двері я галсту забув
божн бляьь відкрий нахуй двері я галсту забув
https://en.cppreference.com/w/cpp/container/array
божн бляьь відкрий нахуй двері я галсту забув
the same
Anonymous
Lol
Anonymous
It is not
Marián
божн бляьь відкрий нахуй двері я галсту забув
not actually the same
Anonymous
Google what small_vector is
Marián
Anonymous
божн бляьь відкрий нахуй двері я галсту забув
Anonymous
Marián
k, next thing, c++ file streams or fread and fopen?
Dima
imo
Dima
Dima
божн бляьь відкрий нахуй двері я галсту забув
Dima
no
Anonymous
Dima
I don’t care
Dima
use whatever you want
Anonymous
Слился
Idk how it will be in English
Dima
Anonymous
Dima
:)
Marián
lol
божн бляьь відкрий нахуй двері я галсту забув
no
i'm actually interested
Dima
there’s no link, that was my exploration lol
Marián
how are c++ file streams over fopen?
Marián
performance-wise
Dima
it’s good
Dima
not sure about performance, never wondered about this one
Marián
hmm okay
Nils
Is every kernel written in C?
klimi
No
Nils
In which language are windows and mac written?
klimi
Windows AFAIK c++
Mac.... No idea...
klimi
Check wiki
Marián
Nils
I am aware of it 😉
Nils
PMs random people for help
Dilara
Hey how can i solve plus minus game?
Dilara
I mean what is algorithm for this game?
Сарвар
create a new stack. the sequence of elements in which the reverse is relative to the first stack.
please, help
I_Interface
/warn @TheFrenchCarrier PMing without asking a permission.
Bunyamin
Dima
use std::cin instead of getline
Dima
and read the rules, post a screenshot, not a photo of screen
Bunyamin
Mateo
Mateo
Mateo
Im surprised -O3 didn't catch that, knowing that div is slower than mul
Francisco
What language are you using?
Mateo
it is just pseudocode, but the idea was the same for c
Mateo
it was a three level deep for loop, with an assignation with a division
Mateo
and I changed it to a multiplication, and voila, 20%
Francisco
Keep in mind that the compiler is also quite conservative in some optimizations, as it cannot asume certain things about the code
Francisco
For example, that snippet may work for you, but for other projects it could mean rounding errors that mess up everything
Mateo
Oh you are right
Mateo
I don't know how division works internally, but wouldn't it have the same precision as a multiplication?
Francisco
One of the biggest issues in floating-point arithmetic is that it's not commutative (that means a * b =/= b * a), and it's something that you have to get your mind around it
Mateo
I thing it makes sense, probably doing a/3 is more precise than a * (1 / 3) = a * 0.333334
Francisco
Also, your code wouldn't work at all with integers
Mateo
However in this context it makes sense for me, I will look up for some flags for these things
Mateo
Anonymous
Best software....for 'C'
Artöm
Software to do what?
Anonymous
import 'package:flutter/material.dart';
import 'package:flights_app/flight_model.dart';
import 'package:flights_app/flights_details_screen.dart';
class FlightCard extends StatelessWidget{
final Flight flight;
final String fullName;
final bool isClickable;
FlightCard({this.flight, this.fullName, @required this.isClickable});
_cityStyle(code, cityName, time){
return Expanded(
child: Column(
children: <Widget>[
Text(code, style: TextStyle(
color: Colors.black,
fontSize: 40.0,
fontWeight: FontWeight.bold
),),
Text(cityName, style: TextStyle(fontSize: 18.0),),
SizedBox(height: 10.0,),
Text(time, style: TextStyle(color: Colors.grey, fontSize: 14.0),)
],
),
);
}
@override
Widget build(BuildContext context) {
return GestureDetector(
onTap: (){
isClickable?
Navigator.of(context).push(
MaterialPageRoute(
builder: (context)
=> FlightDetailScreen(
passengerName: fullName,
flight: flight,
)
)
):;
},
child: Card(
elevation: 5.0,
margin: EdgeInsets.all(0.0),
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(5.0)),
child: Container(
child: Padding(
padding: const EdgeInsets.symmetric(
vertical:20.0),
child: Row(
mainAxisSize: MainAxisSize.max,
mainAxisAlignment: MainAxisAlignment.spaceAround,
children: <Widget>[
_cityStyle(flight.from, flight.fromCity, flight.departTime),
Icon(Icons.airplanemode_active),
_cityStyle(flight.to, flight.toCity, flight.arriveTime),
],
),
),
),
),
);
}
}
Anonymous
Hi. Can someone guide me with calling a function from the memory?
For example, if a function is located at 0x1088a6290, how can I call it?
Artöm
import 'package:flutter/material.dart';
import 'package:flights_app/flight_model.dart';
import 'package:flights_app/flights_details_screen.dart';
class FlightCard extends StatelessWidget{
final Flight flight;
final String fullName;
final bool isClickable;
FlightCard({this.flight, this.fullName, @required this.isClickable});
_cityStyle(code, cityName, time){
return Expanded(
child: Column(
children: <Widget>[
Text(code, style: TextStyle(
color: Colors.black,
fontSize: 40.0,
fontWeight: FontWeight.bold
),),
Text(cityName, style: TextStyle(fontSize: 18.0),),
SizedBox(height: 10.0,),
Text(time, style: TextStyle(color: Colors.grey, fontSize: 14.0),)
],
),
);
}
@override
Widget build(BuildContext context) {
return GestureDetector(
onTap: (){
isClickable?
Navigator.of(context).push(
MaterialPageRoute(
builder: (context)
=> FlightDetailScreen(
passengerName: fullName,
flight: flight,
)
)
):;
},
child: Card(
elevation: 5.0,
margin: EdgeInsets.all(0.0),
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(5.0)),
child: Container(
child: Padding(
padding: const EdgeInsets.symmetric(
vertical:20.0),
child: Row(
mainAxisSize: MainAxisSize.max,
mainAxisAlignment: MainAxisAlignment.spaceAround,
children: <Widget>[
_cityStyle(flight.from, flight.fromCity, flight.departTime),
Icon(Icons.airplanemode_active),
_cityStyle(flight.to, flight.toCity, flight.arriveTime),
],
),
),
),
),
);
}
}
Da fuq
Artöm
Artöm
And do you know the type of this function? Amount and types of arguments?
Anonymous
Da fuq
Pls speak in English