我在Ubuntu 9.04上使用emacs 22.2.1.
每次我打开文件并对其进行处理,然后当我列出终端目录中的文件时,我会在每个文件的末尾看到哈希值.
即
#test.c#
#test.h#
Run Code Online (Sandbox Code Playgroud)
为什么这样,我怎么能删除它们?
非常感谢任何建议,
我想在截图中创建这样的东西.它有一个主要布局,它是覆盖它的背景和布局.我不确定这是怎么做到的.
我最好的猜测是一个对话框片段.这是做这样的事情的正确方法吗?
我尝试使用对话框片段并没有给出我想要的结果,这是我能得到的结果.
这是我的布局:
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
xmlns:app="http://schemas.android.com/apk/res-auto"
tools:context="com.chatt.fragments.AddMember">
<ImageButton
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/ic_highlight_off_white_36dp"
android:layout_alignParentRight="true"
android:layout_alignParentEnd="true"/>
<android.support.design.widget.CoordinatorLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<ImageView
android:id="@+id/ivBackground"
android:layout_width="match_parent"
android:layout_height="300dp"
android:src="@drawable/world"
android:scaleType="centerCrop"
android:alpha="0.4"/>
<de.hdodenhof.circleimageview.CircleImageView
android:id="@+id/civProfilePhoto"
android:layout_width="70dp"
android:layout_height="70dp"
android:src="@drawable/user3"
app:layout_anchor="@+id/ivBackground"
app:layout_anchorGravity="bottom|center"/>
<TextView
android:id="@+id/tvMemberName"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:fontFamily="sans-serif-light"
android:text="Sarah"
android:textSize="26sp"
android:textStyle="bold"
app:layout_anchor="@+id/civProfilePhoto"
app:layout_anchorGravity="bottom|center"
android:layout_marginTop="40dp"/>
</android.support.design.widget.CoordinatorLayout>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="60dp"
android:layout_alignParentBottom="true"
android:background="@color/material_grey_300">
<ImageButton
android:id="@+id/ibLock"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_alignParentStart="true"
android:layout_alignParentLeft="true"
android:layout_marginLeft="60dp"
android:layout_marginStart="60dp"
android:src="@drawable/ic_lock_black_36dp"/>
<ImageButton
android:id="@+id/ibAddMember"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_alignParentEnd="true"
android:layout_alignParentRight="true"
android:layout_marginRight="60dp"
android:layout_marginEnd="60dp"
android:src="@drawable/ic_person_add_black_36dp"/>
</RelativeLayout>
</RelativeLayout>
Run Code Online (Sandbox Code Playgroud)
我使用协调器布局将背景图片固定在背景上.但是,这很好.但这个名字涵盖了一些个人资料图片.我从谷歌图标包下载的图标.臀部显示非常黑的背景,应该是透明的.右上角的关闭图标也没有透明背景.该对话框覆盖整个屏幕.
我像这样膨胀我的DialogFragment:
@Override
public void onCreate(Bundle savedInstanceState) …Run Code Online (Sandbox Code Playgroud) Android Studio 2.0 beta 6
Run Code Online (Sandbox Code Playgroud)
我正在尝试使用ViewPropertyAnimator移动ImageView (ivSettings)工具栏内部,使其从右侧20dp,从顶部20dp,从当前位置.并ImageView (ivSearch)从左侧和顶部移动20dp.
imageViews包含在Toolbar.
这是初始状态,我想将图标移动到工具栏内的上角.
我正在使用的代码是获取宽度然后减去一个值以使ivSettings从右边获得20dp.
final DisplayMetrics displayMetrics = new DisplayMetrics();
getActivity().getWindowManager().getDefaultDisplay().getMetrics(displayMetrics);
final float widthPx = displayMetrics.widthPixels;
ivSearch.animate()
.setInterpolator(new AccelerateInterpolator())
.x(20)
.y(20)
.setDuration(250)
.start();
ivSettings.animate()
.setInterpolator(new AccelerateInterpolator())
.x(widthPx - 160)
.y(20)
.setDuration(250)
.start();
Run Code Online (Sandbox Code Playgroud)
但是,在不同的屏幕尺寸上试过这个,我无法得到精确的宽度计算.有没有更好的方法呢?
非常感谢任何建议
用gcc C99编译
我一直在使用enums一段时间.但是,我正在使用一些示例代码来开发我的应用程序.我偶然发现了一些像这样的代码.我被告知这是使用枚举时的最佳实践.但我不知道这有什么好处.
typedef enum {
TYPE_DATE,
TYPE_TIME,
TYPE_MONEY,
TYPE_COUNT,
TYPE_UNKNOWN = TYPE_COUNT
} string_type_e;
Run Code Online (Sandbox Code Playgroud)
为什么TYPE_COUNT要分配TYPE_COUNT给TYPE_UNKNOWN谁?
非常感谢任何建议,
C#2008 SP1
我想知道处理修订号的最佳方法是什么.
我一直认为通常只有3个数字.(主要,次要和错误修复).
但是,我想知道内部版本号和版本号是什么.
例如,在过去我通常只使用3个数字.我有一些非常小的变化或错误修复我会增加第3个数字(错误修复).
因为我是新手.通常在专业领域做什么?
非常感谢任何建议,
在我的AssemblyInfo文件中,我有以下内容:
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.2.*")]
[assembly: AssemblyFileVersion("1.0.0.0")]
// 1.0.2 Added feature for detecting if a sound card is installed.
Run Code Online (Sandbox Code Playgroud) 我是C的新手,我正在调试源代码.但是,我对此代码段感到困惑.
当值被分配给结构值时,我认为它是一些掩盖.但不确定,如果它是掩盖的.屏蔽如何在这个概念中发挥作用?
非常感谢,
#define MSGINFO_ENABLE 0x01
#define MIME_ENABLE 0x02
#define FASTSTART_CODERS_IN_OFFERED 0x04
#define TRANSADDR_ENABLE 0x08
typedef struct {
unsigned int msginfo_mask; /* added in version 0x0101 */
} VIRTBOARD;
VIRTBOARD VirtBoard;
/* Not sure I understand what is happening here. */
VirtBoard.msginfo_mask = MSGINFO_ENABLE | MIME_ENABLE | FASTSTART_CODERS_IN_OFFERED | TRANSADDR_ENABLE;
Run Code Online (Sandbox Code Playgroud) 我使用的是ubuntu 9.04和GNU Emacs 22.2.1
我正在使用终端加载emacs即 emacs -nw
但是,我只运行8种颜色.
M-X list-colors-display
Run Code Online (Sandbox Code Playgroud)
仅显示8种颜色.
在终端我运行此命令
tput colors 我显示了8
如何获得完整的256色支持?
非常感谢任何建议,
GNU Emacs 23.2.1
Fedora xfce 14
Run Code Online (Sandbox Code Playgroud)
我开始进入Prolog,我想使用我的emacs作为IDE在Prolog中进行编程.
目前我使用emacs进行c/c ++.但不知道如何开始使用Prolog.我知道emacs有一个用于emacs编程的内置库.但是,我已经研究过,发现它的功能较少,即没有语法高亮,缩进等.
所以我已经下载了emacs prackage Prolog.el.我已经加载了这个库M-X Load-library.
但是,我不知道在那之后该怎么做.如何编译我的prolog文件?在emacs IDE的菜单中,Prolog没有任何内容.
我是否还需要为Prolog下载一些解释器或编译器?是否有用于编译的emacs命令?我通常在编译c代码时在emacs中使用make.
我做了一个yum搜索序言并得到了这些结果,所以我需要的所有这些选择?:
gprolog.x86_64 : GNU Prolog is a free Prolog compiler
pl.x86_64 : SWI-Prolog - Edinburgh compatible Prolog compiler
pl-static.x86_64 : Static library for SWI Prolog
ppl-gprolog.x86_64 : The GNU Prolog interface of the Parma Polyhedra Library
ppl-gprolog-static.x86_64 : The static archive for the GNU Prolog interface of the Parma Polyhedra Library
ppl-swiprolog.x86_64 : The SWI-Prolog interface of the Parma Polyhedra Library
ppl-swiprolog-static.x86_64 …Run Code Online (Sandbox Code Playgroud) EDIT ===================
Run Code Online (Sandbox Code Playgroud)
apr-1是apache可移植运行时,我自己下载并编译以创建共享库(因此它不是由cmake创建的).在目标系统上运行CPack后,我需要链接到这个库.
我的开发项目目录:
read_config/bin
/libs
/include
/src
/build
Run Code Online (Sandbox Code Playgroud)
对于我的CMakeLists.txt,一切安装正常,但现在我有一个链接问题,因为它找不到库的新位置.
我已经删除了,LINK_DIRECTORIES(${PROJECT_SOURCE_DIR}/libs)因为我现在不需要这个,因为我正在使用FIND_LIBRARY.
并添加了以下内容:
# Find the library in the libs folder
FIND_LIBRARY(APR_LIBS NAMES "apr-1" PATHS ${PROJECT_SOURCE_DIR}/libs)
# Print out the path to see if its correct
MESSAGE(${APR_LIBS})
# Link the library with the executable
TARGET_LINK_LIBRARIES(cfg ${APR_LIBS})
# Install the libs folder
INSTALL(DIRECTORY ${PROJECT_SOURCE_DIR}/libs/
DESTINATION libs)
# Install the executable in the bin folder
INSTALL(TARGETS cfg
RUNTIME DESTINATION bin)
Run Code Online (Sandbox Code Playgroud)
一切都安装正常,但是当我检查可执行文件以查看它链接的库时,它找不到apr-1它在错误的地方看起来.
libapr-1.so.0 => not found
Run Code Online (Sandbox Code Playgroud)
这是因为我已将安装包解压缩到一个新位置,该位置与编译它的位置不同.从编译目录我得到这个,运行正常:
libapr-1.so.0 …Run Code Online (Sandbox Code Playgroud) Android Studio 2.0 Beta 5
Run Code Online (Sandbox Code Playgroud)
每次我构建和部署时,都会出现这个浮动后台任务.
通常我单击最小化按钮以使其显示在状态栏中.但是,我们是否可以将默认行为更改为始终显示在状态栏中.
我在设置中找不到任何内容,因此不确定Android Studio是否以这种方式设计.
我发现这件事很烦人.
非常感谢任何建议,