问题列表 - 第32609页

如何显示空白div元素?

我有一个名为spacer的空白div类......它有一个蓝色背景,宽度为100%的容器(正文)......

我发现除非我在其中抛出一些字符,否则间隔符不会显示.我可以将角色涂成蓝色,这样它就会被隐藏起来,但那是不那么优雅的.

什么是正确的方法来做到这一点.

css

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

如何从多个框架中注销

我有一个页面,它有 4 个框架,代码如下

<frameset id = framset_page rows="30,*" cols="*" border="0">
  <frame name="topFrame" id="topFrame" noresize scrolling="NO" src="topFrame.jsp">
   <frameset  cols="200,50,*">
    <frame src="FramesetLeftFrame.jsp" />
    <frame src="middle.html" />
      <frame src="FramesetRightFrame.jsp" />
   </frameset>
</frameset>
Run Code Online (Sandbox Code Playgroud)

topFrame 包括一个注销按钮。但是当我单击注销按钮时,它只是退出 topFrame 其他人保持不变。我怎样才能退出其他框架?在 topFrame 中编写代码似乎不起作用。谢谢!

html javascript

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

如何为可启动性的电子商务门户提供可扩展性?

我想基于LAMP扩展电子商务门户.最近我们看到了巨大的流量激增.

缩放它的步骤(请按顺序提及):

  1. 我应该考虑转移到Amazon EC2还是类似的?什么可能是切换服务器的潜在问题?

  2. 我们需要重新设计数据库吗?我读过,Facebook从MySql切换到Cassandra.如果切换到Cassandra,需要更改哪些代码?将卡桑德拉是比MySQL更好的选择?

  3. Hadoop的可能性,甚至不确定?

  4. 还需要考虑其他什么吗?

发现这个帖子很有用.这个博客也有很好的文章.我想知道的是我在扩展这个应用时应该考虑的步骤列表.

database lamp scalability e-commerce

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

Android:管理多个通知

我正在尝试在我的应用程序中创建多个通知.为了唯一地识别每个通知,我给了他们一个唯一的identifyId.以下是我的代码:

