小编kos*_*osa的帖子

为iOS编译Qt(UIKit灯塔)

我一直在尝试为iOS编译Qt,但是我遇到了一些其他人似乎没有的疯狂问题(至少根据我过去读过的内容).

我按照本文的说明操作:文章网址

  1. 我从git克隆了最新的Qt 4.8: $ git clone git://gitorious.org/qt/qt.git
  2. 我制作了qt-lighthouse-ios-simulator文件夹,cd给它.
  3. 我从文章中运行了很长的代码: $ ../qt/configure -qpa -xplatform qpa/macx-iphonesimulator-g++ -arch i386 -developer-build -release -opengl es2 -no-accessibility -no-qt3support -no-multimedia -no-phonon-backend -no-svg -no-webkit -no-scripttools -no-openssl -no-sql-mysql -no-sql-odbc -no-cups -no-iconv -no-dbus -static -nomake tools -nomake demos -nomake docs -nomake examples -nomake translations
  4. opensource许可证
  5. yes 我接受此协议

我收到这些错误:

In file included from /System/Library/Frameworks/ApplicationServices.framework/Frameworks/HIServices.framework/Headers/Accessibility.h:13, from /System/Library/Frameworks/ApplicationServices.framework/Frameworks/HIServices.framework/Headers/HIServices.h:49, from /System/Library/Frameworks/ApplicationServices.framework/Headers/ApplicationServices.h:34, from generators/mac/pbuilder_pbx.cpp:56: /System/Library/Frameworks/ApplicationServices.framework/Frameworks/HIServices.framework/Headers/AXUIElement.h:65: error: CGCharCode has not been declared /System/Library/Frameworks/ApplicationServices.framework/Frameworks/HIServices.framework/Headers/AXUIElement.h:65: error: CGKeyCode has not been declared

