投稿時間:2023-08-11 01:33:16 RSSフィード2023-08-11 01:00 分まとめ(41件)

カテゴリー等 サイト名等 記事タイトル・トレンドワード等 リンクURL 頻出ワード・要約等/検索ボリューム 登録日
AWS AWS Government, Education, and Nonprofits Blog Scaling intelligent document processing workflows with AWS AI services https://aws.amazon.com/blogs/publicsector/scaling-intelligent-document-processing-workflows-aws-ai/ Scaling intelligent document processing workflows with AWS AI servicesAs the daily volumes of document submissions increases for government organizations intelligent document processing IDP solution architectures must absorb spikes in requests without creating delays or other impact for the users In cases where the processing volume exceeds the limits of the resources available in an AWS Region organizations can distribute the workloads across multiple regions to increase the document processing throughput This post presents high level architecture guidance built around Amazon Comprehend to create a distributed document processing workload that can overcome the challenges of unpredictable request patterns 2023-08-10 15:18:30
python Pythonタグが付けられた新着投稿 - Qiita from ABC291 to ABC300 (A, B) https://qiita.com/nkfr26/items/1cdbd4b44cfa8bf8d22e aabch 2023-08-11 00:34:05
python Pythonタグが付けられた新着投稿 - Qiita networkXで格子状のネットワークを描く https://qiita.com/koarrrrrrrrrrra/items/819e5b67513d68835ed4 matplotlib 2023-08-11 00:26:14
js JavaScriptタグが付けられた新着投稿 - Qiita Chrome拡張機能の作り方 https://qiita.com/nzw/items/8a9bce4c0ed9f654a838 chrome 2023-08-11 00:07:57
js JavaScriptタグが付けられた新着投稿 - Qiita JavascriptにおけるESモジュールとは? https://qiita.com/GS-AI/items/f99ecea3cadf64dfe1d2 javascript 2023-08-11 00:00:53
AWS AWSタグが付けられた新着投稿 - Qiita Amazon Kinesis Data StreamsとAmazon Kinesis Data Firehoseの違い https://qiita.com/Rei_a-ho/items/da9f7454a39e91f2b129 amazonkinesisdatafirehose 2023-08-11 00:52:09
golang Goタグが付けられた新着投稿 - Qiita [Go言語]データ型 https://qiita.com/hasesiu/items/ec3db4576ba94f17a0b6 tstypescript 2023-08-11 00:19:47
Git Gitタグが付けられた新着投稿 - Qiita Unityの特定のComponentの特定の値(Color)を一括置換するコマンド https://qiita.com/archeleeds/items/8f4c9ab0c5284ab2444e color 2023-08-11 00:24:23
Git Gitタグが付けられた新着投稿 - Qiita Gitのrebaseを活用してコミットを整理・まとめる方法 https://qiita.com/Hana-0000/items/366f21e12d340600f44f gitreb 2023-08-11 00:19:02
Git Gitタグが付けられた新着投稿 - Qiita "Gitで効率的に最新の変更を取り込む: rebaseを活用したシンプルな手順" https://qiita.com/Hana-0000/items/14d89518a8e647b3e99f quotgit 2023-08-11 00:12:35
Git Gitタグが付けられた新着投稿 - Qiita Git Cloneできなくなった https://qiita.com/okuto/items/3e03c47f20fc2d151d92 gintoopenvpnusernamefor 2023-08-11 00:06:58
技術ブログ Developers.IO AWS Cloud Day Thailand 2023: Keynote มีอะไรสำคัญที่ AWS อยากจะบอก? https://dev.classmethod.jp/articles/aws-cloud-day-thailand-2023-what-keynote-does-aws-have-to-say/ AWS Cloud Day Thailand Keynote มีอะไรสำคัญที่AWS อยากจะบอก เมื่อวันที่ สิงหาคมที่ผ่านมาจิ๋วได้มีโอกาสไปเที่ยวชมงานAWS Cloud Day Thailand เลยถือโอกาสเอาเนื้อหาที่ประท 2023-08-10 15:56:02
技術ブログ Developers.IO Classmethod Members เข้าใจกันในบล็อกนี้ พร้อมวิธีประหยัดค่าใช้งาน AWS แบบไม่กั๊ก! https://dev.classmethod.jp/articles/what-is-classmethod-members-th/ Classmethod Members เข้าใจกันในบล็อกนี้พร้อมวิธีประหยัดค่าใช้งานAWS แบบไม่กั๊ก แวะอ่านก่อน อ่าน นะครับสวัสดีครับเบนจ์ครับบทความนี้เป็นบทความภาษาญี่ปุ่นที่เขียนในวันที่ กรกฎาคมปี 2023-08-10 15:51:38
海外TECH MakeUseOf 4 New PDF Productivity Features Coming to Apple Notes With macOS Sonoma https://www.makeuseof.com/pdf-productivity-apple-notes-macos-sonoma/ apple 2023-08-10 15:16:38
海外TECH MakeUseOf Is Windows 10 Slow After an Update? Here's How to Fix It https://www.makeuseof.com/windows-10-slow-after-update-fix/ windows 2023-08-10 15:16:38
海外TECH MakeUseOf Hear the Beat of Amazing Savings: Best Beats Headphone Deals to Get Right Now https://www.makeuseof.com/best-beats-headphone-deals/ beats 2023-08-10 15:10:56
海外TECH MakeUseOf Elevate Your Windows Experience With These 2023 Microsoft Store Community Choice Winning Apps https://www.makeuseof.com/2023-microsoft-store-community-choice-winning-apps/ Elevate Your Windows Experience With These Microsoft Store Community Choice Winning AppsMicrosoft asked you answered Here are the best apps you can download on your Windows computer voted by the Microsoft Community 2023-08-10 15:02:30
海外TECH DEV Community Flutter Inception: A Free Shorebird Alternative https://dev.to/codeontherocks/flutter-inception-a-free-shorebird-alternative-5hif Flutter Inception A Free Shorebird AlternativeThere is an intimacy between web developers and their users that native app developers are jealous of Within minutes of finding and diagnosing a software bug web developers can publish a fix that all of their users will see There is no laborious back and forth with a third party app store or a day wait for an simple app review The web developer builds their new application and sends it to the masses Native app developers are not so lucky App review times on the Google Play and Apple App stores are infamously unpredictable and long delaying what could have otherwise been immediate fixes for an indeterminate amount of time This slow but necessary step can ultimately lead to poor reviews lost users and developer frustration Flutter developers in particular are negatively impacted by these review process because they typically aim to publish their apps on all platforms Every time they are ready to release an update they must ask themselves Am I ready for two app reviews Many other cross platform developers face the same soul crushing processes but in this article I want to present a potential solution for the Flutter crowd On the Web and in your PocketFlutter is special among cross platform frameworks because it works on Android iOS and the web with very little modification In fact every Flutter web application can be downloaded as a progressive web app PWA that performs similarly to a native application In my opinion PWAs are a valid solution to the app review problem because they allows developers to publish updates at their own pace without sacrificing too much of the native experience The issue with this approach of course is that a majority of people don t know how to download a PWA and among those that do the willingness to do so is low Forget the PWA experience then Even if users don t download your Flutter app as a PWA they can still use it in their browser which allows them the benefit of real time updates While good this solution is not perfect either because native apps are still more performant and the app stores provide a level of trust that the wild web does not If not a PWA or web app then what Well what if we could have both What if we could have the native app experience of the time and the web experience the other What if we could have our cake and eat it too That would be nice The final solution I propose is to ship your native apps with a webview fallback When the latest version of your app has passed app store review users will get the native experience When the latest version of your app is still in review users will get the web experience From a user perspective the difference should be subtle to the point of being unnoticeable which is leaps and bounds better than them seeing a bug Whether or not the webview is used can be determined by a simple API call to your server a Firebase Remote Config value or an automated process that compares the current native version to the latest web version The rest of this article will discuss the setup in more details Deployment ApproachMy personal suggestion is to take a web first approach to app development Web applications are faster to update globally accessible and many browsers include a mobile device emulator that makes testing the responsiveness of your app as easy as resizing your browser window By making your application welcoming to web travelers you will make it welcoming to all users regardless of the color of their SMS messages A specific suggestion would be to develop and test your application on a chrome browser using the built in dev tools to emulate how it would look on a mobile device When everything looks good to go ship it and start testing on native platforms Taking this approach will ultimately lead to a drastically higher number of web deployments compared to Android or iOS deployments but that s fine If you re marketing campaigns are web focused most of your traffic will be browser bound anyway Code Web ApplicationThe first step is to create a web application that will be used as the fallback for your native app This application should be hosted on a server that you control and should be accessible via a URL The URL can be stored in your app as a global variable or passed to your application using dart define I recommend using a Firebase Hosting since its super easy to setup Develop this application as you would any other Flutter application and publish it In App WebviewTo effectively implement this solution you ll need a trusty webview package that works on both Android and iOS platforms I prefer to use the flutter inappwebview package which you can add to your pubspec yaml using the following line flutter inappwebview There is a beta version of this plugin that also works on the webOnce you ve added the dependency the next step is to create an app webview widget with the sole purpose of displaying your web application in a webview A small visual indicator like a different colored status bar when the app is using thewebview can help you avoid being confused during development The bare bones code looks like this class AppWebview extends StatefulWidget const AppWebview Key key super key key override State lt AppWebview gt createState gt AppWebviewState class AppWebviewState extends State lt AppWebview gt final GlobalKey webViewKey GlobalKey InAppWebViewController webViewController override Widget build BuildContext context return Scaffold appBar AppBar toolbarHeight backgroundColor Colors black body InAppWebView key webViewKey pullToRefreshController pullToRefreshController initialUrlRequest URLRequest url WebUri const String fromEnvironment APP WEBVIEW BASE URL onWebViewCreated controller webViewController controller The webview variant of your native app doesn t need to use the router your app normally uses ex auto route go router etc so you can add it directly to a MaterialApp widget The app inside the webview will use the router as designed The biggest problem with this code is that your native application will think it only has a single route In other words the native Android and iOS apps can t see the router in the webview One tap of the Android back button or a single right swipe on iOS will close the application completely We don t want that To fix this we need to wrap the webview widget in a WillPopScope widget that will detect back button presses and communicate them to the webview controller If the webview can navigate backwards in its history a back button press should do that instead of closing the app return WillPopScope onWillPop async final controller webViewController if controller null if await controller canGoBack controller goBack return false return false child Scaffold appBar AppBar toolbarHeight backgroundColor Colors black body webview code When to WebviewNow that we have a webview set up we need to decide when to use that instead of the normal app This part is up to you but I ll provide a few ideas here Since the app stores operate at different speeds its a good idea to create separate flags for Android and iOS Firebase Remote ConfigFirebase Remote Config lets you create and update feature flags easily through your project s Firebase console On the Remote Config tab add two new boolean parameters android webview and ios webview set them to false and publish the changes When a platform should use the webview change its corresponding flag to true and publish In the app you can read these values using the firebase remote config package The following code sets up the remote config and reads the values for the android webview and ios webview flags final remoteConfig FirebaseRemoteConfig instance Future lt void gt setup async await remoteConfig setConfigSettings RemoteConfigSettings fetchTimeout const Duration minutes minimumFetchInterval const Duration hours await remoteConfig setDefaults android webview false ios webview false await remoteConfig fetchAndActivate bool get androidWebview gt remoteConfig getBool android webview bool get iosWebview gt remoteConfig getBool ios webview Pros Fast to changeFast to deployCons Requires Firebase project and packagesNot always immediate Dart EndpointIf you re a full stack Dartists creating a simple endpoint using Dart Frog can be a fast way to add remote control to your app Create a new endpoint that returns a boolean value for each platform When the endpoint is hit the app can read the value and decide if it should use thewebview Pros Fully customizableLightweightCons Requires a new server deploy for each change More setupIf you d rather your app automatically detect when it should use the webview you can tweak this implementation slightly and store the latest version in Remote Config or on your server Then when your native apps start up they can check their own version against this server version and decide if the webview is necessary You can get the current version of your app using the package info plus package Add it to your pubspec yaml package info plus Then in your main dart file you can get the current version of your app final packageInfo await PackageInfo fromPlatform final currentVersion packageInfo version Regardless of how you decide to set these flags the implementation on the frontend will look similar If the app is running on the web it should never use the webview If its running on native Android or iOS it should check the relevant flag and decide what to do class MyApp extends StatelessWidget MyApp super key final MaterialApp baseApp MaterialApp router routerConfig router config theme ThemeData colorScheme ColorScheme fromSeed seedColor Colors deepPurple useMaterial true override Widget build BuildContext context return Builder builder context if kIsWeb return baseApp else bool androidWebview Platform isAndroid amp amp remoteConfigService androidWebview bool iosWebview Platform isIOS amp amp remoteConfigService iosWebview bool showWebView androidWebview iosWebview if kIsWeb amp amp showWebView return const MaterialApp home AppWebview else return baseApp What about the Guidelines According to section of the Apple Developer guidelines Apps should be self contained in their bundles and may not read or write data outside the designated container area nor may they download install or execute code which introduces or changes features or functionality of the app including other apps Educational apps designed to teach develop or allow students to test executable code may in limited circumstances download code provided that such code is not used for other purposes Such apps must make the source code provided by the app completely viewable and editable by the user If we re comparing the webview fallback method to Shorebird dev I d argue that the webview approach is more acceptable since the contents of the users app does not change until they want it to by updating the app through the App Store ConclusionIf you ve ever accidentally shipped a bug to production you know what true helplessness feels like Regardless of how simple the fix is you can be stuck watching users encounter the bug for hours or even days as stakeholders question you about when it will be squashed Its a stressful time and stress is bad for your health With the webview fallback solution I ve described here you might just get days of your life back Most of the time your users will see the native experience they re used to For the other handful of times when a bug has crept into prod or a much needed update is standing in the TSA line you can flip a switch and sleep easy How can you beat that 2023-08-10 15:44:12
海外TECH DEV Community CSS TRANSITIONS https://dev.to/stanthewebdev/css-transitions-4h71 CSS TRANSITIONSOUTLINEHere is a comprehensive outline for a CSS transition tutorial Introduction to CSS Transitions Definition of CSS transitionsHow CSS transitions workExamples of CSS transitionsProperties of CSS Transitions transition property specifies the name or names of the CSS properties to which transitions should be appliedtransition duration specifies the duration over which transitions should occurtransition timing function specifies a function to define how intermediate values for properties are computedtransition delay specifies a delay in seconds for the transition effectUsing CSS Transitions How to create a transition effectHow to specify the speed curve of the transitionHow to delay the transition effectHow to change several property valuesBrowser Support for Transitions Overview of browser support for CSS transitionsHow to ensure cross browser compatibilityAdvanced Topics Using cubic bezier functions to define custom easing functionsCombining CSS transitions with other CSS techniques such as transforms and animationsConclusion and Further Resources Summary of key pointsLinks to further resources for learning about CSS transitionsIntroduction to CSS TransitionsDefinition of CSS transitionsCSS transitions provide a way to control animation speed when changing CSS properties Instead of having property changes take effect immediately you can cause the changes in a property to take place over a period of time¹ For example if you change the color of an element from white to black usually the change is instantaneous With CSS transitions enabled changes occur at time intervals that follow an acceleration curve all of which can be customized¹ How CSS transitions workCSS transitions let you decide which properties to animate by listing them explicitly when the animation will start by setting a delay how long the transition will last by setting a duration and how the transition will run by defining an easing function e g linearly or quick at the beginning slow at the end ¹ The Web author can define which property has to be animated and in which way This allows the creation of complex transitions However some properties are not animatable as it doesn t make sense to animate them¹ Examples of CSS transitionsHere are some examples of CSS transitions Simple example A div element with a specified transition effect for the width property with a duration of seconds The transition effect will start when the specified CSS property width changes value div width px height px background red transition width s div hover width px Multiple animated properties example A div element with a transition effect for both the width and height property with a duration of seconds for the width and seconds for the height div width px height px background red transition width s height s div hover width px height px Using transitions when highlighting menus A common use of CSS is to highlight items in a menu as the user hovers over them This can be achieved using CSS transitions ul li display inline block margin right px position relative padding px px background color eee cursor pointer transition all s ease in out ul li hover background color ddd transform scale Properties of CSS TransitionsCSS transitions provide a way to control animation speed when changing CSS properties Instead of having property changes take effect immediately you can cause the changes in a property to take place over a period of time¹ The transition is the combination of four properties which are listed below transition property It specifies the CSS properties to which a transition effect should be applied Only properties listed here are animated during transitions changes to all other properties occur instantaneously as usual² For example if you want to apply a transition effect to the width property of an element you can specify it like this div transition property width transition duration It specifies the length of time a transition animation should take to complete You can specify a single duration that applies to all properties during the transition or multiple values to allow each property to transition over a different period of time² For example if you want the width transition to take seconds you can specify it like this div transition duration s transition timing function It specifies a function to define how intermediate values for properties are computed Easing functions determine how intermediate values of the transition are calculated² For example if you want the width transition to have an ease in out timing function you can specify it like this div transition timing function ease in out transition delay It defines how long to wait between the time a property is changed and the transition actually begins² For example if you want the width transition to start after a delay of second you can specify it like this div transition delay s All these properties can be combined into one shorthand property transition The syntax is div transition lt transition property gt lt transition duration gt lt transition timing function gt lt transition delay gt For example if you want to apply a transition effect to the width property of an element with a duration of seconds an ease in out timing function and a delay of second you can specify it like this div transition width s ease in out s Using CSS TransitionsCSS transitions provide a way to control animation speed when changing CSS properties Instead of having property changes take effect immediately you can cause the changes in a property to take place over a period of time¹ How to create a transition effectTo create a transition effect you must specify two things the CSS property you want to add an effect to and the duration of the effect³ For example if you want to apply a transition effect to the width property of an element with a duration of seconds you can specify it like this div width px height px background red transition width s div hover width px How to specify the speed curve of the transitionThe transition timing function property specifies the speed curve of the transition effect This property can have several values including ease linear ease in ease out and ease in out³ For example if you want the width transition to have an ease in out timing function you can specify it like this div width px height px background red transition width s ease in out div hover width px How to delay the transition effectThe transition delay property specifies a delay in seconds for the transition effect For example if you want the width transition to start after a delay of second you can specify it like this div width px height px background red transition width s ease in out transition delay s div hover width px How to change several property valuesYou can change several property values at once by specifying multiple properties in the transition shorthand property For example if you want to apply a transition effect to both the width and height properties of an element with a duration of seconds for the width and seconds for the height you can specify it like this div width px height px background color red transition width s height s div hover width px height px Browser Support for TransitionsOverview of browser support for CSS transitionsCSS transitions are widely supported in modern browsers According to Can I use CSS transitions are supported by of global users¹ This includes support in all major browsers such as Chrome Firefox Safari Edge and Opera¹ However it is important to note that older versions of some browsers may require vendor prefixes to use CSS transitions For example older versions of Chrome and Safari may require the webkit prefix³ How to ensure cross browser compatibilityTo ensure cross browser compatibility with CSS transitions you can follow these steps Determine your target browsers It is important to determine which browsers your target audience is likely to use This will help you focus your testing efforts on the most relevant browsers⁵ Use vendor prefixes Vendor prefixes are a way for browser makers to add support for new CSS features before those features are fully supported in all browsers By using vendor prefixes developers can use new CSS features in the browsers that support them instead of waiting for all browsers to catch up For example if you need to support older versions of Chrome and Safari you may need to use the webkit prefix for the transition property¹ Here is an example of how to use vendor prefixes for the transition property div width px height px background red webkit transition width s For older versions of Chrome and Safari transition width s div hover width px In this example we use the webkit prefix for the transition property to ensure that the transition effect works in older versions of Chrome and Safari We also include the unprefixed version of the transition property to ensure that the transition effect works in other browsers that support CSS transitions Test on multiple browsers It is important to test your website on multiple browsers to ensure that the transitions work as expected You can use tools such as LambdaTest or BrowserStack to test your website on a range of different browsers and devices Provide fallbacks In case some users are using a browser that does not support CSS transitions it is a good idea to provide fallbacks For example you can use JavaScript animations as a fallback for browsers that do not support CSS transitions Advanced TopicsUsing cubic bezier functions to define custom easing functionsCubic BezieBeziertions are a powerful tool for creating custom easing functions in CSS transitions These functions allow you to define the speed curve of a transition giving you precise control over how the animation progresses over time A cubic bezier function is defined by four values which represent the x and y coordinates of two control points on a cubic bezier curve The first and last points of the curve are fixed at and respectively By adjusting the position of the two control points you can create a wide variety of easing functions Here are some examples of how to use cubic bezier functions in CSS transitions Example Bounce effectdiv width px height px background red transition all s cubic bezier div hover width px In this example we use a cubic bezier function to create a bounce effect when the width of the div element changes The transition starts quickly slows down in the middle and then speeds up again towards the end Example Elastic effectdiv width px height px background red transition all s cubic bezier div hover width px In this example we use a cubic bezier function to create an elastic effect when the width of the div element changes The transition starts slowly speeds up in the middle and then overshoots its target before settling back to its final value Example Custom ease in out effectdiv width px height px background color red transition all s cubic bezier div hover width px In this example we use a cubic bezier function to create a custom ease in out effect when the width of the div element changes The transition starts slowly and ends slowly with a fast change in between These are just a few examples of how you can use cubic bezier functions to create custom easing functions in CSS transitions By adjusting the values of the cubic bezier function you can create an almost infinite variety of easing effects to suit your needs Combining CSS transitions with other CSS techniques such as transforms and animationsCombining CSS transitions with other CSS techniques such as transforms and animations can create truly immersive and engaging web experiences Transforms allow you to modify an element s position rotation scale and other properties while transitions enable you to animate those changes smoothly over a specified duration Here are some examples of how to combine CSS transitions with other CSS techniques Example Rotating an element continuouslydiv width px height px background color red animation rotate s linear infinite keyframes rotate from transform rotate deg to transform rotate deg In this example we use a CSS animation to continuously rotate a div element The animation property specifies the name of the animation rotate the duration of the animation s the timing function linear and the number of times the animation should repeat infinite The keyframes rule defines the start and end states of the animation with the transform property being used to specify the rotation Example Creating a hover effect with a D perspectivediv width px height px margin px background color red transition transform s transform style preserve d div hover transform perspective px rotateY deg In this example we use a CSS transition to create a hover effect with a D perspective When the user hovers over the div element it rotates around its Y axis giving the impression of a D flip The transition property specifies that the transform property should be animated over a duration of s The transform style property is set to preserve d to enable D transformations On hover the transform property is updated to specify a perspective and a rotation Example Creating a card flip animation container width px height px position relative border px solid ccc perspective px card width height position absolute transform style preserve d transition transform s card hover transform rotateY deg front back width height position absolute backface visibility hidden front background color red back background color green transform rotateY deg In this example we use a CSS transition to create a card flip animation The container element has a perspective property set to give the impression of depth The card element has a transition property set to animate changes to the transform property over a duration of s The front and back elements represent the front and back of the card respectively When the user hovers over the card element its transform property is updated to rotate it around its Y axis giving the impression of a card flip Here are some more examples of combining CSS transitions with other CSS techniques Example Creating a smooth scrolling effecthtml scroll behavior smooth In this example we use the scroll behavior property to create a smooth scrolling effect when the user clicks on an anchor link The scroll behavior property specifies whether the scrolling should be smooth or instant By setting the value to smooth the browser will automatically animate the scrolling when the user clicks on an anchor link Example Creating a fade in effect fade opacity transition opacity s fade hover opacity In this example we use a CSS transition to create a fade in effect when the user hovers over an element The transition property specifies that changes to the opacity property should be animated over a duration of s When the user hovers over the element its opacity is updated from to creating a smooth fade in effect Example Creating a slide in effect slide position relative left px transition left s slide hover left In this example we use a CSS transition to create a slide in effect when the user hovers over an element The transition property specifies that changes to the left property should be animated over a duration of s When the user hovers over the element its left property is updated from px to creating a smooth slide in effect Summary of key pointsCSS transitions provide a way to control animation speed when changing CSS properties The transition is the combination of four properties transition property transition duration transition timing function and transition delay You can create a wide variety of transition effects by combining these properties in different ways CSS transitions are widely supported in modern browsers but you may need to use vendor prefixes to ensure cross browser compatibility You can combine CSS transitions with other CSS techniques such as transforms and animations to create truly immersive and engaging web experiences Links to further resources for learning about CSS transitions Using CSS transitions CSS Cascading Style Sheets MDN MDN Web Docs CSS Transitions WSchools CSS transitions CSS Cascading Style Sheets MDN MDN Web Docs CSS Transitions and Transforms for Beginners thoughtbot transition CSS Cascading Style Sheets MDN MDN Web Docs CSS Transition Property How does Transition Property Work in CSS EDUCBA CSS Transitions GeeksforGeeks CSS Transition Cheat Sheet amp Examples for CatsWhoCode 2023-08-10 15:44:00
海外TECH DEV Community Dockerfile https://dev.to/scorcism/dockerfile-12ho Dockerfile Let s startClone this repoIt s a simple react app which increase the count on the button clicks and store in localstorage to maintain state Dockerfile explanationLets break the code into componetsFROM node alpineWORKDIR appCOPY package json RUN npm installCOPY EXPOSE CMD npm start Every new line or new line command in the Dockerfile is a new layer on top of the previous one Docker creates container images using layers Each command that is found in a Dockerfile creates a new layer Each layer contains the filesystem changes to the image for the state before the execution of the command and the state after the execution of the command FROM node alpineThis creates a base layer for our application Since we are using react we require node as the base You can choose any base image e g Ubuntu but in Ubuntu images we have to manually download node so instead we can use the node image itself WORKDIR appWORKDIR changes the working directory for future commands The WORKDIR specifies the default directory inside a Docker container where commands will be executed It is similar to the concept of the current working directory on your computer when you run commands in the terminal or command prompt COPY package json This line copies the package json file from the current directory on the host machine where the Dockerfile is located into the app directory inside the container It s the first step in installing the dependencies required for the Node js application RUN npm installThis line runs the npm install command inside the container It installs all the dependencies listed in the package json file into the app node modules directory inside the container These dependencies are required for the Node js application to work correctly COPY This line copies all the files and folders from the current directory on the host machine into the app directory inside the container This includes all the source code and other files needed for the Node js application EXPOSE This line exposes port inside the container It means that the container will listen for incoming connections on port which is a common port used for web applications CMD npm start This line sets the default command to be executed when the container starts running It runs the npm start command which typically starts the Node js application defined in the package json file So when the container starts it will run the react application and listen on port as specified earlier with EXPOSE Now as we got the undertsanding of Dockerfile Now we will explore some commands to create a Docker image and a Docker container Create image from DockerFiledocker build t react counter docker build This tells Docker to start building a new image t react counter This specifies the name of the image we want to create In this case the image will be named react counter This indicates the current directory where the Dockerfile the configuration file that defines the image is located Docker will look for the Dockerfile in the current directory and use it as a blueprint to create the image Create Container of Docker Image docker run name counter d p react counter docker run This tells Docker to run a new container name counter This sets the name of the container as counter The name is like a nickname for the container so that you can refer to it easily later d This flag runs the container in the background detached mode so that you can continue using your terminal p This maps port on your host machine to port inside the container It means you can access the application running inside the container on your host machine using port docker img id or docker img name This is the unique identifier ID of the Docker image that you want to run in the container Docker uses this ID to find the image and create a container from it Open you browserEnter the URI ENJOY 2023-08-10 15:30:28
海外TECH DEV Community CSS TRANSFORM https://dev.to/stanthewebdev/css-transform-2mjb CSS TRANSFORMThe CSS transform property allows you to apply geometric transformations to an element such as rotating scaling skewing or translating it Here is a list of all the CSS transform functions along with examples matrix The matrix function describes a homogeneous D transformation matrix It takes six values representing the elements of a x matrix Here is an example that shows how to use the matrix function to scale and skew an element example transform matrix matrixd The matrixd function describes a D transformation as a x homogeneous matrix It takes sixteen values representing the elements of a x matrix Here is an example that shows how to use the matrixd function to rotate and scale an element in D space example transform matrixd perspective The perspective function sets the distance between the user and the z plane It takes one value representing the distance in pixels Here is an example that shows how to use the perspective function to create a perspective effect on an element example transform perspective px rotateY deg rotate The rotate function rotates an element around a fixed point on the D plane It takes one value representing the angle of rotation in degrees or radians Here is an example that shows how to use the rotate function to rotate an element by degrees example transform rotate deg rotated The rotated function rotates an element around a fixed axis in D space It takes four values the x y and z coordinates of the axis of rotation followed by the angle of rotation in degrees or radians Here is an example that shows how to use the rotated function to rotate an element around a fixed axis in D space example transform rotated deg rotateX The rotateX function rotates an element around the horizontal axis It takes one value representing the angle of rotation in degrees or radians Here is an example that shows how to use the rotateX function to rotate an element around the horizontal axis example transform rotateX deg rotateY The rotateY function rotates an element around the vertical axis It takes one value representing the angle of rotation in degrees or radians Here is an example that shows how to use the rotateY function to rotate an element around the vertical axis example transform rotateY deg rotateZ The rotateZ function rotates an element around the z axis It takes one value representing the angle of rotation in degrees or radians Here is an example that shows how to use the rotateZ function to rotate an element around the z axis example transform rotateZ deg scale The scale function scales an element up or down on the D plane It takes one or two values if one value is provided it specifies a uniform scaling factor for both dimensions if two values are provided they specify separate scaling factors for the x and y dimensions respectively Here is an example that shows how to use the scale function to increase the size of an element by a factor of two example transform scale scaled The scaled function scales an element up or down in D space It takes three values separate scaling factors for each dimension x y and z dimensions Here is an example that shows how to use the lt EUGPSCoordinates gt function to scale an element in all three dimensions example transform scaled scaleX The lt EUGPSCoordinates gt function scales an element up or down horizontally along its x axis It takes one value a scaling factor for its x dimension Here is an example that shows how to use the scaleX function to scale an element horizontally example transform scaleX scaleY The scaleY function scales an element up or down vertically along its y axis It takes one value a scaling factor for its y dimension Here is an example that shows how to use the scaleY function to scale an element vertically example transform scaleY scaleZ The scaleZ function scales an element up or down along the z axis It takes one value a scaling factor for its z dimension Here is an example that shows how to use the scaleZ function to scale an element along the z axis example transform scaleZ skew The skew function skews an element on the D plane It takes one or two values if one value is provided it specifies a skew along the x axis if two values are provided they specify separate skews along the x and y axes respectively Here is an example that shows how to use the skew function to skew an element by degrees along the X axis and degrees along the Y axis example transform skew deg deg skewX The skewX function skews an element in the horizontal direction along its x axis It takes one value representing the angle of skew in degrees or radians Here is an example that shows how to use the skewX function to skew an element in the horizontal direction example transform skewX deg skewY The skewY function skews an element in the vertical direction along its y axis It takes one value representing the angle of skew in degrees or radians Here is an example that shows how to use the skewY function to skew an element in the vertical direction example transform skewY deg translate The translate function moves an element on the D plane It takes one or two values if one value is provided it specifies a translation along the x axis if two values are provided they specify separate translations along the x and y axes respectively Here is an example that shows how to use the translate function to move an element pixels to the right and pixels down example transform translate px px translated The translated function moves an element in D space It takes three values separate translations for each dimension x y and z dimensions Here is an example that shows how to use the lt EUGPSCoordinates gt function to move an element in all three dimensions example transform translated px px px translateX The lt EUGPSCoordinates gt function moves an element horizontally along its x axis It takes one value a translation for its x dimension Here is an example that shows how to use the lt EUGPSCoordinates gt function to move an element horizontally example transform translateX px translateY The lt EUGPSCoordinates gt function moves an element vertically along its y axis It takes one value a translation for its y dimension Here is an example that shows how to use the lt EUGPSCoordinates gt function to move an element vertically example transform translateY px translateZ The lt EUGPSCoordinates gt function moves an element along the z axis It takes one value a translation for its z dimension Here is an example that shows how to use the lt EUGPSCoordinates gt function to move an element along the z axis example transform translateZ px These examples demonstrate how you can use each of these CSS transform functions to apply geometric transformations to elements on your web pages transform CSS Cascading Style Sheets MDN MDN Web Docs CSS Cascading Style Sheets MDN CSS Functions Quackit Tutorials CSS Transitions and Transforms for Beginners thoughtbot 2023-08-10 15:21:24
海外TECH DEV Community Getting Started with Hy, the Python Lisp: a Matplotlib example - Ep. 2 https://dev.to/gicrisf/getting-started-with-hy-the-python-lisp-a-matplotlib-example-ep-2-7jm Getting Started with Hy the Python Lisp a Matplotlib example Ep In the previous episode we briefly saw what Hy is what it means that it is a dialect of Lisp how to install it and step by step we wrote a small example to create a line plot in matplotlib strictly following the imperative approach we would have used in Python import matplotlib pyplot as plt setv x values setv y values setv fig ax plt subplots ax plot x values y values marker o ax set xlabel X values ax set ylabel Y values ax set title Simple Line Plot plt savefig img hy plt example png If you don t understand something about the code above I recommend referring to the first part maybe something just went unnoticed until now If instead everything is clear we can proceed Now it s time to make things more spicy by adopting a functional approach More precisely we will begin by encapsulating everything in a let What is a let Before rewriting our code it is important to understand what a let is and why it is so useful If you are already familiar with this concept feel free to skip this paragraph and proceed directly to the code A let is a Lisp operator that allows you to create a lexical context with new local variables Basically it s like saying you want to call a function that can access these variables and prioritize these variable declarations over other external ones with the same name How does it works A let expression has two parts First comes a list of instructions for creating variables each of the form variable expression Each variable will initially be set to the value of the corresponding expression After the list of variables and values comes a body of expressions which are evaluated in order Graham ANSI Common Lisp p In Hy terms let x print x The x variable defined in the head of the let is not accessible outside it Actually the Hy let is pretty special because it makes you write variables that have access to the ones defined previously in the same expression For example let x y z x y print x print y print z As you can see here the z variable is defined in relation to x and y As the documentation explains Like the let of many other Lisps let executes the variable assignments one by one in the order writtenThis means that as let in other lisps let in Hy is functionally equivalent to a series of pure nested lets Let s plotBeing conscious of how let works in Hy we can now rewrite the initial code import matplotlib pyplot as plt let x values y values fig ax plt subplots ax plot x values y values marker o ax set xlabel X values ax set ylabel Y values ax set title Simple Line Plot plt savefig img hy plt example png Remember that let blocks can be nested For example in the case we want to plot two identical graphs but with different labels we could write import matplotlib pyplot as plt let x values y values English version let fig ax plt subplots ax plot x values y values marker x ax set xlabel X values ax set ylabel Y values ax set title First Title plt savefig img hy plt example en png Italian version let fig ax plt subplots ax plot x values y values marker o ax set xlabel Ascisse ax set ylabel Ordinate ax set title Secondo titolo plt savefig img hy plt example it png This code saves two figures an English one and an Italian one MacrosLisp code including Hy code is expressed as a series of lists Its minimalist syntax or rather the lack of it allows for easy writing of macros But what is a macro The most common way to write programs that write programs is by defining macros Macros are operators that are implemented by transformation You define a macro by saying how a call to it should be translated This translation called macro expansion is done automatically by the compiler So the code generated by your macros becomes an integral part of your program just as if you had typed it in yourself Graham ANSI Common Lisp p In other words macros are operators that write code and lisps are particularly good for metaprogramming which means the code itself is treated as data that can be manipulated by itself allowing for powerful generative techniques This means also that we can build up our own language to make the code drier or more comfortable Lisp is designed to be extensible it lets you define new operators yourself Graham ANSI Common Lisp p Going metaLet s see how we can leverage the power of macros in this case If you require a series of similar plots with only the title and filename being changed you can write import matplotlib pyplot as plt defmacro plot with title title fname quasiquote let fig ax plt subplots ax plot x values y values marker o ax set xlabel Ascisse ax set ylabel Ordinate ax set title unquote title plt savefig unquote fname let x values y values plot with title First title img hy plt example one png plot with title Second title img hy plt example two png We can dream bigger by creating abstractions for all line plots import matplotlib pyplot as plt defmacro lineplot x y title fname marker xlabel ylabel quasiquote let x values unquote x y values unquote y fig ax plt subplots ax plot x values y values marker unquote marker ax set xlabel unquote xlabel ax set ylabel unquote ylabel ax set title unquote title plt savefig unquote fname lineplot Titolo img hy plt example one png o X values Y values As long as the macro definition is under your eyes it s easy to understand the order in which to write the arguments In this example first the values for x and y then the title followed by the path of the image to be saved the marker and the labels But this is just a simplified situation usually the macro definition is hidden in a library out of sight so named arguments should be preferred over positional arguments Unfortunately this is not directly possible in Hy because as described in the documentation defmacro cannot use keyword arguments because all values are passed to macros unevaluated All arguments are passed positionally but they can have default values defmacro a macro a b a b a macro a macro a macro b b Thankfully there s a nifty workaround to achieve to have both the default values and the positional arguments Instead of them being assigned in the macro we write a simple wrapper function Then we use the function for Defining the default values Giving names to macro s positional arguments import matplotlib pyplot as plt defmacro macro lineplot x y title fname marker xlabel ylabel quasiquote let x values unquote x y values unquote y fig ax plt subplots ax plot x values y values marker unquote marker ax set xlabel unquote xlabel ax set ylabel unquote ylabel ax set title unquote title plt savefig unquote fname defn lineplot x y title Title fname fname png marker o xlabel X values ylabel Y values macro lineplot x y title fname marker xlabel ylabel The asterisk tells which parameters need the key If the symbol is given in place of a parameter it means that all the following parameters can only be set by name In other words we have assigned default values that can be overridden by using the key s name Ultimately assuming the macro is externalized in a library the original code simplifies to these practical and fully functional lines lineplot title Simple Line Plot fname img hy plt example last png Of course this is the simplest example I could think of and there is room for a lot of improvement but I think it makes the potential of the language and macros quite evident Moreover keep in mind that the thrill lies in the fusion of these two powerful languages By keeping the hy package as a dependency Hy macros can be imported and used directly in Python code This allows you to easily share the wrapper function with non Hy users ConclusionIn this post we have discussed how to effectively use lexical scoped blocks and macros Macros provide a powerful tool for metaprogramming allowing you to extend the language and write code that is both cleaner and more expressive By understanding and utilizing these features in Hy you will be able to write more reliable code while still benefiting from Python libraries Originally posted on Zwitterionic Digressions Cover image realized with the help of openjourney 2023-08-10 15:17:04
海外TECH DEV Community How to use the official Apache AGE docker image https://dev.to/markgomer/how-to-use-the-official-apache-age-docker-image-5baf How to use the official Apache AGE docker image Pre requisitesFor this guide I ll be using Windows with Arch Linux installed on WSL and Docker integrated Docker Desktop needs to be installed on Windows This may work on anything that runs Docker though Getting the imageMake sure docker daemon is running by starting Docker Desktop If you issue docker ps and it doesn t throw an error you may be good to go Now go to the official Apache AGE docker hub page and copy the command docker pull apache ageRun it on WSL terminal and it should appear in the list of docker images docker image lsREPOSITORY TAG IMAGE ID CREATED SIZEapache age latest dcbacfc hours ago GB Running the containerNow that you have the image you need to run a container of it but it needs very specific variables as per user documentation From WSL terminal paste docker run name age p e POSTGRES USER postgresUser e POSTGRES PASSWORD postgresPW e POSTGRES DB postgresDB d apache ageLet me break down the command docker run This is the basic command to start a new Docker container name age Assigns the name age to the container This name can be used to reference the container in other Docker commands p Maps port inside the Docker container to port on the host machine WSL This is useful for connecting to the PostgreSQL service running inside the container from the host system e POSTGRES USER postgresUser Sets an environment variable POSTGRES USER inside the container assigning it the value postgresUser This is the username used to connect to the PostgreSQL database e POSTGRES PASSWORD postgresPW Sets an environment variable POSTGRES PASSWORD inside the container assigning it the value postgresPW This is the password used to connect to the PostgreSQL database e POSTGRES DB postgresDB Sets an environment variable POSTGRES DB inside the container assigning it the value postgresDB This is the name of the database to which connections will be made by default d Runs the container in detached mode This means that the container will run in the background and you won t see its output in the terminal apache age This is the name of the Docker image to be used for the container It refers to a specific image that has Apache AGE installed and configured With that there will be a running container on background Using Apache AGE from containerNow on Docker Desktop click on age the recently created container Now click Terminal and Open in external terminal It will open your default terminal logged in to root Now run the command psql h p d postgresDB U postgresUserImmediately you will be inside psql logged in to postgresUser in the postgresDB database which were created upon the prior docker run command psql h p d postgresDB U postgresUserpsql Debian pgdg Type help for help postgresDB Apache AGE comes already loaded so you can start using it right away postgresDB SET search path TO ag catalog SETpostgresDB SELECT FROM ag graph graphid name namespace test test row postgresDB SELECT FROM ag label name graph id kind relation seq name ag label vertex v test ag label vertex ag label vertex id seq ag label edge e test ag label edge ag label edge id seq rows postgresDB And that s a wrap Have fun I make these posts in order to guide people into the development of a new technology If you find anything incorrect I urge you to comment below so I can fix it Thanks Check Apache AGE Overview ーApache AGE master documentation GitHub apache age 2023-08-10 15:11:31
海外TECH DEV Community Practical Guide to Writing Reusable Components in Angular https://dev.to/ifleonardo_/practical-guide-to-writing-reusable-components-in-angular-1336 Practical Guide to Writing Reusable Components in AngularDeveloping reusable components is one of the cornerstones for building well structured and easily maintainable Angular applications In this guide we will delve deep into best practices for designing and implementing reusable components that promote code reusability maintainability and scalability Separating ResponsibilitiesThe approach of separating responsibilities is crucial for creating reusable components By adhering to this practice you ensure that each component has a specific task and doesn t accumulate unnecessary functionalities Let s explore some advanced tactics to apply this approach Clear and Well Defined InterfaceStart by defining a clear interface for your component This includes comprehensively documenting which input and output properties are available as well as how to use them For example interface CardData header string content string Use of Structural DirectivesTo keep your component focused avoid adding complex layout structures directly to the component Instead use structural directives like lt ng content gt to allow consumers to customize the layout as needed lt card component html gt lt div class card gt lt ng content gt lt ng content gt lt div gt The Single Responsibility PrincipleA component should have a single well defined responsibility If the component starts accumulating too many functionalities consider splitting those functionalities into smaller subcomponents Creating Reusable ComponentsNow let s move on to the practical creation of reusable components and explore advanced techniques to make them even more versatile Dependency InjectionWhen designing components avoid creating tight dependencies on specific services Instead use dependency injection to provide external services to your component This will make the component more flexible and easy to test constructor private dataService DataService Flexible CustomizationProvide customization options for your component through input properties Use attributes with sensible default values so that consumers can effortlessly customize the component Input title Default Title Event HandlingIn addition to input properties use output properties to emit events This allows the component to notify the consumer about important actions However avoid excessive notifications focusing only on significant events Output cardClicked new EventEmitter lt CardData gt TestabilityWrite unit and integration tests for your component This ensures that the component works correctly in different scenarios and is crucial for long term maintenance Advanced Usage ExampleTo demonstrate how to create reusable components that go beyond the basics let s consider a list component that displays items in a flexible list format This component can receive a listOptions object containing all the necessary information to configure the list FlexibleListComponent Component selector app flexible list templateUrl flexible list component html styleUrls flexible list component scss export class FlexibleListComponent Input items any Input listOptions ListOptions export interface ListOptions columnsNumber number itemTemplate string Component Usage lt app flexible list items items listOptions listOptions gt lt app flexible list gt ConclusionThe ability to create reusable components goes beyond simply defining input and output properties By applying advanced practices of separating responsibilities dependency injection flexible customization and proper event handling you ll be on the right path to building a solid foundation for your Angular applications Remember that clarity and documentation are essential when designing reusable components Consistent practice and refining your techniques will result in robust components of high value for your teams and future projects 2023-08-10 15:11:19
海外TECH DEV Community Host your E-Learning platform with Moodle https://dev.to/technology-schaechner/ho-to-install-moodle-2o69 Host your E Learning platform with MoodleIf you like this article we would appreciate a comment and a like ️In this guide we will show you today how to install the learning platform Moodle It s best if we start right now Don t you like to do this installation or don t have the possibility Then register on our website here you also have the option to create your own courses for free We would be pleased We switch to the terminal and then withcd var www in our data directory Here we also download the latest Moodle filessudo wget In our case this ZIP file is now called moodle zip and we unpack itsudo unzip master zipAnd we ve already unzipped the folder If you want we can move or rename the folder we ll take care of everythingmv foldername folderpathWe rename the folder that has now been extracted moodle master to moodle We ll do thatsudo mv moodle master moodle Then we still have to adjust the permissions we ll do that with yousudo chown R root moodle sudo chmod R moodle Now we have to create our database We ll do thatsudo mysqlCREATE DATABASE database name CREATE USER username localhost IDENTIFIED BY password GRANT ALL PRIVILEGES ON dbname TO username localhost FLUSH PRIVILEGES EXIT You can define the username database name and user password as you wish but we will need the data again later When we have done that we can already call up the IP address moodle and we have arrived at our web installer Optionally we can now specify a domain For this we createsudo nano etc apache sites available moodle confa new file The content can look something like this lt VirtualHost gt ServerAdmin master domain com DocumentRoot var www moodle Server name learn xn schchner za de Server alias www learn schächner de Alias moodle var www moodle lt Directory var www moodle gt Options FollowSymlinks AllowOverrideAll Require all granted lt IfModule mod dav c gt dav off lt IfModule gt SetEnv HOME var www moodle SetEnv HTTP HOME var www moodle lt Directory gt ErrorLog APACHE LOG DIR error log CustomLog APACHE LOG DIR access log combinedRewriteEngine onRewriteCond SERVER NAME learn xn schchner za de OR RewriteCond SERVER NAME www learn schächner deRewriteRule https SERVER NAME REQUEST URI END NE R permanent lt VirtualHost gt We activate the page with sudo aensite moodle confadjust the privileges again sudo chown R www data www data var www moodle sudo chmod R var www moodle and restart our web server sudo service apache restartsudo systemctl restart apache serviceNow all we need is a Let s Encrypt SSL certificate to keep our website secure For that we run this code sudo certbot apacheHere we have to choose our domain with the number and it s done Now we can really start installing Moodle on the web Note here that you open the web installer via the IP address First we choose our languageThen we need to confirm our paths You can either create the data directory yourself it is not safe in the specified folder or we can create the directory ourselvessudo mkdir var moodledata sudo chmod var moodledata Then we have that too We let that as it is Here you have to enter the password and username from the database You can leave the last two fields empty Now we have to confirm the conditions And then everything is checked again If the PHP extension is missing you can usually use it withsudo apt install php EXTENSIONNAMEto install But the red bug is worse to do this we need to edit the config php file We ll do thatsudo nano config phpAnd here we change the line CFG gt dbtype mysqli to CFG gt dbtype mariadb around At the bottom is the error because of the max input vars We can remove it by adding in the file withsudo nano etc php apache php iniopen and the line max input vars tomax input vars adjust NOTE THAT PHP WILL NOT WORK Then we start the server and PHPsudo service apache resetnew If this error comes up you have to wait a few minutes or start the installation again You can also simply try to check the permissions again almost hours later when we finally solved the problem Here we see that everything is finally ready Then we go to next and make general settings it doesn t matter how you configure them Last but not least we specify the name of the website and other settings Thanks for reading Schächner 2023-08-10 15:09:25
海外TECH DEV Community Live Audio Transcription with Python For Free https://dev.to/picovoice/live-audio-transcription-with-python-for-free-jff Live Audio Transcription with Python For FreeUnlike cloud speech to text APIs Cheetah Streaming Speech to Text processes speech data locally on device Thus it has a default advantage over the cloud speech to text APIs when it comes to speed No cloud speech to text API can eliminate the network latency They can be fast but to a certain degree Let s learn to convert live audio to text using Picovoice Cheetah Streaming Speech to Text Python SDK so you can see it yourself Install Cheetah Streaming Speech to Text Python SDKpip install pvcheetah Grab your AccessKey from Picovoice Console If you do not have an existing Picovoice Console Account create one in minutes No credit card is required You can enjoy the Forever Free Plan as the name suggests forever Import Cheetah Streaming Speech to Text package import pvcheetah Create an instance of the speech to text object with your AccessKey handle pvcheetah create access key Don t forget to replace the placeholder with your AccessKey Implement audio recording Cheetah Streaming Speech to Text processes audio whether it comes from a microphone or another program For the following we assume there is a function available to us that provides the next available audio chunk frame as below def get next audio frame passConvert live audio to text while True partial transcript is endpoint handle process get next audio frame if is endpoint final transcript handle flush That s it In simple steps you can get live audio converted into text For more information you can checkthe original article how to evaluate live audio transcription engineson prem deployment optionsthe comparison of popular speech to text enginesadvantages of local speech to text 2023-08-10 15:07:57
海外TECH DEV Community Linux - INODE https://dev.to/scorcism/linux-inode-1a2g Linux INODERemember how our filesystem is comprised of all our actual files and a database that manages these files The database is known as the inode table What is an inode An inode index node is an entry in this table and there is one for every file It describes everything about the file such as File type regular file directory character device etc Owner Group Access permissions Timestamps mtime time of last file modification ctime time of last attribute change atime time of last access Number of hardlinks to the file Size of the file Number of blocks allocated to the file Pointers to the data blocks of the file most important Inodes store everything about the file except the filename and the file itself How do inodes locate files We know our data is out there on the disk somewhere unfortunately it probably wasn t stored sequentially so we have to use inodes Inodes point to the actual data blocks of your files In a typical filesystem not all work the same each inode contains pointers and the first pointers point directly to the data blocks The th pointer points to a block containing pointers to more blocks the th pointer points to another nested block of pointers and the th pointer points yet again to another block of pointers Confusing I know The reason this is done this way is to keep the inode structure the same for every inode but be able to reference files of different sizes If you had a small file you could find it quicker with the first direct pointers larger files can be found with the nests of pointers Either way the structure of the inode is the sameIf the article helps you leave a like follow or anything You can follow me on LinkedIn and GitHub 2023-08-10 15:06:19
海外TECH DEV Community GSAP Section Layout Animation https://dev.to/uidesign09/gsap-section-layout-animation-25ef GSAP Section Layout AnimationCheck source code here 2023-08-10 15:06:14
海外TECH DEV Community Linux - SYMLINKS https://dev.to/scorcism/linux-symlinks-82f Linux SYMLINKS SymlinksIn Linux the equivalent of shortcuts are symbolic links or soft links or symlinks Symlinks allow us to link to another file by its filename Another type of links found in Linux are hardlinks these are actually another file with a link to an inode Create a soft linkln s myfile myfilelinkYou can see that I ve made a symbolic link named myfilelink that points to myfile Symbolic links are denoted by gt Notice how I got a new inode number though symlinks are just files that point to filenames When you modify a symlink the file also gets modified Inode numbers are unique to filesystems you can t have two of the same inode number in a single filesystem meaning you can t reference a file in a different filesystem by its inode number However if you use symlinks they do not use inode numbers they use filenames so they can be referenced across different filesystems Create a hard linkln myfile myhardlinkA hardlink just creates another file with a link to the same inode So if I modified the contents of myfile or myhardlink the change would be seen on both but if I deleted myfile the file would still be accessible through myhardlink Here is where our link count in the ls command comes into play The link count is the number of hardlinks that an inode has when you remove a file it will decrease that link count The inode only gets deleted when all hardlinks to the inode have been deleted When you create a file it s link count is because it is the only file that is pointing to that inode Unlike symlinks hardlinks do not span filesystems because inodes are unique to the filesystem If the article helps you leave a like follow or anything You can follow me on LinkedIn and GitHub 2023-08-10 15:03:47
Apple AppleInsider - Frontpage News Daily Deals August 10: $100 off iPad Air, $100 off 15" MacBook Air, 38% off Typecase Touch Keyboard Case for iPad, more https://appleinsider.com/articles/23/08/10/daily-deals-august-10-100-off-ipad-air-100-off-15-macbook-air-38-off-typecase-touch-keyboard-case-for-ipad-more?utm_medium=rss Daily Deals August off iPad Air off quot MacBook Air off Typecase Touch Keyboard Case for iPad moreToday s top deals include off an Ecoflow portable solar power generator station off Monolith by Monoprice Bluetooth headphones up to off Fire HD kids tablets off a Asus Zenbook OLED Touch laptop and more Get off an iPad AirThe AppleInsider crew combs the internet for top notch deals at ecommerce retailers to showcase a list of excellent bargains on trending tech gadgets including discounts on Apple products TVs accessories and other products We post the most valuable deals every day to help you save money Read more 2023-08-10 15:36:50
海外科学 NYT > Science Muon Discovery Moves Physicists One Step Closer to a Theoretical Showdown https://www.nytimes.com/2023/08/10/science/physics-muons-g2-fermilab.html particle 2023-08-10 15:34:20
海外科学 NYT > Science How Summer Camps Are Dealing With Mental Health https://www.nytimes.com/2023/08/06/health/summer-camp-mental-health.html crisis 2023-08-10 15:29:51
海外TECH WIRED The Scary Science of Maui’s Wildfires https://www.wired.com/story/the-scary-science-of-mauis-wildfires/ fiery 2023-08-10 15:10:37
海外科学 BBC News - Science & Environment Scientists at Fermilab close in on fifth force of nature https://www.bbc.co.uk/news/science-environment-66407099?at_medium=RSS&at_campaign=KARANGA atomic 2023-08-10 15:31:05
金融 金融庁ホームページ 令和5年7月に開催された業界団体との意見交換会において金融庁が提起した主な論点を公表しました。 https://www.fsa.go.jp/common/ronten/index.html 意見交換会 2023-08-10 17:00:00
金融 金融庁ホームページ 鈴木財務大臣兼内閣府特命担当大臣閣議後記者会見の概要(令和5年8月8日)を掲載しました。 https://www.fsa.go.jp/common/conference/minister/2023b/20230808-1.html 内閣府特命担当大臣 2023-08-10 15:12:00
金融 金融庁ホームページ 入札公告等を更新しました。 https://www.fsa.go.jp/choutatu/choutatu_j/nyusatu_menu.html 公告 2023-08-10 15:09:00
ニュース BBC News - Home NI police chief says officers 'anxious and angry' at data breach https://www.bbc.co.uk/news/uk-northern-ireland-66455475?at_medium=RSS&at_campaign=KARANGA apologises 2023-08-10 15:33:04
ニュース BBC News - Home Ecuador politician murder: Prison gangs in terror reign https://www.bbc.co.uk/news/world-latin-america-66459310?at_medium=RSS&at_campaign=KARANGA crime 2023-08-10 15:15:44
ニュース BBC News - Home Barbie banned in Kuwait as Lebanon urges action https://www.bbc.co.uk/news/world-66464852?at_medium=RSS&at_campaign=KARANGA social 2023-08-10 15:01:44
ニュース BBC News - Home 'Family album' for the UK unveiled by National Portrait Gallery https://www.bbc.co.uk/news/entertainment-arts-66457285?at_medium=RSS&at_campaign=KARANGA stories 2023-08-10 15:01:27

コメント

このブログの人気の投稿

投稿時間: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件)