问题列表 - 第36979页

如何以不区分大小写的方式在MySQL中搜索

即使我不知道关于案例的确切拼写,我怎样才能搜索用户

SELECT * FROM USER WHERE U.NAME =  'STEVEN';
Run Code Online (Sandbox Code Playgroud)

含义:如果用户的名称为"Steven"或"sTEVEN",我该如何搜索具有此名称的所有人?

我尝试过,但它不起作用.

WHERE email LIKE '%GMAIL%'
Run Code Online (Sandbox Code Playgroud)

案件是小写的时候并没有用.

mysql

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

如何使用GlassFish打印完整的堆栈跟踪?

我有一个GlassFish Web应用程序,它将错误(如下所列)抛出到webbrowser.但我的问题是我看不到完整的堆栈跟踪.我想我必须知道真正的问题是什么.如何更改堆栈跟踪的长度?

javax.ejb.EJBException
 at com.sun.ejb.containers.BaseContainer.processSystemException(BaseContainer.java:5119)
 at com.sun.ejb.containers.BaseContainer.completeNewTx(BaseContainer.java:5017)
 at com.sun.ejb.containers.BaseContainer.postInvokeTx(BaseContainer.java:4805)
 at com.sun.ejb.containers.BaseContainer.postInvoke(BaseContainer.java:2004)
 at com.sun.ejb.containers.BaseContainer.postInvoke(BaseContainer.java:1955)
 at com.sun.ejb.containers.EJBLocalObjectInvocationHandler.invoke(EJBLocalObjectInvocationHandler.java:198)
 at com.sun.ejb.containers.EJBLocalObjectInvocationHandlerDelegate.invoke(EJBLocalObjectInvocationHandlerDelegate.java:84)
 at $Proxy158.findRange(Unknown Source)
 at ejb.__EJB31_Generated__NewEntityFacade__Intf____Bean__.findRange(Unknown Source)
 at jsf.NewEntityController$1.createPageDataModel(NewEntityController.java:56)
 at jsf.NewEntityController.getItems(NewEntityController.java:155)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
 at java.lang.reflect.Method.invoke(Method.java:597)
 at javax.el.BeanELResolver.getValue(BeanELResolver.java:302)
 at javax.el.CompositeELResolver.getValue(CompositeELResolver.java:175)
 at com.sun.faces.el.FacesCompositeELResolver.getValue(FacesCompositeELResolver.java:72)
 at com.sun.el.parser.AstValue.getValue(AstValue.java:116)
 at com.sun.el.parser.AstValue.getValue(AstValue.java:163)
 at com.sun.el.parser.AstEqual.getValue(AstEqual.java:54)
 at com.sun.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:219)
 at com.sun.faces.facelets.el.TagValueExpression.getValue(TagValueExpression.java:102)
 at javax.faces.component.ComponentStateHelper.eval(ComponentStateHelper.java:190)
 at javax.faces.component.UIComponentBase.isRendered(UIComponentBase.java:416)
 at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1607)
 at javax.faces.render.Renderer.encodeChildren(Renderer.java:168)
 at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:848)
 at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1613)
 at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1616)
 at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1616)
 at com.sun.faces.application.view.FaceletViewHandlingStrategy.renderView(FaceletViewHandlingStrategy.java:380)
 at com.sun.faces.application.view.MultiViewHandler.renderView(MultiViewHandler.java:126)
 at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:127)
 at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
 at …
Run Code Online (Sandbox Code Playgroud)

logging glassfish glassfish-3

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

可以使用"打开文件"对话框选择文件夹吗?

"浏览文件夹"Windows对话框非常不方便,因为:

  • 它没有路径框我可以粘贴我想要的路径(例如来自Total Commander)
  • 它始终从桌面开始,一切都关闭

有没有办法使用"打开文件"对话框(更好)选择文件夹?一些旗帜或选项或什么?

上下文:用Python和Qt编写的口径eLibrary管理器.

它目前显示在左侧.我希望它显示在右侧 BrowserFileDialog

甚至更好,作为打开文件对话框: 打开文件对话框

qt openfiledialog

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

如何在__init__中设置python属性

我有一个具有属性的类,我希望将其转换为属性,但此属性设置在其中__init__.不知道应该怎么做.没有设置这个属性__init__很容易,效果很好

import datetime

class STransaction(object):
    """A statement transaction"""
    def __init__(self):
        self._date = None

    @property
    def date(self):
        return self._date

    @date.setter
    def date(self, value):
        d = datetime.datetime.strptime(value, "%d-%b-%y")
        self._date = d

st = STransaction()
st.date = "20-Jan-10"
Run Code Online (Sandbox Code Playgroud)