在努力解决这个问题之后,在这里和那里搜索,找不到任何有用的东西(甚至没有关于CGKeyCode或CGCharCode实际上是什么,我决定"破解"它并且只是将定义添加到pbuilder_pbx.cpp:

typedef …

qt uikit lighthouse ios

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

什么是android中的init.rc语言?

我需要了解init.rc的格式

在init.rc中有如此manny服务.其中之一是

service bootanim /system/bin/bootanimation
    user graphics
    group graphics
    disabled
    oneshot 
Run Code Online (Sandbox Code Playgroud)

这里有什么意思disabled, oneshot为什么这一切都在这里?

我已经参考了这篇文章,但没有得到这么多.

c android

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

Richfaces没有定义javascript错误

当我尝试调用Richfaces.showModalPanel('id')时,我得到的Richfaces没有定义javascript错误,也没有发生任何事情.

在我的示例应用程序中,我有两个页面,一个是主视图,另一个页面是子视图.子视图使用上面的调用在主视图中调用popupPanel.我不确定是什么问题.任何指针将不胜感激.

这是我的页面:

第一页:

<!DOCTYPE html>
<html lang="en"
      xmlns="http://www.w3.org/1999/xhtml"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:rich="http://richfaces.org/rich"
      xmlns:c="http://java.sun.com/jsp/jstl/core"
      xmlns:richext="http://java.sun.com/jsf/composite/richext">
    <h:head>
        <title>Page Title</title>

    </h:head>
    <h:body>

     <ui:include id="nextPageInclude" src="secondpage.xhtml"/>   
    <rich:popupPanel id="logoutDialogId"
                 width="300"
                 height="50"
                 autosized="true"
                 resizeable="false"
                 moveable="true"
                 modal="true"
                 style="border:5px solid #5e81ac; background-color:#dce3ed;">

        <h:outputText value="Inside logout window"/>
    </rich:popupPanel>

    </h:body>
</html>
Run Code Online (Sandbox Code Playgroud)

第二页:

<ui:composition xmlns="http://www.w3.org/1999/xhtml"
    xmlns:ui="http://java.sun.com/jsf/facelets"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:f="http://java.sun.com/jsf/core"
    xmlns:a4j="http://richfaces.org/a4j"
    xmlns:rich="http://richfaces.org/rich">
    <h:head/>
    <a4j:outputPanel id='headerLinks' layout="block">
        <ul id="sddm">
            <li>
            </li>
            <li>
            </li>
            <li>
                <a4j:commandLink id="logoutLinkId"
                                 value="Logout"
                                 onclick="Richfaces.showPopupPanel('logoutDialogId')"
                                 styleClass="linkLogout"/></li>

        </ul>
        <div style="clear:both"></div>
    </a4j:outputPanel>
</ui:composition>
Run Code Online (Sandbox Code Playgroud)

编辑:附加加载JS截图

在此输入图像描述

谢谢,

richfaces facelets jsf-2

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

如何只使用一次方法调用重置所有对象值?

基本上,我想创建Counter对象,他们所要做的只是保持数字值.在我的resetCounters方法中,我想重置每个对象的值.这可能很容易,但我是个新手.

public class Counter
{
    Random number = new Random();

    Counter()
    {
        Random number = new Random();
    }

    public Random getNumber()
    {
        return number;
    }

    public void setNumber(Random number)
    {
        this.number = number;
    }

    public static void main(String[] args) 
    {
        Counter counter1 = new Counter();
        Counter counter2 = new Counter();
        Counter counter3 = new Counter();
        Counter counter4 = new Counter();
        Counter counter5 = new Counter();

    }

    public static void resetCounters()
    {

    }
    }
Run Code Online (Sandbox Code Playgroud)

java

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

解雇模态segue

我想了解模式VS推赛格瑞读几Q&A像这个这个.我对这些答案感到困惑的一点是"主持人应该解雇它所提出的VC."

例如,我正在编写的示例显示UIPageViewController类似于此处提供的示例,页面底部有一个名称为"Skip"的按钮.

在故事板中我创建了一个segue(类型为Modal)从"Skip"按钮到另一个"View Controller"(让我们说LoginViewController),但是我需要在哪里解雇UIPageViewContoller(如果需要的话)以及如何?

编辑: 经过一点点阅读,似乎UIPageViewController(其中有Skip按钮)应该照顾解雇LoginViewController(因为UIPageViewController是演示者).

在我的情况下,登录完成后,我想导航到"菜单"页面,然后我怎么能要求UIPageViewController关闭"LoginViewController"并移动到MenuController?我找不到任何关于它是如何工作的例子.任何帮助将不胜感激!

iphone xcode objective-c uiviewcontroller ios7

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

如何获取 JSON 路径?

给定一个示例 JSON:

{
  "hello" : "wolrd",
  "arrayField" : ["one", "two", "three"],
  "mapField" : {
    "name" : "john",
    "lastName" : "doe" 
  }
}
Run Code Online (Sandbox Code Playgroud)

Java 中是否有框架可以帮助我从 JSON 树中获取 JSON 路径结构?类似的东西:

$.hello
$.arrayField[0]
$.arrayField[1]
$.arrayField[2]
$.mapField.name
$.mapField.lastName
Run Code Online (Sandbox Code Playgroud)

编辑:

我已经使用fasterxml 的Jackson 编写了第一种方法。但我想知道是否有更强大/灵活的东西。

   final JsonNode rootNode = mapper.readValue(jon, JsonNode.class);
    printFieldKeys(rootNode, "$");

    private static void printFieldKeys(JsonNode rootNode, String parent) {
        final Iterator<Entry<String, JsonNode>> fieldIt = rootNode.fields();
        while (fieldIt.hasNext()) {
            final Entry<String, JsonNode> next = fieldIt.next();
            final JsonNode value = next.getValue();
            final String path = parent + …
Run Code Online (Sandbox Code Playgroud)

java json

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

在MVVM模式之后处理WPF应用程序中的导航的最佳方法是什么?

我已经在.xaml文件后面的事件处理程序中看到了这一点,但是它似乎不会遵循MVVM模式:MainApplication.mainFrame.Navigate(new HomePage());.是否有更好的方法可以在ViewModel中使用MVVM模式处理导航?还是在XAML?

navigation wpf mvvm

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

对字节添加和赋值的有趣观察

今天在帮助某人的过程中,我遇到了一个有趣的问题,我无法理解其中的原因.使用+ =时我们不需要显式转换,但是当我们使用i + i时,我们需要显式转换.找不到确切的原因.任何输入将不胜感激.

public class Test{
       byte c = 2;
       byte d = 5;

       public  void test(String args[])
       {
           c += 2;
           d = (byte) (d + 3);   
       }
    }
Run Code Online (Sandbox Code Playgroud)

java casting

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

Car.class - 是"类"变量吗?

Class c1 = Car.class;这是什么.class?它是一个存在于每个类中的公共变量吗?

java

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

我们是否需要关闭ExecutorService fixedThreadPool

ExecutorService在我的应用程序中使用下面的代码创建了threadpool ,用于调用供应商websrvice.

  ExecutorService executor = Executors.newFixedThreadPool(getThreadPoolSize());
    for (int i = 0; i < list.size(); i++) {
                    Request ecpReq = list.get(i);           
                    thRespLst.add(executor.submit(new Task(ecpReq)));
                }
Run Code Online (Sandbox Code Playgroud)

想要知道我们需要关注线程池或其他东西,基本上我不想在生产环境中挂线程.

java executorservice threadpoolexecutor

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