当前位置: 首页 > 编程日记 > 正文

数据分析从头学_数据新闻学入门指南:让我们从头开始构建故事

数据分析从头学

by Mina Demian

由Mina Demian

数据新闻学入门指南:让我们从头开始构建故事 (A Beginner’s Guide to Data Journalism: Let’s Build a Story From Scratch)

This is an introductory guide on how to produce the beginnings of a piece of data journalism. We’re going to walk through it together, as I outline the key things to consider before starting. We’ll cover:

这是有关如何产生数据新闻事业起点的入门指南。 我们将一起探讨它,因为我概述了开始之前要考虑的关键事项。 我们将介绍:

  • how to structure your work

    如何安排工作
  • a basic process to follow

    遵循的基本过程
  • a real-world case study to show how this process works

    一个真实的案例研究,以展示此过程的工作原理

数据新闻仍然是故事 (Data journalism is still about stories)

The glitz and glamour of data journalism (the animations, the striking maps, and those great infographics) are all over the Internet. It’s easy to think, then, that it’s about the data and how cool you can make it look, sing, or dance. My wise friends at OpenUp, Raymond, and Adi keep reminding me (and the salivating Internet-at-large) that the focus should be on data journalism, and not data journalism.

数据新闻( 动画 , 引人注目的地图以及那些出色的信息图表 )的浮华与魅力遍布互联网。 因此,很容易想到这与数据有关,以及它看起来,唱歌或跳舞时有多酷。 我在OpenUp , Raymond和Adi的明智朋友不断提醒我(以及垂涎的互联网),重点应该放在数据新闻学上 ,而不是数据新闻学上。

Data journalism is no different from the journalism we know and consume every day. Where traditional journalism relies on human sources (e.g., insiders, experts, scholars, and scientists), data journalism treats data sources (e.g., spreadsheets, websites, and databases) with the rigor and scrutiny that journalists treat human sources.

数据新闻与我们每天了解和使用的新闻没有什么不同。 在传统新闻依赖人源(例如内部人员,专家,学者和科学家)的地方,数据新闻对待记者(对电子表格,网站和数据库)的严格性和审查性。

The animations and snazzy work help to communicate the final product — the story — but they will never replace the actual story.

动画和时髦的工作有助于传达最终产品-故事-但它们永远不会取代实际的故事。

盛大的开始 (The grand start)

A data journalism story can start from an important event or it can simply be a question. You may see a breaking headline and wonder how much x did it take for y to happen? Or, you are thinking about food and wonder how much the average shopper spends on dog food. Both questions are valid and great starting points when evaluating a piece for data journalism.

数据新闻故事可以从重要事件开始,也可以只是一个问题。 您可能会看到一个标题不明确的标题,并且想知道要使y发生需要多少x ? 或者,您在考虑食物,想知道购物者平均在狗粮上花费多少。 这两个问题都是有效的,也是评估数据新闻学方面的一个很好的起点。

What I’ve learned so far in my work is that there is little difference between doing the work of basic science and that of data journalism. You make an observation, come up with a question (hypothesis for purists), and then you go about trying to answer that question. Your work will show either that your initial hypothesis was indeed incorrect or that, yes, it was indeed correct.

到目前为止,我在工作中了解到的是,从事基础科学工作与数据新闻工作之间几乎没有区别。 您进行观察,提出一个问题(对纯粹主义者的假设),然后尝试回答该问题。 您的工作将表明您的最初假设确实不正确,或者是,确实如此。

So, as I mentioned earlier, it’s not about the fancy graphics or how much data you trawled through, it’s about knowing what is your question and did you answer it?

因此,正如我之前提到的,这与花哨的图形或您拖曳的数据量无关,而是与知道您的问题以及您是否回答了有关

Don’t believe the hype.

不要相信炒作。

“ 谁是你的数据,他做什么?” (“Who’s your data and what does he do?”)

This guide is based on data from South Africa’s statistics agency. (The results of the quarterly survey released in the summer of 2015 shows the official unemployment rate at a grim 25%.) The agency was kind enough to release the data in an Excel spreadsheet. I will write posts that address how to manage sources of data that are not released in an easy-to-use format.

本指南基于南非统计局的数据 。 (2015年夏季发布的季度调查结果显示,官方失业率处于25%的严峻水平。)该机构非常乐于在Excel电子表格中发布数据。 我将撰写有关如何管理未以易于使用的格式发布的数据源的文章。

