replacement for std::binary_function

First, my advice is to watch CppCon 2015: Stephan T. Lavavej “functional: What’s New, And Proper Usage”. std::binary_function is mentioned on slide 36, at around 36 mins in the video. You can find the slides at github.com/CppCon/CppCon2015). It doesn’t go into detail why you shouldn’t use std::binary_function, but if you’re using something that’s been deprecated … Read more

Flutter FlatButton is deprecated – alternative solution with width and height

I followed the guide here: https://flutter.dev/docs/release/breaking-changes/buttons. _buttonPreview(double _height, double _width) { final ButtonStyle flatButtonStyle = TextButton.styleFrom( minimumSize: Size(_width, _height), backgroundColor: Colors.grey, padding: EdgeInsets.all(0), ); return TextButton( style: flatButtonStyle, onPressed: () {}, child: Text( “some text”, style: TextStyle(color: Colors.white), ), ); }

Swift 4 ‘substring(from:)’ is deprecated: Please use String slicing subscript with a ‘partial range from’ operator

Follow the below example to fix this warning: Supporting examples for Swift 3, 4 and 5. let testStr = “Test Teja” let finalStr = testStr.substring(to: index) // Swift 3 let finalStr = String(testStr[..<index]) // Swift 4 let finalStr = testStr.substring(from: index) // Swift 3 let finalStr = String(testStr[index…]) // Swift 4 //Swift 3 let finalStr … Read more

Mark element as deprecated in XSD

Create a new schema, with a new namespace. Call this “version 2”. If you choose to support version 1 XSD and version 2 XSD in your application that’s fine, but keep them seperate and don’t try to layer the two on top of each other – especially if you’re going try to stop people from … Read more

error: strcpy was not declared in this scope

Observations: #include <cstring> should introduce std::strcpy(). using namespace std; (as written in medico.h) introduces any identifiers from std:: into the global namespace. Aside from using namespace std; being somewhat clumsy once the application grows larger (as it introduces one hell of a lot of identifiers into the global namespace), and that you should never use … Read more

What are all these deprecated “loop” parameters in asyncio?

What problems did loop solve? Why would one have used it in the first place? Prior to Python 3.6, asyncio.get_event_loop() was not guaranteed to return the event loop currently running when called from an asyncio coroutine or callback. It would return whatever event loop was previously set using set_event_loop(some_loop), or the one automatically created by … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)