我安装了XAMPP v3.2.1,因为我想学习如何在MySQL中创建数据库并了解有关TOMCAT的更多信息.但是,我对现在该做什么感到有点困惑.我在这个页面上阅读了很多博客和文档http://dev.mysql.com/doc/refman/5.0/en/creating-database.html.
按照我发现的指示:我无法访问我的本地主机.
尝试解决方案:我关闭了Skype,因为我读到这可能是一个问题.我的计算机上没有任何旧版本的XAMPP,我不相信我连接到任何其他服务器.所以,我没有做任何事情的许可.
要么
我是否试图通过错误的命令提示符访问mysql?我试图从XAMPP shell使用MySQL.我不知道为什么我不能让一切都运转起来.我是以错误的方式来做这件事的吗?
谢谢你的帮助
我需要从ble传感器获取友好的设备名称.我想查找设备并告诉用户他们已连接到"我的家庭传感器".我可以找到该设备,但我不知道如何找到该数据.
在常规蓝牙中,我相信我可以使用BLUETOOTH_DEVICE_INFO或winsock.是否有蓝牙的低能耗相当于蓝牙的BLUETOOTH_DEVICE_INFO?如果可能的话,请您提供一个如何获取信息(即设备名称)的示例?
我正在使用Windows 8.1,c ++和visual studio 2013.我一直在引用windows dev docs,但我还没有找到任何有用的东西.
谢谢!
所以我在python中有一个字典,其中我有一个数字用于键,其值为attatched.
myDictionary = {"0" :0, "1":0, "2":0, "3":0, "4":0, "5":0, "6":12, "7":0,"8":0,"9":0,"10":0,"11":0, "12":0,"13":12}
Run Code Online (Sandbox Code Playgroud)
我运行的doctest说:
>>> myDictionary = {"0" :0, "1":0, "2":0, "3":0, "4":0, "5":0, "6":12, "7":0,"8":0,"9":0,"10":0,"11":0, "12":0,"13":12}
>>> new_Val = 0
>>> method0 = WordClass (new_Val, myDictionary)
True
Run Code Online (Sandbox Code Playgroud)
我正在做一些调试广告,打印出我的字典,以确保我在字典中查看正确的值.当我打印出来时,它看起来像这样:
{'11': 4, '10': 4, '13': 0, '12': 4, '1': 4, '0': 4, '3': 4, '2': 4, '5': 4, '4': 4, '7': 4, '6': 0, '9': 4, '8': 4}
Run Code Online (Sandbox Code Playgroud)
它们全都乱了.默认情况下,python在存储内存时会这样做吗?如果是这样,我可以在某处查看某些文档吗?
谢谢
我在从骆驼中的 bean 获取返回值并在我的路线中使用它时遇到了一些麻烦。
我有一条看起来像这样的路线:
from(file:test/?delete=true)
.unmarshal(jaxb)
.bean(testBean, "testMethod")
.to(direct:nextRoute);
Run Code Online (Sandbox Code Playgroud)
该豆看起来像这样:
public void testBean (PojoName pojoInstance){
//do stuff
int i= 75; //a number I generate within the bean after I've started this method
}
Run Code Online (Sandbox Code Playgroud)
我想使用我在 bean 内部和路线中生成的数字。像这样的东西:
from(file:test/?delete=true)
.unmarshal(jaxb)
.bean(testBean, "testMethod")
.log(integer generated from testBean)
.to(direct:nextRoute);
Run Code Online (Sandbox Code Playgroud)
我尝试过的:
因此,我没有在 bean 中返回 void,而是将返回类型更改为 int 并返回整数。然后,我希望在我的路线中做这样的事情:
.log("${body.intFromBean}")
Run Code Online (Sandbox Code Playgroud)
我的想法是,一旦我从 bean 返回值,它应该将该值存储在交换体中(至少这是我从 Camel 文档中得到的)。然后,我可以在我的路线中访问它。
问题:
但是,当我将 testBean 返回类型更改为 int 时,出现以下错误:
org.apache.camel.CamelExecutionException: Execution occurred during execution on the exchange
Caused by: org.apache.camel.InvalidPayloadException: No body available of type: …Run Code Online (Sandbox Code Playgroud) 我在动态路由概念和消费者规则方面有点挣扎。
因此,假设我有一条包含交换数据的路由,然后我想在“from”端点的不同路由中使用来自交换的标头。
我认为它看起来像这样:
路线一:
from("file:/dir1")
...
.to ("direct:start");
Run Code Online (Sandbox Code Playgroud)
路线2:
from("direct: start")//get the old exchange data
.from("file:/dir1/?fileName=${header.myHeader}")//start consuming from a different endpoint using old exchange data
...
.to("direct: end);
Run Code Online (Sandbox Code Playgroud)
所以这些步骤对我来说似乎是正确的,但我觉得我有点污染了交易所。
对我来说,我使用动态路由,但同时也创建了一个新的消费者。这意味着我正在创建一个新的交易所,对吗?那么,camel 如何知道在其余路线中选择和使用哪个交换?
起初我认为它可能将它们组合在一起,但我做了更多的挖掘,发现你实际上需要使用“丰富”来添加到现有的交换中。
有人可以解释骆驼如何处理这种情况吗?如果你有一个例子,那也很棒。我在骆驼包中搜索了一个,但没有成功。
我想遍历元素((a,b),(x,y)),所以我尝试了:
def method(tuple):
((a,b),(x,y))= tuple
for element in tuple:
.....
Run Code Online (Sandbox Code Playgroud)
但是随后我阅读了另一个stackoverflow页面,其中提出了类似以下内容:
def method(tuple):
((a,b),(x,y))= tuple
for element in tuple[0:4]:
.....
Run Code Online (Sandbox Code Playgroud)
两者均导致错误:ValueError:需要多个值才能解压。
是python不允许执行此操作,还是我有语法问题?我也检查了python文档。
感谢您的任何建议。
编辑
map = ((1,0),(3,2))
def count(map):
((a,b),(x,y))= tuple
inc=0
for element in tuple:
inc+=1
Run Code Online (Sandbox Code Playgroud)