问题列表 - 第41573页

如何保持持久的emacs-server实例运行?

我使用emacs-server,这样我就可以将emacsclient设置为默认的texteditor并让它将新文件作为缓冲区而不是新的emacs实例打开.

但是,这仅在emacs服务器运行时才有效,那么我怎样才能在启动时运行并保持在后台运行?

另一个问题是,如果我启动emacs,然后退出并重新启动它,它会告诉我:

文件错误:无法绑定服务器套接字,已在使用的地址

emacs ubuntu

6
推荐指数
1
解决办法
4085
查看次数

layout"include"功能不支持layout_gravity属性?

<LinearLayout
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:orientation="horizontal">

    <include
        layout="@layout/view1" 
        android:layout_gravity="center_vertical" />

    <include
        layout="@layout/view2"
        android:layout_gravity="center_vertical" />
</LinearLayout>
Run Code Online (Sandbox Code Playgroud)

那么,android:layout_gravity会一直被忽略吗?这对于代码可重用性来说真的很糟糕......看起来layout_margin也不支持.

这是view1.xml布局

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:orientation="horizontal"
    android:minHeight="45dip"
    android:background="@drawable/updater_background" >

    <ProgressBar
        style="?android:attr/progressBarStyleSmall"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_gravity="center_vertical"
        android:layout_marginRight="7dip"
        android:visibility="gone" />

    <TextView
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_gravity="center_vertical" />
</LinearLayout>
Run Code Online (Sandbox Code Playgroud)

layout android include

7
推荐指数
1
解决办法
5022
查看次数

Spring无法自动发送字段错误

我的弹簧动态网络项目出现了以下错误.我是春天的新手,我不知道为什么会出现以下错误 -

org.springframework.beans.factory.BeanCreationException: Could not autowire field: private com.persistent.eap.dao.UserRegistrationDetailsDao com.persistent.eap.service.impl.UserRegistrationServiceImpl.userRegistrationDetailsDao; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'userRegistrationDetailsDao': Injection of persistence dependencies failed; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No unique bean of type [javax.persistence.EntityManagerFactory] is defined: expected single bean but found 0
Run Code Online (Sandbox Code Playgroud)

以下是痕迹 -

HTTP Status 500 - 

--------------------------------------------------------------------------------

type Exception report

message 

description The server encountered an internal error () that prevented it from fulfilling this request.

exception 

javax.servlet.ServletException: Servlet.init() for servlet dispatcher threw exception
 org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
 org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
 org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:849) …
Run Code Online (Sandbox Code Playgroud)

spring spring-mvc

2
推荐指数
1
解决办法
3万
查看次数

Rails 3多态关联引发NameError

我有以下两种型号:

class FuzzyDate < ActiveRecord::Base
  belongs_to :fuzzy_dateable, :polymorphic => true
end

class Device < ActiveRecord::Base
  has_one :received_date, :as => :fuzzy_dateable
end
Run Code Online (Sandbox Code Playgroud)

使用以下架构:

  create_table "devices", :force => true do |t|
    t.string   "meid"
    t.datetime "created_at"
    t.datetime "updated_at"
  end

  create_table "fuzzy_dates", :force => true do |t|
    t.date     "date"
    t.integer  "fuzz"
    t.integer  "fuzzy_dateable_id"
    t.string   "fuzzy_dateable_type"
    t.datetime "created_at"
    t.datetime "updated_at"
  end
Run Code Online (Sandbox Code Playgroud)

让我们开启控制台,好吗?

