问题列表 - 第21246页

如何将数字从基数8转换为10?

我知道75(base8)= 61(base10),但我不能轻易找到这个公式.如何从基数8转换为基数10?

math radix

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

如何使用本机Win32 API从焦点窗口中获取所选文本?

我的应用.将在系统上运行,尝试监控热键; 当用户在任何窗口中选择一些文本并按下热键时,当我收到WM_HOTKEY消息时,如何获取所选文本?

为了将文本捕获到剪贴板,我尝试使用和向活动窗口()和forground window()发送Ctrl + C ; 尝试过这些组合; 一切都是徒劳.我可以使用普通的Win32系统API在Windows中获取焦点窗口的选定文本吗?keybd_event()SendInput()GetActiveWindow()GetForegroundWindow()

c windows clipboard winapi selection

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

在Google App Engine Python API中获取原始发布数据

我正在尝试使用self.request.get('content')将原始数据作为帖子发送到Google App引擎,但是徒劳无功.它返回空.我确信数据是从客户端发送的,因为我检查了另一个简单的服务器代码.

知道我做错了什么吗?我在客户端使用以下代码生成POST调用(objective-c/cocoa-touch)

NSMutableArray *array = [[NSMutableArray alloc] init];
    NSMutableDictionary *diction = [[NSMutableDictionary alloc] init];
    NSString *tempcurrentQuestion = [[NSString alloc] initWithFormat:@"%d", (questionNo+1)];
    NSString *tempansweredOption = [[NSString alloc] initWithFormat:@"%d", (answeredOption)];       

    [diction setValue:tempcurrentQuestion forKey:@"questionNo"];
    [diction setValue:tempansweredOption forKey:@"answeredOption"];
    [diction setValue:country forKey:@"country"];

    [array addObject:diction];
    NSString *post1 = [[CJSONSerializer serializer] serializeObject:array];


    NSString *post = [NSString stringWithFormat:@"json=%@", post1];
    NSData *postData = [post dataUsingEncoding:NSASCIIStringEncoding allowLossyConversion:YES];  
    NSLog(@"Length: %d", [postData length]);

    NSString *postLength = [NSString stringWithFormat:@"%d", [postData length]];  

    NSMutableURLRequest *request = [[[NSMutableURLRequest alloc] init] autorelease];  
    [request setURL:[NSURL URLWithString:@"http://localhost:8080/userResult/"]];  
    [request …
Run Code Online (Sandbox Code Playgroud)

python iphone post google-app-engine request

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

如何在Visual Studio 2008或Visual Studio 2010中设置JavaScript断点

我正在尝试使用Visual Studio 2010调试JavaScript代码,但我无法设置断点.

我怎样才能做到这一点?

我只是注意到了一些东西,每当我尝试调用一个函数时,无论函数是什么,在JavaScript中,jQuery和Microsoft的Ajax框架JavaScript都会捕获它并检查文档是否准备好(document.onready或其他)并且永远不会将控件返回给功能我正在打电话!为什么它这样做呢?我从来没有要求它!

我所有的都是对这些库,脚本/链接引用的引用,就像在母版页的顶部一样.

这太荒谬了,我该如何解决?

.net javascript c# vb.net asp.net

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

powershell中的条件执行(&&和||)

已经有问题解决我的问题(我可以让&&在Powershell中工作吗?),但有一点不同.我需要两个命令的OUTPUT.看,如果我只是运行:

(command1 -arg1 -arg2) -and (command2 -arg1)
Run Code Online (Sandbox Code Playgroud)

我不会看到任何输出,而是stderr消息.正如所料,只需输入:

command1 -arg1 -arg2 -and command2 -arg1 
Run Code Online (Sandbox Code Playgroud)

给出语法错误.

syntax powershell command-execution

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

如何组织具有多个模块和共享服务器的GWT项目?

我有三个GWT模块,它们有一些共同的代码 - 通常是域类 - 并且还共享相同的服务器实例.我的第一个想法是像这样组织它:

app1/client/
app2/client/
app3/client/
server/
shared/

然后,这些模块将在其描述符中包含:

<source path = "client"/>
<source path = "../shared"/>

但似乎../shared路径不起作用.

这是要走的路,还是有更好的方法?

gwt module

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

这个Java代码有什么问题?为什么我不能放入HashMap?

class{
    public HashMap<String, String> eachperson;  

    apple(){
        this.eachperson.put("thekey","thevalue");
    }
}
Run Code Online (Sandbox Code Playgroud)

(请原谅班级和职能面前的公众/私人.我只是想知道我是否正确地使用哈希地图.)

有关真实代码,请参阅以下内容:

class ParsedDataSet{
    public HashMap<String, String> eachperson;      
    public List<HashMap<String,String>> peoplelist = new ArrayList<HashMap<String,String>>();
}

class ListprofileHandler extends DefaultHandler{
    private boolean in_results = true;
    private boolean in_item = false;
    private boolean in_first_name = false;
    private boolean in_last_name = false;
    private boolean in_picture_url = false;
    private boolean in_enditem_dummy = false;
    private ParsedDataSet dset = new ParsedDataSet();
    public void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException {
        if(localName.equals("results")){
            this.in_results = …
Run Code Online (Sandbox Code Playgroud)

java hashmap

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

如何在Linux中检测系统时间的变化?

当时间服务器中的系统时间有更新或由于DST更改时,是否有办法得到通知?我正在执行API /系统调用或等效操作。

我的工作之一是在不使用SQL的情况下,将类似于SQL NOW()的值的生成优化为一个小时的粒度。

c++ linux timezone ntp dst

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

如何创建一个调整为列出项目高度的方形按钮?

在Listview中,我想创建一个与列表项一样宽的方形按钮.我不想设置固定的宽度和高度,因为它应该适用于不同的分辨率.

有可能吗?

android android-button

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

如何保护swf文件不被反编译?

我正在使用Flex框架开展重要项目,我希望保持我的算法和代码保密.是否有可能以某种方式保护swf文件不被反编译?我不希望有人使用Flash反编译器提取我的代码.

谢谢.

flash actionscript flex3

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