IT |
ITmedia 総合記事一覧 |
[ITmedia News] みんなの銀行の“秘密の質問”が話題 「両親の旧姓は?」→2文字の名字はNG 理由を聞いた |
https://www.itmedia.co.jp/news/articles/2307/25/news125.html
|
itmedia |
2023-07-25 13:50:00 |
IT |
ITmedia 総合記事一覧 |
[ITmedia PC USER] PFU、「ScanSnap iX1600」をアップデート ネットワークフォルダへの直接保存が可能に |
https://www.itmedia.co.jp/pcuser/articles/2307/25/news126.html
|
itmediapcuserpfu |
2023-07-25 13:48:00 |
IT |
ITmedia 総合記事一覧 |
[ITmedia Mobile] 3万円で買える5Gスマホ「Infinix Note 30 5G」 作りは甘いが可能性は感じる |
https://www.itmedia.co.jp/mobile/articles/2307/25/news123.html
|
infinix |
2023-07-25 13:16:00 |
IT |
ITmedia 総合記事一覧 |
[ITmedia News] TikTokでも“つぶやける”ように テキスト投稿機能追加へ |
https://www.itmedia.co.jp/news/articles/2307/25/news121.html
|
bytedance |
2023-07-25 13:05:00 |
TECH |
Techable(テッカブル) |
ワンタップで定型文や資料を送信できる営業支援ツール「TeamBoard」開発元、資金調達を実施 |
https://techable.jp/archives/213889
|
eastventures |
2023-07-25 04:00:36 |
技術ブログ |
Developers.IO |
「ダッシュボードもコード管理!Amazon QuickSightで考えるBIOps」というタイトルで DevelopersIO 2023 大阪に登壇しました! #devio2023 |
https://dev.classmethod.jp/articles/quicksight-biops-devio2023/
|
amazonquicksight |
2023-07-25 04:33:01 |
技術ブログ |
Developers.IO |
従業員エンゲージメントサーベイと意図外の影響確認 |
https://dev.classmethod.jp/articles/effect-of-engagement-survey/
|
組織開発 |
2023-07-25 04:12:07 |
海外TECH |
DEV Community |
Exploring Genetic Algorithms with Ruby |
https://dev.to/rpaweb/exploring-genetic-algorithms-with-ruby-4lae
|
Exploring Genetic Algorithms with RubyIntroduction In the quest to solve complex optimization problems and simulate natural evolution computer scientists turn to the fascinating world of genetic algorithms These algorithms mimic the principles of Darwinian evolution and when combined with the expressive and elegant Ruby language they become a powerful toolset for tackling a wide range of challenges In this article we ll dive into the intriguing realm of genetic algorithms in Ruby and explore real life applications that showcase their potential Understanding Genetic Algorithms Genetic algorithms draw inspiration from biological evolution imitating the process of natural selection crossover and mutation At their core these algorithms consist of a population of candidate solutions evolving over generations to reach an optimal or near optimal solution to a given problem Representation of Solutions In a genetic algorithm each candidate solution is encoded as a chromosome often represented as an array or data structure in Ruby The combination of genes within chromosomes determines the characteristics of each solution Example Chromosome representing a sequence of cities in a Traveling Salesman Problemclass Chromosome attr accessor genes def initialize genes genes genes endendEvaluation Function The key to genetic algorithms lies in the evaluation function also known as the fitness function This function assesses how well each candidate solution performs guiding the selection process during evolution Example Fitness function for the Traveling Salesman Problemdef fitness chromosome distance matrix total distance chromosome genes each with index do city index total distance distance matrix city chromosome genes index end total distanceendSelection Methods Various selection methods determine which solutions have a higher chance of becoming parents for the next generation Popular selection techniques include roulette wheel selection tournament selection and rank based selection Example Roulette wheel selectiondef roulette wheel selection population distance matrix total fitness population sum chromosome fitness chromosome distance matrix selected until selected size population size r rand total fitness cumulative fitness population each do chromosome cumulative fitness fitness chromosome distance matrix if cumulative fitness gt r selected lt lt chromosome break end end end selectedendGenetic Operators Genetic algorithms utilize three fundamental genetic operators Crossover Involves combining genetic material from two parents to create offspring Mutation Introduces random changes in the offspring to maintain diversity Elitism Preserves the best solutions from the previous generation to ensure progress Example Crossover operator for the Traveling Salesman Problemdef crossover parent parent crossover point rand parent genes size child genes parent genes crossover point parent genes each do city child genes lt lt city unless child genes include city end Chromosome new child genes end Example Mutation operator for the Traveling Salesman Problemdef mutate chromosome mutation rate chromosome genes each with index do city index if rand lt mutation rate swap index rand chromosome genes size chromosome genes index chromosome genes swap index chromosome genes swap index chromosome genes index end endendReal World Applications Genetic algorithms have found applications in diverse fields showcasing their versatility and problem solving capabilities Their ability to handle combinatorial optimization challenges makes them invaluable in real life scenarios Traveling Salesman Problem Optimizing routes for delivery services or travel planning where the goal is to find the shortest path that visits a set of cities and returns to the starting point Job Scheduling Efficiently scheduling tasks or jobs to minimize processing time improve resource utilization and meet deadlines Network Routing Optimizing data packet routing in computer networks to reduce congestion and improve efficiency Evolutionary Art Generating artistic images or designs through evolving populations of visual representations Neural Network Training Tuning the weights and biases of neural networks to optimize their performance for specific tasks Conclusion Ruby s expressive syntax and powerful object oriented features make it an ideal language for implementing genetic algorithms By harnessing the principles of natural selection crossover and mutation developers can solve complex optimization problems and explore uncharted territories in their respective domains As you delve deeper into the world of genetic algorithms remember to experiment iterate and adapt your approach to the unique challenges you encounter Embrace the evolutionary spirit and let Ruby be your ally in unleashing the untapped potential of genetic algorithms Happy genetic coding |
2023-07-25 04:15:20 |
海外TECH |
DEV Community |
How To Construct An Array-Like Data Structure? |
https://dev.to/ggorantala/how-to-construct-an-array-like-data-structure-255k
|
How To Construct An Array Like Data Structure You will learn to implement a custom array like data structure and basic array operations IntroductionBefore you start solving array problems understanding and implementing an array like data structure is a good practice This lesson teaches you how to implement common array operations such as inserting an element removing an element getting an element finding the length of the array and printing elements of the array What are we building We are going to build an array from scratch that contains some of the most common array operations as discussed above We will also learn how to convert the fixed size array into a dynamic array by tweaking a method This is the concept of dynamic arrays LinkedList ArrayList and a few more complex data structures Every requirement in software is divided into pieces we work on each piece and finally we bring them all together So let s break down the requirements Problem statementBuild an array from scratch and store elements in it The array should allow inserting deleting getting and printing elements Input CREATE gt create an array with capacity INSERT gt insert these elementsDELETE gt remove nd index elementGET gt print th elementSIZE gt size should print how many items currently an array hasPRINT gt print all elements shown in outputOutput Requirements breakdownWhen asked a question or given a problem write down the requirements on paper Our requirements are Create an array The array should have the following methods insert remove get size print Make the array resizable automatically covered in next article release Error handling optional but it adds value when you work with the interviewer in building an array We have our requirements Let s break down the problem Always break the problem into smaller chunks It will be easy to build smaller parts and combine them to complete the requirement Array Construction Creating an arrayCreate an array with two fields properties int data and size A constructor to initialize the array size public class Array private int data private int size public Array int capacity data new int capacity size We initialized size for our zero index based arrays When we insert elements into an array we are inserting them from the index We created a base Array class we need to write some of the basic array operations we need to perform on the custom array data structure we created Insert an elementWe need to write a method that inserts items into our array public void insert int element data size element size Or you can use specify the short hand syntax public void insert int element data size element We initialized the array size with in the constructor So the first element gets stored in th index When we call data size element we are storing an item in the array right at the th index In the next line we have size which increments the size variable from to So the next item gets stored in the next slot What if we want to insert elements in the middle index or starting index do we need to replace that element in that slot or should we shift the elements and insert an element in the slot In the upcoming lessons you will learn how to write shifting algorithms in an array to insert elements Remove an element at a specific indexOur array like data structure should handle removing items What if the index provided to the remove method is either negative or more than the size of the array We run into ArrayIndexOutOfBoundsException If the index provided is either negative or more than the size of the array we purposefully throw IndexOutOfBoundsException Or we can add a message to our logger by providing the error message that prints on the console or application logs if index lt index gt size throw new IndexOutOfBoundsException After our error handling is in place we can remove an element from the index and shift all the array elements to the left Anything else we need to take care of We need to decrement the size variable value by using size With all these changes in place remove method looks like this public void remove int index if index lt index gt size throw new IndexOutOfBoundsException for int i index i lt size i data i data i size So why are we shifting elements Suppose we want to delete remove elements in the middle or starting index as discussed above In that case we need to delete the element from the given index and shift all the right elements to the left by one position to fill the deleted slot In the upcoming lessons you will learn how to write shifting algorithms in an array Get an item at a specific indexThis is no different from the above explanation We need to check if the given is either negative or more than the size of the array In either case we run into ArrayIndexOutOfBoundsException The method looks like this public int get int index if index lt index gt size throw new IndexOutOfBoundsException return data index Size of arrayThis is quite straightforward In all the array operations we decrement the size when we need to remove delete an element and increment the size when we add a new element to the array So returning the size directly gives us the result public int size return size Print array itemsA simple for loop to iterate through all the array elements and display them public void print for int i i lt data length i System out println data i The same code with enhanced for loop is public void print for int el data System out println el Final look at our custom array like DSAll these smaller chunks are combined and the final array we built is package dev ggorantala ds arrays public class Array private int data private int size public Array int capacity data new int capacity size public void insert int element data size element size public boolean isOutOfBounds int index return index lt index gt size public void remove int index if isOutOfBounds index throw new IndexOutOfBoundsException for int i index i lt size i data i data i size public int get int index if index lt index gt size throw new IndexOutOfBoundsException return data index public int size return size public void print for int i i lt data length i System out print data i Array execution classLet us create an array with capacity as and insert numbers in it the size of the array becomes Illustration sA simple illustration is as follows Another illustration that clarifies the difference between capacity and size of the array What do you think is stored in the index to index The answer is zeros So s are stored from the index to So when you access A you get for A you get and so on In the above we have constructed an Array class and basic operations insert remove get and size etc Let us test each of the methods to ensure nothing is breaking in our code CodeFollowing is the execution classpackage dev ggorantala ds arrays public class ArrayExecution private static final int INPUT new int public static void main String args Array array new Array for int value INPUT array insert value array remove removed element from array System out println array get System out println array size The extra o s are because of the array capacity which is array print ExplanationArray array new Array creates an array with a capacity The input array we declared holds elements private static final int INPUT new int Using a simple for loop we are storing the INPUT data into our newly created array instance variable for int value INPUT array insert value We removed an element at the index using array remove Finally we called get size and print methods to display data on the console Hurrah You just implemented your first data structure in computer science and successfully tested it |
2023-07-25 04:13:32 |
海外TECH |
DEV Community |
How to Use CodiumAI's pr-agent? |
https://dev.to/erikbower65/how-to-use-codiumais-pr-agent-1598
|
How to Use CodiumAI x s pr agent To use CodiumAI s pr agent follow these steps Install via pip Import pr agent Initialize with your API key Create a project and set target URLs Call analyze with the text to analyze Access results for sentiment entities and more Utilize the insights to enhance your applications |
2023-07-25 04:12:45 |
医療系 |
医療介護 CBnews |
訪問リハの拡充には老健でも「みなし指定」を-委員から要望 介護給付費分科会 |
https://www.cbnews.jp/news/entry/20230725124937
|
医療機関 |
2023-07-25 13:50:00 |
金融 |
日本銀行:RSS |
実質輸出入の動向 |
http://www.boj.or.jp/research/research_data/reri/index.htm
|
輸出入 |
2023-07-25 14:00:00 |
金融 |
日本銀行:RSS |
基調的なインフレ率を捕捉するための指標 |
http://www.boj.or.jp/research/research_data/cpi/index.htm
|
捕捉 |
2023-07-25 14:00:00 |
ニュース |
BBC News - Home |
The Papers: 'Rhodes holiday terror' and George Alagiah tributes |
https://www.bbc.co.uk/news/blogs-the-papers-66297222?at_medium=RSS&at_campaign=KARANGA
|
greek |
2023-07-25 04:08:31 |
ニュース |
BBC News - Home |
Colombia 2-0 South Korea: South Americans capitalise on mistakes for opening World Cup win |
https://www.bbc.co.uk/sport/football/66290020?at_medium=RSS&at_campaign=KARANGA
|
Colombia South Korea South Americans capitalise on mistakes for opening World Cup winColombia get their Women s World Cup off to the perfect start with victory over South Korea while Casey Phair becomes the youngest ever player at a Women s World Cup |
2023-07-25 04:12:07 |
ビジネス |
ダイヤモンド・オンライン - 新着記事 |
中国の反腐敗キャンペーン、新標的は種子取引 - WSJ発 |
https://diamond.jp/articles/-/326666
|
腐敗 |
2023-07-25 13:10:00 |
ビジネス |
東洋経済オンライン |
「大学か職人か」10歳で決めるドイツと日本の違い 子供がシビアに才能を見極められるのは幸せか | 学校・受験 | 東洋経済オンライン |
https://toyokeizai.net/articles/-/688128?utm_source=rss&utm_medium=http&utm_campaign=link_back
|
当たり前 |
2023-07-25 14:00:00 |
マーケティング |
MarkeZine |
ドデカミン×VTuberのコラボ事例とデータで分析!若年世代の「推し消費」の裏側【視聴無料】 |
http://markezine.jp/article/detail/42875
|
vtuber |
2023-07-25 13:15:00 |
IT |
週刊アスキー |
本日7月25日21時から!『PSO2 NGS』公式番組で8月アップデート情報や新たなコラボ情報を公開 |
https://weekly.ascii.jp/elem/000/004/146/4146711/
|
psongs |
2023-07-25 13:45:00 |
IT |
週刊アスキー |
『クライマキナ』発売記念「はなまる」生放送が7月27日21時より配信! |
https://weekly.ascii.jp/elem/000/004/146/4146705/
|
crymachina |
2023-07-25 13:35:00 |
IT |
週刊アスキー |
ScanSnap iX1600がネットワークフォルダーへのPCレス保存に対応 |
https://weekly.ascii.jp/elem/000/004/146/4146634/
|
scansnapix |
2023-07-25 13:30:00 |
IT |
週刊アスキー |
岸田総理も推す「メタバース上への経済圏の創出」とはなにか 「WebX」開幕 |
https://weekly.ascii.jp/elem/000/004/146/4146655/
|
東京国際フォーラム |
2023-07-25 13:30:00 |
マーケティング |
AdverTimes |
従業員エンゲージメントと投資指標ROE、ROIC、PBRに正の相関 |
https://www.advertimes.com/20230725/article428063/
|
関係性 |
2023-07-25 04:37:20 |
コメント
コメントを投稿