>> d = Device.create(:meid => "A")
=> #<Device id: 1, meid: "A", created_at: "2010-12-16 06:52:55", updated_at: "2010-12-16 06:52:55">
>> fd = FuzzyDate.create(:date => …
Run Code Online (Sandbox Code Playgroud)

ruby-on-rails polymorphic-associations

2
推荐指数
1
解决办法
1740
查看次数

在Linux上使用C++中的SMTP发送邮件

有人能举例说明如何使用C++程序发送邮件吗?我遇到过一些程序,但它们并不具有描述性.如果我需要更多选项,我还想知道其他库是什么.

c++ linux smtp

5
推荐指数
1
解决办法
1万
查看次数

将共享库转换为静态库

如何将共享库转换为静态库?我正在尝试静态构建 valgrind,这需要将共享对象转换为静态库。valgrind 的正常构建过程创建的共享库很少。有没有办法将这些共享库(.so)转换为静态库?

shared-libraries static-libraries

5
推荐指数
1
解决办法
1144
查看次数

如何使关键字在 Qt::4.6 (C++) 中立即无延迟地工作?

操作系统:: win xp sp3。

Qt::4.6

我有一个游戏板类,其中有一些矩形。我为该矩形定义了 keyPressEvent,以便在屏幕上移动他。Key_A :: 矩形.moveToLeft 和 Key_D :: 矩形.moveToRight。问题是按键有延迟。当我释放一个键并按下另一个键时,需要一些时间才能开始工作。我检查了 Qt 在线文档,现在了解了这种效果,但现在不知道如何使这些键立即工作而不会在它们之间产生延迟?

代码片段:

//in Gameboard class    

ship = new QRect(x,y,w,h);

void Gameboard::keyPressEvent(QKeyEvent* event)
{
switch(event->key())  {

case Qt::Key_A :
{ 
    x = x-10;
    ship->moveTo(x,y);
    break; 
}

case Qt::Key_D :
{
    x = x+10;
    ship->moveTo(x,y);
    break; 
}


}



}
Run Code Online (Sandbox Code Playgroud)

c++ visual-studio-2008 qt4.6

2
推荐指数
1
解决办法
1312
查看次数

合并2个不同的AVL树

假设我有两个AVL树,并且我知道它们各自的大小.但是,我不知道是否有重复的节点或任何其他信息.在新的AVL树中合并它们的最有效方法是什么?原始树木可以被摧毁.

c c++ algorithm avl-tree data-structures

5
推荐指数
1
解决办法
3390
查看次数

$("a [rel ='example1']").colorbox不是一个函数

我已经将colorbox jQuery插件集成到Wordpress主题中.但在主页上显示 $("a[rel='example1']").colorbox的不是功能

但是当我在内页上运行代码时,它的工作正常.

请帮忙

链接到该网站:http://lab.pixzon.com/ca

下面是头文件的代码

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title><?php echo bloginfo('title');?></title>
<link rel="shortcut icon" href="<?php echo bloginfo('template_url')?>/images/icon.jpg"/>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link href="<?php echo bloginfo('stylesheet_url')?>" type="text/css" rel="stylesheet" />
<link media="screen" rel="stylesheet" href="<?php echo bloginfo('template_url')?>/css/colorbox.css" />
<script src="<?php echo bloginfo('template_url')?>/colorbox/jquery.min.js"></script>
<script type="text/javascript" src="<?php echo bloginfo('template_url')?>/js/browcss.js"></script>
<script src="<?php echo bloginfo('template_url')?>/colorbox/jquery.colorbox.js"></script>
<script language="javascript" type="text/javascript" src="<?php echo bloginfo('template_url')?>/js/site.js"></script>
<script language="JavaScript" src="<?php echo bloginfo('template_url')?>/js/swfobject.js"></script>
<?php 
wp_head();
?>
Run Code Online (Sandbox Code Playgroud)

wordpress jquery colorbox

1
推荐指数
1
解决办法
5836
查看次数

UIPopoverController与PresentFromBarButtonItem一起使用时设置高度

我有一个显示UItableview的UIPopoverController.我使用PresentFromBarButtonItem方法.

我怎么告诉UIPopoverCOntroller只有200px高?默认情况下,它是全屏高度.

cocoa-touch uipopovercontroller

4
推荐指数
1
解决办法
1668
查看次数