首页 文章 精选 留言 我的

精选列表

搜索[集合],共10000篇文章
优秀的个人博客,低调大师

CodeMade:寻找开源物联网项目的优秀集合网站

大多数刚开始学习编程的用户在刚开始学习的前几个月都会遭遇相同的问题--根据书籍或网站来学习编程的基础知识,在成功打印出“Hello World”之后在自己编程之后总会遇到各种问题。遇到这些问题之后通常建议在GitHub,Project Euler和Daily Programmer的Reddit条目来上阅读其他人的编程代码,不过今天外媒还推荐了一个不错的代码网站--CodeMade。 访问:CodeMade CodeMade是用户生成的物理计算机产品收藏合集,并能连接访问到完整的源代码。项目按照分类进行分组,涵盖每个人都可以掌握的基础Arduino项目,也有用到人工智能和深度学习的更复杂项目。这能够让初学者很容易找到一个酷炫的项目并以此进行建设。 这些项目来自GitHub,Instructables,Make Magazine,LifeHacker,但是聚合在一起,有点类似于Pinterest,但是更加的亲民。目前该项目还处于早期阶段,虽然可用项目的收集相对有限,但是网站在迅速扩充中。 本文转自d1net(转载)

优秀的个人博客,低调大师

一位android开发程序猿的小工具集合

工欲善其事,必先利其器 以下是我开发中或生活中用的个人觉得比较好的工具软件,一款好用的工具,往往能事半功倍 PostMan(ChromeApp) 一个可以模拟实现HTTP get和post的请求工具,方面设置请求参数和查看响应结果。可在Chrome应用商店搜索下载,目前已经出了PC版,界面美观,功能强大,良心工具 马克飞象(ChromeApp) 我试用过很多MD编辑器,唯独此款最合我心意,主要是它颜值高,易用 ,它还支持同步印象笔记功能,不过好像要收费 马克飞象使用截图 Vysor(ChromeApp) 做安卓调试的时候,我习惯用真机而不用模拟器调试,因为电脑不行,而且速度没有真机快,但是用真机的话就要在真机上操作,电脑上演示,操作都不方便。有了Vysor就很方便了,直接利用Vysor同步真机上的屏幕,画质流畅,鼠标就能操作真机,完美!当然收费版本有更高级的功能。 Vysor效果 qiniu upload files(ChromeApp) 七牛云空间可以存文件,图片文件还可以加水印上传,并且可以生成外联直接使用,我的博客很多媒体文件都是存在七牛上的,不过每次都要到网页控制台手动添加,要是可以直接拖拽上传就好了。有了qiniu upload files 完美解决。当然会写脚本的,自己弄个方便的命令行工具也是极好的,以后有机会可以搞下。 七牛云空间插件 LICEcap 一款电脑上录制GIF的软件,配合Vysor,傻瓜式操作,完美生成GIF演示文件。省得自己要录成mp4,再转gif。 gif录制效果 Visio 画UML图很好,当然Visio是专业的,各种图都能画 效果图 Gliffy Diagrams 也是画图的好工具,但就是不能调整箭头线的位置 image.png Mobipocket Reader Mobi电子书阅读器,反正我用着挺好的,功能强大 image.png image.png 静读天下(手机APP) 也是款mobi电子书阅读器,功能强大,就是免费版有广告 Screenshot_2017-05-30-15-50-02-1974671738.png Screenshot_2017-05-30-15-50-16-0673376779.png PotPlayer 如果你追求低内存占用、无广告、功能强大又唯美的本地播放器,Potplayer 是最好的选择。 最大的优点——不流氓! 解码强大 PotPlayer

优秀的个人博客,低调大师

MapReduce实现协同过滤中每个用户看过的项目集合

