我最近升级到了emacs23(Ubuntu 10.04),我设法让我的面孔(字体)全部用相关的.emacs选项整理出来.
然而,我似乎无法更改的一种字体是用于显示缓冲区菜单的字体(即,当您按住CTRL +左键单击缓冲区时,您将获得一个列出所有打开缓冲区的弹出菜单).
问题是用于显示此菜单的字体是成比例的(不是固定宽度)并且它使菜单变得很乱 - 没有任何内容垂直排列,我经常使用它来查看哪些缓冲区保存了共同的文件目录.比例字体在整个地方都有路径.
我相信Ubuntu的emacs23是用GTK而不是Lucid构建的.我读过的一些东西似乎表明没有办法在Emacs中设置这个字体 - 这必须在外部使用GTK配置完成 - 如果这是真的,怎么样?
否则,如果无法完成,使用Lucid重新编译emacs23而不是Ubuntu上的GTK支持是多么棘手?可以使用"apt-get source"轻松完成吗?
我正在构建一个使用大型下拉式菜单的网站,该菜单的样式使用包含子菜单的嵌套ul周围的div.
有没有人知道如何自定义Wordpress(wp_nav_menu)生成的菜单的输出,以在嵌套的子菜单ul周围添加包含div?
有两个参数
'before'=>'',''=>''之后,
但不幸的是,这些只是在实际链接之前添加内容而不是整个子菜单.
如果您有任何指示或已经完成此操作之前我真的很感激它.
干杯,
戴夫
我的命令行参数有问题.我完成了程序,所以我可以从命令行启动它:
program.exe test.txt copy_test.txt
Run Code Online (Sandbox Code Playgroud)
基本上,我的程序执行以下操作:
但是(总是这样但是?!),我应该从命令行启动程序,如下所示:
program.exe -input=test.txt -output=copy_test.txt
Run Code Online (Sandbox Code Playgroud)
我不知道该怎么做.我研究过,但我没有找到任何帮助:(
请回复.
#include <string>
#include <iostream>
#include <fstream>
#include <vector>
#include <algorithm>
using namespace std;
int main ( int argc, char* argv[])
{
ifstream in(argv[1]);
ofstream out(argv[2]);
vector <string> sV;
string line;
while (in >> line)
sV.push_back(line);
for ( int i = 0; i < sV.size(); i++)
sort ( sV.begin(), sV.end () );
for ( int i = 0; i < sV.size(); i++)
out << sV[i] << endl;
cin.get(); …Run Code Online (Sandbox Code Playgroud) 我有一个自定义ListView和适配器.我可以从我的列表中删除在我的自定义列表中设置的项目,但我可以从中删除ListView.当我尝试调用时adapter.remove(position),编辑器会说"创建一个方法"remove(int position)"".当我在适配器中创建这个方法时,我不知道该怎么做.代码:
填写我的列表视图:
lv = (ListView) findViewById(R.id.list);
LayoutInflater mLInflater = getLayoutInflater();
final ListViewAdapter adapter = new ListViewAdapter(
getApplicationContext(), kimdenlist, konulist,
mLInflater);
lv.setAdapter(adapter);
Run Code Online (Sandbox Code Playgroud)
ListViewAdapter:
public class ListViewAdapter extends BaseAdapter {
static HashMap<Integer, Boolean> cartItems = new HashMap<Integer, Boolean>();
Context mContext;
ArrayList<String> kimdenlist; // to load images
ArrayList<String> konulist; // for data
LayoutInflater mLayoutInflater;
public ListViewAdapter(Context context, ArrayList<String> kimdenlist, ArrayList<String> konulist,
LayoutInflater layoutInflater) {
mContext = context;
this.kimdenlist = kimdenlist;
this.konulist = konulist;
mLayoutInflater …Run Code Online (Sandbox Code Playgroud) 我知道这UIAlertView符合UIAppearance和UIAppearanceContainer.
但是如何使用UIAppearance自定义/样式UIAlertView?我无法通过网络找到它.
根据Alexander Merchi在这篇文章(UINavigationBar中的UIBarButtonItem Custom视图)中给出的答案,找到了一个解决方案.但仍然不知道如何正确改变图像的位置.
UIButton *btn = [UIButton buttonWithType:UIButtonTypeCustom];
[btn setFrame:CGRectMake(0, 0, 28.0f, 28.0f)]; // 28 points is the width or height of the button image
[btn setBackgroundImage:[UIImage imageNamed:@"button.png"] forState:UIControlStateNormal];
[btn addTarget:self action:@selector(onClickMenuButton) forControlEvents:UIControlEventTouchUpInside];
btnMenu = [[UIBarButtonItem alloc] initWithCustomView:btn];
Run Code Online (Sandbox Code Playgroud)

在iOS 6中,目标是这样的:

而目前的结果是这样的:

我的代码是
btnMenu = [[UIBarButtonItem alloc] initWithImage:[UIImage imageNamed:@"button.png"]
style:UIBarButtonItemStylePlain
target:self
action:@selector(onClickMenuButton)];
Run Code Online (Sandbox Code Playgroud)
button.png是白色的圆圈,里面有白色的三个条纹和一个透明的背景.
如何通过代码或通过GUI更改每个子面板上的顺序?在Sugar 6中,用户可以简单地通过拖放每个模块下的子面板来改变顺序.据我所知,这在7.x中是不可能的.我试图改变
'order' => 1
Run Code Online (Sandbox Code Playgroud)
在
custom/Extension/modules/Opportunities/Ext/Layoutdefs/some_file.php
Run Code Online (Sandbox Code Playgroud)
没有运气......
让下表:
x <- sample(1:2, 100, replace = T)
tabela <- table(x)
Run Code Online (Sandbox Code Playgroud)
我添加了边距
> addmargins(tabela)
x
1 2 Sum
51 49 100
Run Code Online (Sandbox Code Playgroud)
但是,我想将"Sum"标签更改为"Total".我该怎么做呢?
我目前的解决方法是运行addmargins以获取函数的源代码,将其复制到我的脚本并将字符串更改"Sum"为"Total",但我想有一种更聪明的方法来实现这一点.
如何创建使用表单构建器构建的自定义登录页面并使用表单辅助函数来呈现视图?我终于想通了!我的解决方案如下.
为什么需要?
好吧,我想使用表单生成器来创建Symfony登录页面,因为我想使用表单帮助程序函数来呈现视图.这样我的字段将始终使用正确的模板(手动编写表单 - 根据Symfony书籍示例 - 意味着如果主模板已更新,则登录表单的更改必须手动完成 - 并且有可能忘记!)
关于自定义模板的主题.我正在教自己如何用xcode 7和Objective c这样做,我被卡住了.到目前为止,通过对SO阅读其他职位我已成功通过复制单一视图的应用之一,并在Xcode包的合适的目录下它来创建自定义模板.我的模板文件夹如下所示:
如果我点击Main.storyboard并说添加几个按钮,并保存,然后在xcode中打开我的自定义模板,按钮就在那里,所以我知道我正在取得进展.我想做的是创建视图控制器文件和xib并包含应用程序图标等...这样我就可以有一个正确的自定义模板来启动我的所有项目.这就是我被困的地方.我不知道如何从简单文件Main.storyboard开始.任何人都可以请我指出正确的方向.
特别是,我正在做的事情是没有一个故事板,并从一个xib开始.我猜我需要用TemplateInfo.plist做点什么.我看了看,看不到任何关于它的东西,所以只需重定向即可.谢谢