我有以下数组:
int A[] = {0,1,1,1,1, 1,0,1,0,0, 0,1,1,1,1};
int B[] = {1,1,1,1,1, 1,0,1,0,1, 0,1,0,1,0};
int C[] = {0,1,1,1,0, 1,0,0,0,1, 1,0,0,0,1};
//etc... for all letters of the alphabet
Run Code Online (Sandbox Code Playgroud)
还有一个在5x3 LED矩阵上打印字母的功能:
void printLetter(int letter[])
Run Code Online (Sandbox Code Playgroud)
我有一串字母:
char word[] = "STACKOVERFLOW";
Run Code Online (Sandbox Code Playgroud)
我想将字符串的每个字符传递给printLetter函数.
我试过了:
int n = sizeof(word);
for (int i = 0; i < n-1; i++) {
printLetter(word[i]);
}
Run Code Online (Sandbox Code Playgroud)
但是我收到以下错误:从'char'到'int*'的无效转换
我该怎么办?
谢谢!!
如何将特定文件和/或文件夹的剪切/复制引用放入 Windows 剪贴板,以便当我打开标准的 Windows 资源管理器窗口时,转到某处并按Ctrl+ V- 粘贴文件?
如果我在 Windows 资源管理器中复制或剪切了一些文件/文件夹,我如何在我的程序中获取这些信息(全名以及它们是否被剪切或复制)?
我用C# 4.0编程,但其他语言的方式也很有趣。
查看TCP的SQL 2008管理配置屏幕的这张图片: 
我需要知道我正在运行的端口.根据之前的帖子,我不相信它是1433,我猜这是默认的.
当我在SQL Config Mgr.中检查我的端口号时,它是空白的.这是否暗示默认端口?请注意,我在数据库服务器上有多个SQL Server实例.一个2000实例和两个2008实例.我想知道2008b实例的端口.
第一个显示用于TCP.我不确定VIA是什么,但请查看:

你能帮我吗?
更新
我重新启动了我的sql2008b实例并检查了日志以查找指示它正在使用的端口的msg.它表明了这一点:
2010-05-22 20:06:29.27 Server A self-generated certificate was successfully loaded for encryption.
2010-05-22 20:06:29.27 Server Server local connection provider is ready to accept connection on [ \\.\pipe\SQLLocal\SQL2008B ].
2010-05-22 20:06:29.27 Server Server local connection provider is ready to accept connection on [ \\.\pipe\MSSQL$SQL2008B\sql\query ].
2010-05-22 20:06:29.32 Server Server is listening on [ 127.0.0.1 <ipv4> 5786].
2010-05-22 20:06:29.32 Server Dedicated admin connection support was established for listening locally on …Run Code Online (Sandbox Code Playgroud) 我查看了MySql连接选项,它似乎并不存在.有没有办法为.NET创建只读连接/命令?使用SQLite,我可以指定read only=true执行此操作.我能用MySQL做什么?
我听说--prefix=PREFIX在Linux上编译PHP时设置选项将允许您一次安装多个PHP而不会发生冲突.(我认为如果未设置则默认为/usr/local).但是,我不确定它究竟是做什么或者使用的好设置是什么.此外,我还听说将其设置为默认值以外的其他内容可能会使某些PHP扩展更难以安装.
./configure --prefix=PREFIX ...
Run Code Online (Sandbox Code Playgroud)
我刚刚意识到其他一些选项--exec-prefix可能仍然需要设置,/usr/local因为它们默认为值--prefix.如果将前缀设置为类似web/phpalt因为--sbindir设置为``--exec-prefix +/sbin`之类的东西,这会导致问题.
Directory and file names:
--prefix=PREFIX install architecture-independent files in PREFIX
[/usr/local]
--exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
[same as prefix]
--bindir=DIR user executables in DIR [EPREFIX/bin]
--sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
--libexecdir=DIR program executables in DIR [EPREFIX/libexec]
--datadir=DIR read-only architecture-independent data in DIR
[PREFIX/share]
--sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
--sharedstatedir=DIR modifiable architecture-independent data in DIR …Run Code Online (Sandbox Code Playgroud) 我刚刚将编译器选项从4.0更改为4.2.
现在我收到一个错误:
jump to case label crosses initialization of 'const char* selectorName'
Run Code Online (Sandbox Code Playgroud)
它在4.0中运行良好
有任何想法吗?
我正在浏览我的vim dotfiles来整理它们.我注意到,随着时间的推移,我以各种不一致的方式添加了各种文件类型特定的设置.让我们假设我正在为Python定制:
au BufRead,BufNewFile *.py (do something).我不喜欢这个,因为一些Python文件可能没有.py终止.
au FileType python (do something).这似乎是一个更好的选择,因为它不依赖于具有.py终止的文件.缺点是Vim不知道某些文件类型.我可以让Vim识别其他文件类型,但我也有各种不一致的方法:.vim/filetype.vim文件,另一个in .vim/after/filetype.vim和各种set filetype命令.vimrc.
添加.vim/ftplugin/python.vim具有特定于文件类型设置的文件.我知道$VIMRUNTIME/ftplugin/python.vim可以覆盖我在这里设置的任何设置.一个问题是,我不知道该如何与交互.vim/filetype.vim和.vim/after/filetype.vim.
添加一个.vim/after/ftplugin/python.vim.我知道这是在之后加载的,$VIMRUNTIME/ftplugin/python.vim所以它可以从那里覆盖设置.和前面的方法一样,我不确定它是如何与filetype.vim文件交互的.
所以我至少有四种方法可以做到这一点,不提及语法文件和特定于文件类型的插件.在我看来,这样做是为了把我的文件类型的特定设置的最佳途径after/ftplugin,使他们不被覆盖,并filetypes.vim在after出于同样的原因.
但是,在我继续之前,我想询问是否有人有关于处理文件类型特定设置的最佳方法的建议.
我有一个像这样的头文件:
/*
* APP 180-2 ALG-254/258/772 implementation
* Last update: 03/01/2006
* Issue date: 08/22/2004
*
* Copyright (C) 2006 Somebody's Name here
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must …Run Code Online (Sandbox Code Playgroud) 是什么区别HashMap,LinkedHashMap而TreeMap在Java中?我没有看到输出有任何差异,因为所有三个都有keySet和values.什么是Hashtables?
Map m1 = new HashMap();
m1.put("map", "HashMap");
m1.put("schildt", "java2");
m1.put("mathew", "Hyden");
m1.put("schildt", "java2s");
print(m1.keySet());
print(m1.values());
SortedMap sm = new TreeMap();
sm.put("map", "TreeMap");
sm.put("schildt", "java2");
sm.put("mathew", "Hyden");
sm.put("schildt", "java2s");
print(sm.keySet());
print(sm.values());
LinkedHashMap lm = new LinkedHashMap();
lm.put("map", "LinkedHashMap");
lm.put("schildt", "java2");
lm.put("mathew", "Hyden");
lm.put("schildt", "java2s");
print(lm.keySet());
print(lm.values());
Run Code Online (Sandbox Code Playgroud) 我正在使用Expander控件并设置了标题,如下图所示:
http://www.hughgrice.com/Expander.jpg
Expander我遇到的问题是我希望扩展器按钮包含在标题中,以便标题模板末尾的行与内容对齐,即我最终想要得到类似于下图的内容:
http://www.hughgrice.com/Expander.gif
提前致谢.