一、知识准备 hadoop自带的例子在 D:\HADOOP_HOME\hadoop-2.6.4\share\hadoop\mapreduce\sources\hadoop-mapreduce-examples 2.6.0-source.jar 我记得当年面试的时候就问中位数的问题不过是数据流下的中位数,一问便知是否搞过hadoop。 二、代码实现 2.1 Mapper package cf; import java.io.IOException; import org.apache.hadoop.io.LongWritable; import org.apache.hadoop.io.Text; import org.apache.hadoop.mapreduce.Mapper; public class MovieMapper1 extends Mapper<LongWritable, Text, Text, Text> { public void map(LongWritable ikey, Text ivalue, Context context) throws IOException, InterruptedException { String[] values = ivalue.toString().split(","); if (values.length!=2) { return ; } String userID = values[0]; String itemID = values[1]; context.write(new Text(userID), new Text(itemID)); } } 2.2 Reducer package cf; import java.io.IOException; import org.apache.hadoop.io.Text; import org.apache.hadoop.mapreduce.Reducer; public class MovieReduce1 extends Reducer<Text, Text, Text, Text> { public void reduce(Text _key, Iterable<Text> values, Context context) throws IOException, InterruptedException { // process values StringBuffer sb = new StringBuffer(); for (Text val : values) { sb.append(val.toString()); sb.append(","); } //value不能直接用StringBuffer 必须转换为String context.write(_key,new Text(sb.toString())); } } 2.3 Main package cf; import java.io.IOException; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.fs.Path; import org.apache.hadoop.io.IntWritable; import org.apache.hadoop.io.Text; import org.apache.hadoop.mapreduce.Job; import org.apache.hadoop.mapreduce.lib.input.FileInputFormat; import org.apache.hadoop.mapreduce.lib.output.FileOutputFormat; public class UserItemSetMapReduce { public static void main(String[] args) throws Exception{ Configuration conf = new Configuration(); Job job = new Job(conf, "CFItemSet"); job.setJarByClass(UserItemSetMapReduce.class); job.setMapperClass(MovieMapper1.class); //job.setCombinerClass(cls); // job.setCombinerClass(MovieReduce1.class); job.setReducerClass(MovieReduce1.class); job.setOutputKeyClass(Text.class); job.setOutputValueClass(Text.class); FileInputFormat.addInputPath(job,new Path("hdfs://192.168.58.180:8020/cf/userItem.txt")); //InputPath(job, new Path(otherArgs[0])); //直接写到cf会提示已存在cf,我写成uIO.ttx,以为内容会写入到txt,然没有,默认他是文件夹 FileOutputFormat.setOutputPath(job,new Path("hdfs://192.168.58.180:8020/cf/userItemOut.txt")); System.exit(job.waitForCompletion(true) ? 0 : 1); } } 三、结果分析 3.1 输入 3.2 输出 查看结果发现输出文件的分隔符默认是tab,‘\t’,同时相对于输入文件来说输出结果是逆着的,类似沾,莫非context就是这样的先进后出、 3.3日志分析 只列出了主要部分的日志 DEBUG - PrivilegedAction as:hxsyl (auth:SIMPLE) from:org.apache.hadoop.mapreduce.Job.getCounters(Job.java:765) INFO - Counters: 38 File System Counters FILE: Number of bytes read=538 FILE: Number of bytes written=509366 FILE: Number of read operations=0 FILE: Number of large read operations=0 FILE: Number of write operations=0 HDFS: Number of bytes read=106 HDFS: Number of bytes written=37 HDFS: Number of read operations=13 HDFS: Number of large read operations=0 HDFS: Number of write operations=4 Map-Reduce Framework Map input records=11 Map output records=11 Map output bytes=44 Map output materialized bytes=72 Input split bytes=107 Combine input records=0 Combine output records=0 Reduce input groups=5 Reduce shuffle bytes=72 Reduce input records=11 Reduce output records=5 Spilled Records=22 Shuffled Maps =1 Failed Shuffles=0 Merged Map outputs=1 GC time elapsed (ms)=3 CPU time spent (ms)=0 Physical memory (bytes) snapshot=0 Virtual memory (bytes) snapshot=0 Total committed heap usage (bytes)=462422016 Shuffle Errors BAD_ID=0 CONNECTION=0 IO_ERROR=0 WRONG_LENGTH=0 WRONG_MAP=0 WRONG_REDUCE=0 File Input Format Counters Bytes Read=53 File Output Format Counters Bytes Written=37 DEBUG - PrivilegedAction as:hxsyl (auth:SIMPLE) from:org.apache.hadoop.mapreduce.Job.updateStatus(Job.java:323) DEBUG - stopping client from cache: org.apache.hadoop.ipc.Client@37afeb11 DEBUG - removing client from cache: org.apache.hadoop.ipc.Client@37afeb11 DEBUG - stopping actual client because no more references remain: org.apache.hadoop.ipc.Client@37afeb11 DEBUG - Stopping client DEBUG - IPC Client (521081105) connection to /192.168.58.180:8020 from hxsyl: closed DEBUG - IPC Client (521081105) connection to /192.168.58.180:8020 from hxsyl: stopped, remaining connections 0 大神分析一下如何执行的,看着日志....Map如何输入的,执行几次等。

资源下载

更多资源
优质分享App

优质分享App

近一个月的开发和优化,本站点的第一个app全新上线。该app采用极致压缩,本体才4.36MB。系统里面做了大量数据访问、缓存优化。方便用户在手机上查看文章。后续会推出HarmonyOS的适配版本。

腾讯云软件源

腾讯云软件源

为解决软件依赖安装时官方源访问速度慢的问题,腾讯云为一些软件搭建了缓存服务。您可以通过使用腾讯云软件源站来提升依赖包的安装速度。为了方便用户自由搭建服务架构,目前腾讯云软件源站支持公网访问和内网访问。

Nacos

Nacos

Nacos /nɑ:kəʊs/ 是 Dynamic Naming and Configuration Service 的首字母简称,一个易于构建 AI Agent 应用的动态服务发现、配置管理和AI智能体管理平台。Nacos 致力于帮助您发现、配置和管理微服务及AI智能体应用。Nacos 提供了一组简单易用的特性集,帮助您快速实现动态服务发现、服务配置、服务元数据、流量管理。Nacos 帮助您更敏捷和容易地构建、交付和管理微服务平台。

Sublime Text

Sublime Text

Sublime Text具有漂亮的用户界面和强大的功能,例如代码缩略图,Python的插件,代码段等。还可自定义键绑定,菜单和工具栏。Sublime Text 的主要功能包括:拼写检查,书签,完整的 Python API , Goto 功能,即时项目切换,多选择,多窗口等等。Sublime Text 是一个跨平台的编辑器,同时支持Windows、Linux、Mac OS X等操作系统。

用户登录
用户注册
修改密码
忘记密码