但是一旦初始化需要发生,__init__它会变得更复杂,我不确定正确的行动方案.

class STransaction(object):
    """A statement transaction"""
    def __init__(self, date):
        self._date = None
Run Code Online (Sandbox Code Playgroud)

奇怪的是,以下似乎工作但闻起来非常糟糕.

class STransaction(object):
    """A statement transaction"""
    def __init__(self, date):
        self._date = None
        self.date = date

    @property
    def date(self):
        return self._date

    @date.setter
    def date(self, value):
        d = datetime.datetime.strptime(value, …
Run Code Online (Sandbox Code Playgroud)

python properties

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

getElementByID().parentNode返回null

出于某种原因,这种情况非常模糊.它有时工作,有时却不工作.同一行代码,对于同一父母下的不同"myid",行 -

document.getElementById("myid").parentNode 返回null.

我很确定元素"myid"不是根元素,它的父元素是需要返回的DIV.我使用的是Firefox 3.6.10版本.

任何人都可以提出任何可能发生这种情况的原因吗?

编辑:这里的"myid"是某种文本框或任何其他控件元素.但是父节点总是DIV.我们添加的任何控件总是包含在DIV下.所以基本上当屏幕上的某些东西刷新时,我们得到父节点并替换innerhtml.innerhtml可以是任何东西.

下面给出的是我的html -

<div style="height: 334px; width: 769px; position: relative;">

    <span style="display: inline-block; height: 13px; width: 61px; position: absolute; left: 393px; top: 84px;" bizappid="System856UserGroupAppPoint156d5elabel300" tabindex="-1" id="System856UserGroupAppPoint156d5elabel300">User Group</span>   

    <input type="text" style="height: 20px; width: 221px; position: absolute; left: 503px; top: 77px;" bizappid="System856UserGroupAppPoint156d5etextBox190" class="formtextbox" tabindex="400" id="System856UserGroupAppPoint156d5etextBox190" readonly="readonly" name="System856UserGroupAppPoint156d5etextBox190">
</div>
Run Code Online (Sandbox Code Playgroud)

在这个Html中,假设我正在获取Span元素的ParentNode,但是我没有为Input文本元素获得相同的parentNode.另外一个奇怪的事情是,我刚刚添加了一个检查,说明getelementbyid是否为null,然后检查其parentNode.然后,如果parentNode不为null,则进一步添加,然后执行刷新操作.现在控件不会进入parentNode not null条件.

javascript

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

Visual Studio 2010项目模板未显示

我尝试编辑项目模板后,通过提取它并在编辑后再次压缩它来从vs2010导出它.但之后它将不会出现在视觉工作室的新项目对话中.

所以我再次尝试了,没有编辑.只需再次提取和压缩.我甚至使用Windows拉链机制,但仍然无法工作.只有导出的模板才能正常工作.

我也试过这里写的:http: //msdn.microsoft.com/en-us/library/ms185298.aspx 无济于事.

那么有没有人告诉我要让它发挥作用的一些神奇的咒语?

visual-studio-2010 project-template

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

数组包含来自另一个数组的任何值?

如果数组包含来自第二个数组的任何元素,那么测试最好,最优雅/最有效的方法是什么?

以下两个例子,试图回答这个问题,"食物"包含来自'奶酪'的任何元素:

cheeses = %w(chedder stilton brie mozzarella feta haloumi reblochon)
foods = %w(pizza feta foods bread biscuits yoghurt bacon)

puts cheeses.collect{|c| foods.include?(c)}.include?(true)

puts (cheeses - foods).size < cheeses.size
Run Code Online (Sandbox Code Playgroud)

ruby arrays

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

NSWindow关闭时退出应用程序

当主(唯一)关闭时,如何正确退出Mac OS X应用程序?

我知道有一种方法- (void)windowWillClose:(NSNotification *)notificationNSWindowDelegate.但它在我的情况下不太合适,因为它 NSWindow关闭之前被调用.

macos nswindow

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

Android:拦截来自WebView的AJAX调用

我想要一个HTML/javascript应用程序,在a中运行WebView以进行AJAXJava代码处理的调用.
理想的做法是拦截调用(简单,只是使用shouldOverrideUrlLoading())并"返回"一些数据.
但是,WebView除了使用javascript函数调用函数之外,我找不到"返回"响应的方法loadUrl().
这对我不起作用,因为该HTML/javascript应用程序是我无法控制的插入式应用程序.就HTML/javascript应用程序而言,它只是进行AJAX调用并接收一些数据.

有什么想法吗?

ajax android webview

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

Android模拟器Mac OSX位置

Android模拟器在哪里保存其所有数据?

在SDK文件夹或其他地方?

macos android osx-snow-leopard android-virtual-device

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