The dataset is here, and there are enough sheets to warrant exploration. This exploration is important because without knowing what it’s about, what it covers, and so on, you may look at the wrong data. It may lead you to answer the wrong question or — the nightmare of every data journalist — waste hours while achieving very little.

数据集在此处 ,并且有足够的图纸来进行探索。 这项探索很重要,因为在不了解其含义,所涵盖的内容等情况下,您可能会看到错误的数据。 它可能会导致您回答错误的问题,或者-每个数据新闻工作者的噩梦-浪费时间却却很少。

So, before we talk about the process, let’s look at the data and see what it tells us. We don’t usually work with all the data (unless our initial idea or question requires this). It’s better to first look at all the data and then focus on a particular section that catches your attention.

因此,在讨论过程之前,让我们看一下数据,看看它能告诉我们什么。 通常,我们不会处理所有数据(除非我们最初的想法或问题需要这样做)。 最好先查看所有数据,然后专注于引起您注意的特定部分。

The spreadsheets from the statistics agency looks at different characteristics of the workforce (broken down by province, age, gender, and demographic). Even if this is your first time, quickly look over each sheet. It will help to develop a methodical work ethic that is invaluable to data journalism.

统计局的电子表格查看了劳动力的不同特征(按省,年龄,性别和人口统计)。 即使您是第一次,也要快速浏览每张纸。 这将有助于发展一种有条不紊的职业道德,这对数据新闻业来说是无价的。

An important side note: you only need a basic working knowledge of Excel. I don’t wield magic on the worksheets, so anyone can follow them. For the sake of brevity (and so you don’t go into a catatonic stupor), I will leave you to figure out how to do the basic manipulations in Excel.

重要的旁注:您只需要Excel的基本工作知识。 我不会在工作表上使用魔术,因此任何人都可以关注它们。 为了简洁起见(因此您不会陷入瘫痪),我将让您了解如何在Excel中进行基本操作。

现在,旅程开始了 (Now the journey begins)

We’ve talked about what it means to produce a work of data journalism, how to evaluate if an idea will lead to a piece, and how to look at a dataset. Finally. We get to the process, the good stuff. How does it work?

我们已经讨论了产生数据新闻工作的意义,如何评估一个想法是否会成功,以及如何看待数据集。 最后。 我们进入流程,好东西。 它是如何工作的?

第1步:从数据中吸一口 (Step 1: Take a bite out of the data)

For this guide, I want to know the size of the workforce of each province in South Africa, and how it fared between 2013 and the 2nd quarter of 2015. This data is displayed in the first worksheet. (You’re welcome to look through the other spreadsheets to see what interesting insights you can mine from them.)

对于本指南,我想知道南非每个省的劳动力规模以及2013年至2015年第二季度之间的表现。此数据显示在第一个工作表中。 (欢迎您浏览其他电子表格,以查看可以从中挖掘出哪些有趣的见解。)

So we went from working with the original spreadsheet, which has more than 20 worksheets, as shown below:

因此,我们不再使用原始电子表格,该电子表格具有20多个工作表,如下所示:

To working with just one worksheet, titled “Table 1: Population of working age (15–64 years),” as shown below.

如下图所示,只使用一张名为“表1:工作年龄人口(15-64岁)”的工作表即可。

Now, let’s copy the data at the bottom of the sheet, since it’s the data we want, and paste it into a new worksheet. To move towards a clean dataset, delete the row with the Thousands heading and delete the cell labelled South Africa. Also, delete the Totals row so that it doesn’t confuse us later. (I will adjust all the values to reflect millions in a minute.)

现在,让我们将数据复制到工作表底部,因为它是我们想要的数据,然后将其粘贴到新的工作表中。 要移至干净的数据集,请删除标题为“千”的行,并删除标有“南非”的单元格。 另外,删除“总计”行,以免日后混淆。 (我将调整所有值以在一分钟内反映数百万。)

It now should look like this:

现在看起来应该像这样:

Now, let’s change all the cells to show values in millions. Create a new column beside each existing column, and multiply the value by 1000. It now looks like this:

现在,让我们更改所有单元格以显示数百万的值。 在每个现有列旁边创建一个新列,并将该值乘以1000。现在看起来像这样:

