python |
Pythonタグが付けられた新着投稿 - Qiita |
OpenAIの音声認識Whisperがすごいので,Youtube用に字幕生成してみた |
https://qiita.com/walnut-pro/items/69864b0a074bd773711f
|
openai |
2022-09-24 15:54:34 |
python |
Pythonタグが付けられた新着投稿 - Qiita |
requests.SessionインスタンスをSingletonパターンで作成する |
https://qiita.com/tsal3290s/items/dd4b3ab0420d03a4db86
|
tanceclsinputifnothasattr |
2022-09-24 15:09:25 |
Ruby |
Rubyタグが付けられた新着投稿 - Qiita |
ruby から slack へ message を送信する |
https://qiita.com/Satoshi_Numasawa/items/3fc9078beabff666280c
|
rubycodesampleto |
2022-09-24 15:37:18 |
AWS |
AWSタグが付けられた新着投稿 - Qiita |
AWSのCloudWatchを使って請求アラームを設定してみる |
https://qiita.com/yukijigen3/items/cf98c05cac4045b1326b
|
cloudwatch |
2022-09-24 15:04:44 |
golang |
Goタグが付けられた新着投稿 - Qiita |
GoでJWT生成/認証を実装する。(ロジック編) |
https://qiita.com/kouji0705/items/49172d713e13fa554ba7
|
部品 |
2022-09-24 15:28:41 |
海外TECH |
DEV Community |
How the 2-minute rule improved my life |
https://dev.to/smeetsmeister/how-the-2-minute-rule-improved-my-life-15f2
|
How the minute rule improved my lifeI am a master procrastinator I have tried several productivity methods to get me to stop procrastinating Most of these tools did not work for me The minute rule however is one of the few that does The minute rule is crazy simple and that is why it works Here is what you need to know minute rule explainedHow do you beat procrastination By taking action The biggest hurdle is getting started And once I am started I usually will stick around for a while This is the power of the minute rule Created by David Allen in his book Getting things done If an action will take less than two minutes it should be done at the moment it s defined David AllenWhy does it work Often the biggest hurdle is to get started Once you are already active it s easier to keep going Like Isaac Newton said An object in motion tends to remain in motion unless acted upon by an outside force How it improved my lifeI use to have dishes piling up a big pile of laundry and other small things around the house A big mess does not start at once It consists of many small moments of not taking action If you have eaten dinner how long does it take you to put your plates in the dishwasher instead of on the counter How long does it take if you put your plates in the dishwasher right away The minute rule helped me to prevent my tasks from getting too big Spending a few minutes to clean up after cooking and putting the plates in the dishwasher seems like nothing But all these small actions add up quickly They prevent a pile up and the need for a big cleaning day every few weeks Applying the minute rule to your day to day life takes some getting used to The format that worked for me was asking myself can I fix this in minutes whenever I put something off It helps if you have an accountability buddy to remind you every once in a while How to apply it in your careerThe examples I shared above are all related to personal things But how to apply it to make your work more productive The minute rule helps you start In my work as an Engineering Manager I apply the minute rule as follows Find a part of a big task that takes lt minutes to complete Complete the task right there and then Usually that momentum will keep me going on the big task Bonus points if you combine it with Eating a frog tackle your biggest issue of the day first The tasks I am usually struggling with to get started are those big nasty tasks that feel impossible to work with Using this rule helps me to find an angle I can start with that does not have to be the natural beginning I noticed that whenever I am in the flow it is much easier to find another point to continue working on On several occasions the minute rule has helped me tackle big obstacles Obstacles I had no idea if or how to climb By just taking action and using that momentum ConclusionThe minute rule is a great productivity tool to get you to take action It is an easy system that lets you take the first step And the momentum of taking action will in most cases help you on finishing your big task It changed my life by making me take small steps that take minimal effort to keep my life in order And prevent me the frustration of having a big cleaning day every few weeks This is one of the few productivity tools that work and stuck around If you enjoyed this kind of post subscribe to the newsletter Get my latest updates straight in your mailbox |
2022-09-24 06:30:23 |
海外TECH |
DEV Community |
Become a freelance software developer |
https://dev.to/polterguy/become-a-freelance-software-developer-317d
|
Become a freelance software developerOnce you spent some time with Aista Magic Cloud the way I show in the following article you ll need to hunt down jobs The way you need to approach this is by registering at sites such as Fiverr or FreeLancer There are hundreds of similar sites out there but you should choose on or two and spend most of your energy polishing your profile at your selected sites In addition you should be actively using LinkedIn to chase potential clients Think about your profiles on all sites such as the above as “your brand and that you need to “sell the belief in that you can do the job Make sure you use photos that are of an optimistic character where you re smiling or somehow creates confidence in that you can deliver whatever job some clients in North America or Europe might be looking to have you deliver You ll need to “sell yourself at these sites If you can take profile photos of yourself wearing a suit or a nice dress where you look professional Make sure you use a nice background Worst case scenario you can put on nice clothes and go find a hotel lobby and take a photo The idea is to create confidence in that you re a professional and that you can deliver whatever the client needs When you find a client and it s time to communicate with the client try to use Google Meet The reason is that Google Meet allows you to manipulate your background using “green screen techniques This allows you to hide your background making the client focus on you and not whatever is behind you in your room As you are meeting with the client make sure you use a close headset and that you have a silent environment This is important for the client to build trust in you Sit straight up have your laptop on a table and make sure your back is straight If you re laying down while you talk to the client you might as well be telling himI don t like to work I just want to get paid for sleepingIf you re doing this with friends you can practice on each other and create “mock meetings where you get to watch each other and practice meetings Remember the objective of everything you do is to make the client believe that you can fix his problems |
2022-09-24 06:15:37 |
海外TECH |
DEV Community |
Build a breakout game |
https://dev.to/dhanushnehru/build-a-breakout-game-4chn
|
Build a breakout gameHey guys In this article I will show you how I built a breakout game using HTML canvas CSS and Javascript Using a single ball the player must knock down as many bricks as possible by using the walls and or the paddle below to hit the ball against the bricks and eliminate them In this game you will have lives and you must hit the ball against the bricks and eliminate them If you are not able to eliminate the bricks within lives then your game is over Why did I want to create this game I want to familiarise myself with using HTML Canvas and the flexibility of building a game with it Setup for the projectThis game is best viewed or played on a desktop computer with the help of a mouse pointer Let s start coding The project structure consists of only files style css script js index htmlLet s begin with the program A simple html file with canvas defined lt DOCTYPE html gt lt html lang en gt lt head gt lt meta charset UTF gt lt title gt Breakout Game lt title gt lt link rel stylesheet href styles css gt lt head gt lt body gt lt canvas id myCanvas width height gt lt canvas gt lt script src script js gt lt script gt lt body gt lt html gt A css file for the background and defining the colors padding margin myCanvas background eee display block margin auto A Javascript file that defines each operation as a function var canvas document getElementById myCanvas var ctx canvas getContext d var x canvas width var y canvas height var dx var dy var ballRadius var paddleHeight var paddleWidth var paddleX canvas width paddleWidth var rightPressed false var leftPressed false var brickRowCount var brickColumnCount var brickWidth var brickHeight var brickPadding var brickOffsetTop var brickOffsetLeft var score var lives var bricks for c c lt brickColumnCount c bricks c for r r lt brickRowCount r bricks c r x y status document addEventListener keydown keyDownHandler document addEventListener keyup keyUpHandler function drawBricks for c c lt brickColumnCount c for r r lt brickRowCount r if bricks c r status var brickX c brickWidth brickPadding brickOffsetLeft var brickY r brickHeight brickPadding brickOffsetTop bricks c r x brickX bricks c r y brickY ctx beginPath ctx rect brickX brickY brickWidth brickHeight ctx fillStyle DD ctx fill ctx closePath function keyDownHandler e if e keyCode rightPressed true else if e keyCode leftPressed true function keyUpHandler e if e keyCode rightPressed false else if e keyCode leftPressed false After defining the objects as functions lets call the draw based methods to perform the individual operations such as drawing a ball identifying the collision between the ball etc function drawBall ctx beginPath ctx arc x y ballRadius Math PI ctx fillStyle FF ctx fill ctx closePath function drawPaddle ctx beginPath ctx rect paddleX canvas height paddleHeight paddleWidth paddleHeight ctx fillStyle pink ctx fill ctx closePath function collisionDetection for c c lt brickColumnCount c for r r lt brickRowCount r var b bricks c r if b status if x gt b x amp amp x lt b x brickWidth amp amp y gt b y amp amp y lt b y brickHeight dy dy b status score if score brickRowCount brickColumnCount alert YOU WIN CONGRADULATIONS document location reload function drawScore ctx font px Arial ctx fillStyle DD ctx fillText Score score function drawLives ctx font px Arial ctx fillStyle DD ctx fillText Lives lives canvas width Now lets create a draw method which combines the above functions togetherfunction draw ctx clearRect canvas width canvas height drawBricks drawBall drawPaddle drawScore drawLives collisionDetection if y dy lt ballRadius dy dy else if y dy gt canvas height ballRadius if x gt paddleX amp amp x lt paddleX paddleWidth dy dy else lives if lives alert GAME OVER document location reload else x canvas width y canvas height dx dy paddleX canvas width paddleWidth if x dx gt canvas width ballRadius x dx lt ballRadius dx dx if rightPressed amp amp paddleX lt canvas width paddleWidth paddleX else if leftPressed amp amp paddleX gt paddleX x dx y dy requestAnimationFrame draw Now lets add the functions to define the movement of the mouse finally document addEventListener mousemove mouseMoveHandler function mouseMoveHandler e var relativeX e clientX canvas offsetLeft if relativeX gt paddleWidth amp amp relativeX lt canvas width paddleWidth paddleX relativeX paddleWidth draw The draw method actually calls a set of functions starting from drawing the bricks to the various elements needed for the breakout game Conclusion I was able to accomplish this by dividing the elements of the game into small parts and designing the entire game by combining parts of the code with functionality to be set You can try playing the game here and get the source code here Feel free to contribute incase you have any improvements to be done ️Thanks for reading ️Feel free to subscribe to my newsletter Follow me via Twitter Instagram or Github |
2022-09-24 06:09:10 |
海外ニュース |
Japan Times latest articles |
Two killed as storm lashes central Japan |
https://www.japantimes.co.jp/news/2022/09/24/national/storm-talas-approaches-japan/
|
local |
2022-09-24 15:39:37 |
ニュース |
BBC News - Home |
EU 'must take seriously' Putin nuclear threats - Borrell |
https://www.bbc.co.uk/news/world-europe-63016675?at_medium=RSS&at_campaign=KARANGA
|
ukraine |
2022-09-24 06:45:58 |
ニュース |
BBC News - Home |
Kate Middleton to Catherine: Becoming Princess of Wales |
https://www.bbc.co.uk/news/uk-wales-62968227?at_medium=RSS&at_campaign=KARANGA
|
famous |
2022-09-24 06:25:50 |
北海道 |
北海道新聞 |
後志管内34人感染 小樽市は11人 新型コロナ |
https://www.hokkaido-np.co.jp/article/735598/
|
新型コロナウイルス |
2022-09-24 15:25:00 |
北海道 |
北海道新聞 |
知床岬付近の遺体は豊田船長 知床・観光船沈没事故 DNA鑑定で判明 1管 |
https://www.hokkaido-np.co.jp/article/735595/
|
沈没事故 |
2022-09-24 15:20:42 |
北海道 |
北海道新聞 |
福島、復興目指しSDGs博 100ブースが活動紹介 |
https://www.hokkaido-np.co.jp/article/735596/
|
原発事故 |
2022-09-24 15:14:00 |
北海道 |
北海道新聞 |
思い出は鉄路とともに |
https://www.hokkaido-np.co.jp/article/735592/
|
開通 |
2022-09-24 15:08:24 |
北海道 |
北海道新聞 |
ドリフト走行会で2人けが 滋賀・米原、防護ブロック倒れる |
https://www.hokkaido-np.co.jp/article/735594/
|
滋賀県米原市 |
2022-09-24 15:07:00 |
北海道 |
北海道新聞 |
ハマる人続出、ボードゲーム 専用カフェ50代から子どもまで 道外大学では制作の授業も |
https://www.hokkaido-np.co.jp/article/735593/
|
道外 |
2022-09-24 15:02:00 |
IT |
週刊アスキー |
ローソンから新作スイーツ登場! 「濃密カヌレ」と「生チーズケーキ」で贅沢時間を |
https://weekly.ascii.jp/elem/000/004/106/4106449/
|
贅沢 |
2022-09-24 15:30:00 |
コメント
コメントを投稿