private void updateNotification(int notificationId, int clockStatusID, CharSequence text) {
 //notificationManager.cancel(notificationId);
// throws up an ongoing notification that the timer is running
Log.i("TIMERCOUNT", "Notification id: " + notificationId);
Notification not = new Notification(clockStatusID, // the
    // icon
    // for
    // the
    // status
    // bar
    text, // the text to display in the ticker
    System.currentTimeMillis() // the timestamp for the
    // notification to appear
);
Intent intent = new Intent();
intent.putExtra("notificationID", notificationId);
intent.setAction("actionstring" + System.currentTimeMillis());
intent.setClassName("com.chander.time.android.activities",
"com.chander.time.android.activities.Tabs");


not.setLatestEventInfo(self,
    getText(R.string.timer_notification_title),
    getText(R.string.timer_on_notification_text), …
Run Code Online (Sandbox Code Playgroud)

java android

9
推荐指数
2
解决办法
8609
查看次数

有人可以解释这些Android ROM黑客术语:HBOOT/bootloader,无线电,恢复映像,update.zip,NAND解锁,RUU?

我看到这些组件一直在xda开发人员上讨论过.我对它们是什么以及它们如何相互关联有一个模糊的理解,但它并不十分清楚.例如,收音机似乎不仅仅是收音机.作为Linux用户和软件开发人员,我对基本思想有很好的理解.

为了解决问题,让我介绍一下目前的理解.在某些事情上我可能会离开:

"无线电" - 我不确定这是在引导程序之前还是之后运行

HBOOT是引导程序,是启动手机时首先运行的程序.与常规的Linux引导程序一样,它可以让您从不同的分区启动.

系统上有多个分区,至少有一个用于HBOOT(可能?或者它是某种MBR类型的区域?),恢复,系统和数据.所有这些分区都在系统的"ROM"中,它实际上不是ROM,它实际上是NVRAM或闪存等等.因此,这些区域中的每一个都可以独立闪烁.

恢复是您可以启动的分区.它本来是一种"恢复"模式,因此为黑客提供了基础.这通常是重新闪存以便进一步修改.从恢复映像中,您还可以访问sdcard,这对于获取update.zip文件等非常有用.

update.zip - 这些是可以从自定义恢复映像应用的更新.看起来这些更新可能包含或多或少的任意代码,但我不清楚如何应用它们或它们被闪存或应用于何处.

/ system - 以只读方式挂载(这是什么控制?),除非你做了一些黑客攻击

内核在哪里?恢复与常规图像有不同之处吗?哪些部件形成像CyanogenMod的自定义ROM?什么是NAND以及解锁NAND意味着什么?什么是RUU?SPL?WiFi和3G无线电图像在哪里?PC36IMG.zip?PRI?

我已经在其他地方看到了一些解释,但我不明白它们是如何组合在一起的.

android

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

哪个Eclipse版本:Java,RCP或"Eclipse Classic"?

以下链接指出"建议使用Eclipse的Java或RCP版本.对于Eclipse 3.5,建议使用"Eclipse Classic"版本."

http://developer.android.com/sdk/installing.html

但是,Eclipse 3.6是可用的,作为一个新手,我不确定"Eclipse Classic"对RCP(或Java)的推荐是否仍然适用.

你能澄清一下吗?

谢谢.

java eclipse rcp android

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

绑定两个参数

考虑一下我有以下几点struct:

struct IDirect3D
{
    IDirect3D() : ref_count_(0) {}
    unsigned long Release() { return --ref_count_; }
private:
    long ref_count_;
    ~IDirect3D() {}
};
Run Code Online (Sandbox Code Playgroud)

我想shared_ptr在后面的代码(最小例子)中使用它:

int main()
{
    boost::shared_ptr<IDirect3D> ptr;

    IDirect3D* p = 0; // initialized somewhere
    ptr.reset( p, boost::mem_fn( &IDirect3D::Release ) );

    return 0;
}
Run Code Online (Sandbox Code Playgroud)

这在大多数情况下都可以正常工作,但如果p等于,则可以使用0.我有以下要删除的删除器:

template<typename T, typename D>
inline void SafeDeleter( T*& p, D d ) 
{ 
    if ( p != NULL ) {
        (p->*d)();
        p = NULL;
    }
}
Run Code Online (Sandbox Code Playgroud)

但是下面的代码给出了很多错误(看起来像转储整个bind.hpp …

c++ boost bind shared-ptr

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

Git文件路径的"快捷方式"?

filepath是否有一些快捷方式,因为一次又一次地编写完整路径非常烦人?

某种正则表达或其他东西.

我知道,我可以使用"Tab"键,但......

更新:

来自Git的Windows和默认sh.exe

回答:

我正在寻找来自holygeek的 Git扩展,但他的版本仅适用于*NIX类似系统或cygwin更新版本的Bash.

这就是原因,为什么我在这里为msysgit =>创建了一些修复

git

8
推荐指数
2
解决办法
2877
查看次数

如何使用 python/distutils 依赖系统命令?

我正在寻找最优雅的方式来通知我的库的用户他们需要一个特定的 unix 命令来确保它可以工作......

什么时候是我的 lib 引发错误的最佳时机:

  • 安装 ?
  • 当我的应用程序调用命令时?
  • 在导入我的 lib 时?
  • 两个都?

以及您应该如何检测命令丢失 ( if not commands.getoutput("which CommandIDependsOn"): raise Exception("you need CommandIDependsOn"))。

我需要建议。

python command packaging distutils

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

在构造函数之后初始化C++ const字段

我想创建一个不可变的数据结构,例如,可以从文件初始化.

class Image {
public:
   const int width,height;
   Image(const char *filename) {
     MetaData md((readDataFromFile(filename)));
     width = md.width();   // Error! width  is const
     height = md.height(); // Error! height is const
   }
};
Run Code Online (Sandbox Code Playgroud)

我能做些什么来解决这个问题

class Image {
   MetaData md;
public:
   const int width,height;
   Image(const char *filename):
     md(readDataFromFile(filename)),
     width(md.width()),height(md.height()) {}
};
Run Code Online (Sandbox Code Playgroud)

然而

  1. 它迫使我将MetaData保存为我对象中的一个字段.我并不总是想要.
  2. 有时构造函数中的逻辑比单个读取要复杂得多(例如,错误处理可能需要几行)

所以我想到的唯一解决方案是沿着这条线

class A {
  int stub;
  int init(){/* constructor logic goes here */}
  A():stub(init)/*now initialize all the const fields you wish
  after the constructor ran */{}
};
Run Code Online (Sandbox Code Playgroud)

有更好的主意吗?(在 …

c++ constructor const

8
推荐指数
4
解决办法
7083
查看次数