Remove all borders and decimal places, and make the thousand separator a comma. This helps to make our chart easier to read and more accessible. At this point, this table should be ready to be analysed.

删除所有边框和小数点后的位置,并以千位分隔符为逗号。 这有助于使我们的图表更易于阅读和访问。 此时,该表应该已经准备好进行分析了。

Not quite yet. Although it is cleaner, the data structure we need is not there. Why does this matter? Because the data needs to be organized in a way that we can aggregate or group them. The old sages of data journalism say that if your data is not summarized (or aggregated), it is not ready to be analyzed.

还不行 尽管它更干净,但是我们所需的数据结构并不存在。 为什么这么重要? 因为数据需要以一种可以汇总或分组的方式进行组织。 古老的数据新闻工作者说,如果您的数据未汇总(或汇总),则不准备进行分析。

步骤2:将数据转换为可进行分析/可视化的结构 (Step 2: Transform the data into an analysis-/visualization-ready structure)

What factors are we looking to expose from this data set? They are province, year, and the total number of workers. But before that, we’re going to create this new data structure with the following columns:

我们希望从该数据集中揭示哪些因素? 他们是省份,年份和总工人数。 但是在此之前,我们将使用以下各列创建此新的数据结构:

If you studied database design, you would fail your database design test for presenting this dataset design. Or if you are a programmer, your boss would chide you for proposing this dataset design. Your lecturer or boss would be in the right to do so. It’s not a normalized (computer science speak for optimized) dataset. However, this is data analysis for a piece of data journalism, so you may scorn those rules! We need to have duplicate rows in order to aggregate the data later (remember?).

如果您学习了数据库设计,则由于呈现此数据集设计而使数据库设计测试失败。 或者,如果您是一名程序员,您的老板会建议您提出这种数据集设计。 您的讲师或老板将有权这样做。 它不是规范化 (计算机科学代表优化)数据集。 但是,这是对一部分数据新闻的数据分析,因此您可能会鄙视这些规则! 我们需要重复的行,以便以后聚合数据(还记得吗?)。

步骤3:产生最终数据集 (Step 3: Produce the final dataset)

In the screenshot above, I entered the relevant years into the structure. Next, paste the totals for 2013, 2014 and 2015. The dataset now looks like this. (Medium doesn’t allow iframe embeds, so instead I have provided a link to the dataset.) It should have 91 rows, and only quarter 1 and quarter 2 are indicated for 2015.

在上面的屏幕截图中,我在结构中输入了相关年份。 接下来,粘贴2013年,2014年和2015年的总数。数据集现在看起来像这样 。 (Medium不允许iframe嵌入,因此我提供了指向数据集的链接。)它应该有91行,并且仅表示2015年的第1季度和第2季度。

We’re almost there!

我们快到了!

The last step is to aggregate the data. So, take a deep breath and create a PivotTable in a new sheet. Our summarized data looks like this:

最后一步是汇总数据。 因此,深吸一口气,在新的工作表中创建一个数据透视表。 我们的汇总数据如下所示:

Clean up the table. Enter the thousands separator, remove the decimal places, and delete the cell labelled Sum of Total Row Labels. The table now looks like this:

清理桌子。 输入千位分隔符,删除小数位,然后删除标记为“总行标签总数”的单元格。 该表现在如下所示:

步骤4:产生可视化 (Step 4: Produce the visualization)

Congratulations! You have a dataset that is ready to be visualized.

恭喜你! 您已经准备好可视化数据集。

We’re going to use Infogr.am to produce an infographic. This guide doesn’t cover how to sign up with and use Infogr.am, so (as with Excel) you’ll need to get acquainted with the tool on your own. I assure you that it’s straightforward and intuitive! You’ll be using it like a professional in no time! You’ll see.

我们将使用Infogr.am生成信息图。 本指南没有介绍如何注册和使用Infogr.am,因此(与Excel一样)您需要自己熟悉该工具。 我向您保证,它简单明了! 您将立即像专业人士一样使用它! 你会看到的。

To create a new infographic, choose any template you like. The blank work area looks like this:

要创建新的信息图,请选择所需的任何模板。 空白工作区如下所示:

Give the infographic a title like “Total workforce in provinces, 2013–2015” or something similar, as you see fit. Then add a grouped bar chart from the popup wizard. You should see the new chart in the work area. (Delete the existing chart that comes with the template, which now appears below the one you just created.)

