投稿時間:2022-07-06 15:21:23 RSSフィード2022-07-06 15:00 分まとめ(24件)

カテゴリー等 サイト名等 記事タイトル・トレンドワード等 リンクURL 頻出ワード・要約等/検索ボリューム 登録日
IT ITmedia 総合記事一覧 [ITmedia ビジネスオンライン] ドムドムハンバーガー、東京・銀座に新業態 カツカレー発祥の店とのコラボも https://www.itmedia.co.jp/business/articles/2207/06/news121.html itmedia 2022-07-06 14:25:00
IT ITmedia 総合記事一覧 [ITmedia ビジネスオンライン] シェイクシャック、京都限定の「宇治抹茶シェイク」全国展開 8月までの期間限定 https://www.itmedia.co.jp/business/articles/2207/06/news106.html itmedia 2022-07-06 14:09:00
python Pythonタグが付けられた新着投稿 - Qiita BERTopicで文章群をイイ感じで分類してみる https://qiita.com/takky_0330/items/9cf8d642be3b216dd70d bertopic 2022-07-06 14:01:43
Docker dockerタグが付けられた新着投稿 - Qiita Dockerコンテナのactix-webをherokuで動かそうとしたらError R10 (Boot timeout)が出た https://qiita.com/yoshiyasu1111/items/656f0178b9df183bdfde applicat 2022-07-06 14:29:57
技術ブログ Developers.IO RDS Proxyのピン留めを許容できるケースについて考えてみる https://dev.classmethod.jp/articles/rdsproxy-usecase-that-allows-pinning/ rdsproxy 2022-07-06 05:33:23
技術ブログ Developers.IO Lambda で使用できる標準ライブラリのバージョンは自動更新されるか教えてください https://dev.classmethod.jp/articles/tsnote-how-do-i-manage-the-versions-of-standard-libraries-that-can-be-used-with-lambda/ 自動更新 2022-07-06 05:23:38
海外TECH DEV Community Won't extend it more than once! https://dev.to/sandordargo/wont-extend-it-more-than-once-2m98 Won x t extend it more than once A few months ago I changed teams and I started to work on a library that helps its users to perform cryptographic operations Those operations need a so called Hardware Security Module HSM that is provided by a third party My first project was to migrate from one provider to another Though we decided to make the changes without breaking the API the configuration files had to change All the client applications have to take the new library version and change the config files Taking a new version is always a pain as it requires redeploying their applications Therefore one of the requirements was to deliver a bug free version on a short notice so that they have to deploy only once And we started to work And we worked and worked And shipped on time The next Monday our first adopters loaded their software with the new version of our library In a few minutes they reported a regression That was fast Faster than I expected I was not particularly confident with the change anyway Our QA went on vacation during the last few weeks I lacked the functional expertise and we had to change a lot of code Still the error report came in faster than expected It had some particularities though Only one of the adopters experienced it even though both of them used the same version and pretty much the same configuration file And the error only happened on one of the servers Some disturbance in the forceHaving an error not happening everywhere is already bad enough but there was more to that The first error code was about a bad input and that seemed interesting something to consider Sadly later on we got a myriad of different poorly documented error codes which made little sense This situation seriously raised the question of whether the problem is coming from our update or from the rd party service Falling back our library to the previous version didn t solve the issues but we had to also restart the rd party server Our manager was convinced that the error is due to our update but more and more we analyzed the logs and read our changeset over and over again lines of code and we were less and less convinced After the fallback we ran all our integration tests over and over again While they were failing before the server reboot both with the old and the new version now they were succeeding again Don t believe in coincidences In the meanwhile we blacklisted this new version so no matter how much we wanted to retest it with a client application we couldn t We decided to fix some long known issues to get a new version delivered I kept thinking My manager could be right I used to say both at work and outside that I don t believe in coincidences Why should I believe in coincidences in this case Only because I cannot find a bug Only because most probably I introduced it Those are not good reasons But it s also true that I investigated a lot Well a lot but apparently not enough I even used gdb something I rarely do Now I used it more than ever Still it didn t help reveal the issue I always wanted to get more familiar with clang and the related tools I decided this was the right time I had no idea how to run them in our corporate environment so I installed them locally and simplified our critical path into something like this piece of code coliru link include lt iostream gt include lt string gt include lt boost variant hpp gt struct VariantA std string url std string port std string token struct VariantB std string username std string password class Parameters public Parameters VariantA a params a Parameters VariantB b params b boost variant lt VariantA VariantB gt get const return params private boost variant lt VariantA VariantB gt params Parameters makeParams VariantA a return a void print unsigned char p std cout lt lt p lt lt n void foo const Parameters amp p const auto amp va boost get lt VariantA gt p get print unsigned char va url c str print unsigned char va port c str print unsigned char va token c str int main VariantA a a url url a port port a token token auto p makeParams a foo p I ran the address the memory and the undefined behaviour sanitizers I expected something from the last one but I got an error from the first one from the address sanitizer ERROR stack use after scopeNo freaking way I already looked at const auto amp va boost get lt VariantA gt p get and I was thinking that while it would be probably worth it to remove the reference which I shouldn t have added in the first place still the lifetime of the returned variable from Parameters get must have been extended So I decided to do it later once we fixed the error And then it seemed that THAT was the error The stages of griefIn the next half an hour I went through the stages of grief Yes luckily it was quite fast Mine looked like this Denial Okay okay It s not sane to have the reference there But the real issue must be somewhere else The lifetime of a temporary is extended until that const amp is used In any case even the ASAN said it might be a false positive But if I made some very tiny changes to the code such as declaring va just a const auto instead of const auto amp or returning in Parameters get a const amp instead of a const the ASAN report became clean I arrived at the next stage Anger stupid me this line was already suspicious But I didn t want to fix it so that we can simply test the real fix of the real issue Aaaaaah Bargaining At this stage I was asking myself the question what if I wasn t in a hurry and if I paid more attention to that update to that piece of code This path was still related to the old service provider and I only introduced some technical changes as our architecture changed a bit I should have paid more attention To the hell with that Others should have also paid more attention to the code reviews how could that pass Depression My bad feelings went away quite fast especially towards the others It was replaced with depression Fine I made a mistake It doesn t work But I still have absolutely no idea why it doesn t work It should work This is impossible Acceptance Okay okay So it s really that line it must be about lifetime extension I simply remove the amp and say some bullshit that most people will accept or I take some extra time and try to understand it This whole bug is just a freaking bug if I don t understand it If I do then it was an opportunity to get better Then it hit me First I read about lifetime extension here in this article I shared it a few times and revisited it a few times But in the recent days I read about it somewhere else too I cannot recall where Maybe it was just a tweet It said something like that lifetime extension will only happen once It cannot be done twice I looked up what C Reference says about reference initialization In general the lifetime of a temporary cannot be further extended by passing it on a second reference initialized from the reference variable or data member to which the temporary was bound does not affect its lifetime But why would it happen twice here Cannot I pass that c str to the next call Removing the call didn t clean up the ASAN report Then it hit me const auto amp va boost get lt VariantA gt no second extension p get first extension The first call is to Parameters get It returns a temporary and its lifetime is extended Then comes boost get lt VariantA gt It takes this temporary whose lifetime was already extended but it won t be extended for the second call By the time the full expression is executed the reference will be destroyed In fact if I used clang as a compiler and the standard C and therefore std variant instead of the boost option I could have also used Wdangling gsl The compiler would have told me that there is an error in my code So that s another reason why to compile with multiple compilers and why to use an as recent version of C as possible ConclusionIn my first project in my new team I introduced a subtle bug related to lifetime extension Once there it s hard to notice and it can manifest itself in unexpected circumstances I heartily recommend to run builds with multiple compilers tons of warnings turned on and also don t forget about the different analyzers and sanitizers They might require a bit of time but they can save you so much Connect deeperIf you liked this article please hit on the like button subscribe to my newsletter and let s connect on Twitter 2022-07-06 05:28:03
海外TECH DEV Community How to Plot an audio file using Matplotlib https://dev.to/puritye/how-to-plot-an-audio-file-using-matplotlib-pbb How to Plot an audio file using Matplotlib IntroductionPlotting and visualizing an audio file is one of the most important processes in audio analysis Audio analysis is the process of transforming exploring and interpreting audio signals recorded by digital devices so as to extract insights from the audio data In this article we are going to plot a waveform of an audio file with matplotlib PrerequisitesPython installedNumpy installedMatplotlib installedBackground in data analysis Importing module and librariesAs a first step let s import the modules and libraries that we will need import waveimport matplotlib pyplot as plt import numpy as npWe will use wave module and numpy to preprocess the audio We will use matplotlib for plotting the audio Loading the Audio fileThe audio file that we will use is a wave file Let s load the wave file that we want to plotobj wave open audio file wav rb Getting Audio parametersLet s print out the audio parameters such as number of channels sample width etc We will use getparams method of the wave moduleprint Parameters obj getparams Output Parameters wave params nchannels sampwidth framerate nframes comptype NONE compname not compressed Now let s get the parameters that we will need for plotting the audio Sample frequency this is the number of samples per secondsample freq obj getframerate Number of samples this is the total number of samples or frames in the audio filen samples obj getnframes Signal wave this is the wave amplitude which is the sound intensity signal wave obj readframes Audio length this is the duration of the audio duration n samples sample freq Creating numpy objectsLet s create a numpy object from the signal wave This will be plotted on the y axis signal array np frombuffer signal wave dtype np int Let s create a numpy object from duration This will be plotted on the x axistime np linspace duration num n samples Creating an audio plotplt figure figsize plt plot time signal array plt title Audio Plot plt ylabel signal wave plt xlabel time s plt xlim time limiting the x axis to the audio timeplt show Output ConclusionIn this article we ve learnt how to plot a waveform of an audio file Apart from plotting the waveform another plot we can get from an audio file is frequency spectrum For the frequency spectrum we plot sample frequency against time To learn how to plot a frequency spectrum checkout this link CreditsAudio Processing Basics Assembly AI Audio Analysis altexsoft 2022-07-06 05:24:50
海外TECH DEV Community What Software Developers can learn from Gutenberg https://dev.to/polterguy/what-software-developers-can-learn-from-gutenberg-5bpa What Software Developers can learn from GutenbergBefore Johannes Gutenberg invented the printing press there was only one book for all practical concerns in the western hemisphere This book was the Bible The price of one Bible was the same as the price needed to buy a medium sized farm capable of sustaining a household of people In today s money this would probably be at least million dollars maybe as much as The reason why a Bible had such a price tag was because the job of assembling a Bible was insanely resource demanding It would take one monk about months to manually copy the text from one of his existing Bibles into an empty manuscript This ensured only the rich could afford to buy a Bible and we don t have many Bibles today from that period for these reasons Today if you visit London or New York evangelic born again Christians will throw Bibles at you from street corners shouting at you Have you met Jesus The cost of assembling a Bible today is probably less than dollars Some simple math with your calculator hence concludes that the price of assembling a book has dropped million times from million dollars years ago to dollars today This price reduction on books is often by scientists contributed as the sole reason we are living in an enlightened society based upon reason and science because as the price for books dropped the market for alternative books increased Implying books not being the Bible started becoming popular This effect is easily understood by realising that nobody would have heard about Isaac Newton Rene Descartes or any of the other champions of science and enlightenment unless these revolutionaries could somehow spread their teachings through books and the written word Think about like this No Gutenberg no science no Newton no Descartes no modern medicine no enlightenment no modern education system no computers no cars no internet and no world wide web In fact the only reason why I can use DEV today to write this article is because of that one guy had a great idea years ago and that guy s name was Johannes Gutenberg If the Origins of Species by Charles Darwin was the most important book ever written the printing press was definitely the most important invention Besides no Gutenberg no Charles Darwin Without the printing press we d still be living in the middle ages with superstitious belief systems and possibly the inquisition and witch burnings still infesting our daily lives The printing press created modern society Software development automationAs a software developer I sometimes feel like one of those monks from years ago sitting by the light of my candle copying Bibles to those willing to pay for my work And similarities are to be found everywhere I won t dive into them in too much details today but years ago could read and write today can create software History is repeating itself We need to automate the software development process the same way Gutenberg automated book productionThe above has been my sole obsession for more than a decade and we re arguably closing in on our goal too The lessons and objections are very similar years ago monks would say This isn t a real book it s got no illustrations it s got no soul it s built with cheap paper etc etc etc From their point of view such arguments made perfect sense because they could see the writing on the wall which was that their days were numbered However for those who embraced the future instead of fighting it new professions emerged such as working in print shops selling books in books stores becoming an author writing creatively instead of copying stuff etc etc etc Evolution itself even describes this problem as a local evolutionary optimum Software development as a profession is such a local evolutionary optimum However like all local evolutionary optimums it s destined to collapse over time I should know because I read about it in a book years ago we copied the Bible today we copy from StackOverflow Seriously can you explain the difference to me It s literally that simple Software developers are the new priesthood and we ve got just as many superstitious belief systems and dogmatic perceptions as the old priesthood There s no real difference here If you want to see how far me and my team has made it in regards to replacing this priesthood you can register a Magic Cloudlet below in seconds and have your own printshop where you can produce software a million times faster than your average st Century monk Create software in seconds 2022-07-06 05:23:08
ニュース @日本経済新聞 電子版 ギガスクールの恩恵、生徒も教員も 授業準備の負担減に https://t.co/oBQDRJaYMy https://twitter.com/nikkei/statuses/1544560957917384705 負担 2022-07-06 05:56:43
ニュース @日本経済新聞 電子版 【参議院選挙】日本経済新聞社による各選挙区別の情勢調査です。 ▶特設ページへ https://t.co/bTvoTOyjcV https://t.co/vwhNt7UfvA https://twitter.com/nikkei/statuses/1544558249902481408 参議院選挙 2022-07-06 05:45:57
ニュース @日本経済新聞 電子版 進まぬ男性育休「壁」高く 取得1割、職場理解半ば https://t.co/kZmT1EUBdF https://twitter.com/nikkei/statuses/1544555798474268672 育休 2022-07-06 05:36:13
ニュース @日本経済新聞 電子版 ガソリン価格173.6円 補助は40.8円に、上限超え8週連続 https://t.co/o702z7FQSp https://twitter.com/nikkei/statuses/1544552632605634561 補助 2022-07-06 05:23:38
ニュース @日本経済新聞 電子版 政策キーパーソン座談会「ESG金融待ったなし」 19時からNIKKEI Financialセミナー https://t.co/yeUZU1Bz8r https://twitter.com/nikkei/statuses/1544549389678415872 nikkeifinancial 2022-07-06 05:10:45
ニュース @日本経済新聞 電子版 大塚製薬、瓶入りポカリスエット発売 再利用でゴミ削減 https://t.co/5HtW4sxH46 https://twitter.com/nikkei/statuses/1544547496185438209 大塚製薬 2022-07-06 05:03:14
海外ニュース Japan Times latest articles Rise in COVID cases prompts Japan to consider delaying travel program https://www.japantimes.co.jp/news/2022/07/06/national/travel-subsidy-program-delay/ Rise in COVID cases prompts Japan to consider delaying travel programHigher case counts have been seen in every prefecture raising the prospect that the rollout of a nationwide travel subsidy program planned for early July 2022-07-06 14:08:58
ニュース BBC News - Home Boris Johnson fights for political survival as he prepares to face MPs https://www.bbc.co.uk/news/uk-politics-62059032?at_medium=RSS&at_campaign=KARANGA health 2022-07-06 05:46:34
ニュース BBC News - Home We're so short staffed our hotel has to turn people away https://www.bbc.co.uk/news/uk-scotland-62049326?at_medium=RSS&at_campaign=KARANGA awaybusiness 2022-07-06 05:20:51
ニュース BBC News - Home The Papers: Johnson 'on brink' and 'battling for survival' https://www.bbc.co.uk/news/blogs-the-papers-62059064?at_medium=RSS&at_campaign=KARANGA dominates 2022-07-06 05:15:37
北海道 北海道新聞 同僚の現金盗む 空士長を懲戒免職 航空自衛隊網走分屯基地 https://www.hokkaido-np.co.jp/article/702370/ 懲戒免職 2022-07-06 14:37:00
北海道 北海道新聞 菊池は2回1/3を4失点 アスレチックス戦 https://www.hokkaido-np.co.jp/article/702367/ 菊池 2022-07-06 14:28:00
北海道 北海道新聞 北海道内ガソリン価格172円台に 5週ぶり値下がり https://www.hokkaido-np.co.jp/article/702363/ 値下がり 2022-07-06 14:18:47
北海道 北海道新聞 【参院選コラム】棄権、実は「不合理」です! 国会不信なら、なおさら投票を https://www.hokkaido-np.co.jp/article/702366/ 盛り上がり 2022-07-06 14:18:00
IT 週刊アスキー 国際的に活躍するリウ・ディンとキャロル・インホワ・ルーが「ヨコハマトリエンナーレ2023」のアーティスティック・ディレクターに決定! https://weekly.ascii.jp/elem/000/004/096/4096937/ 横浜トリエンナーレ 2022-07-06 14:15:00

コメント

このブログの人気の投稿

投稿時間:2021-06-17 05:05:34 RSSフィード2021-06-17 05:00 分まとめ(1274件)

投稿時間:2021-06-20 02:06:12 RSSフィード2021-06-20 02:00 分まとめ(3871件)

投稿時間:2020-12-01 09:41:49 RSSフィード2020-12-01 09:00 分まとめ(69件)