@kingmaggot
48I am blogging about Software and Technology in Turkish & English . Do not forget to follow and give me upvote. I love php
steemit.com/@kingmaggotVOTING POWER100.00%
DOWNVOTE POWER100.00%
RESOURCE CREDITS100.00%
REPUTATION PROGRESS96.04%
Net Worth
0.210USD
STEEM
3.607STEEM
SBD
0.001SBD
Effective Power
1.201SP
├── Own SP
0.000SP
└── Incoming DelegationsDeleg
+1.201SP
Detailed Balance
| STEEM | ||
| balance | 3.607STEEM | STEEM |
| market_balance | 0.000STEEM | STEEM |
| savings_balance | 0.000STEEM | STEEM |
| reward_steem_balance | 0.000STEEM | STEEM |
| STEEM POWER | ||
| Own SP | 0.000SP | SP |
| Delegated Out | 0.000SP | SP |
| Delegation In | 1.201SP | SP |
| Effective Power | 1.201SP | SP |
| Reward SP (pending) | 0.000SP | SP |
| SBD | ||
| sbd_balance | 0.001SBD | SBD |
| sbd_conversions | 0.000SBD | SBD |
| sbd_market_balance | 0.000SBD | SBD |
| savings_sbd_balance | 0.000SBD | SBD |
| reward_sbd_balance | 0.000SBD | SBD |
{
"balance": "3.607 STEEM",
"savings_balance": "0.000 STEEM",
"reward_steem_balance": "0.000 STEEM",
"vesting_shares": "0.000000 VESTS",
"delegated_vesting_shares": "0.000000 VESTS",
"received_vesting_shares": "1953.311140 VESTS",
"sbd_balance": "0.001 SBD",
"savings_sbd_balance": "0.000 SBD",
"reward_sbd_balance": "0.000 SBD",
"conversions": []
}Account Info
| name | kingmaggot |
| id | 693399 |
| rank | 1,616,642 |
| reputation | 355754647561 |
| created | 2018-01-30T01:05:48 |
| recovery_account | steem |
| proxy | None |
| post_count | 28 |
| comment_count | 0 |
| lifetime_vote_count | 0 |
| witnesses_voted_for | 0 |
| last_post | 2018-03-06T18:04:18 |
| last_root_post | 2018-03-06T18:04:18 |
| last_vote_time | 2018-02-22T21:25:00 |
| proxied_vsf_votes | 0, 0, 0, 0 |
| can_vote | 1 |
| voting_power | 0 |
| delayed_votes | 0 |
| balance | 3.607 STEEM |
| savings_balance | 0.000 STEEM |
| sbd_balance | 0.001 SBD |
| savings_sbd_balance | 0.000 SBD |
| vesting_shares | 0.000000 VESTS |
| delegated_vesting_shares | 0.000000 VESTS |
| received_vesting_shares | 1953.311140 VESTS |
| reward_vesting_balance | 0.000000 VESTS |
| vesting_balance | 0.000 STEEM |
| vesting_withdraw_rate | 0.000000 VESTS |
| next_vesting_withdrawal | 1969-12-31T23:59:59 |
| withdrawn | 23824017691 |
| to_withdraw | 23824017691 |
| withdraw_routes | 0 |
| savings_withdraw_requests | 0 |
| last_account_recovery | 1970-01-01T00:00:00 |
| reset_account | null |
| last_owner_update | 2018-02-21T02:49:06 |
| last_account_update | 2018-02-21T02:49:06 |
| mined | No |
| sbd_seconds | 0 |
| sbd_last_interest_payment | 2018-05-13T08:00:57 |
| savings_sbd_last_interest_payment | 1970-01-01T00:00:00 |
{
"active": {
"account_auths": [],
"key_auths": [
[
"STM7bZ8PnSUvExDaS9tMaqCx9at3sBv8jGanVm8wxeJxLVqzzKcav",
1
]
],
"weight_threshold": 1
},
"balance": "3.607 STEEM",
"can_vote": true,
"comment_count": 0,
"created": "2018-01-30T01:05:48",
"curation_rewards": 0,
"delegated_vesting_shares": "0.000000 VESTS",
"downvote_manabar": {
"current_mana": 488327785,
"last_update_time": 1588937919
},
"guest_bloggers": [],
"id": 693399,
"json_metadata": "{\"profile\":{\"profile_image\":\"https://i.hizliresim.com/gOZo3b.png\",\"cover_image\":\"https://i.hizliresim.com/gOZo3b.png\",\"name\":\"Remzi\",\"about\":\"I am blogging about Software and Technology in Turkish & English . Do not forget to follow and give me upvote. I love php\",\"location\":\"Turkey\",\"website\":\"https://www.google.com\"}}",
"last_account_recovery": "1970-01-01T00:00:00",
"last_account_update": "2018-02-21T02:49:06",
"last_owner_update": "2018-02-21T02:49:06",
"last_post": "2018-03-06T18:04:18",
"last_root_post": "2018-03-06T18:04:18",
"last_vote_time": "2018-02-22T21:25:00",
"lifetime_vote_count": 0,
"market_history": [],
"memo_key": "STM8TVYx3uZ4z6h4AfG4nesZFkn9CDTorW4VgdVppukkwWE1cJVzf",
"mined": false,
"name": "kingmaggot",
"next_vesting_withdrawal": "1969-12-31T23:59:59",
"other_history": [],
"owner": {
"account_auths": [],
"key_auths": [
[
"STM6Z9kLDpUwRF1zFbADicfeBQfbM9yCwKcJaVoMChkUPp9hbgjgd",
1
]
],
"weight_threshold": 1
},
"pending_claimed_accounts": 0,
"post_bandwidth": 0,
"post_count": 28,
"post_history": [],
"posting": {
"account_auths": [
[
"dmania.app",
1
],
[
"utopian.app",
1
]
],
"key_auths": [
[
"STM8d73hYDbqkNo1McY5diKzMxAz7qdqvgi124aSFUJhQ8a3Q1Tz5",
1
]
],
"weight_threshold": 1
},
"posting_json_metadata": "{\"profile\":{\"profile_image\":\"https://i.hizliresim.com/gOZo3b.png\",\"cover_image\":\"https://i.hizliresim.com/gOZo3b.png\",\"name\":\"Remzi\",\"about\":\"I am blogging about Software and Technology in Turkish & English . Do not forget to follow and give me upvote. I love php\",\"location\":\"Turkey\",\"website\":\"https://www.google.com\"}}",
"posting_rewards": 22300,
"proxied_vsf_votes": [
0,
0,
0,
0
],
"proxy": "",
"received_vesting_shares": "1953.311140 VESTS",
"recovery_account": "steem",
"reputation": "355754647561",
"reset_account": "null",
"reward_sbd_balance": "0.000 SBD",
"reward_steem_balance": "0.000 STEEM",
"reward_vesting_balance": "0.000000 VESTS",
"reward_vesting_steem": "0.000 STEEM",
"savings_balance": "0.000 STEEM",
"savings_sbd_balance": "0.000 SBD",
"savings_sbd_last_interest_payment": "1970-01-01T00:00:00",
"savings_sbd_seconds": "0",
"savings_sbd_seconds_last_update": "1970-01-01T00:00:00",
"savings_withdraw_requests": 0,
"sbd_balance": "0.001 SBD",
"sbd_last_interest_payment": "2018-05-13T08:00:57",
"sbd_seconds": "0",
"sbd_seconds_last_update": "2018-05-13T08:00:57",
"tags_usage": [],
"to_withdraw": "23824017691",
"transfer_history": [],
"vesting_balance": "0.000 STEEM",
"vesting_shares": "0.000000 VESTS",
"vesting_withdraw_rate": "0.000000 VESTS",
"vote_history": [],
"voting_manabar": {
"current_mana": 1953311140,
"last_update_time": 1588937919
},
"voting_power": 0,
"withdraw_routes": 0,
"withdrawn": "23824017691",
"witness_votes": [],
"witnesses_voted_for": 0,
"rank": 1616642
}Withdraw Routes
| Incoming | Outgoing |
|---|---|
Empty | Empty |
{
"incoming": [],
"outgoing": []
}From Date
To Date
steemdelegated 1.201 SP to @kingmaggot2020/05/08 11:38:39
steemdelegated 1.201 SP to @kingmaggot
2020/05/08 11:38:39
| delegatee | kingmaggot |
| delegator | steem |
| vesting shares | 1953.311140 VESTS |
| Transaction Info | Block #43195830/Trx da9a9dae513224cd0bf316b62affd9fac9a237f8 |
View Raw JSON Data
{
"block": 43195830,
"op": [
"delegate_vesting_shares",
{
"delegatee": "kingmaggot",
"delegator": "steem",
"vesting_shares": "1953.311140 VESTS"
}
],
"op_in_trx": 0,
"timestamp": "2020-05-08T11:38:39",
"trx_id": "da9a9dae513224cd0bf316b62affd9fac9a237f8",
"trx_in_block": 29,
"virtual_op": 0
}2020/01/30 06:19:33
2020/01/30 06:19:33
| author | steemitboard |
| body | Congratulations @kingmaggot! You received a personal award! <table><tr><td>https://steemitimages.com/70x70/http://steemitboard.com/@kingmaggot/birthday2.png</td><td>Happy Birthday! - You are on the Steem blockchain for 2 years!</td></tr></table> <sub>_You can view [your badges on your Steem Board](https://steemitboard.com/@kingmaggot) and compare to others on the [Steem Ranking](https://steemitboard.com/ranking/index.php?name=kingmaggot)_</sub> ###### [Vote for @Steemitboard as a witness](https://v2.steemconnect.com/sign/account-witness-vote?witness=steemitboard&approve=1) to get one more award and increased upvotes! |
| json metadata | {"image":["https://steemitboard.com/img/notify.png"]} |
| parent author | kingmaggot |
| parent permlink | ios-programming-courses-with-swift-series-1 |
| permlink | steemitboard-notify-kingmaggot-20200130t061932000z |
| title | |
| Transaction Info | Block #40373478/Trx ea133432c56cf83e62df052ccf393fd33338cc94 |
View Raw JSON Data
{
"block": 40373478,
"op": [
"comment",
{
"author": "steemitboard",
"body": "Congratulations @kingmaggot! You received a personal award!\n\n<table><tr><td>https://steemitimages.com/70x70/http://steemitboard.com/@kingmaggot/birthday2.png</td><td>Happy Birthday! - You are on the Steem blockchain for 2 years!</td></tr></table>\n\n<sub>_You can view [your badges on your Steem Board](https://steemitboard.com/@kingmaggot) and compare to others on the [Steem Ranking](https://steemitboard.com/ranking/index.php?name=kingmaggot)_</sub>\n\n\n###### [Vote for @Steemitboard as a witness](https://v2.steemconnect.com/sign/account-witness-vote?witness=steemitboard&approve=1) to get one more award and increased upvotes!",
"json_metadata": "{\"image\":[\"https://steemitboard.com/img/notify.png\"]}",
"parent_author": "kingmaggot",
"parent_permlink": "ios-programming-courses-with-swift-series-1",
"permlink": "steemitboard-notify-kingmaggot-20200130t061932000z",
"title": ""
}
],
"op_in_trx": 0,
"timestamp": "2020-01-30T06:19:33",
"trx_id": "ea133432c56cf83e62df052ccf393fd33338cc94",
"trx_in_block": 2,
"virtual_op": 0
}2019/01/30 09:14:51
2019/01/30 09:14:51
| author | steemitboard |
| body | Congratulations @kingmaggot! You received a personal award! <table><tr><td>https://steemitimages.com/70x70/http://steemitboard.com/@kingmaggot/birthday1.png</td><td>Happy Birthday! - You are on the Steem blockchain for 1 year!</td></tr></table> <sub>_[Click here to view your Board](https://steemitboard.com/@kingmaggot)_</sub> > Support [SteemitBoard's project](https://steemit.com/@steemitboard)! **[Vote for its witness](https://v2.steemconnect.com/sign/account-witness-vote?witness=steemitboard&approve=1)** and **get one more award**! |
| json metadata | {"image":["https://steemitboard.com/img/notify.png"]} |
| parent author | kingmaggot |
| parent permlink | ios-programming-courses-with-swift-series-1 |
| permlink | steemitboard-notify-kingmaggot-20190130t091450000z |
| title | |
| Transaction Info | Block #29904636/Trx f16ba0139c8bdbbd3141ccf0df72775883fd6343 |
View Raw JSON Data
{
"block": 29904636,
"op": [
"comment",
{
"author": "steemitboard",
"body": "Congratulations @kingmaggot! You received a personal award!\n\n<table><tr><td>https://steemitimages.com/70x70/http://steemitboard.com/@kingmaggot/birthday1.png</td><td>Happy Birthday! - You are on the Steem blockchain for 1 year!</td></tr></table>\n\n<sub>_[Click here to view your Board](https://steemitboard.com/@kingmaggot)_</sub>\n\n\n> Support [SteemitBoard's project](https://steemit.com/@steemitboard)! **[Vote for its witness](https://v2.steemconnect.com/sign/account-witness-vote?witness=steemitboard&approve=1)** and **get one more award**!",
"json_metadata": "{\"image\":[\"https://steemitboard.com/img/notify.png\"]}",
"parent_author": "kingmaggot",
"parent_permlink": "ios-programming-courses-with-swift-series-1",
"permlink": "steemitboard-notify-kingmaggot-20190130t091450000z",
"title": ""
}
],
"op_in_trx": 0,
"timestamp": "2019-01-30T09:14:51",
"trx_id": "f16ba0139c8bdbbd3141ccf0df72775883fd6343",
"trx_in_block": 4,
"virtual_op": 0
}kingmaggotreceived 0.000 STEEM from power down installment (0.000 SP)2018/07/10 20:32:12
kingmaggotreceived 0.000 STEEM from power down installment (0.000 SP)
2018/07/10 20:32:12
| deposited | 0.000 STEEM |
| from account | kingmaggot |
| to account | kingmaggot |
| withdrawn | 0.000006 VESTS |
| Transaction Info | Block #24062915/Virtual Operation #16 |
View Raw JSON Data
{
"block": 24062915,
"op": [
"fill_vesting_withdraw",
{
"deposited": "0.000 STEEM",
"from_account": "kingmaggot",
"to_account": "kingmaggot",
"withdrawn": "0.000006 VESTS"
}
],
"op_in_trx": 0,
"timestamp": "2018-07-10T20:32:12",
"trx_id": "0000000000000000000000000000000000000000",
"trx_in_block": 4294967295,
"virtual_op": 16
}kingmaggotreceived 0.902 STEEM from power down installment (1.127 SP)2018/07/03 20:32:12
kingmaggotreceived 0.902 STEEM from power down installment (1.127 SP)
2018/07/03 20:32:12
| deposited | 0.902 STEEM |
| from account | kingmaggot |
| to account | kingmaggot |
| withdrawn | 1832.616745 VESTS |
| Transaction Info | Block #23861505/Virtual Operation #9 |
View Raw JSON Data
{
"block": 23861505,
"op": [
"fill_vesting_withdraw",
{
"deposited": "0.902 STEEM",
"from_account": "kingmaggot",
"to_account": "kingmaggot",
"withdrawn": "1832.616745 VESTS"
}
],
"op_in_trx": 0,
"timestamp": "2018-07-03T20:32:12",
"trx_id": "0000000000000000000000000000000000000000",
"trx_in_block": 4294967295,
"virtual_op": 9
}kingmaggotreceived 0.902 STEEM from power down installment (1.127 SP)2018/06/26 20:32:12
kingmaggotreceived 0.902 STEEM from power down installment (1.127 SP)
2018/06/26 20:32:12
| deposited | 0.902 STEEM |
| from account | kingmaggot |
| to account | kingmaggot |
| withdrawn | 1832.616745 VESTS |
| Transaction Info | Block #23669715/Virtual Operation #17 |
View Raw JSON Data
{
"block": 23669715,
"op": [
"fill_vesting_withdraw",
{
"deposited": "0.902 STEEM",
"from_account": "kingmaggot",
"to_account": "kingmaggot",
"withdrawn": "1832.616745 VESTS"
}
],
"op_in_trx": 0,
"timestamp": "2018-06-26T20:32:12",
"trx_id": "0000000000000000000000000000000000000000",
"trx_in_block": 4294967295,
"virtual_op": 17
}kingmaggotreceived 0.902 STEEM from power down installment (1.127 SP)2018/06/19 20:32:12
kingmaggotreceived 0.902 STEEM from power down installment (1.127 SP)
2018/06/19 20:32:12
| deposited | 0.902 STEEM |
| from account | kingmaggot |
| to account | kingmaggot |
| withdrawn | 1832.616745 VESTS |
| Transaction Info | Block #23468174/Virtual Operation #18 |
View Raw JSON Data
{
"block": 23468174,
"op": [
"fill_vesting_withdraw",
{
"deposited": "0.902 STEEM",
"from_account": "kingmaggot",
"to_account": "kingmaggot",
"withdrawn": "1832.616745 VESTS"
}
],
"op_in_trx": 0,
"timestamp": "2018-06-19T20:32:12",
"trx_id": "0000000000000000000000000000000000000000",
"trx_in_block": 4294967295,
"virtual_op": 18
}kingmaggotreceived 0.901 STEEM from power down installment (1.127 SP)2018/06/12 20:32:12
kingmaggotreceived 0.901 STEEM from power down installment (1.127 SP)
2018/06/12 20:32:12
| deposited | 0.901 STEEM |
| from account | kingmaggot |
| to account | kingmaggot |
| withdrawn | 1832.616745 VESTS |
| Transaction Info | Block #23266620/Virtual Operation #14 |
View Raw JSON Data
{
"block": 23266620,
"op": [
"fill_vesting_withdraw",
{
"deposited": "0.901 STEEM",
"from_account": "kingmaggot",
"to_account": "kingmaggot",
"withdrawn": "1832.616745 VESTS"
}
],
"op_in_trx": 0,
"timestamp": "2018-06-12T20:32:12",
"trx_id": "0000000000000000000000000000000000000000",
"trx_in_block": 4294967295,
"virtual_op": 14
}kingmaggotsent 10.342 STEEM to @blocktrades- "75e78997-6fd5-4266-ac73-a3c7145ee59f"2018/06/06 21:01:54
kingmaggotsent 10.342 STEEM to @blocktrades- "75e78997-6fd5-4266-ac73-a3c7145ee59f"
2018/06/06 21:01:54
| amount | 10.342 STEEM |
| from | kingmaggot |
| memo | 75e78997-6fd5-4266-ac73-a3c7145ee59f |
| to | blocktrades |
| Transaction Info | Block #23095029/Trx 032dc16f3e9d01a710779f2b149f34b77277d5f9 |
View Raw JSON Data
{
"block": 23095029,
"op": [
"transfer",
{
"amount": "10.342 STEEM",
"from": "kingmaggot",
"memo": "75e78997-6fd5-4266-ac73-a3c7145ee59f",
"to": "blocktrades"
}
],
"op_in_trx": 0,
"timestamp": "2018-06-06T21:01:54",
"trx_id": "032dc16f3e9d01a710779f2b149f34b77277d5f9",
"trx_in_block": 31,
"virtual_op": 0
}northeastersent 3.143 STEEM to @kingmaggot- "memo"2018/06/06 20:56:30
northeastersent 3.143 STEEM to @kingmaggot- "memo"
2018/06/06 20:56:30
| amount | 3.143 STEEM |
| from | northeaster |
| memo | memo |
| to | kingmaggot |
| Transaction Info | Block #23094921/Trx 67247e34f3f385a2ec13d9234454e52f3a498654 |
View Raw JSON Data
{
"block": 23094921,
"op": [
"transfer",
{
"amount": "3.143 STEEM",
"from": "northeaster",
"memo": "memo",
"to": "kingmaggot"
}
],
"op_in_trx": 0,
"timestamp": "2018-06-06T20:56:30",
"trx_id": "67247e34f3f385a2ec13d9234454e52f3a498654",
"trx_in_block": 0,
"virtual_op": 0
}kingmaggotreceived 0.901 STEEM from power down installment (1.127 SP)2018/06/05 20:32:12
kingmaggotreceived 0.901 STEEM from power down installment (1.127 SP)
2018/06/05 20:32:12
| deposited | 0.901 STEEM |
| from account | kingmaggot |
| to account | kingmaggot |
| withdrawn | 1832.616745 VESTS |
| Transaction Info | Block #23065639/Virtual Operation #41 |
View Raw JSON Data
{
"block": 23065639,
"op": [
"fill_vesting_withdraw",
{
"deposited": "0.901 STEEM",
"from_account": "kingmaggot",
"to_account": "kingmaggot",
"withdrawn": "1832.616745 VESTS"
}
],
"op_in_trx": 0,
"timestamp": "2018-06-05T20:32:12",
"trx_id": "0000000000000000000000000000000000000000",
"trx_in_block": 4294967295,
"virtual_op": 41
}kingmaggotreceived 0.901 STEEM from power down installment (1.127 SP)2018/05/29 20:32:12
kingmaggotreceived 0.901 STEEM from power down installment (1.127 SP)
2018/05/29 20:32:12
| deposited | 0.901 STEEM |
| from account | kingmaggot |
| to account | kingmaggot |
| withdrawn | 1832.616745 VESTS |
| Transaction Info | Block #22864111/Virtual Operation #15 |
View Raw JSON Data
{
"block": 22864111,
"op": [
"fill_vesting_withdraw",
{
"deposited": "0.901 STEEM",
"from_account": "kingmaggot",
"to_account": "kingmaggot",
"withdrawn": "1832.616745 VESTS"
}
],
"op_in_trx": 0,
"timestamp": "2018-05-29T20:32:12",
"trx_id": "0000000000000000000000000000000000000000",
"trx_in_block": 4294967295,
"virtual_op": 15
}kingmaggotreceived 0.900 STEEM from power down installment (1.127 SP)2018/05/22 20:32:12
kingmaggotreceived 0.900 STEEM from power down installment (1.127 SP)
2018/05/22 20:32:12
| deposited | 0.900 STEEM |
| from account | kingmaggot |
| to account | kingmaggot |
| withdrawn | 1832.616745 VESTS |
| Transaction Info | Block #22662915/Virtual Operation #18 |
View Raw JSON Data
{
"block": 22662915,
"op": [
"fill_vesting_withdraw",
{
"deposited": "0.900 STEEM",
"from_account": "kingmaggot",
"to_account": "kingmaggot",
"withdrawn": "1832.616745 VESTS"
}
],
"op_in_trx": 0,
"timestamp": "2018-05-22T20:32:12",
"trx_id": "0000000000000000000000000000000000000000",
"trx_in_block": 4294967295,
"virtual_op": 18
}kingmaggotreceived 0.900 STEEM from power down installment (1.127 SP)2018/05/15 20:32:12
kingmaggotreceived 0.900 STEEM from power down installment (1.127 SP)
2018/05/15 20:32:12
| deposited | 0.900 STEEM |
| from account | kingmaggot |
| to account | kingmaggot |
| withdrawn | 1832.616745 VESTS |
| Transaction Info | Block #22461351/Virtual Operation #11 |
View Raw JSON Data
{
"block": 22461351,
"op": [
"fill_vesting_withdraw",
{
"deposited": "0.900 STEEM",
"from_account": "kingmaggot",
"to_account": "kingmaggot",
"withdrawn": "1832.616745 VESTS"
}
],
"op_in_trx": 0,
"timestamp": "2018-05-15T20:32:12",
"trx_id": "0000000000000000000000000000000000000000",
"trx_in_block": 4294967295,
"virtual_op": 11
}upboaterssent 0.001 SBD to @kingmaggot- "✅ From @bdbot Do you want min 70-75 upvote → Send 0.010 SBD or 0.010 Steem to @bdbot with your post link in memo and get 70-75 within 10 minute. ✅ https://steemit.com/@bdbot/transfers "2018/05/13 08:00:57
upboaterssent 0.001 SBD to @kingmaggot- "✅ From @bdbot Do you want min 70-75 upvote → Send 0.010 SBD or 0.010 Steem to @bdbot with your post link in memo and get 70-75 within 10 minute. ✅ https://steemit.com/@bdbot/transfers "
2018/05/13 08:00:57
| amount | 0.001 SBD |
| from | upboaters |
| memo | ✅ From @bdbot Do you want min 70-75 upvote → Send 0.010 SBD or 0.010 Steem to @bdbot with your post link in memo and get 70-75 within 10 minute. ✅ https://steemit.com/@bdbot/transfers |
| to | kingmaggot |
| Transaction Info | Block #22388732/Trx 73010c487c0ec01af634b48ed0c827a354c4aec9 |
View Raw JSON Data
{
"block": 22388732,
"op": [
"transfer",
{
"amount": "0.001 SBD",
"from": "upboaters",
"memo": "✅ From @bdbot Do you want min 70-75 upvote → Send 0.010 SBD or 0.010 Steem to @bdbot with your post link in memo and get 70-75 within 10 minute. ✅ https://steemit.com/@bdbot/transfers ",
"to": "kingmaggot"
}
],
"op_in_trx": 0,
"timestamp": "2018-05-13T08:00:57",
"trx_id": "73010c487c0ec01af634b48ed0c827a354c4aec9",
"trx_in_block": 26,
"virtual_op": 0
}kingmaggotreceived 0.900 STEEM from power down installment (1.127 SP)2018/05/08 20:32:12
kingmaggotreceived 0.900 STEEM from power down installment (1.127 SP)
2018/05/08 20:32:12
| deposited | 0.900 STEEM |
| from account | kingmaggot |
| to account | kingmaggot |
| withdrawn | 1832.616745 VESTS |
| Transaction Info | Block #22259771/Virtual Operation #5 |
View Raw JSON Data
{
"block": 22259771,
"op": [
"fill_vesting_withdraw",
{
"deposited": "0.900 STEEM",
"from_account": "kingmaggot",
"to_account": "kingmaggot",
"withdrawn": "1832.616745 VESTS"
}
],
"op_in_trx": 0,
"timestamp": "2018-05-08T20:32:12",
"trx_id": "0000000000000000000000000000000000000000",
"trx_in_block": 4294967295,
"virtual_op": 5
}kingmaggotreceived 0.899 STEEM from power down installment (1.127 SP)2018/05/01 20:32:12
kingmaggotreceived 0.899 STEEM from power down installment (1.127 SP)
2018/05/01 20:32:12
| deposited | 0.899 STEEM |
| from account | kingmaggot |
| to account | kingmaggot |
| withdrawn | 1832.616745 VESTS |
| Transaction Info | Block #22058230/Virtual Operation #16 |
View Raw JSON Data
{
"block": 22058230,
"op": [
"fill_vesting_withdraw",
{
"deposited": "0.899 STEEM",
"from_account": "kingmaggot",
"to_account": "kingmaggot",
"withdrawn": "1832.616745 VESTS"
}
],
"op_in_trx": 0,
"timestamp": "2018-05-01T20:32:12",
"trx_id": "0000000000000000000000000000000000000000",
"trx_in_block": 4294967295,
"virtual_op": 16
}kingmaggotreceived 0.899 STEEM from power down installment (1.127 SP)2018/04/24 20:32:12
kingmaggotreceived 0.899 STEEM from power down installment (1.127 SP)
2018/04/24 20:32:12
| deposited | 0.899 STEEM |
| from account | kingmaggot |
| to account | kingmaggot |
| withdrawn | 1832.616745 VESTS |
| Transaction Info | Block #21856726/Virtual Operation #9 |
View Raw JSON Data
{
"block": 21856726,
"op": [
"fill_vesting_withdraw",
{
"deposited": "0.899 STEEM",
"from_account": "kingmaggot",
"to_account": "kingmaggot",
"withdrawn": "1832.616745 VESTS"
}
],
"op_in_trx": 0,
"timestamp": "2018-04-24T20:32:12",
"trx_id": "0000000000000000000000000000000000000000",
"trx_in_block": 4294967295,
"virtual_op": 9
}kingmaggotreceived 0.899 STEEM from power down installment (1.127 SP)2018/04/17 20:32:12
kingmaggotreceived 0.899 STEEM from power down installment (1.127 SP)
2018/04/17 20:32:12
| deposited | 0.899 STEEM |
| from account | kingmaggot |
| to account | kingmaggot |
| withdrawn | 1832.616745 VESTS |
| Transaction Info | Block #21655746/Virtual Operation #5 |
View Raw JSON Data
{
"block": 21655746,
"op": [
"fill_vesting_withdraw",
{
"deposited": "0.899 STEEM",
"from_account": "kingmaggot",
"to_account": "kingmaggot",
"withdrawn": "1832.616745 VESTS"
}
],
"op_in_trx": 0,
"timestamp": "2018-04-17T20:32:12",
"trx_id": "0000000000000000000000000000000000000000",
"trx_in_block": 4294967295,
"virtual_op": 5
}kingmaggotsent 41.211 SBD to @blocktrades- "7ad5a991-e4a6-4713-a558-989f7a37b14d"2018/04/13 03:41:24
kingmaggotsent 41.211 SBD to @blocktrades- "7ad5a991-e4a6-4713-a558-989f7a37b14d"
2018/04/13 03:41:24
| amount | 41.211 SBD |
| from | kingmaggot |
| memo | 7ad5a991-e4a6-4713-a558-989f7a37b14d |
| to | blocktrades |
| Transaction Info | Block #21520360/Trx 23c51e6ccbf467677bf78acecaee1e61868b3453 |
View Raw JSON Data
{
"block": 21520360,
"op": [
"transfer",
{
"amount": "41.211 SBD",
"from": "kingmaggot",
"memo": "7ad5a991-e4a6-4713-a558-989f7a37b14d",
"to": "blocktrades"
}
],
"op_in_trx": 0,
"timestamp": "2018-04-13T03:41:24",
"trx_id": "23c51e6ccbf467677bf78acecaee1e61868b3453",
"trx_in_block": 23,
"virtual_op": 0
}kingmaggotsent 18.147 STEEM to @blocktrades- "3f81f42b-a3e0-424a-bd8b-e477cd869ead"2018/04/13 00:24:21
kingmaggotsent 18.147 STEEM to @blocktrades- "3f81f42b-a3e0-424a-bd8b-e477cd869ead"
2018/04/13 00:24:21
| amount | 18.147 STEEM |
| from | kingmaggot |
| memo | 3f81f42b-a3e0-424a-bd8b-e477cd869ead |
| to | blocktrades |
| Transaction Info | Block #21516420/Trx bd679cdb19c73861df38c39366b124947d323896 |
View Raw JSON Data
{
"block": 21516420,
"op": [
"transfer",
{
"amount": "18.147 STEEM",
"from": "kingmaggot",
"memo": "3f81f42b-a3e0-424a-bd8b-e477cd869ead",
"to": "blocktrades"
}
],
"op_in_trx": 0,
"timestamp": "2018-04-13T00:24:21",
"trx_id": "bd679cdb19c73861df38c39366b124947d323896",
"trx_in_block": 54,
"virtual_op": 0
}northeastersent 18.147 STEEM to @kingmaggot- "kingmaggot"2018/04/13 00:16:09
northeastersent 18.147 STEEM to @kingmaggot- "kingmaggot"
2018/04/13 00:16:09
| amount | 18.147 STEEM |
| from | northeaster |
| memo | kingmaggot |
| to | kingmaggot |
| Transaction Info | Block #21516256/Trx cd0f2795e92e70cc29b28cd94b1784d523189b7b |
View Raw JSON Data
{
"block": 21516256,
"op": [
"transfer",
{
"amount": "18.147 STEEM",
"from": "northeaster",
"memo": "kingmaggot",
"to": "kingmaggot"
}
],
"op_in_trx": 0,
"timestamp": "2018-04-13T00:16:09",
"trx_id": "cd0f2795e92e70cc29b28cd94b1784d523189b7b",
"trx_in_block": 7,
"virtual_op": 0
}northeastersent 0.080 SBD to @kingmaggot- "kingmaggot"2018/04/13 00:11:18
northeastersent 0.080 SBD to @kingmaggot- "kingmaggot"
2018/04/13 00:11:18
| amount | 0.080 SBD |
| from | northeaster |
| memo | kingmaggot |
| to | kingmaggot |
| Transaction Info | Block #21516159/Trx eb0ad1936ebfbc9069c82a36f14fa47f5d7f13d7 |
View Raw JSON Data
{
"block": 21516159,
"op": [
"transfer",
{
"amount": "0.080 SBD",
"from": "northeaster",
"memo": "kingmaggot",
"to": "kingmaggot"
}
],
"op_in_trx": 0,
"timestamp": "2018-04-13T00:11:18",
"trx_id": "eb0ad1936ebfbc9069c82a36f14fa47f5d7f13d7",
"trx_in_block": 23,
"virtual_op": 0
}kingmaggotsent 0.899 STEEM to @northeaster- "northeaster"2018/04/13 00:09:54
kingmaggotsent 0.899 STEEM to @northeaster- "northeaster"
2018/04/13 00:09:54
| amount | 0.899 STEEM |
| from | kingmaggot |
| memo | northeaster |
| to | northeaster |
| Transaction Info | Block #21516131/Trx fd0502d4d2d19067b3de61167e109cfc6ea2aff6 |
View Raw JSON Data
{
"block": 21516131,
"op": [
"transfer",
{
"amount": "0.899 STEEM",
"from": "kingmaggot",
"memo": "northeaster",
"to": "northeaster"
}
],
"op_in_trx": 0,
"timestamp": "2018-04-13T00:09:54",
"trx_id": "fd0502d4d2d19067b3de61167e109cfc6ea2aff6",
"trx_in_block": 98,
"virtual_op": 0
}kingmaggotreceived 0.898 STEEM from power down installment (1.127 SP)2018/04/10 20:32:12
kingmaggotreceived 0.898 STEEM from power down installment (1.127 SP)
2018/04/10 20:32:12
| deposited | 0.898 STEEM |
| from account | kingmaggot |
| to account | kingmaggot |
| withdrawn | 1832.616745 VESTS |
| Transaction Info | Block #21454185/Virtual Operation #8 |
View Raw JSON Data
{
"block": 21454185,
"op": [
"fill_vesting_withdraw",
{
"deposited": "0.898 STEEM",
"from_account": "kingmaggot",
"to_account": "kingmaggot",
"withdrawn": "1832.616745 VESTS"
}
],
"op_in_trx": 0,
"timestamp": "2018-04-10T20:32:12",
"trx_id": "0000000000000000000000000000000000000000",
"trx_in_block": 4294967295,
"virtual_op": 8
}kingmaggotstarted power down of 14.648 SP2018/04/03 20:32:12
kingmaggotstarted power down of 14.648 SP
2018/04/03 20:32:12
| account | kingmaggot |
| vesting shares | 23824.017691 VESTS |
| Transaction Info | Block #21252606/Trx 27acfdd94657bad893f16e5fb09bd83e3dfd3ee5 |
View Raw JSON Data
{
"block": 21252606,
"op": [
"withdraw_vesting",
{
"account": "kingmaggot",
"vesting_shares": "23824.017691 VESTS"
}
],
"op_in_trx": 0,
"timestamp": "2018-04-03T20:32:12",
"trx_id": "27acfdd94657bad893f16e5fb09bd83e3dfd3ee5",
"trx_in_block": 4,
"virtual_op": 0
}kingmaggotcancelled power down2018/04/03 20:31:57
kingmaggotcancelled power down
2018/04/03 20:31:57
| account | kingmaggot |
| vesting shares | 0.000000 VESTS |
| Transaction Info | Block #21252601/Trx 43166fccc3ee55f95f082525100e8eecc3bbbc32 |
View Raw JSON Data
{
"block": 21252601,
"op": [
"withdraw_vesting",
{
"account": "kingmaggot",
"vesting_shares": "0.000000 VESTS"
}
],
"op_in_trx": 0,
"timestamp": "2018-04-03T20:31:57",
"trx_id": "43166fccc3ee55f95f082525100e8eecc3bbbc32",
"trx_in_block": 26,
"virtual_op": 0
}kingmaggotstarted power down of 14.648 SP2018/04/03 20:31:51
kingmaggotstarted power down of 14.648 SP
2018/04/03 20:31:51
| account | kingmaggot |
| vesting shares | 23824.017691 VESTS |
| Transaction Info | Block #21252599/Trx 49f5e4042a14d291c049a3026bbcd8c06e55b0c9 |
View Raw JSON Data
{
"block": 21252599,
"op": [
"withdraw_vesting",
{
"account": "kingmaggot",
"vesting_shares": "23824.017691 VESTS"
}
],
"op_in_trx": 0,
"timestamp": "2018-04-03T20:31:51",
"trx_id": "49f5e4042a14d291c049a3026bbcd8c06e55b0c9",
"trx_in_block": 3,
"virtual_op": 0
}kingmaggotstarted power down of 7.630 SP2018/04/03 20:31:36
kingmaggotstarted power down of 7.630 SP
2018/04/03 20:31:36
| account | kingmaggot |
| vesting shares | 12410.319973 VESTS |
| Transaction Info | Block #21252594/Trx 23fe3cdb2dc33eb115d9b6231b059c2512dd831b |
View Raw JSON Data
{
"block": 21252594,
"op": [
"withdraw_vesting",
{
"account": "kingmaggot",
"vesting_shares": "12410.319973 VESTS"
}
],
"op_in_trx": 0,
"timestamp": "2018-04-03T20:31:36",
"trx_id": "23fe3cdb2dc33eb115d9b6231b059c2512dd831b",
"trx_in_block": 2,
"virtual_op": 0
}kingmaggotstarted power down of 14.648 SP2018/04/03 20:31:24
kingmaggotstarted power down of 14.648 SP
2018/04/03 20:31:24
| account | kingmaggot |
| vesting shares | 23824.017691 VESTS |
| Transaction Info | Block #21252590/Trx b0a0baa51e88d77b782c3b5927efa7e7b28bfec3 |
View Raw JSON Data
{
"block": 21252590,
"op": [
"withdraw_vesting",
{
"account": "kingmaggot",
"vesting_shares": "23824.017691 VESTS"
}
],
"op_in_trx": 0,
"timestamp": "2018-04-03T20:31:24",
"trx_id": "b0a0baa51e88d77b782c3b5927efa7e7b28bfec3",
"trx_in_block": 0,
"virtual_op": 0
}2018/03/12 00:15:42
2018/03/12 00:15:42
| author | roj |
| body | Your contribution cannot be approved because it does not follow the [Utopian Rules](https://utopian.io/rules). - First of all, sorry for late coming comment. It caused by a bug. **Related Rule:** - Design or video editing related tutorials, gameplay, simple on-screen instructions, ubiquitous functions (Save, Open, Print, etc.) or basic programming concepts (variables, operators, loops, etc.) will not be accepted. **Suggestions:** - As stated in the rule above, tutorials covering basic programming concepts cannot be approved. You should provide tutorials for more technical parts of the project. If the tutorial was covering a proper concept, it would probably be approved since you tend to provide explanations and detailed information. You can contact us on [Discord](https://discord.gg/uTyJkNm). **[[utopian-moderator]](https://utopian.io/moderators)** |
| json metadata | {"tags":["utopian-io"],"community":"utopian","app":"utopian/1.0.0"} |
| parent author | kingmaggot |
| parent permlink | ios-programming-courses-with-swift-series-1 |
| permlink | re-kingmaggot-ios-programming-courses-with-swift-series-1-20180312t001539241z |
| title | |
| Transaction Info | Block #20595775/Trx 900a6e3492a3aa4ae1e434b9924521e076cd3a83 |
View Raw JSON Data
{
"block": 20595775,
"op": [
"comment",
{
"author": "roj",
"body": "Your contribution cannot be approved because it does not follow the [Utopian Rules](https://utopian.io/rules).\n\n- First of all, sorry for late coming comment. It caused by a bug. \n\n**Related Rule:**\n- Design or video editing related tutorials, gameplay, simple on-screen instructions, ubiquitous functions (Save, Open, Print, etc.) or basic programming concepts (variables, operators, loops, etc.) will not be accepted.\n\n**Suggestions:**\n- As stated in the rule above, tutorials covering basic programming concepts cannot be approved. You should provide tutorials for more technical parts of the project. If the tutorial was covering a proper concept, it would probably be approved since you tend to provide explanations and detailed information. \n\nYou can contact us on [Discord](https://discord.gg/uTyJkNm).\n**[[utopian-moderator]](https://utopian.io/moderators)**",
"json_metadata": "{\"tags\":[\"utopian-io\"],\"community\":\"utopian\",\"app\":\"utopian/1.0.0\"}",
"parent_author": "kingmaggot",
"parent_permlink": "ios-programming-courses-with-swift-series-1",
"permlink": "re-kingmaggot-ios-programming-courses-with-swift-series-1-20180312t001539241z",
"title": ""
}
],
"op_in_trx": 0,
"timestamp": "2018-03-12T00:15:42",
"trx_id": "900a6e3492a3aa4ae1e434b9924521e076cd3a83",
"trx_in_block": 1,
"virtual_op": 0
}kingmaggotpublished a new post: ios-programming-courses-with-swift-series-12018/03/07 00:01:18
kingmaggotpublished a new post: ios-programming-courses-with-swift-series-1
2018/03/07 00:01:18
| author | kingmaggot |
| body | **What will we learn?** - IOS Programming Courses with Swift / Series 1 ( Data Types ) <br> https://cdn2.macworld.co.uk/cmsdata/features/3597812/how-to-learn-swift-4_thumb800.jpg <br> **Requirements:** - Notepad+ - IOS Operating System - Xcode <br> **Difficulty Level:** - Normal Level <br> **Let's Start the Course :** **Data Types** **Text-Based Types** We will consider the data types used to store text-based expressions under the category of textual types. Then, as understood, the data types used to store text-based expressions. **String Data Type** It is the type of data stored in text-based expressions. It is possible to store a numeric data in a variable of type String. However, the numerical data we store will be stored in text base. It is not possible to do numeric operations (addition, subtraction.... ) on numeric stuff stored in "string" type. If we want to do a floating-point operation in a "string" variable, we will have to transform this variable into a numeric type by subjecting it to a "type conversion" which we will learn later. ``` note If we want to assign a value to a text-based variable , we need to type the value to be assigned in double quotation marks (""). ``` ``` swift var text1:String var text2:String = "Utopian" ``` In the following sections I will show you how to handle string data more than once. However, the most basic operation is to learn how to combine two string expressions. In the following example, we see the concatenation of two string data. The concatenation of string expressions is called the concatenation of string data. ``` swift var name:String = "Kingmaggot" "Hello " + name ``` If we repeat the important point here, the string expression is the concatenation of strings. **Character Data Type** A text-based variable is a type that can store only one character, even though it is a type. The character we keep can be a letter , a digit, or a punctuation. The information below about text-based data types is key. You will understand better what I mean about the series we will learn in the following articles, and we will relate this information to another information, and we will open an important door. Since it is character data type, textual data type, the string type, just as in our data collection process that are subject to the merging process will be performed. In the following example, by assigning the letters "U", "t", "o", "p", "i", "a" ,"n" to K1, k2 , k3 , k4, K5,K6,K7 respectively, we obtained utupian data by adding these characters to the collection process. ``` swift var k1,k2,k3,k4,k5,k6,k7:String k1 = "U" k2 = "t" k3 = "o" k4 = "p" k5 = "i" k6 = "a" k7 = "n" //result -->> Utopian ``` The latest information we need to know about the character data type two-byte data type. ``` swift var character1: Character var character2: Character = "!" ``` **Real Number Types** Variable types that can store decimal numbers. Real number types include not only decimal but also integer numbers. When we want to keep decimal numbers in the variable, integer types such as integer are insufficient. The data types we need to refer to here should be "float" or "double". ``` swift var DecimalNumber1:Float = 10.2 var DecimalNumber2:Double = 5.5 ``` If there are any remaining divisions we will make in real number types, it will be shown. ``` swift var Number1:Float = 19.3 var Number2:Double = 3 Number1 / Number2 ``` **Logical Types** It is the data type that stores only one of the values 0 OR 1, which are the two basic characters of the machine language. The data type that occupies the minimum amount of memory is also logical types. In programming , the value 0 is false and the value 1 is true. We can understand the absence of ambiguity in programming from logical data types. If we move through the objects we encounter in everyday life, let's think of a window. With programming logic, this window is either open or closed. This means that the window is semi-open or intermittent. In this context, logical data types can be used in certain cases. In addition, we will see that the type of logical data that we will learn after a while is not an alternative type of "bool" data type, The type of logical data that occupies the least space in memory. The reason is that it can only get "true" or "false". **Bool Data Type** it is the data type that can store only one of the "true" or "false" values. Takes up space in bytes. It is usually used in two possibilities: "military status , married - single, female - male". There is no alternative to the "bool" data type in the logical data types I just mentioned. **TIP Transformation** Although we have learned the data types, this information is not enough. In particular, there will be some problems that we will encounter when we go to "Xcode" projects. The most classic of these problems is when we want to print numeric data anywhere on the screen. If we want to print a numeric expression on a control, we may need to convert it to a string type and print it. We will also need to apply for "tip" conversion. In addition to translating a numeric data into a string, we also need to convert a numeric expression into a numeric data type to a mathematical operation. If we go over one example , we will have two variables, as follows. One of them will hide the name information, the other will hide the age information. Let's put these two data into a textual collection, that is, a concatenation process. As we see below, when we define both data As "String", we get the result we want. This is not a logical way to store age information in a string variable. When we store age information in a variable of type int, age information is "string" and there is no error in the collection process. ``` swift var name:String = " Kingmaggot " var old:Int = 32 name + old.description + " he's Old." //result --> Kingmaggot 32 he's Old ``` **Fixed Description** We can change the value we assign to a variable in the next line as much as we want. In some cases, we may want to assign only one value to the variable we define and not change those values that are assigned later. For example, the number "PI" can be given. In such cases, we must define a constant instead of a variable. Constant definition has only 1 difference according to variable definition. This difference is the use of "let" instead of "var". ``` swift let date_of_birth:Int = 1986 ``` ``` note We need to know about this. We cannot take any action that would attempt to change the value of this constant , whether it is constant , numeric , or textual. ``` **What Have We Learned ?** In this section, we learn how to use data consistency, data types with each other, and how to use these types of VI. The information we have learned in this section will be used in most of the following sections. In this respect, we have left behind an extremely important part. **For the rest of the article, follow our series.** <br> **Series :** <br> 1 - [IOS Programming Courses with Swift / Series 1](https://utopian.io/utopian-io/@kingmaggot/ios-programming-courses-with-swift-series-1) #1 <br> <br /><hr/><em>Posted on <a href="https://utopian.io/utopian-io/@kingmaggot/ios-programming-courses-with-swift-series-1">Utopian.io - Rewarding Open Source Contributors</a></em><hr/> |
| json metadata | {"community":"utopian","app":"utopian/1.0.0","format":"markdown","repository":{"id":44838949,"name":"swift","full_name":"apple/swift","html_url":"https://github.com/apple/swift","fork":false,"owner":{"login":"apple"}},"pullRequests":[],"platform":"github","type":"tutorials","tags":["utopian-io","apple","steem","steemit","kingmaggot"],"users":["kingmaggot"],"links":["https://utopian.io/utopian-io/@kingmaggot/ios-programming-courses-with-swift-series-1"],"moderator":{"account":"roj","time":"2018-03-06T22:45:57.485Z","flagged":true,"reviewed":false,"pending":false},"questions":[],"score":null} |
| parent author | |
| parent permlink | utopian-io |
| permlink | ios-programming-courses-with-swift-series-1 |
| title | IOS Programming Courses with Swift / Series 1 |
| Transaction Info | Block #20451760/Trx 429a6333de3b44f5be8b696da9466d78ce754a7d |
View Raw JSON Data
{
"block": 20451760,
"op": [
"comment",
{
"author": "kingmaggot",
"body": "**What will we learn?**\n\n- IOS Programming Courses with Swift / Series 1 ( Data Types )\n\n<br>\n\nhttps://cdn2.macworld.co.uk/cmsdata/features/3597812/how-to-learn-swift-4_thumb800.jpg\n\n<br>\n\n**Requirements:**\n\n- Notepad+\n- IOS Operating System \n- Xcode\n\n<br>\n\n**Difficulty Level:**\n\n- Normal Level\n\n<br>\n\n**Let's Start the Course :**\n\n**Data Types**\n\n**Text-Based Types**\n\nWe will consider the data types used to store text-based expressions under the category of textual types. Then, as understood, the data types used to store text-based expressions.\n\n**String Data Type**\n\nIt is the type of data stored in text-based expressions. It is possible to store a numeric data in a variable of type String. However, the numerical data we store will be stored in text base. It is not possible to do numeric operations (addition, subtraction.... ) on numeric stuff stored in \"string\" type. If we want to do a floating-point operation in a \"string\" variable, we will have to transform this variable into a numeric type by subjecting it to a \"type conversion\" which we will learn later.\n\n``` note\nIf we want to assign a value to a text-based variable , we need to type the value to be assigned in double quotation marks (\"\").\n```\n\n``` swift\nvar text1:String\nvar text2:String = \"Utopian\"\n```\n\nIn the following sections I will show you how to handle string data more than once. However, the most basic operation is to learn how to combine two string expressions. In the following example, we see the concatenation of two string data. The concatenation of string expressions is called the concatenation of string data.\n\n``` swift\nvar name:String = \"Kingmaggot\"\n\"Hello \" + name\n```\nIf we repeat the important point here, the string expression is the concatenation of strings.\n\n**Character Data Type**\n\nA text-based variable is a type that can store only one character, even though it is a type. The character we keep can be a letter , a digit, or a punctuation. The information below about text-based data types is key. You will understand better what I mean about the series we will learn in the following articles, and we will relate this information to another information, and we will open an important door.\n\nSince it is character data type, textual data type, the string type, just as in our data collection process that are subject to the merging process will be performed. In the following example, by assigning the letters \"U\", \"t\", \"o\", \"p\", \"i\", \"a\" ,\"n\" to K1, k2 , k3 , k4, K5,K6,K7 respectively, we obtained utupian data by adding these characters to the collection process.\n\n\n``` swift\nvar k1,k2,k3,k4,k5,k6,k7:String\nk1 = \"U\"\nk2 = \"t\"\nk3 = \"o\"\nk4 = \"p\"\nk5 = \"i\"\nk6 = \"a\"\nk7 = \"n\"\n//result -->> Utopian\n```\n\nThe latest information we need to know about the character data type two-byte data type.\n\n``` swift\nvar character1: Character\nvar character2: Character = \"!\"\n```\n\n**Real Number Types**\n\nVariable types that can store decimal numbers. Real number types include not only decimal but also integer numbers. When we want to keep decimal numbers in the variable, integer types such as integer are insufficient. The data types we need to refer to here should be \"float\" or \"double\".\n\n``` swift\nvar DecimalNumber1:Float = 10.2\nvar DecimalNumber2:Double = 5.5\n```\n\nIf there are any remaining divisions we will make in real number types, it will be shown.\n\n``` swift\nvar Number1:Float = 19.3\nvar Number2:Double = 3\nNumber1 / Number2\n```\n\n**Logical Types**\n\nIt is the data type that stores only one of the values 0 OR 1, which are the two basic characters of the machine language. The data type that occupies the minimum amount of memory is also logical types. In programming , the value 0 is false and the value 1 is true.\n\nWe can understand the absence of ambiguity in programming from logical data types. If we move through the objects we encounter in everyday life, let's think of a window. With programming logic, this window is either open or closed. This means that the window is semi-open or intermittent. In this context, logical data types can be used in certain cases. In addition, we will see that the type of logical data that we will learn after a while is not an alternative type of \"bool\" data type, The type of logical data that occupies the least space in memory. The reason is that it can only get \"true\" or \"false\".\n\n**Bool Data Type**\n\nit is the data type that can store only one of the \"true\" or \"false\" values. Takes up space in bytes. It is usually used in two possibilities: \"military status , married - single, female - male\". There is no alternative to the \"bool\" data type in the logical data types I just mentioned.\n\n**TIP Transformation**\n\nAlthough we have learned the data types, this information is not enough. In particular, there will be some problems that we will encounter when we go to \"Xcode\" projects. The most classic of these problems is when we want to print numeric data anywhere on the screen. If we want to print a numeric expression on a control, we may need to convert it to a string type and print it. We will also need to apply for \"tip\" conversion. In addition to translating a numeric data into a string, we also need to convert a numeric expression into a numeric data type to a mathematical operation.\n\nIf we go over one example , we will have two variables, as follows. One of them will hide the name information, the other will hide the age information. Let's put these two data into a textual collection, that is, a concatenation process. As we see below, when we define both data As \"String\", we get the result we want. This is not a logical way to store age information in a string variable. When we store age information in a variable of type int, age information is \"string\" and there is no error in the collection process.\n\n``` swift\nvar name:String = \" Kingmaggot \"\nvar old:Int = 32\nname + old.description + \" he's Old.\" \n//result --> Kingmaggot 32 he's Old\n```\n\n**Fixed Description**\n\nWe can change the value we assign to a variable in the next line as much as we want. In some cases, we may want to assign only one value to the variable we define and not change those values that are assigned later. For example, the number \"PI\" can be given. In such cases, we must define a constant instead of a variable.\n\nConstant definition has only 1 difference according to variable definition. This difference is the use of \"let\" instead of \"var\".\n\n``` swift\nlet date_of_birth:Int = 1986\n```\n\n``` note\nWe need to know about this. We cannot take any action that would attempt to change the value of this constant , whether it is constant , numeric , or textual.\n```\n\n**What Have We Learned ?**\n\nIn this section, we learn how to use data consistency, data types with each other, and how to use these types of VI. The information we have learned in this section will be used in most of the following sections. In this respect, we have left behind an extremely important part.\n\n**For the rest of the article, follow our series.**\n\n<br>\n**Series :** <br>\n1 - [IOS Programming Courses with Swift / Series 1](https://utopian.io/utopian-io/@kingmaggot/ios-programming-courses-with-swift-series-1) #1 <br>\n\n<br /><hr/><em>Posted on <a href=\"https://utopian.io/utopian-io/@kingmaggot/ios-programming-courses-with-swift-series-1\">Utopian.io - Rewarding Open Source Contributors</a></em><hr/>",
"json_metadata": "{\"community\":\"utopian\",\"app\":\"utopian/1.0.0\",\"format\":\"markdown\",\"repository\":{\"id\":44838949,\"name\":\"swift\",\"full_name\":\"apple/swift\",\"html_url\":\"https://github.com/apple/swift\",\"fork\":false,\"owner\":{\"login\":\"apple\"}},\"pullRequests\":[],\"platform\":\"github\",\"type\":\"tutorials\",\"tags\":[\"utopian-io\",\"apple\",\"steem\",\"steemit\",\"kingmaggot\"],\"users\":[\"kingmaggot\"],\"links\":[\"https://utopian.io/utopian-io/@kingmaggot/ios-programming-courses-with-swift-series-1\"],\"moderator\":{\"account\":\"roj\",\"time\":\"2018-03-06T22:45:57.485Z\",\"flagged\":true,\"reviewed\":false,\"pending\":false},\"questions\":[],\"score\":null}",
"parent_author": "",
"parent_permlink": "utopian-io",
"permlink": "ios-programming-courses-with-swift-series-1",
"title": "IOS Programming Courses with Swift / Series 1"
}
],
"op_in_trx": 0,
"timestamp": "2018-03-07T00:01:18",
"trx_id": "429a6333de3b44f5be8b696da9466d78ce754a7d",
"trx_in_block": 28,
"virtual_op": 0
}pqbdupvoted (100.00%) @kingmaggot / ios-programming-courses-with-swift-series-12018/03/06 18:47:48
pqbdupvoted (100.00%) @kingmaggot / ios-programming-courses-with-swift-series-1
2018/03/06 18:47:48
| author | kingmaggot |
| permlink | ios-programming-courses-with-swift-series-1 |
| voter | pqbd |
| weight | 10000 (100.00%) |
| Transaction Info | Block #20445504/Trx bda4d3a448774beaae5cf20caa567aab166f8cc7 |
View Raw JSON Data
{
"block": 20445504,
"op": [
"vote",
{
"author": "kingmaggot",
"permlink": "ios-programming-courses-with-swift-series-1",
"voter": "pqbd",
"weight": 10000
}
],
"op_in_trx": 0,
"timestamp": "2018-03-06T18:47:48",
"trx_id": "bda4d3a448774beaae5cf20caa567aab166f8cc7",
"trx_in_block": 24,
"virtual_op": 0
}kingmaggotpublished a new post: ios-programming-courses-with-swift-series-12018/03/06 18:04:48
kingmaggotpublished a new post: ios-programming-courses-with-swift-series-1
2018/03/06 18:04:48
| author | kingmaggot |
| body | @@ -7094,30 +7094,42 @@ got/ -python-private-lessons +ios-programming-courses-with-swift -ser |
| json metadata | {"community":"utopian","app":"utopian/1.0.0","format":"markdown","repository":{"id":44838949,"name":"swift","full_name":"apple/swift","html_url":"https://github.com/apple/swift","fork":false,"owner":{"login":"apple"}},"pullRequests":[],"platform":"github","type":"tutorials","tags":["utopian-io","apple","steem","steemit","kingmaggot"],"users":["kingmaggot"],"links":["https://utopian.io/utopian-io/@kingmaggot/ios-programming-courses-with-swift-series-1"]} |
| parent author | |
| parent permlink | utopian-io |
| permlink | ios-programming-courses-with-swift-series-1 |
| title | IOS Programming Courses with Swift / Series 1 |
| Transaction Info | Block #20444644/Trx 31ad41cfd7485ca96b843e890ea5ca8d83a10eb9 |
View Raw JSON Data
{
"block": 20444644,
"op": [
"comment",
{
"author": "kingmaggot",
"body": "@@ -7094,30 +7094,42 @@\n got/\n-python-private-lessons\n+ios-programming-courses-with-swift\n -ser\n",
"json_metadata": "{\"community\":\"utopian\",\"app\":\"utopian/1.0.0\",\"format\":\"markdown\",\"repository\":{\"id\":44838949,\"name\":\"swift\",\"full_name\":\"apple/swift\",\"html_url\":\"https://github.com/apple/swift\",\"fork\":false,\"owner\":{\"login\":\"apple\"}},\"pullRequests\":[],\"platform\":\"github\",\"type\":\"tutorials\",\"tags\":[\"utopian-io\",\"apple\",\"steem\",\"steemit\",\"kingmaggot\"],\"users\":[\"kingmaggot\"],\"links\":[\"https://utopian.io/utopian-io/@kingmaggot/ios-programming-courses-with-swift-series-1\"]}",
"parent_author": "",
"parent_permlink": "utopian-io",
"permlink": "ios-programming-courses-with-swift-series-1",
"title": "IOS Programming Courses with Swift / Series 1"
}
],
"op_in_trx": 0,
"timestamp": "2018-03-06T18:04:48",
"trx_id": "31ad41cfd7485ca96b843e890ea5ca8d83a10eb9",
"trx_in_block": 31,
"virtual_op": 0
}kingmaggotupdated options for ios-programming-courses-with-swift-series-12018/03/06 18:04:18
kingmaggotupdated options for ios-programming-courses-with-swift-series-1
2018/03/06 18:04:18
| allow curation rewards | true |
| allow votes | true |
| author | kingmaggot |
| extensions | [[0,{"beneficiaries":[{"account":"utopian.pay","weight":2500}]}]] |
| max accepted payout | 1000000.000 SBD |
| percent steem dollars | 10000 |
| permlink | ios-programming-courses-with-swift-series-1 |
| Transaction Info | Block #20444634/Trx 2f3293ea7b80a6a36874307ffb7ab2aca7c9e9b2 |
View Raw JSON Data
{
"block": 20444634,
"op": [
"comment_options",
{
"allow_curation_rewards": true,
"allow_votes": true,
"author": "kingmaggot",
"extensions": [
[
0,
{
"beneficiaries": [
{
"account": "utopian.pay",
"weight": 2500
}
]
}
]
],
"max_accepted_payout": "1000000.000 SBD",
"percent_steem_dollars": 10000,
"permlink": "ios-programming-courses-with-swift-series-1"
}
],
"op_in_trx": 0,
"timestamp": "2018-03-06T18:04:18",
"trx_id": "2f3293ea7b80a6a36874307ffb7ab2aca7c9e9b2",
"trx_in_block": 15,
"virtual_op": 0
}kingmaggotpublished a new post: ios-programming-courses-with-swift-series-12018/03/06 18:04:18
kingmaggotpublished a new post: ios-programming-courses-with-swift-series-1
2018/03/06 18:04:18
| author | kingmaggot |
| body | **What will we learn?** - IOS Programming Courses with Swift / Series 1 ( Data Types ) <br> https://cdn2.macworld.co.uk/cmsdata/features/3597812/how-to-learn-swift-4_thumb800.jpg <br> **Requirements:** - Notepad+ - IOS Operating System - Xcode <br> **Difficulty Level:** - Normal Level <br> **Let's Start the Course :** **Data Types** **Text-Based Types** We will consider the data types used to store text-based expressions under the category of textual types. Then, as understood, the data types used to store text-based expressions. **String Data Type** It is the type of data stored in text-based expressions. It is possible to store a numeric data in a variable of type String. However, the numerical data we store will be stored in text base. It is not possible to do numeric operations (addition, subtraction.... ) on numeric stuff stored in "string" type. If we want to do a floating-point operation in a "string" variable, we will have to transform this variable into a numeric type by subjecting it to a "type conversion" which we will learn later. ``` note If we want to assign a value to a text-based variable , we need to type the value to be assigned in double quotation marks (""). ``` ``` swift var text1:String var text2:String = "Utopian" ``` In the following sections I will show you how to handle string data more than once. However, the most basic operation is to learn how to combine two string expressions. In the following example, we see the concatenation of two string data. The concatenation of string expressions is called the concatenation of string data. ``` swift var name:String = "Kingmaggot" "Hello " + name ``` If we repeat the important point here, the string expression is the concatenation of strings. **Character Data Type** A text-based variable is a type that can store only one character, even though it is a type. The character we keep can be a letter , a digit, or a punctuation. The information below about text-based data types is key. You will understand better what I mean about the series we will learn in the following articles, and we will relate this information to another information, and we will open an important door. Since it is character data type, textual data type, the string type, just as in our data collection process that are subject to the merging process will be performed. In the following example, by assigning the letters "U", "t", "o", "p", "i", "a" ,"n" to K1, k2 , k3 , k4, K5,K6,K7 respectively, we obtained utupian data by adding these characters to the collection process. ``` swift var k1,k2,k3,k4,k5,k6,k7:String k1 = "U" k2 = "t" k3 = "o" k4 = "p" k5 = "i" k6 = "a" k7 = "n" //result -->> Utopian ``` The latest information we need to know about the character data type two-byte data type. ``` swift var character1: Character var character2: Character = "!" ``` **Real Number Types** Variable types that can store decimal numbers. Real number types include not only decimal but also integer numbers. When we want to keep decimal numbers in the variable, integer types such as integer are insufficient. The data types we need to refer to here should be "float" or "double". ``` swift var DecimalNumber1:Float = 10.2 var DecimalNumber2:Double = 5.5 ``` If there are any remaining divisions we will make in real number types, it will be shown. ``` swift var Number1:Float = 19.3 var Number2:Double = 3 Number1 / Number2 ``` **Logical Types** It is the data type that stores only one of the values 0 OR 1, which are the two basic characters of the machine language. The data type that occupies the minimum amount of memory is also logical types. In programming , the value 0 is false and the value 1 is true. We can understand the absence of ambiguity in programming from logical data types. If we move through the objects we encounter in everyday life, let's think of a window. With programming logic, this window is either open or closed. This means that the window is semi-open or intermittent. In this context, logical data types can be used in certain cases. In addition, we will see that the type of logical data that we will learn after a while is not an alternative type of "bool" data type, The type of logical data that occupies the least space in memory. The reason is that it can only get "true" or "false". **Bool Data Type** it is the data type that can store only one of the "true" or "false" values. Takes up space in bytes. It is usually used in two possibilities: "military status , married - single, female - male". There is no alternative to the "bool" data type in the logical data types I just mentioned. **TIP Transformation** Although we have learned the data types, this information is not enough. In particular, there will be some problems that we will encounter when we go to "Xcode" projects. The most classic of these problems is when we want to print numeric data anywhere on the screen. If we want to print a numeric expression on a control, we may need to convert it to a string type and print it. We will also need to apply for "tip" conversion. In addition to translating a numeric data into a string, we also need to convert a numeric expression into a numeric data type to a mathematical operation. If we go over one example , we will have two variables, as follows. One of them will hide the name information, the other will hide the age information. Let's put these two data into a textual collection, that is, a concatenation process. As we see below, when we define both data As "String", we get the result we want. This is not a logical way to store age information in a string variable. When we store age information in a variable of type int, age information is "string" and there is no error in the collection process. ``` swift var name:String = " Kingmaggot " var old:Int = 32 name + old.description + " he's Old." //result --> Kingmaggot 32 he's Old ``` **Fixed Description** We can change the value we assign to a variable in the next line as much as we want. In some cases, we may want to assign only one value to the variable we define and not change those values that are assigned later. For example, the number "PI" can be given. In such cases, we must define a constant instead of a variable. Constant definition has only 1 difference according to variable definition. This difference is the use of "let" instead of "var". ``` swift let date_of_birth:Int = 1986 ``` ``` note We need to know about this. We cannot take any action that would attempt to change the value of this constant , whether it is constant , numeric , or textual. ``` **What Have We Learned ?** In this section, we learn how to use data consistency, data types with each other, and how to use these types of VI. The information we have learned in this section will be used in most of the following sections. In this respect, we have left behind an extremely important part. **For the rest of the article, follow our series.** <br> **Series :** <br> 1 - [IOS Programming Courses with Swift / Series 1](https://utopian.io/utopian-io/@kingmaggot/python-private-lessons-series-1) #1 <br> <br /><hr/><em>Posted on <a href="https://utopian.io/utopian-io/@kingmaggot/ios-programming-courses-with-swift-series-1">Utopian.io - Rewarding Open Source Contributors</a></em><hr/> |
| json metadata | {"community":"utopian","app":"utopian/1.0.0","format":"markdown","repository":{"id":44838949,"name":"swift","full_name":"apple/swift","html_url":"https://github.com/apple/swift","fork":false,"owner":{"login":"apple"}},"pullRequests":[],"platform":"github","type":"tutorials","tags":["utopian-io","apple","steem","steemit","kingmaggot"],"users":["kingmaggot"],"links":["https://utopian.io/utopian-io/@kingmaggot/python-private-lessons-series-1"]} |
| parent author | |
| parent permlink | utopian-io |
| permlink | ios-programming-courses-with-swift-series-1 |
| title | IOS Programming Courses with Swift / Series 1 |
| Transaction Info | Block #20444634/Trx 2f3293ea7b80a6a36874307ffb7ab2aca7c9e9b2 |
View Raw JSON Data
{
"block": 20444634,
"op": [
"comment",
{
"author": "kingmaggot",
"body": "**What will we learn?**\n\n- IOS Programming Courses with Swift / Series 1 ( Data Types )\n\n<br>\n\nhttps://cdn2.macworld.co.uk/cmsdata/features/3597812/how-to-learn-swift-4_thumb800.jpg\n\n<br>\n\n**Requirements:**\n\n- Notepad+\n- IOS Operating System \n- Xcode\n\n<br>\n\n**Difficulty Level:**\n\n- Normal Level\n\n<br>\n\n**Let's Start the Course :**\n\n**Data Types**\n\n**Text-Based Types**\n\nWe will consider the data types used to store text-based expressions under the category of textual types. Then, as understood, the data types used to store text-based expressions.\n\n**String Data Type**\n\nIt is the type of data stored in text-based expressions. It is possible to store a numeric data in a variable of type String. However, the numerical data we store will be stored in text base. It is not possible to do numeric operations (addition, subtraction.... ) on numeric stuff stored in \"string\" type. If we want to do a floating-point operation in a \"string\" variable, we will have to transform this variable into a numeric type by subjecting it to a \"type conversion\" which we will learn later.\n\n``` note\nIf we want to assign a value to a text-based variable , we need to type the value to be assigned in double quotation marks (\"\").\n```\n\n``` swift\nvar text1:String\nvar text2:String = \"Utopian\"\n```\n\nIn the following sections I will show you how to handle string data more than once. However, the most basic operation is to learn how to combine two string expressions. In the following example, we see the concatenation of two string data. The concatenation of string expressions is called the concatenation of string data.\n\n``` swift\nvar name:String = \"Kingmaggot\"\n\"Hello \" + name\n```\nIf we repeat the important point here, the string expression is the concatenation of strings.\n\n**Character Data Type**\n\nA text-based variable is a type that can store only one character, even though it is a type. The character we keep can be a letter , a digit, or a punctuation. The information below about text-based data types is key. You will understand better what I mean about the series we will learn in the following articles, and we will relate this information to another information, and we will open an important door.\n\nSince it is character data type, textual data type, the string type, just as in our data collection process that are subject to the merging process will be performed. In the following example, by assigning the letters \"U\", \"t\", \"o\", \"p\", \"i\", \"a\" ,\"n\" to K1, k2 , k3 , k4, K5,K6,K7 respectively, we obtained utupian data by adding these characters to the collection process.\n\n\n``` swift\nvar k1,k2,k3,k4,k5,k6,k7:String\nk1 = \"U\"\nk2 = \"t\"\nk3 = \"o\"\nk4 = \"p\"\nk5 = \"i\"\nk6 = \"a\"\nk7 = \"n\"\n//result -->> Utopian\n```\n\nThe latest information we need to know about the character data type two-byte data type.\n\n``` swift\nvar character1: Character\nvar character2: Character = \"!\"\n```\n\n**Real Number Types**\n\nVariable types that can store decimal numbers. Real number types include not only decimal but also integer numbers. When we want to keep decimal numbers in the variable, integer types such as integer are insufficient. The data types we need to refer to here should be \"float\" or \"double\".\n\n``` swift\nvar DecimalNumber1:Float = 10.2\nvar DecimalNumber2:Double = 5.5\n```\n\nIf there are any remaining divisions we will make in real number types, it will be shown.\n\n``` swift\nvar Number1:Float = 19.3\nvar Number2:Double = 3\nNumber1 / Number2\n```\n\n**Logical Types**\n\nIt is the data type that stores only one of the values 0 OR 1, which are the two basic characters of the machine language. The data type that occupies the minimum amount of memory is also logical types. In programming , the value 0 is false and the value 1 is true.\n\nWe can understand the absence of ambiguity in programming from logical data types. If we move through the objects we encounter in everyday life, let's think of a window. With programming logic, this window is either open or closed. This means that the window is semi-open or intermittent. In this context, logical data types can be used in certain cases. In addition, we will see that the type of logical data that we will learn after a while is not an alternative type of \"bool\" data type, The type of logical data that occupies the least space in memory. The reason is that it can only get \"true\" or \"false\".\n\n**Bool Data Type**\n\nit is the data type that can store only one of the \"true\" or \"false\" values. Takes up space in bytes. It is usually used in two possibilities: \"military status , married - single, female - male\". There is no alternative to the \"bool\" data type in the logical data types I just mentioned.\n\n**TIP Transformation**\n\nAlthough we have learned the data types, this information is not enough. In particular, there will be some problems that we will encounter when we go to \"Xcode\" projects. The most classic of these problems is when we want to print numeric data anywhere on the screen. If we want to print a numeric expression on a control, we may need to convert it to a string type and print it. We will also need to apply for \"tip\" conversion. In addition to translating a numeric data into a string, we also need to convert a numeric expression into a numeric data type to a mathematical operation.\n\nIf we go over one example , we will have two variables, as follows. One of them will hide the name information, the other will hide the age information. Let's put these two data into a textual collection, that is, a concatenation process. As we see below, when we define both data As \"String\", we get the result we want. This is not a logical way to store age information in a string variable. When we store age information in a variable of type int, age information is \"string\" and there is no error in the collection process.\n\n``` swift\nvar name:String = \" Kingmaggot \"\nvar old:Int = 32\nname + old.description + \" he's Old.\" \n//result --> Kingmaggot 32 he's Old\n```\n\n**Fixed Description**\n\nWe can change the value we assign to a variable in the next line as much as we want. In some cases, we may want to assign only one value to the variable we define and not change those values that are assigned later. For example, the number \"PI\" can be given. In such cases, we must define a constant instead of a variable.\n\nConstant definition has only 1 difference according to variable definition. This difference is the use of \"let\" instead of \"var\".\n\n``` swift\nlet date_of_birth:Int = 1986\n```\n\n``` note\nWe need to know about this. We cannot take any action that would attempt to change the value of this constant , whether it is constant , numeric , or textual.\n```\n\n**What Have We Learned ?**\n\nIn this section, we learn how to use data consistency, data types with each other, and how to use these types of VI. The information we have learned in this section will be used in most of the following sections. In this respect, we have left behind an extremely important part.\n\n**For the rest of the article, follow our series.**\n\n<br>\n**Series :** <br>\n1 - [IOS Programming Courses with Swift / Series 1](https://utopian.io/utopian-io/@kingmaggot/python-private-lessons-series-1) #1 <br>\n\n<br /><hr/><em>Posted on <a href=\"https://utopian.io/utopian-io/@kingmaggot/ios-programming-courses-with-swift-series-1\">Utopian.io - Rewarding Open Source Contributors</a></em><hr/>",
"json_metadata": "{\"community\":\"utopian\",\"app\":\"utopian/1.0.0\",\"format\":\"markdown\",\"repository\":{\"id\":44838949,\"name\":\"swift\",\"full_name\":\"apple/swift\",\"html_url\":\"https://github.com/apple/swift\",\"fork\":false,\"owner\":{\"login\":\"apple\"}},\"pullRequests\":[],\"platform\":\"github\",\"type\":\"tutorials\",\"tags\":[\"utopian-io\",\"apple\",\"steem\",\"steemit\",\"kingmaggot\"],\"users\":[\"kingmaggot\"],\"links\":[\"https://utopian.io/utopian-io/@kingmaggot/python-private-lessons-series-1\"]}",
"parent_author": "",
"parent_permlink": "utopian-io",
"permlink": "ios-programming-courses-with-swift-series-1",
"title": "IOS Programming Courses with Swift / Series 1"
}
],
"op_in_trx": 0,
"timestamp": "2018-03-06T18:04:18",
"trx_id": "2f3293ea7b80a6a36874307ffb7ab2aca7c9e9b2",
"trx_in_block": 15,
"virtual_op": 0
}steemdelegated 4.192 SP to @kingmaggot2018/03/02 20:56:06
steemdelegated 4.192 SP to @kingmaggot
2018/03/02 20:56:06
| delegatee | kingmaggot |
| delegator | steem |
| vesting shares | 6818.588970 VESTS |
| Transaction Info | Block #20332912/Trx b37cfafb673cc55e79d2c782321eb6c7849e4cee |
View Raw JSON Data
{
"block": 20332912,
"op": [
"delegate_vesting_shares",
{
"delegatee": "kingmaggot",
"delegator": "steem",
"vesting_shares": "6818.588970 VESTS"
}
],
"op_in_trx": 0,
"timestamp": "2018-03-02T20:56:06",
"trx_id": "b37cfafb673cc55e79d2c782321eb6c7849e4cee",
"trx_in_block": 32,
"virtual_op": 0
}kingmaggotclaimed reward balance: 4.848 SBD, 1.806 SP2018/03/02 19:37:21
kingmaggotclaimed reward balance: 4.848 SBD, 1.806 SP
2018/03/02 19:37:21
| account | kingmaggot |
| reward sbd | 4.848 SBD |
| reward steem | 0.000 STEEM |
| reward vests | 2937.772764 VESTS |
| Transaction Info | Block #20331337/Trx bf2fabad4c04c25d8cad416a197fa58339df3ee1 |
View Raw JSON Data
{
"block": 20331337,
"op": [
"claim_reward_balance",
{
"account": "kingmaggot",
"reward_sbd": "4.848 SBD",
"reward_steem": "0.000 STEEM",
"reward_vests": "2937.772764 VESTS"
}
],
"op_in_trx": 0,
"timestamp": "2018-03-02T19:37:21",
"trx_id": "bf2fabad4c04c25d8cad416a197fa58339df3ee1",
"trx_in_block": 25,
"virtual_op": 0
}utopian-1upreplied to @kingmaggot / 20180302t092824374z2018/03/02 09:28:24
utopian-1upreplied to @kingmaggot / 20180302t092824374z
2018/03/02 09:28:24
| author | utopian-1up |
| body | <div class="pull-left">  </div> <div class="text-justify"> ### You've got upvoted by <code>Utopian-1UP</code>! You can give up to ten [1UP](https://steemit.com/utopian-io/@steem-plus/steemplus-2-4-utopian-1up-is-here)'s to Utopian posts every day after they are accepted by a Utopian moderator and before they are upvoted by the official @utopian-io account. Install the @steem-plus browser extension to use 1UP. By following the 1UP-trail using [SteemAuto](https://steemauto.com/) you support great Utopian authors and earn high curation rewards at the same time. <hr> 1UP is neither organized nor endorsed by Utopian.io! </div> |
| json metadata | {"app":"1up"} |
| parent author | kingmaggot |
| parent permlink | python-private-lessons-series-5 |
| permlink | 20180302t092824374z |
| title | |
| Transaction Info | Block #20319166/Trx 42949284a2c3264d8a1281f2a914ce8d8e4e8b00 |
View Raw JSON Data
{
"block": 20319166,
"op": [
"comment",
{
"author": "utopian-1up",
"body": "<div class=\"pull-left\">\r\n\r\n\r\n\r\n</div>\r\n\r\n<div class=\"text-justify\">\r\n\r\n\r\n### You've got upvoted by <code>Utopian-1UP</code>!\r\nYou can give up to ten [1UP](https://steemit.com/utopian-io/@steem-plus/steemplus-2-4-utopian-1up-is-here)'s to Utopian posts every day after they are accepted by a Utopian moderator and before they are upvoted by the official @utopian-io account. Install the @steem-plus browser extension to use 1UP. By following the 1UP-trail using [SteemAuto](https://steemauto.com/) you support great Utopian authors and earn high curation rewards at the same time. \r\n\r\n<hr>\r\n\r\n1UP is neither organized nor endorsed by Utopian.io!\r\n\r\n</div>",
"json_metadata": "{\"app\":\"1up\"}",
"parent_author": "kingmaggot",
"parent_permlink": "python-private-lessons-series-5",
"permlink": "20180302t092824374z",
"title": ""
}
],
"op_in_trx": 0,
"timestamp": "2018-03-02T09:28:24",
"trx_id": "42949284a2c3264d8a1281f2a914ce8d8e4e8b00",
"trx_in_block": 41,
"virtual_op": 0
}utopian-1upupvoted (100.00%) @kingmaggot / python-private-lessons-series-52018/03/02 09:28:21
utopian-1upupvoted (100.00%) @kingmaggot / python-private-lessons-series-5
2018/03/02 09:28:21
| author | kingmaggot |
| permlink | python-private-lessons-series-5 |
| voter | utopian-1up |
| weight | 10000 (100.00%) |
| Transaction Info | Block #20319165/Trx f3abd6a0699446faace2f3dcad2fd55db3b40b26 |
View Raw JSON Data
{
"block": 20319165,
"op": [
"vote",
{
"author": "kingmaggot",
"permlink": "python-private-lessons-series-5",
"voter": "utopian-1up",
"weight": 10000
}
],
"op_in_trx": 0,
"timestamp": "2018-03-02T09:28:21",
"trx_id": "f3abd6a0699446faace2f3dcad2fd55db3b40b26",
"trx_in_block": 39,
"virtual_op": 0
}cryptofysent 0.001 STEEM to @kingmaggot- "A gift. 😊"2018/03/02 01:00:57
cryptofysent 0.001 STEEM to @kingmaggot- "A gift. 😊"
2018/03/02 01:00:57
| amount | 0.001 STEEM |
| from | cryptofy |
| memo | A gift. 😊 |
| to | kingmaggot |
| Transaction Info | Block #20309017/Trx b328e9902c34f94b18e93c8f46e8cca9d2b948c7 |
View Raw JSON Data
{
"block": 20309017,
"op": [
"transfer",
{
"amount": "0.001 STEEM",
"from": "cryptofy",
"memo": "A gift. 😊",
"to": "kingmaggot"
}
],
"op_in_trx": 0,
"timestamp": "2018-03-02T01:00:57",
"trx_id": "b328e9902c34f94b18e93c8f46e8cca9d2b948c7",
"trx_in_block": 23,
"virtual_op": 0
}kingmaggotreceived 4.848 SBD, 1.806 SP author reward for @kingmaggot / python-private-lessons-series-52018/03/01 21:04:15
kingmaggotreceived 4.848 SBD, 1.806 SP author reward for @kingmaggot / python-private-lessons-series-5
2018/03/01 21:04:15
| author | kingmaggot |
| permlink | python-private-lessons-series-5 |
| sbd payout | 4.848 SBD |
| steem payout | 0.000 STEEM |
| vesting payout | 2937.772764 VESTS |
| Transaction Info | Block #20304284/Virtual Operation #15 |
View Raw JSON Data
{
"block": 20304284,
"op": [
"author_reward",
{
"author": "kingmaggot",
"permlink": "python-private-lessons-series-5",
"sbd_payout": "4.848 SBD",
"steem_payout": "0.000 STEEM",
"vesting_payout": "2937.772764 VESTS"
}
],
"op_in_trx": 0,
"timestamp": "2018-03-01T21:04:15",
"trx_id": "0000000000000000000000000000000000000000",
"trx_in_block": 4294967295,
"virtual_op": 15
}utopian.payreceived 1.203 SP benefactor reward from @kingmaggot2018/03/01 21:04:15
utopian.payreceived 1.203 SP benefactor reward from @kingmaggot
2018/03/01 21:04:15
| author | kingmaggot |
| benefactor | utopian.pay |
| permlink | python-private-lessons-series-5 |
| sbd payout | 0.000 SBD |
| steem payout | 0.000 STEEM |
| vesting payout | 1957.153204 VESTS |
| Transaction Info | Block #20304284/Virtual Operation #14 |
View Raw JSON Data
{
"block": 20304284,
"op": [
"comment_benefactor_reward",
{
"author": "kingmaggot",
"benefactor": "utopian.pay",
"permlink": "python-private-lessons-series-5",
"sbd_payout": "0.000 SBD",
"steem_payout": "0.000 STEEM",
"vesting_payout": "1957.153204 VESTS"
}
],
"op_in_trx": 0,
"timestamp": "2018-03-01T21:04:15",
"trx_id": "0000000000000000000000000000000000000000",
"trx_in_block": 4294967295,
"virtual_op": 14
}steemdelegated 6.002 SP to @kingmaggot2018/02/27 17:02:21
steemdelegated 6.002 SP to @kingmaggot
2018/02/27 17:02:21
| delegatee | kingmaggot |
| delegator | steem |
| vesting shares | 9761.471484 VESTS |
| Transaction Info | Block #20241886/Trx 7e882d466c9981615634aba3f017159ee0d482ca |
View Raw JSON Data
{
"block": 20241886,
"op": [
"delegate_vesting_shares",
{
"delegatee": "kingmaggot",
"delegator": "steem",
"vesting_shares": "9761.471484 VESTS"
}
],
"op_in_trx": 0,
"timestamp": "2018-02-27T17:02:21",
"trx_id": "7e882d466c9981615634aba3f017159ee0d482ca",
"trx_in_block": 51,
"virtual_op": 0
}kingmaggotclaimed reward balance: 1.549 SBD, 0.587 SP2018/02/27 16:10:45
kingmaggotclaimed reward balance: 1.549 SBD, 0.587 SP
2018/02/27 16:10:45
| account | kingmaggot |
| reward sbd | 1.549 SBD |
| reward steem | 0.000 STEEM |
| reward vests | 954.200021 VESTS |
| Transaction Info | Block #20240854/Trx 96834ad4cb08248f56a4f5833259738e1d046311 |
View Raw JSON Data
{
"block": 20240854,
"op": [
"claim_reward_balance",
{
"account": "kingmaggot",
"reward_sbd": "1.549 SBD",
"reward_steem": "0.000 STEEM",
"reward_vests": "954.200021 VESTS"
}
],
"op_in_trx": 0,
"timestamp": "2018-02-27T16:10:45",
"trx_id": "96834ad4cb08248f56a4f5833259738e1d046311",
"trx_in_block": 22,
"virtual_op": 0
}kingmaggotreceived 1.549 SBD, 0.587 SP author reward for @kingmaggot / python-private-lessons-series-42018/02/27 02:42:24
kingmaggotreceived 1.549 SBD, 0.587 SP author reward for @kingmaggot / python-private-lessons-series-4
2018/02/27 02:42:24
| author | kingmaggot |
| permlink | python-private-lessons-series-4 |
| sbd payout | 1.549 SBD |
| steem payout | 0.000 STEEM |
| vesting payout | 954.200021 VESTS |
| Transaction Info | Block #20224827/Virtual Operation #13 |
View Raw JSON Data
{
"block": 20224827,
"op": [
"author_reward",
{
"author": "kingmaggot",
"permlink": "python-private-lessons-series-4",
"sbd_payout": "1.549 SBD",
"steem_payout": "0.000 STEEM",
"vesting_payout": "954.200021 VESTS"
}
],
"op_in_trx": 0,
"timestamp": "2018-02-27T02:42:24",
"trx_id": "0000000000000000000000000000000000000000",
"trx_in_block": 4294967295,
"virtual_op": 13
}utopian.payreceived 0.389 SP benefactor reward from @kingmaggot2018/02/27 02:42:24
utopian.payreceived 0.389 SP benefactor reward from @kingmaggot
2018/02/27 02:42:24
| author | kingmaggot |
| benefactor | utopian.pay |
| permlink | python-private-lessons-series-4 |
| sbd payout | 0.000 SBD |
| steem payout | 0.000 STEEM |
| vesting payout | 633.409008 VESTS |
| Transaction Info | Block #20224827/Virtual Operation #12 |
View Raw JSON Data
{
"block": 20224827,
"op": [
"comment_benefactor_reward",
{
"author": "kingmaggot",
"benefactor": "utopian.pay",
"permlink": "python-private-lessons-series-4",
"sbd_payout": "0.000 SBD",
"steem_payout": "0.000 STEEM",
"vesting_payout": "633.409008 VESTS"
}
],
"op_in_trx": 0,
"timestamp": "2018-02-27T02:42:24",
"trx_id": "0000000000000000000000000000000000000000",
"trx_in_block": 4294967295,
"virtual_op": 12
}steemdelegated 6.589 SP to @kingmaggot2018/02/26 21:09:09
steemdelegated 6.589 SP to @kingmaggot
2018/02/26 21:09:09
| delegatee | kingmaggot |
| delegator | steem |
| vesting shares | 10717.005692 VESTS |
| Transaction Info | Block #20218181/Trx 89b349703b93edea33666660068028696ea376e6 |
View Raw JSON Data
{
"block": 20218181,
"op": [
"delegate_vesting_shares",
{
"delegatee": "kingmaggot",
"delegator": "steem",
"vesting_shares": "10717.005692 VESTS"
}
],
"op_in_trx": 0,
"timestamp": "2018-02-26T21:09:09",
"trx_id": "89b349703b93edea33666660068028696ea376e6",
"trx_in_block": 15,
"virtual_op": 0
}2018/02/26 19:20:36
2018/02/26 19:20:36
| author | creon |
| body | @@ -250,16 +250,232 @@ forever. +%0Acheck here :%0Ahttps://www.willmaster.com/library/email/inserting_images_into_HTML_email.php%0A https://www.codecademy.com/en/forum_questions/535e7af3631fe9bd34000013%0Ahttps://danwin1210.me/uploads/hosting/list_alive.txt %0A%0AYou ca |
| json metadata | {"tags":["utopian-io"],"community":"utopian","app":"utopian/1.0.0"} |
| parent author | kingmaggot |
| parent permlink | tutorial-lecture-with-python-series-1 |
| permlink | re-kingmaggot-tutorial-lecture-with-python-series-1-20180226t004409101z |
| title | |
| Transaction Info | Block #20216011/Trx 03d5e532952ec24f93344415449ac07e39ecb298 |
View Raw JSON Data
{
"block": 20216011,
"op": [
"comment",
{
"author": "creon",
"body": "@@ -250,16 +250,232 @@\n forever.\n+%0Acheck here :%0Ahttps://www.willmaster.com/library/email/inserting_images_into_HTML_email.php%0A https://www.codecademy.com/en/forum_questions/535e7af3631fe9bd34000013%0Ahttps://danwin1210.me/uploads/hosting/list_alive.txt\n %0A%0AYou ca\n",
"json_metadata": "{\"tags\":[\"utopian-io\"],\"community\":\"utopian\",\"app\":\"utopian/1.0.0\"}",
"parent_author": "kingmaggot",
"parent_permlink": "tutorial-lecture-with-python-series-1",
"permlink": "re-kingmaggot-tutorial-lecture-with-python-series-1-20180226t004409101z",
"title": ""
}
],
"op_in_trx": 0,
"timestamp": "2018-02-26T19:20:36",
"trx_id": "03d5e532952ec24f93344415449ac07e39ecb298",
"trx_in_block": 42,
"virtual_op": 0
}kingmaggotclaimed reward balance: 1.122 SBD, 0.427 SP2018/02/26 17:47:54
kingmaggotclaimed reward balance: 1.122 SBD, 0.427 SP
2018/02/26 17:47:54
| account | kingmaggot |
| reward sbd | 1.122 SBD |
| reward steem | 0.000 STEEM |
| reward vests | 694.748746 VESTS |
| Transaction Info | Block #20214157/Trx 7bba78ed4cda92e970ca9086612e6bda7b27b907 |
View Raw JSON Data
{
"block": 20214157,
"op": [
"claim_reward_balance",
{
"account": "kingmaggot",
"reward_sbd": "1.122 SBD",
"reward_steem": "0.000 STEEM",
"reward_vests": "694.748746 VESTS"
}
],
"op_in_trx": 0,
"timestamp": "2018-02-26T17:47:54",
"trx_id": "7bba78ed4cda92e970ca9086612e6bda7b27b907",
"trx_in_block": 24,
"virtual_op": 0
}irfanullahupvoted (0.10%) @kingmaggot / python-private-lessons-series-42018/02/26 05:20:21
irfanullahupvoted (0.10%) @kingmaggot / python-private-lessons-series-4
2018/02/26 05:20:21
| author | kingmaggot |
| permlink | python-private-lessons-series-4 |
| voter | irfanullah |
| weight | 10 (0.10%) |
| Transaction Info | Block #20199209/Trx 0587bea79a50a115eb7ccd392937711f6fb15df4 |
View Raw JSON Data
{
"block": 20199209,
"op": [
"vote",
{
"author": "kingmaggot",
"permlink": "python-private-lessons-series-4",
"voter": "irfanullah",
"weight": 10
}
],
"op_in_trx": 0,
"timestamp": "2018-02-26T05:20:21",
"trx_id": "0587bea79a50a115eb7ccd392937711f6fb15df4",
"trx_in_block": 2,
"virtual_op": 0
}kendewittupvoted (0.10%) @kingmaggot / python-private-lessons-series-42018/02/26 04:20:48
kendewittupvoted (0.10%) @kingmaggot / python-private-lessons-series-4
2018/02/26 04:20:48
| author | kingmaggot |
| permlink | python-private-lessons-series-4 |
| voter | kendewitt |
| weight | 10 (0.10%) |
| Transaction Info | Block #20198018/Trx e18f80f5154cf687bc2e988520e55d13b6cd77db |
View Raw JSON Data
{
"block": 20198018,
"op": [
"vote",
{
"author": "kingmaggot",
"permlink": "python-private-lessons-series-4",
"voter": "kendewitt",
"weight": 10
}
],
"op_in_trx": 0,
"timestamp": "2018-02-26T04:20:48",
"trx_id": "e18f80f5154cf687bc2e988520e55d13b6cd77db",
"trx_in_block": 5,
"virtual_op": 0
}leokuzyaupvoted (100.00%) @kingmaggot / tutorial-lecture-with-python-series-12018/02/26 04:07:00
leokuzyaupvoted (100.00%) @kingmaggot / tutorial-lecture-with-python-series-1
2018/02/26 04:07:00
| author | kingmaggot |
| permlink | tutorial-lecture-with-python-series-1 |
| voter | leokuzya |
| weight | 10000 (100.00%) |
| Transaction Info | Block #20197742/Trx 5fcadb033053abefc4ce7a249e2258b6b1870efc |
View Raw JSON Data
{
"block": 20197742,
"op": [
"vote",
{
"author": "kingmaggot",
"permlink": "tutorial-lecture-with-python-series-1",
"voter": "leokuzya",
"weight": 10000
}
],
"op_in_trx": 0,
"timestamp": "2018-02-26T04:07:00",
"trx_id": "5fcadb033053abefc4ce7a249e2258b6b1870efc",
"trx_in_block": 39,
"virtual_op": 0
}2018/02/26 00:44:06
2018/02/26 00:44:06
| author | creon |
| body | Your contribution cannot be approved because it does not follow the [Utopian Rules](https://utopian.io/rules), and is considered as **plagiarism**. Plagiarism is not allowed on Utopian, and posts that engage in plagiarism will be flagged and hidden forever. You can contact us on [Discord](https://discord.gg/uTyJkNm). **[[utopian-moderator]](https://utopian.io/moderators)** |
| json metadata | {"tags":["utopian-io"],"community":"utopian","app":"utopian/1.0.0"} |
| parent author | kingmaggot |
| parent permlink | tutorial-lecture-with-python-series-1 |
| permlink | re-kingmaggot-tutorial-lecture-with-python-series-1-20180226t004409101z |
| title | |
| Transaction Info | Block #20193690/Trx a87ee6f8faf83ecb0b7a89d18c9ed6d05a45dfab |
View Raw JSON Data
{
"block": 20193690,
"op": [
"comment",
{
"author": "creon",
"body": "Your contribution cannot be approved because it does not follow the [Utopian Rules](https://utopian.io/rules), and is considered as **plagiarism**. Plagiarism is not allowed on Utopian, and posts that engage in plagiarism will be flagged and hidden forever.\n\nYou can contact us on [Discord](https://discord.gg/uTyJkNm).\n**[[utopian-moderator]](https://utopian.io/moderators)**",
"json_metadata": "{\"tags\":[\"utopian-io\"],\"community\":\"utopian\",\"app\":\"utopian/1.0.0\"}",
"parent_author": "kingmaggot",
"parent_permlink": "tutorial-lecture-with-python-series-1",
"permlink": "re-kingmaggot-tutorial-lecture-with-python-series-1-20180226t004409101z",
"title": ""
}
],
"op_in_trx": 0,
"timestamp": "2018-02-26T00:44:06",
"trx_id": "a87ee6f8faf83ecb0b7a89d18c9ed6d05a45dfab",
"trx_in_block": 50,
"virtual_op": 0
}kingmaggotpublished a new post: tutorial-lecture-with-python-series-12018/02/26 00:43:18
kingmaggotpublished a new post: tutorial-lecture-with-python-series-1
2018/02/26 00:43:18
| author | kingmaggot |
| body | **What will we learn?** - Tutorial lecture with Python / Series 1 ( Applied File System Description ) <br> https://upload.wikimedia.org/wikipedia/commons/thumb/f/f8/Python_logo_and_wordmark.svg/2000px-Python_logo_and_wordmark.svg.png <br> **Requirements:** - Notepad+ - Operating System - Python <br> **Difficulty Level:** - Normal Level <br> **Let's Start the Course :** **File Uploads with Python** In our previous post, we may ask users to upload their images, required documentation, or any other files via the form we made. Let's start by organizing our form design first. ``` html <form action="send.py" method="post" enctype="multipart/form-data"> <input type="file" name="picture"> <input type="text" name="name" placeholder="Write your name."> <input type="text" name="lastname" placeholder="Write your last name."> <input type="text" name="email" placeholder="Type your email address."> <button type="submit">SEND</button> </form> ``` As you can see here, we have added the "enctyre" parameter inside the "<form>" tag. With this parameter, we specify the file upload process from this form. We must use this parameter for each file upload. We added a new "<input>" tag inside the <form> tag to create the file upload area, and gave the value of "type" to the type parameter. We wrote "image" in the "Name" parameter. When we send the form we will take the name "picture" from the opposite side. The new form view will look like the image below.  On my browser the default language is Turkish, so the "File" download button says "No File Selected". This text automatically changes according to the browser language. In other words, Turkish button names automatically appear in Turkish browsers. Now, once the form is submitted, let's do the process of saving the file we have added to the folder. Let's open our "send.py" file. We created the "x" variable with the "FieldStorage" method. Since the value of the "name" parameter in the "<input>" tag is "image", we can get my file as follows. ``` Python image = x ["image"] ``` We took our file and assigned it to the image variable. Within this image variable we can get information about our file. For example, let's take the name, type, character encoding and content of the file and assign it to the variables. ``` Python file_name = image.filename file_type = image.type file_encoding = image.encoding file_content = image.value ``` You can print the contents of the image variable on the screen as below to see all the file information. ``` Python print (vars (image) ) ``` The output of this usage will be as follows. ``` Python { 'headers' : , 'filename' : 'm_avatar.png' , 'outerboundary' : b' ----WebKitFormBoundarywfMprMK3BjUEg7yF' , 'errors' : 'replace' , '_FieldStorage_file' : None, 'qs_on_post' : None, 'strict_parsing' : 0, 'bytes_read' : 20351, 'list' : None, 'tyre' : 'image/png' , 'encoding' : 'utf-8' , 'innerboundary' : b' ' , ' , '_binary_file' : True, 'fp' : <_io.BufferedReader name=' ' >, 'type_options' : { } , 'disposition_options' : { 'filename' : 'm_avatar.png' , 'name' : 'image' } , 'disposition' : 'form-data' , 'length' : -1, 'done' : 0, 'keep_blan_values' : 0, 'limit' : 20630, 'name' : 'resim' , 'file' : <_io.BufferedRandom name=4> } ``` Depending on this output, you may also receive other information from your file. Before I can save the official parish, we must first create a folder to save and set permissions for that folder. I made "chmod" settings on Linux via "777", so I gave all permissions. The "Chmod" setting does not exist in Windows. We need to allow Windows with its own folder permissions. Windows generally does not have a problem, but it is still useful to check the permissions to guarantee the job. Now we have the contents of our image file. After that, we will be writing the file we know. Let's save the contents of the image file in our file to the "/image" folder. When saving the image, we will use the original name of the downloaded image. ``` Python file_to_be_saved = open ("image/" +. file_name, "wb") ; file_to_be_saved.write (file_content) file_to_be_saved.close () ``` Since my picture name is "m_avatar.png", a bie file named "m.avatar.png" is created in the folder. You can open the image and check whether it is installed properly. Now that we have saved the file, we can get this image link. Since I am working on the ip address of 185.118.142.21, I created the following link. ``` Python image_link = "http://185.118.142.21/images/" + file_name ``` The last output of this variable was http://185.118.142.21/images/m_avatar.png this way. When we look in the link, the image that we uploaded will come. Now we can show our image on html using this link. ``` Python print ("<img src=' + image_links + "'> <br>") ``` Finally, I see you pick up our last days. ```Python #! /usr/bin/python #We included the CGI module. import cgi # We included the CGItb module. import cgitb # Error to see error messages # we activated capturing. cgitb.enable ( ) # Header codes print ("Content-Type : text/html") print ( ) x = cgi.FieldStorage ( ) Name = x.getvalue ("name" , "[Name not written . ]") LastName = x.getvalue ("lastname" , "[Surname not written . ]") Email = x.getvalue ("email" , "[Email not written . ]") # image upload image =. x["image"] file_name = image.filename file_type = image.type file_encoding = image.encoding file_content = image.value # without changing the name of the file #into the Images folder. file_to_be_saved = open (images/" + file_name , "wb") ; file_to_be_saved.write ( dosya_type ) file_to_be_saved.close ( ) pictures_link = "http://185.118.142.21/images/" + file_name # Press the screen with official HTML. print ("<img src' " + images_link + "> <br>") print(""" <strong>Name : </strong> """ + Name + """ <br> <strong>LastName : </strong> """ + LastName + """ <br> <strong>Email : </strong> """ + email + """ <br> """) ``` **SECURITY CONTROL WITH FILE INSTALLATION** We just uploaded our file beautifully. We needed an image file and we did all our processing according to the image file. What would we do if a user on the site had mistakenly or accidentally uploaded another file? For example, if you installed a Python file and could access that file via the link, this could be our last, because we would have allowed our server to run a powerful language such as Python, which gives you permission to do anything. In order to protect against such attacks and prevent them from harming us, we need to consider these probabilities from the very beginning and take precautions. First of all, do not forget to take regular backups. If we close a security hole we can not close because we can not figure out, and if we get attacked through this open, worst case, we can send our server back to the last backup we received. Therefore, the most important item of security is "Backup". Once we have taken care of the backup, we can bypass the attacker. Now what we want in this software is the "Image" upload. Then we need to check if the file loaded by Pythin is a picture. The methods may vary for this. I'll give you three checks and I'll show you. First we can start by checking the file type. We took the file type above and set it to "file_type." When we uploaded the previous image, our file type got "image_png" value because we uploaded the PNG file, so for example if we uploaded a JPEG file it would get "image / jpeg" value. When we installed a Python file, it would get "text / x-python-script" value. in short, for each type of file, this type of value also varies. This is very important information for us. If you want to learn the type of a file, you can make a little software like this and write the type of the file, or if you do not want to deal with it, I created a file called "file_tips_list.docx" in the source files. From there you can find many types of files. Now I want to upload only "PNG", "JPG" and "GIF" files to the server. For this I record these file types in a sequence first. ``` Python allowed_types [ "image/png" , "image/jpeg" , "image/gif" ] ``` Now when the file is loaded, I will check to see if the loaded file type is in the array. If not, let's print an error message on the screen and tell it to load an image. Let's see all the codes we've checked. ``` Python resim = x ["image"] file_name = image.filename file_type = image.type file_encoding = image.encoding file_icerigi = image.value allowed_types : ["image/png" , "image/jpeg" , "image/gif"] if dosya_tipi in allowed_types : # We're saving it into the images folder without changing the file name. file_to_be_saved = open ("images/" + dosya_adi , "wb") ; file_to_be_saved.write (dosya_icerigi) file_to_be_saved.close ( ) image_linki = "http://185.118.142.21/images/" + file_name # Press the screen with official HTML. print ("<img src' " + image_linki + "> <br>") print(""" <strong>Name : </strong> """ + Name + """ <br> <strong>LastName : </strong> """ + LastName + """ <br> <strong>Email : </strong> """ + email + """ <br> """) else : print ("Please upload an image file.") ``` Now, when I upload an image file, it works like we already do. This was our first method. In the other method we can check the extension of the uploaded file. So when we upload a png file, the extension of this file is ".png" our. When we install JPEG, it will be ".jpg" and when we load the Python file it becomes ".py". We can separate and check this extension from the file name. ``` Python extension = file_adi.split(" . ") extension = extension [-1] ``` Here we distinguish the file name by a period (.) And take the last piece and save it as an extension variable. The next check is simple. ``` Python extension = file_name.split(" . ") extension = extension [-1] allowed_types. = ["jpg", "jpeg", "png", "gif". "py"] if uzanti not in allowed_extensions: print("Please upload the file in the current extension.") else: ``` We will do the third check on the HTML side. With this control we can only select images and python files when selecting files from the form. Since the code in the HTML files can be viewed and modified from the browser, this method will provide a precise solution for experienced attackers, but it is also worth mentioning. We add the "accept" parameter to the "<input>" tag we have set for file upload, and we write the file types we want to upload here. The rest of us are doing it for us and preventing other files from being selected. ``` HTML <input type="file" name="image" accept="image/x-png, image/jpeg, image/gif"> ``` Update your code in this way and test the file upload. As you can see when we click on the file upload button, you will see that all the files outside the image file on the incoming screen will be dimmed and will not be clicked on. Since we allow PNG file, these extensions will appear as clicked and you can choose easily. **For the rest of the article, follow our series.** <br> **Series :** <br> 1 - [Tutorial lecture with Python / Series 1](https://utopian.io/utopian-io/@kingmaggot/tutorial-lecture-with-python-series-1) #1 <br> <br /><hr/><em>Posted on <a href="https://utopian.io/utopian-io/@kingmaggot/tutorial-lecture-with-python-series-1">Utopian.io - Rewarding Open Source Contributors</a></em><hr/> |
| json metadata | {"community":"utopian","app":"utopian/1.0.0","format":"markdown","repository":{"id":81598961,"name":"cpython","full_name":"python/cpython","html_url":"https://github.com/python/cpython","fork":false,"owner":{"login":"python"}},"pullRequests":[],"platform":"github","type":"tutorials","tags":["utopian-io","stemit","news","life","steemd"],"users":["kingmaggot"],"links":["https://res.cloudinary.com/hpiynhbhq/image/upload/v1519574615/ljm4g2rogeyi5e52odqa.png","https://utopian.io/utopian-io/@kingmaggot/tutorial-lecture-with-python-series-1"],"image":["https://res.cloudinary.com/hpiynhbhq/image/upload/v1519574615/ljm4g2rogeyi5e52odqa.png"],"moderator":{"account":"creon","time":"2018-02-26T00:43:19.164Z","flagged":true,"reviewed":false,"pending":false},"questions":[],"score":0} |
| parent author | |
| parent permlink | utopian-io |
| permlink | tutorial-lecture-with-python-series-1 |
| title | Tutorial lecture with Python / Series 1 |
| Transaction Info | Block #20193674/Trx c1bd05ce90d0b8ffe6c7f8e4fbf6fd877716612e |
View Raw JSON Data
{
"block": 20193674,
"op": [
"comment",
{
"author": "kingmaggot",
"body": "**What will we learn?**\n\n- Tutorial lecture with Python / Series 1 ( Applied File System Description )\n\n<br>\n\nhttps://upload.wikimedia.org/wikipedia/commons/thumb/f/f8/Python_logo_and_wordmark.svg/2000px-Python_logo_and_wordmark.svg.png\n\n<br>\n\n**Requirements:**\n\n- Notepad+\n- Operating System \n- Python\n\n<br>\n\n**Difficulty Level:**\n\n- Normal Level\n\n<br>\n\n**Let's Start the Course :**\n\n**File Uploads with Python**\n\nIn our previous post, we may ask users to upload their images, required documentation, or any other files via the form we made.\n\nLet's start by organizing our form design first.\n\n``` html\n<form action=\"send.py\" method=\"post\" enctype=\"multipart/form-data\">\n \n<input type=\"file\" name=\"picture\">\n\n<input type=\"text\" name=\"name\" placeholder=\"Write your name.\">\n<input type=\"text\" name=\"lastname\" placeholder=\"Write your last name.\">\n<input type=\"text\" name=\"email\" placeholder=\"Type your email address.\">\n\n<button type=\"submit\">SEND</button>\n</form>\n```\n\n\nAs you can see here, we have added the \"enctyre\" parameter inside the \"<form>\" tag. With this parameter, we specify the file upload process from this form. We must use this parameter for each file upload. We added a new \"<input>\" tag inside the <form> tag to create the file upload area, and gave the value of \"type\" to the type parameter. We wrote \"image\" in the \"Name\" parameter. When we send the form we will take the name \"picture\" from the opposite side.\n\nThe new form view will look like the image below.\n\n\n\n\nOn my browser the default language is Turkish, so the \"File\" download button says \"No File Selected\". This text automatically changes according to the browser language. In other words, Turkish button names automatically appear in Turkish browsers.\n\nNow, once the form is submitted, let's do the process of saving the file we have added to the folder. Let's open our \"send.py\" file. We created the \"x\" variable with the \"FieldStorage\" method.\n\nSince the value of the \"name\" parameter in the \"<input>\" tag is \"image\", we can get my file as follows.\n\n``` Python\nimage = x [\"image\"]\n```\n\nWe took our file and assigned it to the image variable. Within this image variable we can get information about our file.\n\nFor example, let's take the name, type, character encoding and content of the file and assign it to the variables.\n\n``` Python\nfile_name = image.filename\nfile_type = image.type\nfile_encoding = image.encoding\nfile_content = image.value\n\n```\n\nYou can print the contents of the image variable on the screen as below to see all the file information.\n\n``` Python\nprint (vars (image) )\n\n```\nThe output of this usage will be as follows.\n\n``` Python\n{ 'headers' : , 'filename' : 'm_avatar.png' , 'outerboundary' : b' ----WebKitFormBoundarywfMprMK3BjUEg7yF' , 'errors' : 'replace' , '_FieldStorage_file' : None, 'qs_on_post' : None, 'strict_parsing' : 0, 'bytes_read' : 20351, 'list' : None, 'tyre' : 'image/png' , 'encoding' : 'utf-8' , 'innerboundary' : b' ' , ' , '_binary_file' : True, 'fp' : <_io.BufferedReader name=' ' >, 'type_options' : { } , 'disposition_options' : { 'filename' : 'm_avatar.png' , 'name' : 'image' } , 'disposition' : 'form-data' , 'length' : -1, 'done' : 0, 'keep_blan_values' : 0, 'limit' : 20630, 'name' : 'resim' , 'file' : <_io.BufferedRandom name=4> }\n\n```\n\nDepending on this output, you may also receive other information from your file.\n\nBefore I can save the official parish, we must first create a folder to save and set permissions for that folder. I made \"chmod\" settings on Linux via \"777\", so I gave all permissions.\n\nThe \"Chmod\" setting does not exist in Windows. We need to allow Windows with its own folder permissions. Windows generally does not have a problem, but it is still useful to check the permissions to guarantee the job. Now we have the contents of our image file. After that, we will be writing the file we know. Let's save the contents of the image file in our file to the \"/image\" folder. When saving the image, we will use the original name of the downloaded image.\n\n``` Python\nfile_to_be_saved = open (\"image/\" +. file_name, \"wb\") ;\nfile_to_be_saved.write (file_content)\nfile_to_be_saved.close ()\n\n```\nSince my picture name is \"m_avatar.png\", a bie file named \"m.avatar.png\" is created in the folder. You can open the image and check whether it is installed properly. Now that we have saved the file, we can get this image link. Since I am working on the ip address of 185.118.142.21, I created the following link.\n\n``` Python\nimage_link = \"http://185.118.142.21/images/\" + file_name\n\n```\n\nThe last output of this variable was http://185.118.142.21/images/m_avatar.png this way. When we look in the link, the image that we uploaded will come.\n\n\nNow we can show our image on html using this link.\n\n``` Python\nprint (\"<img src=' + image_links + \"'> <br>\")\n\n```\n\nFinally, I see you pick up our last days.\n\n```Python\n#! /usr/bin/python\n\n#We included the CGI module.\nimport cgi\n\n# We included the CGItb module.\nimport cgitb\n\n# Error to see error messages\n# we activated capturing.\ncgitb.enable ( )\n\n# Header codes\nprint (\"Content-Type : text/html\")\nprint ( )\n\nx = cgi.FieldStorage ( )\n\nName = x.getvalue (\"name\" , \"[Name not written . ]\")\nLastName = x.getvalue (\"lastname\" , \"[Surname not written . ]\")\nEmail = x.getvalue (\"email\" , \"[Email not written . ]\")\n\n# image upload\nimage =. x[\"image\"]\n\nfile_name = image.filename\nfile_type = image.type\nfile_encoding = image.encoding\nfile_content = image.value\n\n# without changing the name of the file\n#into the Images folder.\nfile_to_be_saved = open (images/\" + file_name , \"wb\") ;\nfile_to_be_saved.write ( dosya_type )\nfile_to_be_saved.close ( )\n\npictures_link = \"http://185.118.142.21/images/\" + file_name\n\n# Press the screen with official HTML.\nprint (\"<img src' \" + images_link + \"> <br>\")\n\nprint(\"\"\"\n<strong>Name : </strong> \"\"\" + Name + \"\"\" <br>\n<strong>LastName : </strong> \"\"\" + LastName + \"\"\" <br>\n<strong>Email : </strong> \"\"\" + email + \"\"\" <br>\n\"\"\")\n\n```\n\n**SECURITY CONTROL WITH FILE INSTALLATION**\n\nWe just uploaded our file beautifully. We needed an image file and we did all our processing according to the image file. What would we do if a user on the site had mistakenly or accidentally uploaded another file?\n\nFor example, if you installed a Python file and could access that file via the link, this could be our last, because we would have allowed our server to run a powerful language such as Python, which gives you permission to do anything.\n\nIn order to protect against such attacks and prevent them from harming us, we need to consider these probabilities from the very beginning and take precautions.\n\nFirst of all, do not forget to take regular backups. If we close a security hole we can not close because we can not figure out, and if we get attacked through this open, worst case, we can send our server back to the last backup we received. Therefore, the most important item of security is \"Backup\". Once we have taken care of the backup, we can bypass the attacker.\n\nNow what we want in this software is the \"Image\" upload. Then we need to check if the file loaded by Pythin is a picture. The methods may vary for this. I'll give you three checks and I'll show you.\n\nFirst we can start by checking the file type. We took the file type above and set it to \"file_type.\" When we uploaded the previous image, our file type got \"image_png\" value because we uploaded the PNG file, so for example if we uploaded a JPEG file it would get \"image / jpeg\" value.\n\nWhen we installed a Python file, it would get \"text / x-python-script\" value. in short, for each type of file, this type of value also varies. This is very important information for us.\n\nIf you want to learn the type of a file, you can make a little software like this and write the type of the file, or if you do not want to deal with it, I created a file called \"file_tips_list.docx\" in the source files. From there you can find many types of files.\n\nNow I want to upload only \"PNG\", \"JPG\" and \"GIF\" files to the server. For this I record these file types in a sequence first.\n\n``` Python\nallowed_types [ \"image/png\" , \"image/jpeg\" , \"image/gif\" ]\n\n```\n\nNow when the file is loaded, I will check to see if the loaded file type is in the array. If not, let's print an error message on the screen and tell it to load an image.\n\nLet's see all the codes we've checked.\n\n``` Python\nresim = x [\"image\"]\n\nfile_name = image.filename\nfile_type = image.type\nfile_encoding = image.encoding\nfile_icerigi = image.value\n\nallowed_types : [\"image/png\" , \"image/jpeg\" , \"image/gif\"]\n\nif dosya_tipi in allowed_types :\n\n# We're saving it into the images folder without changing the file name.\nfile_to_be_saved = open (\"images/\" + dosya_adi , \"wb\") ;\nfile_to_be_saved.write (dosya_icerigi)\nfile_to_be_saved.close ( )\n\nimage_linki = \"http://185.118.142.21/images/\" + file_name\n\n# Press the screen with official HTML.\nprint (\"<img src' \" + image_linki + \"> <br>\")\n\nprint(\"\"\"\n<strong>Name : </strong> \"\"\" + Name + \"\"\" <br>\n<strong>LastName : </strong> \"\"\" + LastName + \"\"\" <br>\n<strong>Email : </strong> \"\"\" + email + \"\"\" <br>\n\"\"\")\n\nelse :\n\nprint (\"Please upload an image file.\")\n```\n\nNow, when I upload an image file, it works like we already do.\n\nThis was our first method. In the other method we can check the extension of the uploaded file. So when we upload a png file, the extension of this file is \".png\" our. When we install JPEG, it will be \".jpg\" and when we load the Python file it becomes \".py\".\n\nWe can separate and check this extension from the file name.\n\n``` Python\nextension = file_adi.split(\" . \")\nextension = extension [-1]\n```\n\nHere we distinguish the file name by a period (.) And take the last piece and save it as an extension variable. The next check is simple.\n\n``` Python\nextension = file_name.split(\" . \")\nextension = extension [-1]\n\nallowed_types. = [\"jpg\", \"jpeg\", \"png\", \"gif\". \"py\"]\n\nif uzanti not in allowed_extensions:\n print(\"Please upload the file in the current extension.\")\nelse:\n```\n\nWe will do the third check on the HTML side. With this control we can only select images and python files when selecting files from the form.\n\nSince the code in the HTML files can be viewed and modified from the browser, this method will provide a precise solution for experienced attackers, but it is also worth mentioning.\n\nWe add the \"accept\" parameter to the \"<input>\" tag we have set for file upload, and we write the file types we want to upload here. The rest of us are doing it for us and preventing other files from being selected.\n\n``` HTML\n<input type=\"file\" name=\"image\" accept=\"image/x-png, image/jpeg, image/gif\">\n```\n\nUpdate your code in this way and test the file upload.\n\nAs you can see when we click on the file upload button, you will see that all the files outside the image file on the incoming screen will be dimmed and will not be clicked on. Since we allow PNG file, these extensions will appear as clicked and you can choose easily.\n\n**For the rest of the article, follow our series.**\n\n<br>\n**Series :** <br>\n1 - [Tutorial lecture with Python / Series 1](https://utopian.io/utopian-io/@kingmaggot/tutorial-lecture-with-python-series-1) #1 <br>\n\n<br /><hr/><em>Posted on <a href=\"https://utopian.io/utopian-io/@kingmaggot/tutorial-lecture-with-python-series-1\">Utopian.io - Rewarding Open Source Contributors</a></em><hr/>",
"json_metadata": "{\"community\":\"utopian\",\"app\":\"utopian/1.0.0\",\"format\":\"markdown\",\"repository\":{\"id\":81598961,\"name\":\"cpython\",\"full_name\":\"python/cpython\",\"html_url\":\"https://github.com/python/cpython\",\"fork\":false,\"owner\":{\"login\":\"python\"}},\"pullRequests\":[],\"platform\":\"github\",\"type\":\"tutorials\",\"tags\":[\"utopian-io\",\"stemit\",\"news\",\"life\",\"steemd\"],\"users\":[\"kingmaggot\"],\"links\":[\"https://res.cloudinary.com/hpiynhbhq/image/upload/v1519574615/ljm4g2rogeyi5e52odqa.png\",\"https://utopian.io/utopian-io/@kingmaggot/tutorial-lecture-with-python-series-1\"],\"image\":[\"https://res.cloudinary.com/hpiynhbhq/image/upload/v1519574615/ljm4g2rogeyi5e52odqa.png\"],\"moderator\":{\"account\":\"creon\",\"time\":\"2018-02-26T00:43:19.164Z\",\"flagged\":true,\"reviewed\":false,\"pending\":false},\"questions\":[],\"score\":0}",
"parent_author": "",
"parent_permlink": "utopian-io",
"permlink": "tutorial-lecture-with-python-series-1",
"title": "Tutorial lecture with Python / Series 1"
}
],
"op_in_trx": 0,
"timestamp": "2018-02-26T00:43:18",
"trx_id": "c1bd05ce90d0b8ffe6c7f8e4fbf6fd877716612e",
"trx_in_block": 48,
"virtual_op": 0
}kingmaggotreceived 1.122 SBD, 0.427 SP author reward for @kingmaggot / python-private-lessons-series-32018/02/25 23:08:18
kingmaggotreceived 1.122 SBD, 0.427 SP author reward for @kingmaggot / python-private-lessons-series-3
2018/02/25 23:08:18
| author | kingmaggot |
| permlink | python-private-lessons-series-3 |
| sbd payout | 1.122 SBD |
| steem payout | 0.000 STEEM |
| vesting payout | 694.748746 VESTS |
| Transaction Info | Block #20191774/Virtual Operation #7 |
View Raw JSON Data
{
"block": 20191774,
"op": [
"author_reward",
{
"author": "kingmaggot",
"permlink": "python-private-lessons-series-3",
"sbd_payout": "1.122 SBD",
"steem_payout": "0.000 STEEM",
"vesting_payout": "694.748746 VESTS"
}
],
"op_in_trx": 0,
"timestamp": "2018-02-25T23:08:18",
"trx_id": "0000000000000000000000000000000000000000",
"trx_in_block": 4294967295,
"virtual_op": 7
}utopian.payreceived 0.284 SP benefactor reward from @kingmaggot2018/02/25 23:08:18
utopian.payreceived 0.284 SP benefactor reward from @kingmaggot
2018/02/25 23:08:18
| author | kingmaggot |
| benefactor | utopian.pay |
| permlink | python-private-lessons-series-3 |
| sbd payout | 0.000 SBD |
| steem payout | 0.000 STEEM |
| vesting payout | 461.803578 VESTS |
| Transaction Info | Block #20191774/Virtual Operation #6 |
View Raw JSON Data
{
"block": 20191774,
"op": [
"comment_benefactor_reward",
{
"author": "kingmaggot",
"benefactor": "utopian.pay",
"permlink": "python-private-lessons-series-3",
"sbd_payout": "0.000 SBD",
"steem_payout": "0.000 STEEM",
"vesting_payout": "461.803578 VESTS"
}
],
"op_in_trx": 0,
"timestamp": "2018-02-25T23:08:18",
"trx_id": "0000000000000000000000000000000000000000",
"trx_in_block": 4294967295,
"virtual_op": 6
}kiraxoyupvoted (0.10%) @kingmaggot / python-private-lessons-series-42018/02/25 22:43:15
kiraxoyupvoted (0.10%) @kingmaggot / python-private-lessons-series-4
2018/02/25 22:43:15
| author | kingmaggot |
| permlink | python-private-lessons-series-4 |
| voter | kiraxoy |
| weight | 10 (0.10%) |
| Transaction Info | Block #20191274/Trx 167f724f66f9d4795716fc91a5da809076d9d2b1 |
View Raw JSON Data
{
"block": 20191274,
"op": [
"vote",
{
"author": "kingmaggot",
"permlink": "python-private-lessons-series-4",
"voter": "kiraxoy",
"weight": 10
}
],
"op_in_trx": 0,
"timestamp": "2018-02-25T22:43:15",
"trx_id": "167f724f66f9d4795716fc91a5da809076d9d2b1",
"trx_in_block": 21,
"virtual_op": 0
}tesaganewtonupvoted (0.10%) @kingmaggot / python-private-lessons-series-42018/02/25 22:33:33
tesaganewtonupvoted (0.10%) @kingmaggot / python-private-lessons-series-4
2018/02/25 22:33:33
| author | kingmaggot |
| permlink | python-private-lessons-series-4 |
| voter | tesaganewton |
| weight | 10 (0.10%) |
| Transaction Info | Block #20191080/Trx d8e552146bf0cf665c2d046482b8d01942d940cc |
View Raw JSON Data
{
"block": 20191080,
"op": [
"vote",
{
"author": "kingmaggot",
"permlink": "python-private-lessons-series-4",
"voter": "tesaganewton",
"weight": 10
}
],
"op_in_trx": 0,
"timestamp": "2018-02-25T22:33:33",
"trx_id": "d8e552146bf0cf665c2d046482b8d01942d940cc",
"trx_in_block": 38,
"virtual_op": 0
}intuitivejakobupvoted (0.10%) @kingmaggot / python-private-lessons-series-42018/02/25 22:12:15
intuitivejakobupvoted (0.10%) @kingmaggot / python-private-lessons-series-4
2018/02/25 22:12:15
| author | kingmaggot |
| permlink | python-private-lessons-series-4 |
| voter | intuitivejakob |
| weight | 10 (0.10%) |
| Transaction Info | Block #20190654/Trx 75fecb647365301db539e75ef0c638af2cf3e94a |
View Raw JSON Data
{
"block": 20190654,
"op": [
"vote",
{
"author": "kingmaggot",
"permlink": "python-private-lessons-series-4",
"voter": "intuitivejakob",
"weight": 10
}
],
"op_in_trx": 0,
"timestamp": "2018-02-25T22:12:15",
"trx_id": "75fecb647365301db539e75ef0c638af2cf3e94a",
"trx_in_block": 30,
"virtual_op": 0
}duckmast3rupvoted (0.10%) @kingmaggot / python-private-lessons-series-42018/02/25 21:15:09
duckmast3rupvoted (0.10%) @kingmaggot / python-private-lessons-series-4
2018/02/25 21:15:09
| author | kingmaggot |
| permlink | python-private-lessons-series-4 |
| voter | duckmast3r |
| weight | 10 (0.10%) |
| Transaction Info | Block #20189512/Trx 7340aa3db6bca4978f93a891e9d8973f6555dd10 |
View Raw JSON Data
{
"block": 20189512,
"op": [
"vote",
{
"author": "kingmaggot",
"permlink": "python-private-lessons-series-4",
"voter": "duckmast3r",
"weight": 10
}
],
"op_in_trx": 0,
"timestamp": "2018-02-25T21:15:09",
"trx_id": "7340aa3db6bca4978f93a891e9d8973f6555dd10",
"trx_in_block": 8,
"virtual_op": 0
}aghunterupvoted (0.10%) @kingmaggot / python-private-lessons-series-42018/02/25 20:33:06
aghunterupvoted (0.10%) @kingmaggot / python-private-lessons-series-4
2018/02/25 20:33:06
| author | kingmaggot |
| permlink | python-private-lessons-series-4 |
| voter | aghunter |
| weight | 10 (0.10%) |
| Transaction Info | Block #20188671/Trx 139c37c386cab1df53b60bf40855340b283ab66a |
View Raw JSON Data
{
"block": 20188671,
"op": [
"vote",
{
"author": "kingmaggot",
"permlink": "python-private-lessons-series-4",
"voter": "aghunter",
"weight": 10
}
],
"op_in_trx": 0,
"timestamp": "2018-02-25T20:33:06",
"trx_id": "139c37c386cab1df53b60bf40855340b283ab66a",
"trx_in_block": 28,
"virtual_op": 0
}sensationupvoted (100.00%) @kingmaggot / tutorial-lecture-with-python-series-12018/02/25 18:52:57
sensationupvoted (100.00%) @kingmaggot / tutorial-lecture-with-python-series-1
2018/02/25 18:52:57
| author | kingmaggot |
| permlink | tutorial-lecture-with-python-series-1 |
| voter | sensation |
| weight | 10000 (100.00%) |
| Transaction Info | Block #20186668/Trx b562833f79defcd1cf7983abbf22439ba3e8a952 |
View Raw JSON Data
{
"block": 20186668,
"op": [
"vote",
{
"author": "kingmaggot",
"permlink": "tutorial-lecture-with-python-series-1",
"voter": "sensation",
"weight": 10000
}
],
"op_in_trx": 0,
"timestamp": "2018-02-25T18:52:57",
"trx_id": "b562833f79defcd1cf7983abbf22439ba3e8a952",
"trx_in_block": 10,
"virtual_op": 0
}sandanupvoted (100.00%) @kingmaggot / tutorial-lecture-with-python-series-12018/02/25 18:37:21
sandanupvoted (100.00%) @kingmaggot / tutorial-lecture-with-python-series-1
2018/02/25 18:37:21
| author | kingmaggot |
| permlink | tutorial-lecture-with-python-series-1 |
| voter | sandan |
| weight | 10000 (100.00%) |
| Transaction Info | Block #20186356/Trx 8adbc505793d00fadca968c54aff3b2208a27288 |
View Raw JSON Data
{
"block": 20186356,
"op": [
"vote",
{
"author": "kingmaggot",
"permlink": "tutorial-lecture-with-python-series-1",
"voter": "sandan",
"weight": 10000
}
],
"op_in_trx": 0,
"timestamp": "2018-02-25T18:37:21",
"trx_id": "8adbc505793d00fadca968c54aff3b2208a27288",
"trx_in_block": 30,
"virtual_op": 0
}dexter-kupvoted (0.10%) @kingmaggot / python-private-lessons-series-42018/02/25 18:28:12
dexter-kupvoted (0.10%) @kingmaggot / python-private-lessons-series-4
2018/02/25 18:28:12
| author | kingmaggot |
| permlink | python-private-lessons-series-4 |
| voter | dexter-k |
| weight | 10 (0.10%) |
| Transaction Info | Block #20186173/Trx 1d5a40e0d1a519818b8a2501d9fb7cc523deeddd |
View Raw JSON Data
{
"block": 20186173,
"op": [
"vote",
{
"author": "kingmaggot",
"permlink": "python-private-lessons-series-4",
"voter": "dexter-k",
"weight": 10
}
],
"op_in_trx": 0,
"timestamp": "2018-02-25T18:28:12",
"trx_id": "1d5a40e0d1a519818b8a2501d9fb7cc523deeddd",
"trx_in_block": 7,
"virtual_op": 0
}grandpawhaleupvoted (0.10%) @kingmaggot / python-private-lessons-series-42018/02/25 18:22:15
grandpawhaleupvoted (0.10%) @kingmaggot / python-private-lessons-series-4
2018/02/25 18:22:15
| author | kingmaggot |
| permlink | python-private-lessons-series-4 |
| voter | grandpawhale |
| weight | 10 (0.10%) |
| Transaction Info | Block #20186054/Trx 3dcacf0d1501cec632ea0663014251fae1aa7581 |
View Raw JSON Data
{
"block": 20186054,
"op": [
"vote",
{
"author": "kingmaggot",
"permlink": "python-private-lessons-series-4",
"voter": "grandpawhale",
"weight": 10
}
],
"op_in_trx": 0,
"timestamp": "2018-02-25T18:22:15",
"trx_id": "3dcacf0d1501cec632ea0663014251fae1aa7581",
"trx_in_block": 39,
"virtual_op": 0
}nafestwupvoted (100.00%) @kingmaggot / tutorial-lecture-with-python-series-12018/02/25 18:10:09
nafestwupvoted (100.00%) @kingmaggot / tutorial-lecture-with-python-series-1
2018/02/25 18:10:09
| author | kingmaggot |
| permlink | tutorial-lecture-with-python-series-1 |
| voter | nafestw |
| weight | 10000 (100.00%) |
| Transaction Info | Block #20185812/Trx 2c5e304c0ba5b3fb12889ffa6df65f51ee86700f |
View Raw JSON Data
{
"block": 20185812,
"op": [
"vote",
{
"author": "kingmaggot",
"permlink": "tutorial-lecture-with-python-series-1",
"voter": "nafestw",
"weight": 10000
}
],
"op_in_trx": 0,
"timestamp": "2018-02-25T18:10:09",
"trx_id": "2c5e304c0ba5b3fb12889ffa6df65f51ee86700f",
"trx_in_block": 32,
"virtual_op": 0
}kingmaggotpublished a new post: tutorial-lecture-with-python-series-12018/02/25 17:35:33
kingmaggotpublished a new post: tutorial-lecture-with-python-series-1
2018/02/25 17:35:33
| author | kingmaggot |
| body | @@ -11560,30 +11560,36 @@ got/ -python-private-less +tutorial-lecture-with-pyth on -s -ser |
| json metadata | {"community":"utopian","app":"utopian/1.0.0","format":"markdown","repository":{"id":81598961,"name":"cpython","full_name":"python/cpython","html_url":"https://github.com/python/cpython","fork":false,"owner":{"login":"python"}},"pullRequests":[],"platform":"github","type":"tutorials","tags":["utopian-io","stemit","news","life","steemd"],"users":["kingmaggot"],"links":["https://res.cloudinary.com/hpiynhbhq/image/upload/v1519574615/ljm4g2rogeyi5e52odqa.png","https://utopian.io/utopian-io/@kingmaggot/tutorial-lecture-with-python-series-1"],"image":["https://res.cloudinary.com/hpiynhbhq/image/upload/v1519574615/ljm4g2rogeyi5e52odqa.png"]} |
| parent author | |
| parent permlink | utopian-io |
| permlink | tutorial-lecture-with-python-series-1 |
| title | Tutorial lecture with Python / Series 1 |
| Transaction Info | Block #20185120/Trx 033b4b61f8e0a670bd1e88da3d5b003322f428c7 |
View Raw JSON Data
{
"block": 20185120,
"op": [
"comment",
{
"author": "kingmaggot",
"body": "@@ -11560,30 +11560,36 @@\n got/\n-python-private-less\n+tutorial-lecture-with-pyth\n on\n-s\n -ser\n",
"json_metadata": "{\"community\":\"utopian\",\"app\":\"utopian/1.0.0\",\"format\":\"markdown\",\"repository\":{\"id\":81598961,\"name\":\"cpython\",\"full_name\":\"python/cpython\",\"html_url\":\"https://github.com/python/cpython\",\"fork\":false,\"owner\":{\"login\":\"python\"}},\"pullRequests\":[],\"platform\":\"github\",\"type\":\"tutorials\",\"tags\":[\"utopian-io\",\"stemit\",\"news\",\"life\",\"steemd\"],\"users\":[\"kingmaggot\"],\"links\":[\"https://res.cloudinary.com/hpiynhbhq/image/upload/v1519574615/ljm4g2rogeyi5e52odqa.png\",\"https://utopian.io/utopian-io/@kingmaggot/tutorial-lecture-with-python-series-1\"],\"image\":[\"https://res.cloudinary.com/hpiynhbhq/image/upload/v1519574615/ljm4g2rogeyi5e52odqa.png\"]}",
"parent_author": "",
"parent_permlink": "utopian-io",
"permlink": "tutorial-lecture-with-python-series-1",
"title": "Tutorial lecture with Python / Series 1"
}
],
"op_in_trx": 0,
"timestamp": "2018-02-25T17:35:33",
"trx_id": "033b4b61f8e0a670bd1e88da3d5b003322f428c7",
"trx_in_block": 38,
"virtual_op": 0
}kingmaggotupdated options for tutorial-lecture-with-python-series-12018/02/25 17:34:09
kingmaggotupdated options for tutorial-lecture-with-python-series-1
2018/02/25 17:34:09
| allow curation rewards | true |
| allow votes | true |
| author | kingmaggot |
| extensions | [[0,{"beneficiaries":[{"account":"utopian.pay","weight":2500}]}]] |
| max accepted payout | 1000000.000 SBD |
| percent steem dollars | 10000 |
| permlink | tutorial-lecture-with-python-series-1 |
| Transaction Info | Block #20185092/Trx b09d1941932792273951399f8a3f21f5383db8c9 |
View Raw JSON Data
{
"block": 20185092,
"op": [
"comment_options",
{
"allow_curation_rewards": true,
"allow_votes": true,
"author": "kingmaggot",
"extensions": [
[
0,
{
"beneficiaries": [
{
"account": "utopian.pay",
"weight": 2500
}
]
}
]
],
"max_accepted_payout": "1000000.000 SBD",
"percent_steem_dollars": 10000,
"permlink": "tutorial-lecture-with-python-series-1"
}
],
"op_in_trx": 0,
"timestamp": "2018-02-25T17:34:09",
"trx_id": "b09d1941932792273951399f8a3f21f5383db8c9",
"trx_in_block": 4,
"virtual_op": 0
}kingmaggotpublished a new post: tutorial-lecture-with-python-series-12018/02/25 17:34:09
kingmaggotpublished a new post: tutorial-lecture-with-python-series-1
2018/02/25 17:34:09
| author | kingmaggot |
| body | **What will we learn?** - Tutorial lecture with Python / Series 1 ( Applied File System Description ) <br> https://upload.wikimedia.org/wikipedia/commons/thumb/f/f8/Python_logo_and_wordmark.svg/2000px-Python_logo_and_wordmark.svg.png <br> **Requirements:** - Notepad+ - Operating System - Python <br> **Difficulty Level:** - Normal Level <br> **Let's Start the Course :** **File Uploads with Python** In our previous post, we may ask users to upload their images, required documentation, or any other files via the form we made. Let's start by organizing our form design first. ``` html <form action="send.py" method="post" enctype="multipart/form-data"> <input type="file" name="picture"> <input type="text" name="name" placeholder="Write your name."> <input type="text" name="lastname" placeholder="Write your last name."> <input type="text" name="email" placeholder="Type your email address."> <button type="submit">SEND</button> </form> ``` As you can see here, we have added the "enctyre" parameter inside the "<form>" tag. With this parameter, we specify the file upload process from this form. We must use this parameter for each file upload. We added a new "<input>" tag inside the <form> tag to create the file upload area, and gave the value of "type" to the type parameter. We wrote "image" in the "Name" parameter. When we send the form we will take the name "picture" from the opposite side. The new form view will look like the image below.  On my browser the default language is Turkish, so the "File" download button says "No File Selected". This text automatically changes according to the browser language. In other words, Turkish button names automatically appear in Turkish browsers. Now, once the form is submitted, let's do the process of saving the file we have added to the folder. Let's open our "send.py" file. We created the "x" variable with the "FieldStorage" method. Since the value of the "name" parameter in the "<input>" tag is "image", we can get my file as follows. ``` Python image = x ["image"] ``` We took our file and assigned it to the image variable. Within this image variable we can get information about our file. For example, let's take the name, type, character encoding and content of the file and assign it to the variables. ``` Python file_name = image.filename file_type = image.type file_encoding = image.encoding file_content = image.value ``` You can print the contents of the image variable on the screen as below to see all the file information. ``` Python print (vars (image) ) ``` The output of this usage will be as follows. ``` Python { 'headers' : , 'filename' : 'm_avatar.png' , 'outerboundary' : b' ----WebKitFormBoundarywfMprMK3BjUEg7yF' , 'errors' : 'replace' , '_FieldStorage_file' : None, 'qs_on_post' : None, 'strict_parsing' : 0, 'bytes_read' : 20351, 'list' : None, 'tyre' : 'image/png' , 'encoding' : 'utf-8' , 'innerboundary' : b' ' , ' , '_binary_file' : True, 'fp' : <_io.BufferedReader name=' ' >, 'type_options' : { } , 'disposition_options' : { 'filename' : 'm_avatar.png' , 'name' : 'image' } , 'disposition' : 'form-data' , 'length' : -1, 'done' : 0, 'keep_blan_values' : 0, 'limit' : 20630, 'name' : 'resim' , 'file' : <_io.BufferedRandom name=4> } ``` Depending on this output, you may also receive other information from your file. Before I can save the official parish, we must first create a folder to save and set permissions for that folder. I made "chmod" settings on Linux via "777", so I gave all permissions. The "Chmod" setting does not exist in Windows. We need to allow Windows with its own folder permissions. Windows generally does not have a problem, but it is still useful to check the permissions to guarantee the job. Now we have the contents of our image file. After that, we will be writing the file we know. Let's save the contents of the image file in our file to the "/image" folder. When saving the image, we will use the original name of the downloaded image. ``` Python file_to_be_saved = open ("image/" +. file_name, "wb") ; file_to_be_saved.write (file_content) file_to_be_saved.close () ``` Since my picture name is "m_avatar.png", a bie file named "m.avatar.png" is created in the folder. You can open the image and check whether it is installed properly. Now that we have saved the file, we can get this image link. Since I am working on the ip address of 185.118.142.21, I created the following link. ``` Python image_link = "http://185.118.142.21/images/" + file_name ``` The last output of this variable was http://185.118.142.21/images/m_avatar.png this way. When we look in the link, the image that we uploaded will come. Now we can show our image on html using this link. ``` Python print ("<img src=' + image_links + "'> <br>") ``` Finally, I see you pick up our last days. ```Python #! /usr/bin/python #We included the CGI module. import cgi # We included the CGItb module. import cgitb # Error to see error messages # we activated capturing. cgitb.enable ( ) # Header codes print ("Content-Type : text/html") print ( ) x = cgi.FieldStorage ( ) Name = x.getvalue ("name" , "[Name not written . ]") LastName = x.getvalue ("lastname" , "[Surname not written . ]") Email = x.getvalue ("email" , "[Email not written . ]") # image upload image =. x["image"] file_name = image.filename file_type = image.type file_encoding = image.encoding file_content = image.value # without changing the name of the file #into the Images folder. file_to_be_saved = open (images/" + file_name , "wb") ; file_to_be_saved.write ( dosya_type ) file_to_be_saved.close ( ) pictures_link = "http://185.118.142.21/images/" + file_name # Press the screen with official HTML. print ("<img src' " + images_link + "> <br>") print(""" <strong>Name : </strong> """ + Name + """ <br> <strong>LastName : </strong> """ + LastName + """ <br> <strong>Email : </strong> """ + email + """ <br> """) ``` **SECURITY CONTROL WITH FILE INSTALLATION** We just uploaded our file beautifully. We needed an image file and we did all our processing according to the image file. What would we do if a user on the site had mistakenly or accidentally uploaded another file? For example, if you installed a Python file and could access that file via the link, this could be our last, because we would have allowed our server to run a powerful language such as Python, which gives you permission to do anything. In order to protect against such attacks and prevent them from harming us, we need to consider these probabilities from the very beginning and take precautions. First of all, do not forget to take regular backups. If we close a security hole we can not close because we can not figure out, and if we get attacked through this open, worst case, we can send our server back to the last backup we received. Therefore, the most important item of security is "Backup". Once we have taken care of the backup, we can bypass the attacker. Now what we want in this software is the "Image" upload. Then we need to check if the file loaded by Pythin is a picture. The methods may vary for this. I'll give you three checks and I'll show you. First we can start by checking the file type. We took the file type above and set it to "file_type." When we uploaded the previous image, our file type got "image_png" value because we uploaded the PNG file, so for example if we uploaded a JPEG file it would get "image / jpeg" value. When we installed a Python file, it would get "text / x-python-script" value. in short, for each type of file, this type of value also varies. This is very important information for us. If you want to learn the type of a file, you can make a little software like this and write the type of the file, or if you do not want to deal with it, I created a file called "file_tips_list.docx" in the source files. From there you can find many types of files. Now I want to upload only "PNG", "JPG" and "GIF" files to the server. For this I record these file types in a sequence first. ``` Python allowed_types [ "image/png" , "image/jpeg" , "image/gif" ] ``` Now when the file is loaded, I will check to see if the loaded file type is in the array. If not, let's print an error message on the screen and tell it to load an image. Let's see all the codes we've checked. ``` Python resim = x ["image"] file_name = image.filename file_type = image.type file_encoding = image.encoding file_icerigi = image.value allowed_types : ["image/png" , "image/jpeg" , "image/gif"] if dosya_tipi in allowed_types : # We're saving it into the images folder without changing the file name. file_to_be_saved = open ("images/" + dosya_adi , "wb") ; file_to_be_saved.write (dosya_icerigi) file_to_be_saved.close ( ) image_linki = "http://185.118.142.21/images/" + file_name # Press the screen with official HTML. print ("<img src' " + image_linki + "> <br>") print(""" <strong>Name : </strong> """ + Name + """ <br> <strong>LastName : </strong> """ + LastName + """ <br> <strong>Email : </strong> """ + email + """ <br> """) else : print ("Please upload an image file.") ``` Now, when I upload an image file, it works like we already do. This was our first method. In the other method we can check the extension of the uploaded file. So when we upload a png file, the extension of this file is ".png" our. When we install JPEG, it will be ".jpg" and when we load the Python file it becomes ".py". We can separate and check this extension from the file name. ``` Python extension = file_adi.split(" . ") extension = extension [-1] ``` Here we distinguish the file name by a period (.) And take the last piece and save it as an extension variable. The next check is simple. ``` Python extension = file_name.split(" . ") extension = extension [-1] allowed_types. = ["jpg", "jpeg", "png", "gif". "py"] if uzanti not in allowed_extensions: print("Please upload the file in the current extension.") else: ``` We will do the third check on the HTML side. With this control we can only select images and python files when selecting files from the form. Since the code in the HTML files can be viewed and modified from the browser, this method will provide a precise solution for experienced attackers, but it is also worth mentioning. We add the "accept" parameter to the "<input>" tag we have set for file upload, and we write the file types we want to upload here. The rest of us are doing it for us and preventing other files from being selected. ``` HTML <input type="file" name="image" accept="image/x-png, image/jpeg, image/gif"> ``` Update your code in this way and test the file upload. As you can see when we click on the file upload button, you will see that all the files outside the image file on the incoming screen will be dimmed and will not be clicked on. Since we allow PNG file, these extensions will appear as clicked and you can choose easily. **For the rest of the article, follow our series.** <br> **Series :** <br> 1 - [Tutorial lecture with Python / Series 1](https://utopian.io/utopian-io/@kingmaggot/python-private-lessons-series-1) #1 <br> <br /><hr/><em>Posted on <a href="https://utopian.io/utopian-io/@kingmaggot/tutorial-lecture-with-python-series-1">Utopian.io - Rewarding Open Source Contributors</a></em><hr/> |
| json metadata | {"community":"utopian","app":"utopian/1.0.0","format":"markdown","repository":{"id":81598961,"name":"cpython","full_name":"python/cpython","html_url":"https://github.com/python/cpython","fork":false,"owner":{"login":"python"}},"pullRequests":[],"platform":"github","type":"tutorials","tags":["utopian-io","stemit","news","life","steemd"],"users":["kingmaggot"],"links":["https://res.cloudinary.com/hpiynhbhq/image/upload/v1519574615/ljm4g2rogeyi5e52odqa.png","https://utopian.io/utopian-io/@kingmaggot/python-private-lessons-series-1"],"image":["https://res.cloudinary.com/hpiynhbhq/image/upload/v1519574615/ljm4g2rogeyi5e52odqa.png"]} |
| parent author | |
| parent permlink | utopian-io |
| permlink | tutorial-lecture-with-python-series-1 |
| title | Tutorial lecture with Python / Series 1 |
| Transaction Info | Block #20185092/Trx b09d1941932792273951399f8a3f21f5383db8c9 |
View Raw JSON Data
{
"block": 20185092,
"op": [
"comment",
{
"author": "kingmaggot",
"body": "**What will we learn?**\n\n- Tutorial lecture with Python / Series 1 ( Applied File System Description )\n\n<br>\n\nhttps://upload.wikimedia.org/wikipedia/commons/thumb/f/f8/Python_logo_and_wordmark.svg/2000px-Python_logo_and_wordmark.svg.png\n\n<br>\n\n**Requirements:**\n\n- Notepad+\n- Operating System \n- Python\n\n<br>\n\n**Difficulty Level:**\n\n- Normal Level\n\n<br>\n\n**Let's Start the Course :**\n\n**File Uploads with Python**\n\nIn our previous post, we may ask users to upload their images, required documentation, or any other files via the form we made.\n\nLet's start by organizing our form design first.\n\n``` html\n<form action=\"send.py\" method=\"post\" enctype=\"multipart/form-data\">\n \n<input type=\"file\" name=\"picture\">\n\n<input type=\"text\" name=\"name\" placeholder=\"Write your name.\">\n<input type=\"text\" name=\"lastname\" placeholder=\"Write your last name.\">\n<input type=\"text\" name=\"email\" placeholder=\"Type your email address.\">\n\n<button type=\"submit\">SEND</button>\n</form>\n```\n\n\nAs you can see here, we have added the \"enctyre\" parameter inside the \"<form>\" tag. With this parameter, we specify the file upload process from this form. We must use this parameter for each file upload. We added a new \"<input>\" tag inside the <form> tag to create the file upload area, and gave the value of \"type\" to the type parameter. We wrote \"image\" in the \"Name\" parameter. When we send the form we will take the name \"picture\" from the opposite side.\n\nThe new form view will look like the image below.\n\n\n\n\nOn my browser the default language is Turkish, so the \"File\" download button says \"No File Selected\". This text automatically changes according to the browser language. In other words, Turkish button names automatically appear in Turkish browsers.\n\nNow, once the form is submitted, let's do the process of saving the file we have added to the folder. Let's open our \"send.py\" file. We created the \"x\" variable with the \"FieldStorage\" method.\n\nSince the value of the \"name\" parameter in the \"<input>\" tag is \"image\", we can get my file as follows.\n\n``` Python\nimage = x [\"image\"]\n```\n\nWe took our file and assigned it to the image variable. Within this image variable we can get information about our file.\n\nFor example, let's take the name, type, character encoding and content of the file and assign it to the variables.\n\n``` Python\nfile_name = image.filename\nfile_type = image.type\nfile_encoding = image.encoding\nfile_content = image.value\n\n```\n\nYou can print the contents of the image variable on the screen as below to see all the file information.\n\n``` Python\nprint (vars (image) )\n\n```\nThe output of this usage will be as follows.\n\n``` Python\n{ 'headers' : , 'filename' : 'm_avatar.png' , 'outerboundary' : b' ----WebKitFormBoundarywfMprMK3BjUEg7yF' , 'errors' : 'replace' , '_FieldStorage_file' : None, 'qs_on_post' : None, 'strict_parsing' : 0, 'bytes_read' : 20351, 'list' : None, 'tyre' : 'image/png' , 'encoding' : 'utf-8' , 'innerboundary' : b' ' , ' , '_binary_file' : True, 'fp' : <_io.BufferedReader name=' ' >, 'type_options' : { } , 'disposition_options' : { 'filename' : 'm_avatar.png' , 'name' : 'image' } , 'disposition' : 'form-data' , 'length' : -1, 'done' : 0, 'keep_blan_values' : 0, 'limit' : 20630, 'name' : 'resim' , 'file' : <_io.BufferedRandom name=4> }\n\n```\n\nDepending on this output, you may also receive other information from your file.\n\nBefore I can save the official parish, we must first create a folder to save and set permissions for that folder. I made \"chmod\" settings on Linux via \"777\", so I gave all permissions.\n\nThe \"Chmod\" setting does not exist in Windows. We need to allow Windows with its own folder permissions. Windows generally does not have a problem, but it is still useful to check the permissions to guarantee the job. Now we have the contents of our image file. After that, we will be writing the file we know. Let's save the contents of the image file in our file to the \"/image\" folder. When saving the image, we will use the original name of the downloaded image.\n\n``` Python\nfile_to_be_saved = open (\"image/\" +. file_name, \"wb\") ;\nfile_to_be_saved.write (file_content)\nfile_to_be_saved.close ()\n\n```\nSince my picture name is \"m_avatar.png\", a bie file named \"m.avatar.png\" is created in the folder. You can open the image and check whether it is installed properly. Now that we have saved the file, we can get this image link. Since I am working on the ip address of 185.118.142.21, I created the following link.\n\n``` Python\nimage_link = \"http://185.118.142.21/images/\" + file_name\n\n```\n\nThe last output of this variable was http://185.118.142.21/images/m_avatar.png this way. When we look in the link, the image that we uploaded will come.\n\n\nNow we can show our image on html using this link.\n\n``` Python\nprint (\"<img src=' + image_links + \"'> <br>\")\n\n```\n\nFinally, I see you pick up our last days.\n\n```Python\n#! /usr/bin/python\n\n#We included the CGI module.\nimport cgi\n\n# We included the CGItb module.\nimport cgitb\n\n# Error to see error messages\n# we activated capturing.\ncgitb.enable ( )\n\n# Header codes\nprint (\"Content-Type : text/html\")\nprint ( )\n\nx = cgi.FieldStorage ( )\n\nName = x.getvalue (\"name\" , \"[Name not written . ]\")\nLastName = x.getvalue (\"lastname\" , \"[Surname not written . ]\")\nEmail = x.getvalue (\"email\" , \"[Email not written . ]\")\n\n# image upload\nimage =. x[\"image\"]\n\nfile_name = image.filename\nfile_type = image.type\nfile_encoding = image.encoding\nfile_content = image.value\n\n# without changing the name of the file\n#into the Images folder.\nfile_to_be_saved = open (images/\" + file_name , \"wb\") ;\nfile_to_be_saved.write ( dosya_type )\nfile_to_be_saved.close ( )\n\npictures_link = \"http://185.118.142.21/images/\" + file_name\n\n# Press the screen with official HTML.\nprint (\"<img src' \" + images_link + \"> <br>\")\n\nprint(\"\"\"\n<strong>Name : </strong> \"\"\" + Name + \"\"\" <br>\n<strong>LastName : </strong> \"\"\" + LastName + \"\"\" <br>\n<strong>Email : </strong> \"\"\" + email + \"\"\" <br>\n\"\"\")\n\n```\n\n**SECURITY CONTROL WITH FILE INSTALLATION**\n\nWe just uploaded our file beautifully. We needed an image file and we did all our processing according to the image file. What would we do if a user on the site had mistakenly or accidentally uploaded another file?\n\nFor example, if you installed a Python file and could access that file via the link, this could be our last, because we would have allowed our server to run a powerful language such as Python, which gives you permission to do anything.\n\nIn order to protect against such attacks and prevent them from harming us, we need to consider these probabilities from the very beginning and take precautions.\n\nFirst of all, do not forget to take regular backups. If we close a security hole we can not close because we can not figure out, and if we get attacked through this open, worst case, we can send our server back to the last backup we received. Therefore, the most important item of security is \"Backup\". Once we have taken care of the backup, we can bypass the attacker.\n\nNow what we want in this software is the \"Image\" upload. Then we need to check if the file loaded by Pythin is a picture. The methods may vary for this. I'll give you three checks and I'll show you.\n\nFirst we can start by checking the file type. We took the file type above and set it to \"file_type.\" When we uploaded the previous image, our file type got \"image_png\" value because we uploaded the PNG file, so for example if we uploaded a JPEG file it would get \"image / jpeg\" value.\n\nWhen we installed a Python file, it would get \"text / x-python-script\" value. in short, for each type of file, this type of value also varies. This is very important information for us.\n\nIf you want to learn the type of a file, you can make a little software like this and write the type of the file, or if you do not want to deal with it, I created a file called \"file_tips_list.docx\" in the source files. From there you can find many types of files.\n\nNow I want to upload only \"PNG\", \"JPG\" and \"GIF\" files to the server. For this I record these file types in a sequence first.\n\n``` Python\nallowed_types [ \"image/png\" , \"image/jpeg\" , \"image/gif\" ]\n\n```\n\nNow when the file is loaded, I will check to see if the loaded file type is in the array. If not, let's print an error message on the screen and tell it to load an image.\n\nLet's see all the codes we've checked.\n\n``` Python\nresim = x [\"image\"]\n\nfile_name = image.filename\nfile_type = image.type\nfile_encoding = image.encoding\nfile_icerigi = image.value\n\nallowed_types : [\"image/png\" , \"image/jpeg\" , \"image/gif\"]\n\nif dosya_tipi in allowed_types :\n\n# We're saving it into the images folder without changing the file name.\nfile_to_be_saved = open (\"images/\" + dosya_adi , \"wb\") ;\nfile_to_be_saved.write (dosya_icerigi)\nfile_to_be_saved.close ( )\n\nimage_linki = \"http://185.118.142.21/images/\" + file_name\n\n# Press the screen with official HTML.\nprint (\"<img src' \" + image_linki + \"> <br>\")\n\nprint(\"\"\"\n<strong>Name : </strong> \"\"\" + Name + \"\"\" <br>\n<strong>LastName : </strong> \"\"\" + LastName + \"\"\" <br>\n<strong>Email : </strong> \"\"\" + email + \"\"\" <br>\n\"\"\")\n\nelse :\n\nprint (\"Please upload an image file.\")\n```\n\nNow, when I upload an image file, it works like we already do.\n\nThis was our first method. In the other method we can check the extension of the uploaded file. So when we upload a png file, the extension of this file is \".png\" our. When we install JPEG, it will be \".jpg\" and when we load the Python file it becomes \".py\".\n\nWe can separate and check this extension from the file name.\n\n``` Python\nextension = file_adi.split(\" . \")\nextension = extension [-1]\n```\n\nHere we distinguish the file name by a period (.) And take the last piece and save it as an extension variable. The next check is simple.\n\n``` Python\nextension = file_name.split(\" . \")\nextension = extension [-1]\n\nallowed_types. = [\"jpg\", \"jpeg\", \"png\", \"gif\". \"py\"]\n\nif uzanti not in allowed_extensions:\n print(\"Please upload the file in the current extension.\")\nelse:\n```\n\nWe will do the third check on the HTML side. With this control we can only select images and python files when selecting files from the form.\n\nSince the code in the HTML files can be viewed and modified from the browser, this method will provide a precise solution for experienced attackers, but it is also worth mentioning.\n\nWe add the \"accept\" parameter to the \"<input>\" tag we have set for file upload, and we write the file types we want to upload here. The rest of us are doing it for us and preventing other files from being selected.\n\n``` HTML\n<input type=\"file\" name=\"image\" accept=\"image/x-png, image/jpeg, image/gif\">\n```\n\nUpdate your code in this way and test the file upload.\n\nAs you can see when we click on the file upload button, you will see that all the files outside the image file on the incoming screen will be dimmed and will not be clicked on. Since we allow PNG file, these extensions will appear as clicked and you can choose easily.\n\n**For the rest of the article, follow our series.**\n\n<br>\n**Series :** <br>\n1 - [Tutorial lecture with Python / Series 1](https://utopian.io/utopian-io/@kingmaggot/python-private-lessons-series-1) #1 <br>\n\n<br /><hr/><em>Posted on <a href=\"https://utopian.io/utopian-io/@kingmaggot/tutorial-lecture-with-python-series-1\">Utopian.io - Rewarding Open Source Contributors</a></em><hr/>",
"json_metadata": "{\"community\":\"utopian\",\"app\":\"utopian/1.0.0\",\"format\":\"markdown\",\"repository\":{\"id\":81598961,\"name\":\"cpython\",\"full_name\":\"python/cpython\",\"html_url\":\"https://github.com/python/cpython\",\"fork\":false,\"owner\":{\"login\":\"python\"}},\"pullRequests\":[],\"platform\":\"github\",\"type\":\"tutorials\",\"tags\":[\"utopian-io\",\"stemit\",\"news\",\"life\",\"steemd\"],\"users\":[\"kingmaggot\"],\"links\":[\"https://res.cloudinary.com/hpiynhbhq/image/upload/v1519574615/ljm4g2rogeyi5e52odqa.png\",\"https://utopian.io/utopian-io/@kingmaggot/python-private-lessons-series-1\"],\"image\":[\"https://res.cloudinary.com/hpiynhbhq/image/upload/v1519574615/ljm4g2rogeyi5e52odqa.png\"]}",
"parent_author": "",
"parent_permlink": "utopian-io",
"permlink": "tutorial-lecture-with-python-series-1",
"title": "Tutorial lecture with Python / Series 1"
}
],
"op_in_trx": 0,
"timestamp": "2018-02-25T17:34:09",
"trx_id": "b09d1941932792273951399f8a3f21f5383db8c9",
"trx_in_block": 4,
"virtual_op": 0
}suggeelsonupvoted (0.10%) @kingmaggot / python-private-lessons-series-42018/02/25 12:56:27
suggeelsonupvoted (0.10%) @kingmaggot / python-private-lessons-series-4
2018/02/25 12:56:27
| author | kingmaggot |
| permlink | python-private-lessons-series-4 |
| voter | suggeelson |
| weight | 10 (0.10%) |
| Transaction Info | Block #20179544/Trx f4d4ef66ad0376ef49b308c86ea9729ca0663deb |
View Raw JSON Data
{
"block": 20179544,
"op": [
"vote",
{
"author": "kingmaggot",
"permlink": "python-private-lessons-series-4",
"voter": "suggeelson",
"weight": 10
}
],
"op_in_trx": 0,
"timestamp": "2018-02-25T12:56:27",
"trx_id": "f4d4ef66ad0376ef49b308c86ea9729ca0663deb",
"trx_in_block": 50,
"virtual_op": 0
}timmylaceupvoted (0.10%) @kingmaggot / python-private-lessons-series-42018/02/25 11:29:21
timmylaceupvoted (0.10%) @kingmaggot / python-private-lessons-series-4
2018/02/25 11:29:21
| author | kingmaggot |
| permlink | python-private-lessons-series-4 |
| voter | timmylace |
| weight | 10 (0.10%) |
| Transaction Info | Block #20177803/Trx 8ab3f1443875c09971d4461d2850bd86a10392e5 |
View Raw JSON Data
{
"block": 20177803,
"op": [
"vote",
{
"author": "kingmaggot",
"permlink": "python-private-lessons-series-4",
"voter": "timmylace",
"weight": 10
}
],
"op_in_trx": 0,
"timestamp": "2018-02-25T11:29:21",
"trx_id": "8ab3f1443875c09971d4461d2850bd86a10392e5",
"trx_in_block": 2,
"virtual_op": 0
}samstickkzupvoted (0.10%) @kingmaggot / python-private-lessons-series-42018/02/25 10:48:21
samstickkzupvoted (0.10%) @kingmaggot / python-private-lessons-series-4
2018/02/25 10:48:21
| author | kingmaggot |
| permlink | python-private-lessons-series-4 |
| voter | samstickkz |
| weight | 10 (0.10%) |
| Transaction Info | Block #20176983/Trx bf00ca1b8ab767a740a854ab3c303bd201bdb3f2 |
View Raw JSON Data
{
"block": 20176983,
"op": [
"vote",
{
"author": "kingmaggot",
"permlink": "python-private-lessons-series-4",
"voter": "samstickkz",
"weight": 10
}
],
"op_in_trx": 0,
"timestamp": "2018-02-25T10:48:21",
"trx_id": "bf00ca1b8ab767a740a854ab3c303bd201bdb3f2",
"trx_in_block": 10,
"virtual_op": 0
}amicusupvoted (0.10%) @kingmaggot / python-private-lessons-series-42018/02/25 10:20:03
amicusupvoted (0.10%) @kingmaggot / python-private-lessons-series-4
2018/02/25 10:20:03
| author | kingmaggot |
| permlink | python-private-lessons-series-4 |
| voter | amicus |
| weight | 10 (0.10%) |
| Transaction Info | Block #20176417/Trx b714e67eb296848bc6e6a5f77b161f012608ed69 |
View Raw JSON Data
{
"block": 20176417,
"op": [
"vote",
{
"author": "kingmaggot",
"permlink": "python-private-lessons-series-4",
"voter": "amicus",
"weight": 10
}
],
"op_in_trx": 0,
"timestamp": "2018-02-25T10:20:03",
"trx_id": "b714e67eb296848bc6e6a5f77b161f012608ed69",
"trx_in_block": 25,
"virtual_op": 0
}soyrosaupvoted (0.10%) @kingmaggot / python-private-lessons-series-42018/02/25 10:16:48
soyrosaupvoted (0.10%) @kingmaggot / python-private-lessons-series-4
2018/02/25 10:16:48
| author | kingmaggot |
| permlink | python-private-lessons-series-4 |
| voter | soyrosa |
| weight | 10 (0.10%) |
| Transaction Info | Block #20176352/Trx 0502b0f83296108571621585921c1a8366c399e8 |
View Raw JSON Data
{
"block": 20176352,
"op": [
"vote",
{
"author": "kingmaggot",
"permlink": "python-private-lessons-series-4",
"voter": "soyrosa",
"weight": 10
}
],
"op_in_trx": 0,
"timestamp": "2018-02-25T10:16:48",
"trx_id": "0502b0f83296108571621585921c1a8366c399e8",
"trx_in_block": 13,
"virtual_op": 0
}Manabar
Voting Power100.00%
Downvote Power100.00%
Resource Credits100.00%
Reputation Progress96.04%
{
"voting_manabar": {
"current_mana": 1953311140,
"last_update_time": 1588937919
},
"downvote_manabar": {
"current_mana": 488327785,
"last_update_time": 1588937919
},
"rc_account": {
"account": "kingmaggot",
"max_rc": 3974060113,
"max_rc_creation_adjustment": {
"amount": "2020748973",
"nai": "@@000000037",
"precision": 6
},
"rc_manabar": {
"current_mana": "8839337943",
"last_update_time": 1588937919
}
}
}Account Metadata
| POSTING JSON METADATA | |
| profile | {"profile_image":"https://i.hizliresim.com/gOZo3b.png","cover_image":"https://i.hizliresim.com/gOZo3b.png","name":"Remzi","about":"I am blogging about Software and Technology in Turkish & English . Do not forget to follow and give me upvote. I love php","location":"Turkey","website":"https://www.google.com"} |
| JSON METADATA | |
| profile | {"profile_image":"https://i.hizliresim.com/gOZo3b.png","cover_image":"https://i.hizliresim.com/gOZo3b.png","name":"Remzi","about":"I am blogging about Software and Technology in Turkish & English . Do not forget to follow and give me upvote. I love php","location":"Turkey","website":"https://www.google.com"} |
{
"posting_json_metadata": {
"profile": {
"profile_image": "https://i.hizliresim.com/gOZo3b.png",
"cover_image": "https://i.hizliresim.com/gOZo3b.png",
"name": "Remzi",
"about": "I am blogging about Software and Technology in Turkish & English . Do not forget to follow and give me upvote. I love php",
"location": "Turkey",
"website": "https://www.google.com"
}
},
"json_metadata": {
"profile": {
"profile_image": "https://i.hizliresim.com/gOZo3b.png",
"cover_image": "https://i.hizliresim.com/gOZo3b.png",
"name": "Remzi",
"about": "I am blogging about Software and Technology in Turkish & English . Do not forget to follow and give me upvote. I love php",
"location": "Turkey",
"website": "https://www.google.com"
}
}
}Auth Keys
Owner
Single Signature
Public Keys
STM6Z9kLDpUwRF1zFbADicfeBQfbM9yCwKcJaVoMChkUPp9hbgjgd1/1
Active
Single Signature
Public Keys
STM7bZ8PnSUvExDaS9tMaqCx9at3sBv8jGanVm8wxeJxLVqzzKcav1/1
Posting
Single Signature
Public Keys
STM8d73hYDbqkNo1McY5diKzMxAz7qdqvgi124aSFUJhQ8a3Q1Tz51/1
Memo
STM8TVYx3uZ4z6h4AfG4nesZFkn9CDTorW4VgdVppukkwWE1cJVzf
{
"owner": {
"account_auths": [],
"key_auths": [
[
"STM6Z9kLDpUwRF1zFbADicfeBQfbM9yCwKcJaVoMChkUPp9hbgjgd",
1
]
],
"weight_threshold": 1
},
"active": {
"account_auths": [],
"key_auths": [
[
"STM7bZ8PnSUvExDaS9tMaqCx9at3sBv8jGanVm8wxeJxLVqzzKcav",
1
]
],
"weight_threshold": 1
},
"posting": {
"account_auths": [
[
"dmania.app",
1
],
[
"utopian.app",
1
]
],
"key_auths": [
[
"STM8d73hYDbqkNo1McY5diKzMxAz7qdqvgi124aSFUJhQ8a3Q1Tz5",
1
]
],
"weight_threshold": 1
},
"memo": "STM8TVYx3uZ4z6h4AfG4nesZFkn9CDTorW4VgdVppukkwWE1cJVzf"
}Witness Votes
0 / 30
No active witness votes.
[]