给信息图表一个标题,例如“ 2013-2015年各省的总劳动力”或类似的名称(如果您认为合适)。 然后从弹出向导中添加分组的条形图。 您应该在工作区中看到新的图表。 (删除模板随附的现有图表,该图表现在显示在您刚刚创建的图表下方。)

Double-click on the new chart, and an interface similar to Excel will appear on the screen. Delete the data from this screen, and copy the data from the Excel worksheet used in the PivotTable, and paste it into the Infogr.am spreadsheet interface. It should look like this:

双击新图表,屏幕上将出现类似于Excel的界面。 从此屏幕上删除数据,然后从数据透视表中使用的Excel工作表中复制数据,然后将其粘贴到Infogr.am电子表格界面中。 它看起来应该像这样:

When you paste the data, the graphic automatically updates itself.

粘贴数据时,图形会自动更新。

It’s starting to look great!

它开始看起来很棒!

Have a look at the infographic. Everything is in there, but you may not understand the infographic immediately. You have to scroll down to read the legend to see which color refers to which province. So, instead of re-formatting the data, click on the two-directional arrows icon on the top right-hand corner of the spreadsheet. This nifty feature will switch the rows and columns so that the provinces now appear in the rows and the years in the columns.

看一下信息图表。 一切都在其中,但您可能无法立即理解该信息图。 您必须向下滚动以阅读图例,以查看哪种颜色代表哪个省。 因此,不必重新格式化数据,而是单击电子表格右上角的双向箭头图标。 这个漂亮的功能将切换行和列,以便现在各省显示在行中,而年份则显示在列中。

Always aim to show the values on the chart, where appropriate. So click the Show values switch and the totals will reflect on the chart. Also, click on the Settings button and scroll down to add “total (in millions)” in the X-axis textbox. This helps the reader (and you) to better understand the chart.

在适当的情况下,始终力图在图表上显示这些值。 因此,单击“显示值”开关,总计将反映在图表上。 另外,点击设置 按钮并向下滚动以在X轴文本框中添加“总计(百万)”。 这有助于读者(和您)更好地理解图表。

Click the Publish button to give your graphic a title. Then decide whether you want the graphic to be interactive or to be an image. This is how the final image would look like:

单击发布按钮为图形赋予标​​题。 然后确定您是希望图形是交互式的还是图像。 最终图像如下所示:

And you have produced your first visualization. Pat yourself on the back, have a coffee or beer, and get ready because you’ve just started the process.

您已经制作了第一个可视化文件。 轻拍自己的背,喝咖啡或啤酒,然后做好准备,因为您刚刚开始此过程。

Before we look at the rest of the work, let’s review what we’ve done:

在查看其余工作之前,让我们回顾一下已完成的工作:

  1. We looked at a data source and extracted the data we want. In this case, we asked, “What was the size of the workforce in South Africa between 2013 and 2015?”

    我们查看了一个数据源并提取了所需的数据。 在这种情况下,我们问:“ 2013年至2015年之间,南非的劳动力规模是多少?”
  2. We followed a basic process of cleaning, formatting, transforming, and summarizing the data until we produced a table that shows the data we need.

    我们遵循清理,格式化,转换和汇总数据的基本过程,直到生成了显示所需数据的表。
  3. We then inserted the data into our visualization tool and produced an infographic, as shown above.

    然后,我们将数据插入到可视化工具中,并生成了一个信息图,如上所示。

At this point, you’re so excited that you jump on Twitter or your email, and send your work to everyone you know.

在这一点上,您非常激动,以至于跳上Twitter或电子邮件,然后将您的作品发送给您认识的所有人。

Hold on! Not yet.

坚持,稍等! 还没。

您的发现真正意味着什么? (What do your findings really mean?)

Yes, you analyzed the data and you answered your question. Gauteng province had the largest workforce within the period we selected, but it’s been decreasing since 2013. The workforce for the Northern Cape has been consistently below 5 million since 2013. But why?

是的,您分析了数据并回答了您的问题。 豪登省在我们选择的时期内拥有最大的劳动力,但自2013年以来一直在减少。自2013年以来,北开普省的劳动力一直低于500万。 为什么

