• 开源镜像
  • 开源沙龙
  • 媛宝
  • 猿帅
  • 注册
  • 登录
  • 息壤开源生活方式平台
  • 加入我们

开源日报

  • 2018年6月30日:开源日报第114期

    30 6 月, 2018

    每天推荐一个 GitHub 优质开源项目和一篇精选英文科技或编程文章原文,欢迎关注开源日报。交流QQ群:202790710;微博:https://weibo.com/openingsource;电报群 https://t.me/OpeningSourceOrg


    今日推荐开源项目:《Java 版算法与数据结构 javascript-algorithms》GitHub链接

    推荐理由:这个项目中收录了各种用 JavaScript 实现的算法与数据结构,数据结构包括了从最简单的链表到各种树等等,而算法则包括了 BFS(广度优先搜索) 和 DFS(深度优先搜索) 这些,强烈推荐给使用 JavaScript 的朋友。毕竟不管什么时候,学习算法和数据结构都可能让你之后的工作更简单。


    今日推荐英文原文:《Using Your API as a Product》作者:Quora

    原文链接:https://hackernoon.com/using-your-api-as-a-product-9d3229536e7d

    推荐理由:这篇文章讲了单卖 API 的好处在哪。实际上有的时候我们并不需要只是卖整个应用程序,有些 API 同样可以为我们带来利润。

    Using Your API as a Product

    There’s a good chance you’ve used Uber to catch a ride around town at some point. The app is ubiquitous, partly because it’s easy and smooth to use.

    But unless you’re a software engineer, you may not know that Uber’s app only works so well thanks to APIs, or application programming interfaces of other services that the app works with. APIs allow the app to use navigation, send messages, and accept payments — without forcing Uber’s engineers to create those services on their own.

    APIs are the hidden infrastructure that keeps many of your favorite apps humming along, which means there’s also a huge, if somewhat hidden, market for them. You can build APIs and offer them as your product instead of full-stack apps, which include a cloud backend, an API, and an application such as a website and a mobile app. For instance, Facebook is a full-stack app.

    Most software companies create full-stack apps, but they’ll also offer APIs as a product. For example, at Chronicled, we chose to create both an app and an API to maximize our reach and continue helping a variety of industries with blockchain applications.

    But if you decide to only offer your API as the product, here’s what to consider:

    Know what it means to offer an API as a product.

    An API works through a request and response process. The API user sends a message to some type of service, and the service responds back with an answer.

    One common example is Google Maps. Rather than building out an entirely new navigation system yourself, you can just pay to use Google Maps API and capabilities.

    Stripe is another massive company that relies on APIs. They provide an API that enables companies to add payment capabilities to their apps. When a user wants to check out online, or make a payment to a bank or credit card, Stripe supports that process without asking the user to leave your app.

    Many companies offer APIs as the product. They take something that would have been costly and time-consuming for a team to build from scratch and offer it as a simple solution.

    That allows Uber, Airbnb, or anyone else to concentrate fully on the parts of the app that make their product unique.

    Learn what it takes to set up.

    Technical superiority is not the only aspect that will set your API apart.

    Resiliency is a major issue when it comes to offering an API. App developers are counting on the fact that your service will remain intact through natural disasters and other possible interruptions, meaning you have to have a certain amount of fault tolerance built into your system.

    Pricing APIs is also very different from an app. Because APIs are technically software as a service, the pricing is typically based on usage. Each time the API request is sent, a small cost is incurred. Of course, if the API is used millions of times a day, even setting the cost at a fraction of a cent can become very profitable.

    And remember, if you want developers to adopt your API, you need to make it easy for them.

    This means creating SDKs, or software development kits, in the various programming languages. SDKs allow a developer to integrate with an API without writing 30 lines of code. They increase the ease and efficiency of adoption, which is a major selling point for any product.

    Your API documentation becomes a major selling point of your API as well. The better the documentation, the easier the API is to adopt. Stripe and Twilio are gold standards in this. You can also provide other helpful collateral such as how-to guides, recipes and troubleshooting guides.

    Understand how the sales strategy differs.

    You’ve probably flown on — or at least heard of — a Boeing 737.

    Believe it or not, Boeing doesn’t make every single piece of the plane in one of their factories. Parts are created all over the world and then assembled into the final product.

    And the companies who make those parts are not well known outside of industry circles.

    The same idea applies to APIs and apps. APIs are the infrastructure or piping that runs the apps we use every day. But the average consumer has no idea who these companies are — or that they even exist.

    In fact, the only people who are testing out APIs and comparing them are software engineers and CTOs. The target users are app developers, which means the marketing and sales strategies for APIs are very different from that of a common consumer product — or even an app.

    The sales strategy is based around getting engineers to see the benefits and then ask their CTO or CPO to buy the service. Which means not only do you have to convince the engineers (technical decision makers) that your API is the best solution, but you also have to convince the business decision makers that you provide the best savings and offer reliable and scalable service.

    In many cases, this requires starting out small and targeting startups, then moving onto bigger companies as you gain more clients and recognition in the developer world.

    Enjoy the benefits.

    The perk of being a generic player is that you open yourself up to a wide customer base.

    That’s because offering an API as a product requires a very different business strategy and business model. You’re an infrastructure player, so if you get into a new market, there’s always a chance you can win it outright.

    For example, Stripe likely wouldn’t be as successful if they had built an entire app around making payments. Instead, they created a generic API that can be used in any app that needs to process payments. It’s true, most people don’t know the brand, but they still use the service every day. They’ve essentially cornered the market — even without widespread brand recognition in the general public. But keep in mind, it is possible to spread your sales and marketing team too thin by trying to target numerous markets.

    Overall, API-based businesses are simply taking a different approach to building a software company. If you choose to sell an API as a product, it’s important to understand how this affects the way you go about building your business and offerings. If you do it right, it can be a profitable product that flies under the radar.


    每天推荐一个 GitHub 优质开源项目和一篇精选英文科技或编程文章原文,欢迎关注开源日报。交流QQ群:202790710;微博:https://weibo.com/openingsource;电报群 https://t.me/OpeningSourceOrg

  • 2018年6月29日:开源日报第113期

    29 6 月, 2018

    每天推荐一个 GitHub 优质开源项目和一篇精选英文科技或编程文章原文,欢迎关注开源日报。交流QQ群:202790710;微博:https://weibo.com/openingsource;电报群 https://t.me/OpeningSourceOrg


    今日推荐开源项目:《用 Vue.js 写个桌面应用  Vuido》GitHub链接

    推荐理由:如果要写个桌面应用程序,会 C++ 的可能会开出自己的 Qt, 隔壁会 Python 的学着开个 PyQt,后面那个会玩 React 的想到了 Proton Native,前面那个学 Vue.js 的……看到了这个 Vuido。如果有了 Vuido,学 Vue.js 的朋友就可以直接用它来写桌面应用了。现在它已经实现了基本的容器和小部件,同时也可以拿去写个应用了,唯一的不足就是它还只能实现 libui 中实现的功能,但是谁知道它以后会不会成为 Vue.js 使用者的必备工具呢。


    今日推荐英文原文:《How to explain blockchain in plain English》作者:Kevin Casey

    原文链接:https://enterprisersproject.com/article/2018/6/how-explain-blockchain-plain-english

    推荐理由:这篇文章能让你用更简单的方法给外行人解释区块链,兴许你能从中受到点启发,然后在你的朋友问你区块链到底是个啥玩意的时候给他们解释明白。

    How to explain blockchain in plain English

    For all of the hype around blockchain, most businesses are barely tinkering with it right now – if they’re doing anything at all. A recent Gartner survey of CIOs found that 43 percent of respondents said blockchain was on their rader but they had no concrete plans in the works, while 34 percent said they simply weren’t interested. A scant one percent of CIOs reported any kind of blockchain adoption in their organization.

    Change is coming: Research firm IDC, among others, predicts booming growth, expecting worldwide spending on blockchain-related spending to hit $9.7 billion in 2021, up from around $2 billion this year.

    But what’s the hold-up for IT leaders? Gartner points to one reason in its survey results: Blockchain engineering skills are hard to come by and, as a result, are expensive.

    There’s another issue: Many people still don’t understand what blockchain is. Moreover, people who do understand it sometimes have a hard time explaining it succinctly, especially if they have to do so in non-technical terms that a wide audience can understand.

    A lack of internal knowledge and a lack of affordable talent on the open market, notes Dr. Werner Krebs, CEO at Acculation, “pretty much [rules] out any near-term blockchain project. Presumably, that will change.”

    The talent issue is going to take some time, so we’ll set it aside for the moment. But we can roll up our sleeves and try to help people better understand blockchain in clear, relatively succinct terms. Better still, IT leaders can arm themselves with the kinds of definitions that help them explain blockchain to others.

    [ What are the top use cases for your organization? Read Where does blockchain fit best? ]

    We asked Krebs and a slew of others who work closely in and around blockchain technologies to help, starting with a “simple” question: How do you explain blockchain in plain English that just about anyone can understand? We’ve collected their explanations so that you can pick and choose the ones that make the most sense to you.

    Marta Piekarska, director of ecosystem at Hyperledger: “Blockchain is an unchangeable, distributed way to store records of events. It is not a distributed database, as one does not usually store information on a blockchain – only attestation to events that occurred. It is shared through a peer-to-peer network, and in order to put information on a blockchain, participants must agree on a common version of truth. In other words, it is a technology to store and exchange information within a group in a reliable, trustworthy, and efficient manner.”

    Gordon Haff, technology evangelist at Red Hat: “Blockchain has a number of characteristics that distinguish it from traditional databases. Committed transactions can’t be altered, only added. The members of a business network, rather than some single party, have copies of that record and determine which transactions can be added. A transaction (such as a delivery) can automatically trigger another transaction (such as a payment) using smart contracts.”

    David Schatsky, managing director at Deloitte: “A blockchain is a digital and distributed ledger of transactions or decentralized database that keeps continuously updated digital records in real-time across a network of computers. Every transaction must be cryptographically validated before being permanently added to the ledger. Blockchain technology doesn’t require a central authority to approve a transaction.”

    Mick Ayzenberg, security engineer at Security Innovation: “Blockchain is a mechanism for recording information that is unalterable and does not depend on trusting a third party.”

    (Aside from winning the brevity prize for his definition, Ayzenberg developed a “capture the flag”-style decentralized app – or, DApp – that enables users to practice detecting and exploiting six of the most common vulnerabilities in Ethereum smart contracts.)

    Mark Grabowski, associate professor at Adelphi University, where he teaches a course on Bitcoin and blockchain: “A blockchain is a file that’s constantly growing and all its transactions are recorded permanently. It uses very advanced cryptography to ensure that its records are locked inside the ledger. Every transaction, or block, gets added into the ledger chronologically, so every transaction that happens, happens after the previous one. That’s why it’s called a chain. And finally, it’s all immutable, which means that as you add all these transactions onto the blockchain, the file can never be changed.”

    Werner Krebs, CEO at Acculation: “The best one- or two-sentence definition I have seen is something like: Blockchain enables an immutable, shared, decentralized ledger between untrusting parties without need for a middleman or central authority. Thus, blockchain can reduce reconciliation costs in complex commercial transactions like supply chains by establishing a single version of the truth.”

    Shannon Adair, director of project management at BitOlympus: “The internet is composed of autonomous computers linked together on different networks. Similarly, blockchain is a database that is distributed among many computers. Any updates to the database require the consensus of the other computers. It also comes with a built-in permanent audit trail. All of this makes the database very difficult to tamper with.

    The School Lunch explanation

    Tim Kulp, director of emerging technology at Mind Over Machines, serves up “School Lunch,” an explanation that, quite literally, a second-grader can understand:

    “Imagine a school lunch table with a bunch of kids sitting at it.”

    “Imagine a school lunch table with a bunch of kids sitting at it. Two kids want to trade lunches. Kid A says: ‘I’ll trade you lunch if you have a cookie’ to Kid B. Kid B states that he does have a cookie and the two trade lunch. As the kids trade lunches, the Principal comes over and asks: ‘What’s going on here.’ At which point all the kids at the table speak up and say Kid A traded lunch with Kid B.

    This simple story outlines the basics of blockchain. Kid A and B are ‘participants,’ also known as actors, in the blockchain. Lunch is an asset. Trading lunch is the transaction. Whether Kid A’s lunch contains a cookie is a smart contract. Finally, the Principal’s review is the consensus to approve/validate the transaction.

    [To summarize,] blockchain is the process of participants engaging in transactions around assets. Consensus is used to validate the transaction and smart contracts are used to set parameters around the transaction.”

    No, Kulp’s not scoring points for the briefest explanation. But it’s how he explains blockchain to non-technical people who don’t really need a deep dive into things like cryptographic signatures, how consensus works, or the architectural design of a blockchain system.

    Moreover, as you move to a point where you are actively considering a project or needing to make a convincing case for a blockchain investment to others in the company, brevity may lose some of its virtue.

    Maryanne Morrow, a regular on the blockchain speaking circuit and CEO and founder of a fintech blockchain startup, 9thGear.io, notes that, say, a dictionary definition of blockchain – yes, it’s in the dictionary – might be a fine start, but it’s incomplete, especially in terms of explaining its business potential.

    “Blockchain is a digital, always accurate, distributed ledger that allows for secure transactions without a central trusted third party,” Morrow says. Its characteristics, though, are the substance beneath the hype, and why she thinks blockchain will have a huge impact for decades to come. In Morrow’s terms, blockchain is:

    • Immutable: Once agreed [upon], transactions cannot be changed.
    • Encrypted: Increases security of transaction.
    • Pseudonymous: Only the information necessary for a transaction is shared.
    • Decentralized: Enhances security as information resides across every node in the blockchain.
    • Consensus-based: Validation of a transaction requires acceptance by majority of the blockchain’s nodes.
    • Time-stamped: Ensures that transactions cannot be double counted
    • Resilient: Information resides in multiple nodes [which] ensures it is not lost in the event of a technical issue in one or several nodes.

    The big-dollar question, then: Should more CIOs be kicking the tires on blockchain in their businesses? To begin to answer that question, you must think about blockchain in business – rather than technical – terms.

    “In deciding whether to use blockchain, it is helpful to think about whether [its] unique characteristics provide business value,” says Red Hat’s Haff. “For example, if an industry has no system of trusted middlemen – or if existing middlemen are expensive or otherwise add friction – blockchain might be a good fit.”

    Stay tuned: In an upcoming post, we’ll examine that question in more depth, including a closer look at some of the real and potential applications of blockchain in various organizations and industries.


    每天推荐一个 GitHub 优质开源项目和一篇精选英文科技或编程文章原文,欢迎关注开源日报。交流QQ群:202790710;微博:https://weibo.com/openingsource;电报群 https://t.me/OpeningSourceOrg

  • 2018年6月28日:开源日报第112期

    28 6 月, 2018

    每天推荐一个 GitHub 优质开源项目和一篇精选英文科技或编程文章原文,欢迎关注开源日报。交流QQ群:202790710;微博:https://weibo.com/openingsource;电报群 https://t.me/OpeningSourceOrg


    今日推荐开源项目:《用 React 写应用程序 Proton Native》GitHub链接  项目详谈

    推荐理由:顾名思义,这个项目可以让你用 React 写桌面应用程序,一般来说如果你要写跨平台的移动应用程序,你会用 React Native,如果你要写桌面跨平台的话,你兴许会用 Qt 什么的。但是现在没有这个必要了,如果你会用 React,你就可以直接用它去写。当然了,这个项目相对还算早期的,所以说你可能不能马上把它作为主要工具……不过也欢迎大家去贡献。


    今日推荐英文原文:《Top 6 Arduino robots of 2018 (so far)》作者:Jeremy S. Cook

    原文链接:https://opensource.com/article/18/6/arduino-robots

    推荐理由:这次我们来聊点现实世界的东西,Arduino 的机器人,对 Arduino 感兴趣的朋友可别错过这个了。如果你想花几分钟看看 Arduino 是啥,不妨先来看看这个https://opensourcedaily.org/662/

    Top 6 Arduino robots of 2018 (so far)

    Since its development in the early 2000s, Arduino products like the Uno and Nano have revolutionized what people can make at home with inexpensive and easy-to-use components. Robotics and automation are no longer solely in the realm of engineers; anyone willing to spend the time to learn how these devices work can create their own inventions.

    This has led to an influx of practical and innovative projects, and the technology to share them via video and social media has only accelerated the growth. We may be only halfway through 2018, but we’ve already seen a wide variety of innovative projects.

    Here are a handful of our favorites so far—we can only imagine what else we’ll see in 2018!

    HairIO interactive hair extensions

    Human hair, as HairIO’s video describes it, “is a cultural material, with a rich history displaying individuality, cultural expression, and group identity.” While it may be difficult to determine what group you belong to while wearing this braided hair extension, it certainly marks you as a true individual and provides a novel interactive surface. The hair extensions, made of braids, are formed around a strip of nitinol wire, which changes shape when heated and can even change color with the help of thermochromic pigments. Control is via an Arduino Nano, and the hair can be used to signal the wearer or observers of outside stimulus via Bluetooth. Tugging on the extensions can even function as an input device.

    Hand gesture-controlled rover

    Remote control is usually accomplished via a transmitter with a series of joysticks and buttons, but instead, this little robot responds to your actual hand position. It reads position data via an Arduino Nano and MPU6050 accelerometer strapped to the user’s hand, then transmits movement commands to the robot. Interestingly, the robot body doesn’t contain a microcontroller itsel, but receives and decodes commands from the hand-mounted assembly and moves accordingly.

    6 DOF robot arm

    Jimmy Demello’s robot features six degrees of freedom, including the gripper. While interesting as a personal project, what gets it on this list is his integration of Oleg Mazurov’s inverse kinematic program to provide simple X/Y/Z positioning. Control is via an Arduino Uno with a sensor shield. You can see it in Demello’s video doing tasks such as throwing a ball, playing drums, cooling its human with a fan, and even unplugging itself at the end.

    While we’re on the subject of robotic arms, if you’re interested in something really polished for your next project, check out the Tinkerkit Braccio.

    OpenCat

    While some would debate their usefulness, cats make relatively low-maintenance pets compared to their canine counterparts. On the other hand, if you have a robotic cat, you can simply turn it off when needed, and grooming and veterinarian visits are replaced by recharging, reprogramming, or perhaps a little work with a soldering iron. The OpenCat is just such a companion. It is able to walk on four legs and avoid objects in its way. It can even detect human faces, flipping on its backside to sit up and wave to its owner. It’s an impressive build in its current state, and it appears that development will continue into the foreseeable future.

    WALL-E RC toy modified into an actual robot

    As much fun as radio-controlled toys can be, if they’re made in the shape of a fictional robot—WALL-E, in this case—it doesn’t seem quite right for it not to feature any sort of automation. Fortunately, these pseudo-robots form an excellent base on which to construct an actual robot. The device features an Arduino Nano for control and uses a total of five servos to actuate its tracks, arms, and head. Most of the video is an explanation of the ‘bot’s components, but it finally ventures out into the world on its own (after 6:00), avoiding walls using an ultrasonic sensor mounted in its head.

    Coin-shooting question block from Super Mario

    When you played Mario as a kid, perhaps you thought it would be great if, whenever you bumped into something with your head, coins popped out. At some point, you likely realized that he’s supposed to be using his fist, though punching brick walls or even vending machines in the hope of finding spare change is both dangerous and legally discouraged. This 3D-printed device, however, senses taps with a vibration sensor. It then uses a clever mechanism to pull a spring back and releases it to shoot coin after coin out of the slot in the middle. While a simple robot, this Arduino Nano-controlled device is ingenious in its implementation.


    每天推荐一个 GitHub 优质开源项目和一篇精选英文科技或编程文章原文,欢迎关注开源日报。交流QQ群:202790710;微博:https://weibo.com/openingsource;电报群 https://t.me/OpeningSourceOrg

  • 2018年6月27日:开源日报第111期

    27 6 月, 2018

    每天推荐一个 GitHub 优质开源项目和一篇精选英文科技或编程文章原文,欢迎关注开源日报。交流QQ群:202790710;微博:https://weibo.com/openingsource;电报群 https://t.me/OpeningSourceOrg


    今日推荐开源项目:《awesome 系列新作 awesome-scalability》GitHub链接

    推荐理由:这次的 awesome 系列讲的是关于后端设计模式的,它最大的特点就是提供了一份指南,你可以根据指南上所说的你可能正在遇到的情况去阅读不同的文章。如果你正在为后端运行慢或者崩溃掉等等这些表面的问题发愁,不妨根据指南去看看这些文章,兴许会解决你的问题。


    今日推荐英文原文:《Simple C Programming Tips for Newbies》作者:S Sathyanarayanan

    原文链接:https://opensourceforu.com/2018/06/simple-c-programming-tips-for-newbies/

    推荐理由:顾名思义,简单的 C 语言编程技巧,可以让初学者养成良好的编程习惯,推荐给新手级的朋友们

    Simple C Programming Tips for Newbies

    Many programmers begin their romance with code by learning C. The author suggests a few tips for newbies so they can avoid bad coding practices.

    The C programming language is usually the first one that students are taught in most colleges. It is one of the most widely used languages, particularly in systems programming. Here are a few simple tips to avoid some of the most common pitfalls in the language.

    The scanf function and character input

    One common error is due to the characters remaining in the keyboard buffer after an input is executed by a scanf statement.

    When there are two or more consecutive scanf statements in the program and the second or later scanf statement is for character input, it looks as if the scanf statement is skipped. This is because the newline character, \n, which was input due to the return key being pressed by the user, remains in the keyboard buffer. If the next scanf is for character input, the newline character is taken as the input for the character variable.

    scanf(“%d”, &num);
     
    scanf (“%c”, &chr);

    This does not happen for the integer input, as the %d symbol for integers forces all leading white spaces and special characters in the input stream to be skipped.

    This situation can be avoided by using a space before %c. The space character will ensure that the scanf statement skips the leading white spaces and special characters, and the above problem can be avoided.

    scanf(“%d”, &num);
     
    scanf (“ %c”, &chr); /*space character added before %c */

    The fflush function

    The fflush function can also be used for flushing the keyboard buffer.

    fflush (stdin);

    But the fflush function is avoided by many as it is undefined in the C standard for the input stream.

    Magic numbers

    When a number suddenly appears in some part of a program without any background or explanation, it is said to be a magic number. The introduction of magic numbers is a result of poor programming practices and also due to writing a program without thinking it through.

    For example:

    for (i=0; i<10; i++)
     
    scanf(“ %d”, &a[i]);

    The above code is used to input an array of integers of size 10. The number 10 has to be used repeatedly to mention the size of the array when processing it. Also, the related numbers have to be used, like 10-1, 10+1, etc.

    If the size of the array has to be changed for some reason, changing the number ‘10’ to some other number has to be done in multiple places. This introduces a scope for error, as there is a chance that one or more occurrences of the number may be missed.

    Defining the list size using #define will avoid this problem, as shown below:

    #define SIZE 10

    Constant on the left hand side

    When checking for equality, one of the “=” signs is inadvertently left out and the assignment operator “=” is typed instead of “==”, the latter being the relational operator to test equality in a comparison statement. But it is not an error as per the C compiler and is treated as an assignment statement. Hence, the if statement returns true as long as the value assigned is not zero, and this bug is difficult to detect.

    If (i = 10) /* beg your pardon for using a magic number! */
     
    {
     
    ….
     
    ….
     
    }

    The above lines assign 10 to the variable ‘i’ and then test whether the value of i is true (non-zero) or false (0). Since the value of i always results in 10, the result of the Boolean expression will always be true.

    The best way to prevent such bugs in the program is to write the constant on the left hand side. The compiler will flag an error if “=” is written instead of “==” since a constant cannot be assigned a value.

    If (10 == i)
     
    {
     
    ….
     
    ….
     
    }

    Naming of variables

    Care should be taken when naming variables. It is better to use i, j, k, m and n as names of integer variables; x, y and z for float (or double) variables; and a, b and c as names of arrays or coefficients so as to make the program easy to read and to reduce the effort to understand the code.

    Avoid using similar looking characters like 1 and l as these could be interpreted wrongly by the reader1.

    Beginners can go through the best practices for the naming of variables and functions, and follow a particular standard, consistently.

    Avoid using the gets function

    Many beginners use the gets function to input a string. Since it does not have a way to limit the size of the input string, input data can be bigger than the allocated space for the input, which will result in buffer overflow. The gets function has been deprecated in the C99 standard, and has been removed from the latest C11 standard. I am writing about the gets function as I have seen Turbo C being used even by MCA students in a few colleges in India!

    The fgets function can be used to avoid the above mentioned problem, as the maximum length of the characters that can be read is given as an argument to the function.

    #define MAX 20
     
    ….
     
    char name[MAX];
     
    …
     
    …
     
    fgets (name, MAX, stdin);
     
    …

    Commenting out blocks of code

    The C language does not allow nesting of comments. Hence, the /* and */ symbols cannot be used to comment out sections of the code temporarily for testing purposes.

    Fortunately, the #if… # endif preprocessor directive can be used to leave out blocks of code from being compiled.

    #if 0
     
    ……..
     
    ……..
     
    #endif

    The above method makes it easy to comment out large sections of code temporarily.


    每天推荐一个 GitHub 优质开源项目和一篇精选英文科技或编程文章原文,欢迎关注开源日报。交流QQ群:202790710;微博:https://weibo.com/openingsource;电报群 https://t.me/OpeningSourceOrg

←上一页
1 … 231 232 233 234 235 … 262
下一页→

Proudly powered by WordPress