並び順

ブックマーク数

期間指定

  • から
  • まで

1 - 40 件 / 43件

新着順 人気順

nested if else statement in c simple exampleの検索結果1 - 40 件 / 43件

  • Google TypeScript Style Guide

    // Good: choose between two options as appropriate (see below). import * as ng from '@angular/core'; import {Foo} from './foo'; // Only when needed: default imports. import Button from 'Button'; // Sometimes needed to import libraries for their side effects: import 'jasmine'; import '@polymer/paper-button'; Import paths TypeScript code must use paths to import other TypeScript code. Paths may be r

    • JavaScript Best Practices | The WebStorm Blog

      IDEs CLion DataGrip DataSpell Fleet GoLand IntelliJ IDEA PhpStorm PyCharm RustRover Rider RubyMine WebStorm Plugins & Services Big Data Tools Code With Me JetBrains Platform Scala Toolbox App Writerside JetBrains AI Grazie Junie JetBrains for Data Kineto Team Tools Datalore Space TeamCity Upsource YouTrack Hub Qodana CodeCanvas .NET & Visual Studio .NET Tools ReSharper C++ Languages & Frameworks K

        JavaScript Best Practices | The WebStorm Blog
      • Writing a C compiler in 500 lines of Python

        A few months ago, I set myself the challenge of writing a C compiler in 500 lines of Python1, after writing my SDF donut post. How hard could it be? The answer was, pretty hard, even when dropping quite a few features. But it was also pretty interesting, and the result is surprisingly functional and not too hard to understand! There's too much code for me to comprehensively cover in a single blog

        • Decoded: GNU coreutils – MaiZure's Projects

          Helpful background for code reading The GNU coreutils has its foibles. Many of these utilities are approaching 30 years old and include revisions by many people over the years. Here are some things to keep in mind when reading the code: Tiny programs - These utilities are small, (mostly) single-source file programs designed to do one thing and do it well. They are not designed for long life or to

          • All JavaScript and TypeScript Features of the last 3 years

            TypeScript as envisioned by Stable DiffusionThis article goes through almost all of the changes of the last 3 years (and some from earlier) in JavaScript / ECMAScript and TypeScript . Not all of the following features will be relevant to you or even practical, but they should instead serve to show what’s possible and to deepen your understanding of these languages. There are a lot of TypeScript fe

              All JavaScript and TypeScript Features of the last 3 years
            • Weird Lexical Syntax

              I just learned 42 programming languages this month to build a new syntax highlighter for llamafile. I feel like I'm up to my eyeballs in programming languages right now. Now that it's halloween, I thought I'd share some of the spookiest most surprising syntax I've seen. The languages I decided to support are Ada, Assembly, BASIC, C, C#, C++, COBOL, CSS, D, FORTH, FORTRAN, Go, Haskell, HTML, Java,

                Weird Lexical Syntax
              • Golang Mini Reference 2022: A Quick Guide to the Modern Go Programming Language (REVIEW COPY)

                Golang Mini Reference 2022 A Quick Guide to the Modern Go Programming Language (REVIEW COPY) Harry Yoon Version 0.9.0, 2022-08-24 REVIEW COPY This is review copy, not to be shared or distributed to others. Please forward any feedback or comments to the author. • feedback@codingbookspress.com The book is tentatively scheduled to be published on September 14th, 2022. We hope that when the release da

                • Parsing SQL - Strumenta

                  The code for this tutorial is on GitHub: parsing-sql SQL is a language to handle data in a relational database. If you worked with data you have probably worked with SQL. In this article we will talk about parsing SQL. It is in the same league of HTML: maybe you never learned it formally but you kind of know how to use it. That is great because if you know SQL, you know how to handle data. However

                    Parsing SQL - Strumenta
                  • research!rsc: The xz attack shell script

                    Posted on Tuesday, April 2, 2024. Updated Wednesday, April 3, 2024. Introduction Andres Freund published the existence of the xz attack on 2024-03-29 to the public oss-security@openwall mailing list. The day before, he alerted Debian security and the (private) distros@openwall list. In his mail, he says that he dug into this after “observing a few odd symptoms around liblzma (part of the xz packag

                    • Agentic GraphRAG for Commercial Contracts | Towards Data Science

                      In every business, legal contracts are foundational documents that define the relationships, obligations, and responsibilities between parties. Whether it’s a partnership agreement, an NDA, or a supplier contract, these documents often contain critical information that drives decision-making, risk management, and compliance. However, navigating and extracting insights from these contracts can be a

                        Agentic GraphRAG for Commercial Contracts | Towards Data Science
                      • Kalyn: a self-hosting compiler for x86-64

                        Over the course of my Spring 2020 semester at Harvey Mudd College, I developed a self-hosting compiler entirely from scratch. This article walks through many interesting parts of the project. It’s laid out so you can just read from beginning to end, but if you’re more interested in a particular topic, feel free to jump there. Or, take a look at the project on GitHub. Table of contents What the pro

                        • xorvoid

                          SectorC: A C Compiler in 512 bytes SectorC (github) is a C compiler written in x86-16 assembly that fits within the 512 byte boot sector of an x86 machine. It supports a subset of C that is large enough to write real and interesting programs. It is quite likely the smallest C compiler ever written. In a base64 encoding, it looks like this: 6gUAwAdoADAfaAAgBzH/6DABPfQYdQXoJQHr8+gjAVOJP+gSALDDqluB+9

                          • Optimizing Ruby’s JSON, Part 2

                            In the previous post, I covered my motivations for improving ruby/json’s performance, and detailed the first 4 notable optimizations applied to speed up JSON generation. If I was to cover every single optimization applied, at this rate I’d end up with a dozen parts, so I’ll try to only focus on the one that made a significant difference or used an interesting pattern. Reducing Setup Cost - Argumen

                            • All C++20 core language features with examples

                              Introduction The story behind this article is very simple, I wanted to learn about new C++20 language features and to have a brief summary for all of them on a single page. So, I decided to read all proposals and create this “cheat sheet” that explains and demonstrates each feature. This is not a “best practices” kind of article, it serves only demonstrational purpose. Most examples were inspired

                              • JEP 425: Virtual Threads (Preview)

                                Summary Introduce virtual threads to the Java Platform. Virtual threads are lightweight threads that dramatically reduce the effort of writing, maintaining, and observing high-throughput concurrent applications. This is a preview API. Goals Enable server applications written in the simple thread-per-request style to scale with near-optimal hardware utilization. Enable existing code that uses the j

                                • Darker Corners of Go – Rytis Biel

                                  Note: this article is available as an ebook and as a printed book for easier reading Introduction What is this? When I was first learning Go, I already knew several other programming languages. But after reading an introductory book and the language specification I felt like I really didn’t know enough about Go to use it for real world work. I felt I’d probably need to fall into many traps before

                                    Darker Corners of Go – Rytis Biel
                                  • What's New in Emacs 28.1?

                                    Try Mastering Emacs for free! Are you struggling with the basics? Have you mastered movement and editing yet? When you have read Mastering Emacs you will understand Emacs. It’s that time again: there’s a new major version of Emacs and, with it, a treasure trove of new features and changes. Notable features include the formal inclusion of native compilation, a technique that will greatly speed up y

                                    • Type Parameters Proposal

                                      Ian Lance Taylor Robert Griesemer August 20, 2021 StatusThis is the design for adding generic programming using type parameters to the Go language. This design has been proposed and accepted as a future language change. We currently expect that this change will be available in the Go 1.18 release in early 2022. AbstractWe suggest extending the Go language to add optional type parameters to type an

                                      • V8 Torque user manual · V8

                                        V8 Torque is a language that allows developers contributing to the V8 project to express changes in the VM by focusing on the intent of their changes to the VM, rather than preoccupying themselves with unrelated implementation details. The language was designed to be simple enough to make it easy to directly translate the ECMAScript specification into an implementation in V8, but powerful enough t

                                        • https://cheats.rs/rust_cheat_sheet.pdf

                                          Rust Language Cheat Sheet 26. August 2021 Contains clickable links to The Book , Rust by Example , Std Docs , Nomicon , Reference . Data Structures Data types and memory locations defined via keywords. Example Explanation struct S {} Define a struct with named fields. struct S { x: T } Define struct with named field x of type T. struct S ​(T); Define "tupled" struct with numbered field .0 of type

                                          • Compiling a subset of JavaScript to ARM assembly in Haskell - Micah Cantor

                                            A toy compiler for a subset of JavaScript to ARM assembly, using Haskell. Published: May 29, 2022 I recently got a copy of the book Compiling to Assembly from Scratch by Vladamir Keleshev, which details how to write a compiler for a subset of JavaScript to 32-bit ARM assembly code. The choice to use ARM assembly is mainly for its simplicity in comparison to x86. Keleshev elects to use TypeScript t

                                              Compiling a subset of JavaScript to ARM assembly in Haskell - Micah Cantor
                                            • RFC 2369: The Use of URLs as Meta-Syntax for Core Mail List Commands and their Transport through Message Header Fields

                                              Network Working Group G. Neufeld Request for Comments: 2369 Nisto Category: Standards Track J. Baer SkyWeyr Technologies July 1998 The Use of URLs as Meta-Syntax for Core Mail List Commands and their Transport through Message Header Fields Status of this Memo This document specifies an Internet standards track protocol for the Internet community, and requests discussion and suggestions for improve

                                              • Google TypeScript Style Guide

                                                // Good: choose between two options as appropriate (see below). import * as ng from '@angular/core'; import {Foo} from './foo'; // Only when needed: default imports. import Button from 'Button'; // Sometimes needed to import libraries for their side effects: import 'jasmine'; import '@polymer/paper-button'; Import paths TypeScript code must use paths to import other TypeScript code. Paths may be r

                                                • Introduction to Free Monads

                                                  If you’ve been around Haskell circles for a bit, you’ve probably seen the term “free monads”. This article introduces free monads and explain why they are useful in Haskell development. To whet your appetite a little, free monads are basically a way to easily get a generic pure Monad instance for any Functor. This can be rather useful in many cases when you’re dealing with tree-like structures, bu

                                                    Introduction to Free Monads
                                                  • the penultimate conditional syntax – Tony Finch

                                                    About half a year ago I encountered a paper bombastically titled “the ultimate conditional syntax”. It has the attractive goal of unifying pattern match with boolean if tests, and its solution is in some ways very nice. But it seems over-complicated to me, especially for something that’s a basic work-horse of programming. I couldn’t immediately see how to cut it down to manageable proportions, but

                                                    • C# at Google Style Guide

                                                      C# at Google Style Guide This style guide is for C# code developed internally at Google, and is the default style for C# code at Google. It makes stylistic choices that conform to other languages at Google, such as Google C++ style and Google Java style. Formatting guidelines Naming rules Naming rules follow Microsoft’s C# naming guidelines. Where Microsoft’s naming guidelines are unspecified (e.g

                                                      • WebKit Features in Safari 26.0

                                                        We’re happy to share with you what’s arriving in Safari 26.0! It includes big exciting new features, many important improvements, and lots of attention to detail. We can’t wait to see what you do with Anchor Positioning, Scroll-driven animations, High Dynamic Range images, the new HTML <model> element, the all-new Digital Credentials API, SVG icon support, WebGPU, WebKit in SwiftUI, and much, much

                                                          WebKit Features in Safari 26.0
                                                        • Flipping Pages: An analysis of a new Linux vulnerability in nf_tables and hardened exploitation techniques

                                                          This blogpost is the next instalment of my series of hands-on no-boilerplate vulnerability research blogposts, intended for time-travellers in the future who want to do Linux kernel vulnerability research. Specifically, I hope beginners will learn from my VR workflow and the seasoned researchers will learn from my techniques. In this blogpost, I'm discussing a bug I found in nf_tables in the Linux

                                                          • New C++ features in GCC 12 | Red Hat Developer

                                                            Version 12.1 of the GNU Compiler Collection (GCC) is expected to be released in April 2022. Like every major GCC release, this version will bring many additions, improvements, bug fixes, and new features. GCC 12 is already the system compiler in Fedora 36. GCC 12 will also be available on Red Hat Enterprise Linux in the Red Hat Developer Toolset (version 7) or the Red Hat GCC Toolset (version 8 an

                                                              New C++ features in GCC 12 | Red Hat Developer
                                                            • JavaScript Interview Questions

                                                              Here is a list of common JavaScript interview questions with detailed answers to help you prepare for the interview as a JavaScript developer. JavaScript continues to be a cornerstone of web development, powering dynamic and interactive experiences across the web. As the language evolves, so does the complexity and scope of interview questions for JavaScript developers. Whether you’re a fresher de

                                                                JavaScript Interview Questions
                                                              • ScalaTest

                                                                Using matchers ScalaTest provides a domain specific language (DSL) for expressing assertions in tests using the word should. Just mix in should.Matchers, like this: import org.scalatest.flatspec._ import org.scalatest.matchers.should._ class ExampleSpec extends AnyFlatSpec with Matchers { ... You can alternatively import the members of the trait, a technique particularly useful when you want to tr

                                                                • xv6: a simple, Unix-like teaching operating system

                                                                  xv6: a simple, Unix-like teaching operating system Russ Cox Frans Kaashoek Robert Morris September 6, 2021 2 Contents 1 Operating system interfaces 9 1.1 Processes and memory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 1.2 I/O and File descriptors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 1.3 Pipes . . . . . . . . . . . . . . . . . . . . . . . . . .

                                                                  • Combobulate: Structured Movement and Editing with Tree-Sitter

                                                                    Combobulate: Structured Movement and Editing with Tree-Sitter Combobulate is a package that adds advanced structured editing and movement to many programming modes in Emacs. Here's how it works, and how it can enrich your editing experience in Emacs. About a year ago I released an alpha – prototype, really – version of a tool I call Combobulate. I’d been using it personally for a while before I le

                                                                      Combobulate: Structured Movement and Editing with Tree-Sitter
                                                                    • Lil: A Scripting Language

                                                                      Lil: A Scripting LanguageLil is part of the technology that powers Decker, a multimedia creative tool inspired by HyperCard. Decker uses Lil for adding custom behavior to decks and the widgets within. Lil is designed to be learned in layers, but it is a richly multi-paradigm language which incorporates ideas from imperative, functional, declarative, and vector-oriented languages. on mode a do # li

                                                                      • The complete GraphQL Security Guide: Fixing the 13 most common GraphQL Vulnerabilities to make your API production ready

                                                                        Editor's Note: While this post provides great insights into securing GraphQL APIs and addressing vulnerabilities, we'd like to introduce you to WunderGraph Cosmo, our complete solution for GraphQL Federation and API management. Cosmo goes beyond securing individual endpoints; it offers a comprehensive platform for managing and federating APIs with built-in security features, performance optimizati

                                                                          The complete GraphQL Security Guide: Fixing the 13 most common GraphQL Vulnerabilities to make your API production ready
                                                                        • Take a break: Rust match has fallthrough

                                                                          Rust’s match statement can do a lot of things, even C-style fallthough to the next branch, despite having no real support for it. It turns out to be a “shallow” feature, where the C to Rust translation is easily done, without needing to understand the code itself. The hardest part is coming to terms with writing it, and then convincing someone else to let you land it! Here’s what the tail handling

                                                                          • Python Interview Questions

                                                                            Here is a list of common Python interview questions with detailed answers to help you prepare for the interview as a Python developer. Python, with its versatile use cases and straightforward syntax, has seen its popularity growing continuously in software development, data science, artificial intelligence, and many other fields. As such, interviews for Python-related positions are designed not on

                                                                              Python Interview Questions
                                                                            • PgBouncer is useful, important, and fraught with peril

                                                                              Updated 2024-09-17 to reflect updated PgBouncer support for protocol-level prepared statements 🐘 To start, I want to say that I’m appreciative that PgBouncer exists and the work its open source maintainers put into it. I also love working with PostgreSQL, and I’m thankful for the incredible amount of work and improvements that go into it as well. I also think community and industry enthusiasm aro

                                                                                PgBouncer is useful, important, and fraught with peril
                                                                              • JEP 467: Markdown Documentation Comments

                                                                                Summary Enable JavaDoc documentation comments to be written in Markdown rather than solely in a mixture of HTML and JavaDoc @-tags. Goals Make API documentation comments easier to write and easier to read in source form by introducing the ability to use Markdown syntax in documentation comments, alongside HTML elements and JavaDoc tags. Do not adversely affect the interpretation of existing docume

                                                                                • C++20 Coroutine Iterators - Sticky Bits - Powered by Feabhas

                                                                                  A blog looking at developing software for real-time and embedded systems In my first blog post about C++20 Coroutines I introduced the concepts behind a synchronous or generator style coroutine and developed a template class to support coroutines for any data type. In this post I’ll add an iterator to the template to support the range-for loop and iterative algorithms. You may want to review that

                                                                                    C++20 Coroutine Iterators - Sticky Bits - Powered by Feabhas