That’s why the first paragraph in this piece had this naughty qualification — “the beginnings of a story” — because now starts journalism as you know or were trained to do. At this point, do the following:

这就是为什么本文第一段具有这种顽皮的资格-“一个故事的开始”的原因-因为现在您知道或受过训练可以开始新闻工作。 此时,请执行以下操作:

  • contact analysts, experts, or academics to interpret and comment on the data.

    与分析师,专家或学者联系,以解释和评论数据。
  • look at other datasets or ask experts to explain the context of the findings, depending on the scope of the story or your editor’s instructions.

    根据故事的范围或编辑者的指示,查看其他数据集或请专家解释结果的上下文。
  • analyze/visualize other datasets to test and refine your findings.

    分析/可视化其他数据集以测试和完善您的发现。
  • do anything else required to make sure that the piece is balanced and fair.

    做其他必要的事情以确保作品是平衡和公平的。

After you complete one or more of these steps, write the final article. Include the infographic produced above, and submit it for publication. If you run your own blog or website, publish it live.

完成这些步骤中的一个或多个之后,编写最后的文章。 包括上面生成的信息图,然后提交发布。 如果您经营自己的博客或网站,请实时发布。

没有尽头的地方! (There’s no place like the end!)

And the end it is. I hope that you’ve come this far and your appetite has been whetted to do more (and sophisticated) work in data journalism.

最后是。 我希望您已经走了这么远,并且您的胃口被吸引去做更多(更复杂)的数据新闻工作。

If something hasn’t worked for you, or you’d like some help with a section, follow me on Twitter and we can figure it out together.

如果有些问题对您没有帮助,或者您希望获得有关某个部分的帮助,请在Twitter上关注我,我们可以一起解决。

翻译自: https://www.freecodecamp.org/news/data-journalism-isnt-for-the-select-let-s-work-out-a-story-together-from-scratch-dd85b3017f4a/

数据分析从头学

相关文章:

Comparator 和 Comparable

Comparator 和 Comparable 比较 Comparable是排序接口;若一个类实现了Comparable接口,就意味着“该类支持排序”。而Comparator是比较器;我们若需要控制某个类的次序,可以建立一个“该类的比较器”来进行排序。 我们不难发现&…

朴素贝叶斯算法的python实现

朴素贝叶斯 算法优缺点 优点:在数据较少的情况下依然有效,可以处理多类别问题 缺点:对输入数据的准备方式敏感 适用数据类型:标称型数据 算法思想: 朴素贝叶斯比如我们想判断一个邮件是不是垃圾邮件,那么…

iOS 加载本地和网络gif 图片类扩展

https://github.com/AlexanderYeah/GifKuoZhan [self.meiXueImgView showGifImageWithData:[NSData dataWithContentsOfFile:[[NSBundle mainBundle] pathForResource:"美" ofType:"gif"]]];

arkit与现实世界距离比_如何使用ARKit和Pusher构建实时增强现实测量应用程序

arkit与现实世界距离比by Esteban Herrera由Esteban Herrera 如何使用ARKit和Pusher构建实时增强现实测量应用程序 (How to Build a Real-Time Augmented Reality Measuring App with ARKit and Pusher) Augmented reality (AR) is all about modifying our perception of the…

Servlet 3.0 新特性概述

Servlet 3.0 新特性概述 Servlet 3.0 作为 Java EE 6 规范体系中一员,随着 Java EE 6 规范一起发布。该版本在前一版本(Servlet 2.5)的基础上提供了若干新特性用于简化 Web 应用的开发和部署。其中有几项特性的引入让开发者感到非常兴奋&…

MVC、MVP、MVVM

