Software programing
رفتن به کانال در Telegram
This is a channel which gives tutorial on different programming languages, android tips and tricks best apps etc...
نمایش بیشتر1 471
مشترکین
اطلاعاتی وجود ندارد24 ساعت
اطلاعاتی وجود ندارد7 روز
اطلاعاتی وجود ندارد30 روز
آرشیو پست ها
1 471
#Virus_pranks
On javaScruipt
<button onclick="a()">next</button>
<script>
function a(){
alert("you are attacked with virus");
}
for(i=1;i<1000;i++){
a();
}
Save the file as next.html
This virus won't hurt your devise.just prank
1 471
10 Facts About Python Programming Language, All Programmers Should Know
via www.houseofbots.com
1 471
Top 5 Best Text Editor For Windows In 2019
https://www.techtimes.com/amp/articles/240045/20190325/top-5-best-text-editor-windows-2019.htm
1 471
#29
#pytricks
🔱 More on with statement 🔱
📌What is context manager?
It's a simple interface that your object needs to follow in order to support the with statement.
📌Basically all you need to do is add enter and exit methods to an object if you want it to function as a context manager.
class ManagedFile:
def init(self , name):
self.name = name
def enter(self):
self.file = open(self.name, 'w')
return self.file
def exit(self, exc_type, exc_valu, exc_tb):
if self.file:
self.file.close()
📌Our ManagedFile class follows the context manager protocol and now the with statement just like the original open() example did:
with ManagedFile('hello txt' , 'w') as f:
f.write('hello, world')
📌for more information 👇
https://dbader.org/blog/python-context-managers-and-with-statement
1 471
We will do #cross promotion and #paid promotion.with simple payment.
inbox @Fikire2 and @Alphadmin12
1 471
✳️How to create interactive website without programming ✳️
1, 👉first of all go to the website called www.wordpress.com
2, 👉fill all ur detail to getting started
3, 👉choose what kind of website u want to make like business, blog or other
4, 👉give the website adress for the people who want to see u including ur the extension
5, 👉u can download many free plugin which interact ur customer
6, 👉u can edit the template by using different plugin create ur own blog
7, 👉finally ur website is created u need to publish or host the website
📑inorder to get the extension and to host the website u need to bill the money to the organization
1 471
#28 pytricks
🔱 With statement 🔱
#Harmful
f = open( 'hello.txt' , 'w' )
f.write( 'hello , john' )
f.close()
📌 This implementation won't guarantee the file is closed if there is an exception during the f.write() call and therefore our program might leak a file descriptor. That's why the with statement is so useful. It makes properly acquiring and releasing resources a breeze
📌 The built in open() function provides us with an excellent use case:
#Better
with open( 'hello.txt' , 'w' ) as f:
f.write( 'hello , John' )
📌 The above example internally translate like this:
f = open( ' hello.txt' , 'w' )
try :
f.write( 'hello , world' )
finally :
f.close()
📌 In both cases ,using a with statement allows you to abstract away most of the resources handling logic. Instead of having to write an explicit try... finally statement takes care of that for us.
📌 The with statement can make code that deals with system resources more readable. It also helps you avoid bugs or leaks by making it practically impossible to forget to clean up or realese a resource when it's no longer needed.
◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼
📝 If this content was helpful share as much as possible.
@software_programming1
♾♾THANKS FOR THE SUPPORT♾♾
1 471
#27 pytricks
🔱Complacent comma placement🔱
📌Hear is Handy tip for when you're adding and removing items from a list ,dict or set constant in Python : just end all of your lines with a comma.
📌This coading style is not helpful when you edit code . This produced bugs in your program.
names = [ 'jimmy' , 'alice' , 'carry' ]
Preeferd coading style is ,
name = [ 'jimmy' ,
'alice' ,
'carry' ]
📌When you add a new name in names list like this,
names =[ 'jimmy' ,
'alice' ,
'carry'
'john' ]
📌The output of this list like this,
>>> [ 'jimmy' , 'alice' , 'carryjohn' ]
📌As you can see , python merged the string carry and John into carryjohn . This is so called 'string literal concatination'.
📌And this is hard to catch bug in your program . When working with git source control.
📌Git source control system is line based therefor this bug is not easily identify.
📌Therefor adding the missing comma after carry prevents the two string from getting merged into one.
names = [ 'jimmy',
'alice',
'carry',
'john', ]
🔰Smart formatting and comma placement can make your list,dict or set constants easier to maintain.🔰
◼◼◼◼◼◼◼◼◼◼◼◼
⏩ If you like my hard work please share as much as possible to know other people related to programming tips and tricks
1 471
-----------------------------------------------------------
🔫 Best Game Development Platforms And Tools In 2019🔆
----------------------------------------------------------
✔️ Unity ...
✔️AppGameKit. ...
✔️ Unreal Engine. ...
✔️ Corona SDK- the 2D game engine. ...
✔️ Construct 2. ...
✔️ Marmalade. ...
✔️ Fusion. ...
✔️ Game Marker Studio 2....
✔️ CocoonJS...
✔️ MonoGame...
✔️ Amazon Lumberyard...
✔️ Cross2D-x...
✔️ Haxe...
✔️ Gideros..
@software_programming1
@software_programming1
