- Java 双重比较
- java - 比较器与 Apache BeanComparator
- Objective-C 完成 block 导致额外的方法调用?
- database - RESTful URI 是否应该公开数据库主键?
此代码来自Facebook Chat Emoticons Bar Grease Monkey UserScript
ImagesURL = HttpsOn?'https://s-static.ak.fbcdn.net/images/':'http://static.ak.fbcdn.net/images/';
emotsInfo = [':)', ':(', ':p', ':D', ':o', ';)', '8)', '8|', '>:(', ':/', ':\'(', '3:)', 'O:)', ':*', '<3', '^_^', '-_-', 'o.O', '>:O', ':v', ':3'];
for(i=0;i<emotsInfo.length;i+=1) {
var fEmotsDom = document.createElement('img');
fEmotsDom.setAttribute('alt',emotsInfo[i]);
fEmotsDom.setAttribute('style','cursor: pointer; background-position: -'+ 16*i +'px 0px;');
fEmotsDom.setAttribute('src',ImagesURL + 'blank.gif');
fEmotsDom.setAttribute('class','emote_img');
fEmotsListDom.appendChild(fEmotsDom);
}
此代码从 Facebook 服务器获取 Facebook 情绪
我正在编写一个 WPF,除了从 blank.gif 中获取情感外,我了解所有代码过程
C#代码
const string EmotionsResources = "http://static.ak.fbcdn.net/images/";
private Image Emoticons ( string E )
{
return ( new Image ( ) { Source = new BitmapImage ( new Uri ( EmotionsResources + E ) ) } );
}
如果您尝试获取任何 Facebook 聊天情绪的来源..您将获得 [ http://static.ak.fbcdn.net/images/blank.gif ]此代码如何从此链接检索情绪?
最佳答案
我在这里猜测,但我认为该类会触发一种检查替代文本的样式。 (一旦你划掉所有不可能的答案,这是唯一有效的答案。每次迭代中唯一改变的是替代文本,所以它必须是触发它的东西。css 类选择器可以处理属性值)
换句话说 - 你被困住了。
所以我很感兴趣,所以我开始更深入地挖掘:
图像上的css 样式中包含以下css 规则:
element.style {
background-position: 0px 0px;
}
.emote_img {
background: url(http://static.ak.fbcdn.net/rsrc.php/v1/zC/r/eKCEtE1PXyK.png) no-repeat;
overflow: hidden;
}
第一个由脚本设置,第二个来自CSS文件。
所以。实际图像在该 png 文件中找到,即:
http://static.ak.fbcdn.net/rsrc.php/v1/zC/r/eKCEtE1PXyK.png :
(很高兴知道你可以在 fb 中使用这么多表情符号!:-)
你会在一张图片中看到所有图片(这样做是为了节省带宽)由于图像大小为 16*16,因此一次只显示一张图像。背景位置的东西负责移动图像,这样每次都会从大图像中显示不同的图标。
因此,要在 C# 中获取图像,您需要执行以下操作:
你可以裁剪它,或者使用完全相同的技巧(在我看来这是更好的技巧),就像这样:
<Canvas ClipToBounds="true" Width="16" Height="16">
<Image Source="http://static.ak.fbcdn.net/rsrc.php/v1/zC/r/eKCEtE1PXyK.png"
Canvas.Left="0" /> <!-- or -16, -32, -48 etc.. -->
</Canvas>
关于html - Facebook 情绪,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6052477/
我目前正在做一个项目,我必须提取用户的面部表情(网络摄像头一次只能提取一个用户),比如悲伤或快乐。 目前我发现的最佳可能性: 我使用 OpenCV 进行人脸检测。 OpenCV 开发板上的一些用户建议
此代码来自Facebook Chat Emoticons Bar Grease Monkey UserScript ImagesURL = HttpsOn?'https://s-static.ak.f
我正在寻找一种可以分析短文本情感的工具。我搜索了一个星期,但找不到一个可以公开获得的好的。理想的工具是将短文本作为输入并猜测情感的工具。它最好是一个独立的应用程序或库。 我不需要通过文本训练的工具。而
是否有任何简单的 Android/Java 库/框架可以检测图片上的人脸并给我一些关于图片上的人的信息?我的意思是诸如性别、年龄、情绪(微笑、悲伤、愤怒)之类的信息...... 我试过Face++和微
我下载了WN-Affect .但是,我不确定如何使用它来检测句子的情绪。例如,如果我有一个字符串“我讨厌足球”。我希望能够检测情绪是否不好,情绪是否是恐惧。 WN-Affect 没有关于如何操作的教程
现在,Skype 将淘汰其桌面 API 以支持 Skype URI,我正在尝试弄清楚如何修改状态和情绪消息。我的应用程序是一个 chrome 扩展程序,使用它的人都知道它的作用。它是一个合法的用例。目
我有这个: import styled from 'react-emotion'; const Box = styled('div')` display: flex; flex-directi
我是一名优秀的程序员,十分优秀!