MVC、MVP、MVVM这些模式是为了解决开发过程中的实际问题而提出来的,目前作为主流的几种架构模式而被广泛使用。 一、MVC(Model-View-Controller) MVC是比较直观的架构模式,用户操作->View(负责接收用户的输入操作&a…

iOS 计算两个日期之间的差值

NSDateFormatter *dateFomatter [[NSDateFormatter alloc] init];dateFomatter.dateFormat "yyyy-MM-dd HH:mm";// 当前时间字符串格式NSDate *planDate [dateFomatter dateFromString:[model.PlanTime substringToIndex:16]];// 当前日历NSCalendar *calendar […

unity水管工_我是如何从30岁的管道工转变为32岁的Web开发人员的

unity水管工by Rick West由里克韦斯特(Rick West) 我是如何从30岁的管道工转变为32岁的Web开发人员的 (How I transformed from a 30-year-old plumber into a 32-year-old web developer) Friends often ask me why I decided to give up a solid, well-paying job like plum…

netty集成ssl完整参考指南(含完整源码)

虽然我们在内部rpc通信中使用的是基于认证和报文头加密的方式实现安全性,但是有些时候仍然需要使用SSL加密,可能是因为对接的三方系统需要,也可能是由于open的考虑。中午特地测了下netty下集成ssl的功能,关于ssl的握手过程以及jav…

呼叫中心的服务水平管理

对企业来讲,呼叫中心是企业的窗口,呼叫中心为客户提供服务,是企业提升品牌形象、建立客户忠诚度的最佳通道。因此,呼叫中心的服务水平对于企业来说意义重大,相应的服务水平管理更是企业必不可少的管理之一。 “客户至上…

iOS 数组中的模型去重

NSMutableDictionary *mutableDic [NSMutableDictionary dictionary];for (HomeRectProductModel *model in self.modelArr) {[mutableDic setValue:model forKey:model.Id];}[self.modelArr removeAllObjects];self.modelArr [[mutableDic allValues] mutableCopy];// 方法…

软件可读性和效率取舍_网络通信设计中的一些限制和取舍:摘要

软件可读性和效率取舍by Shubheksha通过Shubheksha 网络通信设计中的一些约束和折衷:摘要 (Some Constraints and Trade-offs In The Design of Network Communications: A Summary) This article distills the content presented in the paper “Some Constraints…

浅析对象访问属性的.和[]方法区别

原文链接:http://www.cnblogs.com/bigboyLin/p/4967820.html 简明版:请问js对象属性值为什么用数组也可以访问 在JavaScript中通常使用”."运算符来存取对象的属性的值。或者使用[]作为一个关联数组来存取对象的属性。但是这两种方式有什么区别了&a…

iOS 关闭页面侧滑手势

-(void)popGestureChange:(UIViewController *)vc enable:(BOOL)enable{if ([vc.navigationController respondsToSelector:selector(interactivePopGestureRecognizer)]) {//遍历所有的手势for (UIGestureRecognizer *popGesture in vc.navigationController.interactivePopGe…

CSS与HTML结合

CSS与HTML结合的4中方式&#xff1a; 1、每个HTML标签都有style属性 2、当页面中有多个标签具有相同样式时&#xff0c;可定义style标签封装样式以复用 <style type”text/css”>css代码</style> 3、当多个页面使用相同样式时&#xff0c;可将样式单独封装为CSS文件…

硬件断点反跳似乎_高性能应用程序:多路复用,反跳,系统字体和其他技巧

硬件断点反跳似乎by Atila Fassina通过阿蒂拉法西纳(Atila Fassina) 高性能应用程序&#xff1a;多路复用&#xff0c;反跳&#xff0c;系统字体和其他技巧 (High Performance Apps: Multiplexing, Debouncing, System Fonts, and other tricks) Here are some performance ti…

jquery仿邮箱文本输入框自动加载邮箱后缀

jquery仿邮箱文本输入框自动加载邮箱后缀 在像百度这样的网站注册时&#xff0c;你会看到输入邮箱会出现自动给用户输入补全主流邮箱。这种对于增加用户体验的小例子已司空见惯。正好看到人家写的这种js功能。还挺不错,使用起来很方便&#xff0c;几乎不用写神呢代码。"傻…

Maven最佳实践:划分模块

所有用Maven管理的真实的项目都应该是分模块的&#xff0c;每个模块都对应着一个pom.xml。它们之间通过继承和聚合&#xff08;也称作多模块&#xff0c;multi-module&#xff09;相互关联。那么&#xff0c;为什么要这么做呢&#xff1f;我们明明在开发一个项目&#xff0c;划…

facebook 直播_什么时候是在Facebook Live上直播的最佳时间? 我分析了5,000个Facebook帖子以找出答案。...

facebook 直播by Ofir Chakon由Ofir Chakon 什么时候是在Facebook Live上直播的最佳时间&#xff1f; 我分析了5,000个Facebook帖子以找出答案。 (When is the best time to stream on Facebook Live? I analyzed 5,000 Facebook posts to find out.) Streaming on Facebook …

解决keepalived脑裂问题

检测思路&#xff1a;正常情况下keepalived的VIP地址是在主节点上的&#xff0c;如果在从节点发现了VIP&#xff0c;就设置报警信息 脚本如下&#xff1a; #!/bin/bash # 检查脑裂的脚本&#xff0c;在备节点上进行部署 LB01_VIP10.10.10.229 LB01_IP10.10.10.129 LB02_IP10.10…

iOS 根据中文字符串排序出字母索引

// 传入字符串数组 返回索引字典 - (NSDictionary *)createCharacter:(NSMutableArray *)strArr {NSMutableDictionary *dict [NSMutableDictionary dictionary];for (NSString *stringdict in strArr) {NSString *string stringdict;if ([string length]) {NSMutableString …

devops开发运维训练营_嗨,网络开发人员训练营的毕业生:这是您第一份工作需要了解的内容。...

devops开发运维训练营by Rachel Bird雷切尔伯德(Rachel Bird) 嗨&#xff0c;网络开发人员训练营的毕业生&#xff1a;这是您第一份工作需要了解的内容。 (Hey web dev bootcamp grads: Here’s what you need to know for your first job.) You worked your butt off and gai…

[bzoj1042][HAOI2008]硬币购物

有三种硬币&#xff0c;每种有自己的币值。 然后有n次询问&#xff0c;每次都给出每种硬币的数量和要付的钱s&#xff0c;求有多少种付法。n<1000 s<100000 ------ 不考虑限制&#xff0c;就是个简单dp.... 有限制的时候&#xff0c;我们可以考虑反过来用总的方案数量剪掉…

Windows netstat 查看端口、进程占用

目标&#xff1a;在Windows环境下&#xff0c;用netstat命令查看某个端口号是否占用&#xff0c;为哪个进程所占用. 操作&#xff1a;操作分为两步&#xff1a;&#xff08;1&#xff09;查看该端口被那个PID所占用;方法一&#xff1a;有针对性的查看端口&#xff0c;使用命令 …

iOS Named colors do not work prior to iOS 11.0问题解决

原文链接 https://stackoverflow.com/questions/48014246/named-colors-do-not-work-prior-to-ios-11-0-error-referring-to-a-storyboard/52967313#52967313 1 打开对应文件source code 2 粘贴查找 使用正则表达式 color key(.*) name.* 3 用以下代码覆盖 color key$1 …

如何在StackOverflow上获得第一个标签徽章-以及为什么它很重要。

by Angelos Chalaris通过安吉洛斯查拉利斯(Angelos Chalaris) 如何在StackOverflow上获得第一个标签徽章-以及为什么它很重要。 (How to get your first tag badge on StackOverflow — and why it’s important.) Every developer uses StackOverflow in different ways. Som…

int数据类型

1 a 18862 # 取商和余数3 print(a.__divmod__(10)) 4 5 # r反转,想当于 10-18866 print(a.__rsub__(10)) 7 8 # 取绝对值9 print(a.__abs__(), abs(a)) 10 11 #商取整 12 print(a.__floordiv__(10), a // 10) 转载于:https://www.cnblogs.com/xh4528/p/6497629.html

使用Google 官方的控件SwipeRefreshLayout实现下拉刷新功能

之前做东西的时候&#xff0c;经常会用到下拉刷新的功能&#xff0c;之前大家都在使用Github上的一个很著名的开源项目 PullToRefresh 但是&#xff0c;现在好消息来了&#xff0c;google在19.1版本的support-v4兼容包下面正式提供了官方的下拉刷新组件——SwipeRefreshLayout…

iOS 没到年底NSDate 时间出错问题

NSDate *currentDate [NSDate date];//获取当前时间&#xff0c;日期 NSDateFormatter *dateFormatter [[NSDateFormatter alloc] init]; [dateFormatter setDateFormat:"yyyy-MM-dd HH:mm:ss"]; // [dateFormatter setDateFormat:"YYYY-MM…

react 统一字段验证_如何使用React的受控输入进行即时表单字段验证

react 统一字段验证by Gosha Arinich通过Gosha Arinich 如何使用React的受控输入进行即时表单字段验证 (How to use React’s controlled inputs for instant form field validation) Controlled inputs enable simple things, like disabling the Submit button when some fi…