What is HTTP(Hyper Text Transfer Protocol)? It is a protocol of the web which is responsible for communication between web servers and clients.Whenever you search for a website on the browser,submit a form on a website etc. you are using the HTTP (you are using one of its methods eg. GET,POST etc.) . It works via a request & response cycle. Requests & responses consists of header and a body.Each request can be thought of as a transaction. It is stateless ie all/any of the requests are independent of each other.It doesn't remember any of the previous requests while making a new one.(However,We can use cookies,local storage etc. to do save any information if needed.) HTTPS(Hyper Text Transfer Protocol Secure) is used to encrypt HTTP requests/responses for security purposes.The data is encrypted using SSL(Secure Sockets Layer) or TLS(Transport Layer Security) to protect sensitive information which is susceptible to MitM(man-in-the-middle) attacks.However its to be noted that HTTPS is just, much harder to crack b
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pragma solidity >=0.7.0 <0.9.0; | |
//inheritance in solidity | |
contract Parent{ | |
string public name; | |
mapping(address=>uint256) public balances; | |
constructor(string memory _name) public { | |
name=_name; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class MyActivity extends AppCompatActivity { | |
@Override | |
protected void onCreate(Bundle savedInstanceState) { | |
super.onCreate(savedInstanceState); | |
setContentView(R.layout.activity_my); | |
LinearLayout parent = findViewById(R.id.linearLayout); | |
//by doing this we lose all our theme customisation |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Database(entities = {SomeEntity.class}, version = 1) | |
public abstract class Database extends RoomDatabase { | |
private static Database instance; | |
public abstract SomeDao dao(); | |
public static synchronized NoteDatabase getInstance(Context context) { | |
if (instance == null) { | |
instance = Room.databaseBuilder(context.getApplicationContext(), Database.class, "database"). | |
fallbackToDestructiveMigration(). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class MainActivity extends AppCompatActivity { | |
@Override | |
protected void onCreate(Bundle savedInstanceState) { | |
super.onCreate(savedInstanceState); | |
setContentView(R.layout.activity_main); | |
Log.e("Activity context is", String.valueOf(this)); | |
Button button = findViewById(R.id.btn); |
8 Compatibility Attributes:
- Relationship – Do you have an existing relationship or connection with the sponsor?
- Objectives – Do you fit with the marketing objectives of the sponsor?
- Audience – How closely do you share a common target audience?
- Competition – Does their competition use sponsorship in your area as a marketing tool?
- Attributes – How closely do the attributes of what you have to offer match or compliment that of the sponsor? E.g sophisticated, smart, loud, family orientated, original.
- Geography – Does the sponsor operate in the same geography as you and have marketing objectives targeting the same level? E.g. National, state, region, city, district, suburb.
- Comfort – How comfortable are they using sponsorship as a marketing tool? Do they have a strong sponsorship history?
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import mysql.connector | |
from mysql.connector import errorcode | |
config = { | |
'user': 'root', | |
'password': '', | |
'host': 'localhost', | |
'database': 'acme' | |
} |