问:
Thread sequencing with Java 8
I have a simple program for two threads to print, incremental numbers, alternately.

So,
first thread prints : 1

Second thread prints : 2

first thread prints : 3... and so on

I am able to use 'Thread' class to do this. But I want to see how to use Executor class to do this.

With the following code .... executor class does NOT seem to work. Any pointers ??

Code :

```<code>import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.locks.Condition;
import java.util.concurrent.locks.Lock;
import java.util.concurrent.locks.ReentrantLock;

public class LocksPackagePractice {

    private int i = 0;

    ReentrantLock lock = new ReentrantLock();
    Condition condition = lock.newCondition();

    Runnable r = () -> {
    for(int x = 0; x < 5; x++){
        printValue();
    }
    printValue();
};

    public static void main(String[] args) {

        new LocksPackagePractice().trigger();
    }

    void trigger(){
        ExecutorService service = Executors.newFixedThreadPool(2);
        service.execute(r);
    }

    void printValue(){

        lock.lock();

        try {

            i++;
            System.out.println(Thread.currentThread().getName() + " and value is = " + i);

            condition.signal();
            condition.await();

        } catch(InterruptedException e){
            e.printStackTrace();
        }finally {
            lock.unlock();
        }

    }
}
</code>```

答:
Made some changes in your program. Run it and check if it solves the confusion.

```<code>public class LocksPackagePractice {
    private int i = 0;
    ReentrantLock lock = new ReentrantLock();
    Condition condition = lock.newCondition();
    Runnable r = () -> {
        printValue();
    };
    public static void main(String[] args) {
        new LocksPackagePractice().trigger();
    }
    void trigger() {
        ExecutorService service = Executors.newFixedThreadPool(2);
        service.submit(r);
        for (int i = 0; i < 5; i++) {
            service.execute(r);
        }
    }
    void printValue() {
        lock.lock();
        try {
            i++;
            System.out.println(Thread.currentThread().getName() + " and value is = " + i);
            condition.signal();
            condition.await();
        } catch (Exception e) {
            e.printStackTrace();
        } finally {
            lock.unlock();
        }
    }
}
</code>```

This will give you following output

```<code>pool-1-thread-1 and value is = 1
pool-1-thread-2 and value is = 2
pool-1-thread-1 and value is = 3
pool-1-thread-2 and value is = 4
pool-1-thread-1 and value is = 5
pool-1-thread-2 and value is = 6
</code>```

Title: Thread sequencing with Java 8

Body:
I have a simple program for two threads to print, incremental numbers, alternately.

So,
first thread prints : 1

Second thread prints : 2

first thread prints : 3... and so on

I am able to use 'Thread' class to do this. But I want to see how to use Executor class to do this.

With the following code .... executor class does NOT seem to work. Any pointers ??

Code :

import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.locks.Condition;
import java.util.concurrent.locks.Lock;
import java.util.concurrent.locks.ReentrantLock;

public class LocksPackagePractice {

    private int i = 0;

    ReentrantLock lock = new ReentrantLock();
    Condition condition = lock.newCondition();

    Runnable r = () -> {
    for(int x = 0; x < 5; x++){
        printValue();
    }
    printValue();
};

    public static void main(String[] args) {

        new LocksPackagePractice().trigger();
    }

    void trigger(){
        ExecutorService service = Executors.newFixedThreadPool(2);
        service.execute(r);
    }

    void printValue(){

        lock.lock();

        try {

            i++;
            System.out.println(Thread.currentThread().getName() + " and value is = " + i);

            condition.signal();
            condition.await();

        } catch(InterruptedException e){
            e.printStackTrace();
        }finally {
            lock.unlock();
        }

    }
}

Body:
Made some changes in your program. Run it and check if it solves the confusion.

public class LocksPackagePractice {
    private int i = 0;
    ReentrantLock lock = new ReentrantLock();
    Condition condition = lock.newCondition();
    Runnable r = () -> {
        printValue();
    };
    public static void main(String[] args) {
        new LocksPackagePractice().trigger();
    }
    void trigger() {
        ExecutorService service = Executors.newFixedThreadPool(2);
        service.submit(r);
        for (int i = 0; i < 5; i++) {
            service.execute(r);
        }
    }
    void printValue() {
        lock.lock();
        try {
            i++;
            System.out.println(Thread.currentThread().getName() + " and value is = " + i);
            condition.signal();
            condition.await();
        } catch (Exception e) {
            e.printStackTrace();
        } finally {
            lock.unlock();
        }
    }
}

This will give you following output

pool-1-thread-1 and value is = 1
pool-1-thread-2 and value is = 2
pool-1-thread-1 and value is = 3
pool-1-thread-2 and value is = 4
pool-1-thread-1 and value is = 5
pool-1-thread-2 and value is = 6


来源: stackexchange

问:
QtCreator, subproject linker error
I have a rather large application I need to build/maintain so I decided to use googletest and for convenience wanted to structure the test and the application code as subprojects. I created a superproject with the following structure:

```<code>SuperProject
- SuperProject.pro
- defaults.pri
- Application
  -- Application.pro
  -- Sources
  -- main.cpp
  -- Headers
- Tests
  -- Tests.pro
  -- main.cpp
  -- Sources
  -- Headers
</code>```

With superproject.pro

```<code>TEMPLATE = subdirs
CONFIG += ordered
SUBDIRS += \
    Application \
    Tests \
OTHER_FILES += \
    defaults.pri
</code>```

With defaults.pri

```<code>INCLUDEPATH += $$PWD/Application
</code>```

And Tests.pro

```<code>include(gtest_dependency.pri)
include(../defaults.pri)

TEMPLATE = app
QT += core
CONFIG += console c++11
CONFIG -= app_bundle
CONFIG += thread

HEADERS +=     tst_redoundo.h
SOURCES +=     main.cpp
</code>```

And Application.pro

```<code>include(ExcelLib/qtxlsx.pri)
include(../defaults.pri)

TEMPLATE = app
QT += qml quick

CONFIG += c++14

static { # everything below takes effect with CONFIG ''= static
 CONFIG+= static
 CONFIG += staticlib # this is needed if you create a static library, not a static executable
 DEFINES+= STATIC
 message("~~~ static build ~~~") # this is for information, that the static build is done
 win32: TARGET = $$join(TARGET,,,s) #this adds an s in the end, so you can seperate static build from

}

RC_ICONS += msiconbmp.ico

SOURCES += ..omitted

RESOURCES += qml.qrc

# Additional import path used to resolve QML modules in Qt Creator's code model
QML_IMPORT_PATH =

# Additional import path used to resolve QML modules just for Qt Quick Designer
QML_DESIGNER_IMPORT_PATH =

# The following define makes your compiler emit warnings if you use
# any feature of Qt which as been marked deprecated (the exact warnings
# depend on your compiler). Please consult the documentation of the
# deprecated API in order to know how to port your code away from it.
DEFINES += QT_DEPRECATED_WARNINGS

# You can also make your code fail to compile if you use deprecated APIs.
# In order to do so, uncomment the following line.
# You can also select to disable deprecated APIs only up to a certain version of Qt.
#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000    # disables all the APIs deprecated before Qt 6.0.0

# Default rules for deployment.
qnx: target.path = /tmp/$${TARGET}/bin
else: unix:!android: target.path = /opt/$${TARGET}/bin
!isEmpty(target.path): INSTALLS += target

DISTFILES += *.pri

HEADERS += ..omitted
</code>```

:w

Application compiles and runs fine by its own, so does the test code. But as soon as I try to include anything from Application like so

```<code>#include "util.h"
#include "tst_redoundo.h"
#include <gtest/gtest.h>

int main(int argc, char *argv[])
{

    Util u;
    ::testing::InitGoogleTest(&argc, argv);
    return RUN_ALL_TESTS();
}
</code>```

The code compiles but won't link with undefined reference to Util constructor. Most of the guides with the same setup as mine assumes that the template of what the test code links against is TEMPLATE = lib but I cannot change the template from app to lib for Application. How do I get the linker to link against Application?

答:
First thing, I can't see anywhere that you linked the gtest library in your test subproject. The command to add is LIBS += -lgtest

More generally, you have only two options. Either you compile your main project as a lib that you then link to your testing subproject, or you have to include in the testing all of your .cpp files. In any case, since it's a separate project, your testing project has no knowledge of your other (sub)projects.

I hope this will point you towards the right answer

ContentLicense: CC BY-SA 3.0

Title: QtCreator, subproject linker error

Body:
I have a rather large application I need to build/maintain so I decided to use googletest and for convenience wanted to structure the test and the application code as subprojects. I created a superproject with the following structure:

SuperProject
- SuperProject.pro
- defaults.pri
- Application
  -- Application.pro
  -- Sources
  -- main.cpp
  -- Headers
- Tests
  -- Tests.pro
  -- main.cpp
  -- Sources
  -- Headers

With superproject.pro

TEMPLATE = subdirs
CONFIG += ordered
SUBDIRS += \
    Application \
    Tests \
OTHER_FILES += \
    defaults.pri

With defaults.pri

INCLUDEPATH += $$PWD/Application

And Tests.pro

include(gtest_dependency.pri)
include(../defaults.pri)

TEMPLATE = app
QT += core
CONFIG += console c++11
CONFIG -= app_bundle
CONFIG += thread

HEADERS +=     tst_redoundo.h
SOURCES +=     main.cpp

And Application.pro

include(ExcelLib/qtxlsx.pri)
include(../defaults.pri)

TEMPLATE = app
QT += qml quick

CONFIG += c++14

static { # everything below takes effect with CONFIG ''= static
 CONFIG+= static
 CONFIG += staticlib # this is needed if you create a static library, not a static executable
 DEFINES+= STATIC
 message("~~~ static build ~~~") # this is for information, that the static build is done
 win32: TARGET = $$join(TARGET,,,s) #this adds an s in the end, so you can seperate static build from

}

RC_ICONS += msiconbmp.ico

SOURCES += ..omitted

RESOURCES += qml.qrc

# Additional import path used to resolve QML modules in Qt Creator's code model
QML_IMPORT_PATH =

# Additional import path used to resolve QML modules just for Qt Quick Designer
QML_DESIGNER_IMPORT_PATH =

# The following define makes your compiler emit warnings if you use
# any feature of Qt which as been marked deprecated (the exact warnings
# depend on your compiler). Please consult the documentation of the
# deprecated API in order to know how to port your code away from it.
DEFINES += QT_DEPRECATED_WARNINGS

# You can also make your code fail to compile if you use deprecated APIs.
# In order to do so, uncomment the following line.
# You can also select to disable deprecated APIs only up to a certain version of Qt.
#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000    # disables all the APIs deprecated before Qt 6.0.0

# Default rules for deployment.
qnx: target.path = /tmp/$${TARGET}/bin
else: unix:!android: target.path = /opt/$${TARGET}/bin
!isEmpty(target.path): INSTALLS += target

DISTFILES += *.pri

HEADERS += ..omitted

:w

Application compiles and runs fine by its own, so does the test code. But as soon as I try to include anything from Application like so

#include "util.h"
#include "tst_redoundo.h"
#include <gtest/gtest.h>

int main(int argc, char *argv[])
{

    Util u;
    ::testing::InitGoogleTest(&argc, argv);
    return RUN_ALL_TESTS();
}

The code compiles but won't link with undefined reference to Util constructor. Most of the guides with the same setup as mine assumes that the template of what the test code links against is TEMPLATE = lib but I cannot change the template from app to lib for Application. How do I get the linker to link against Application?


问:
How to set Plotly to replace the default lists to iplot with specific colors and widths?
I can specify lists of colors and widths to plot in matplotlib, for illustration:

```<code>import matplotlib.pyplot as plt
import matplotlib._color_data as mcd

cXJO = mcd.XKCD_COLORS["xkcd:black"]
cXDJ = mcd.XKCD_COLORS["xkcd:fuchsia"]
cXEJ = mcd.XKCD_COLORS["xkcd:green"]

lineColor = (cXJO, cXDJ, cXEJ)
lineType = (3, 2, 1)

for i in range(plotList):
    ax.plot(index, df[i], color=lineColor[i], linewidth=lineType[i])
</code>```

I need to present the same colors and lines by iPlot in Plotly for interative media sharing. Possible to do the same as simply as matplotlib per attached chart?

答:
Good examples in Plotly that may be relevant for reference:

https://plot.ly/python/line-charts/

Body:
I can specify lists of colors and widths to plot in matplotlib, for illustration:

import matplotlib.pyplot as plt
import matplotlib._color_data as mcd

cXJO = mcd.XKCD_COLORS["xkcd:black"]
cXDJ = mcd.XKCD_COLORS["xkcd:fuchsia"]
cXEJ = mcd.XKCD_COLORS["xkcd:green"]

lineColor = (cXJO, cXDJ, cXEJ)
lineType = (3, 2, 1)

for i in range(plotList):
    ax.plot(index, df[i], color=lineColor[i], linewidth=lineType[i])

I need to present the same colors and lines by iPlot in Plotly for interative media sharing. Possible to do the same as simply as matplotlib per attached chart?


问:
Read bunch of tags in SAX in QT
I'm using a QXMLSimpleReader to parse through an XML file via SAX.

I know this goes against the principle of SAX, but is there a neat way to grab the content of a parent tag without having to reassemble it manually ?

For example, given the following XML example (not real):

```<code><record>
  <person level="manager">
    <personal>
      <male/>
      <birthday>2010-12-13T20:00</birthday>
      <promotions>2</promotions>
      <salary high="200000"/>
    </personal>
  </person>
</record>
</code>```

I would like to grab a string containing all of the personal tag, i.e.

```<code><male/>
<birthday>2010-12-13T20:00</birthday>
<promotions>2</promotions>
<salary high="200000"/>
</code>```

The thing is, SAX automatically splits everything up into atomic tags so the personal tag parses as empty.

Solutions ideally for QT 2.3 please!

答:
One way to do this would by to set a flag in QXmlContentHandler::startElement if the localName is "personal" and reset it in the corresponding endElement. If the flag is set you have to write out all *startElement*s including all attributes, all *character*s and all *endElement*s.

The easier way would be forget about xml and put the xml content in a QString and extract the interesting section using QString::indexOf and QString::mid.

ContentLicense: CC BY-SA 2.5

Title: Read bunch of tags in SAX in QT

Body:
I'm using a QXMLSimpleReader to parse through an XML file via SAX.

I know this goes against the principle of SAX, but is there a neat way to grab the content of a parent tag without having to reassemble it manually ?

For example, given the following XML example (not real):

<record>
  <person level="manager">
    <personal>
      <male/>
      <birthday>2010-12-13T20:00</birthday>
      <promotions>2</promotions>
      <salary high="200000"/>
    </personal>
  </person>
</record>

I would like to grab a string containing all of the personal tag, i.e.

<male/>
<birthday>2010-12-13T20:00</birthday>
<promotions>2</promotions>
<salary high="200000"/>

The thing is, SAX automatically splits everything up into atomic tags so the personal tag parses as empty.

Solutions ideally for QT 2.3 please!


问:
Is there a way to tell mercurial 'delete all files that are deleted in local' during a merge?
I've been assigned the task to do a huge merge, ~1500 commits, on a mercurial project.

In the local fork we have deleted about ~200 files, right now I need to press d and enter for each file:

```<code>remote changed file/that/is/deleted/in/local which local deleted
use (c)hanged version or leave (d)eleted?
</code>```

Is there a way to tell mercurial to choose to delete all those files?

答:
since you are on windows, try using tortoise
https://tortoisehg.bitbucket.io/

add your project. then your working directory, you will be able to see the files affected, you can then

Body:
I've been assigned the task to do a huge merge, ~1500 commits, on a mercurial project.

In the local fork we have deleted about ~200 files, right now I need to press d and enter for each file:

remote changed file/that/is/deleted/in/local which local deleted
use (c)hanged version or leave (d)eleted?

Is there a way to tell mercurial to choose to delete all those files?


问:
Typescript Error: Property 'user' does not exist on type 'Request'
I have the following piece of code in my express app

```<code>router.get('/auth/userInfo', this.validateUser,  (req, res) => {
    res.json(req.user);
});
</code>```

and my IDE seems to be complaining with the error

error TS2339: Property 'user' does not exist on type 'Request'.

When I compile my typescript code it seems to be throwing this error. Any ideas why this is happening?

答:
req is probably of type Request from "express" package and user does not exist there. You have to either extend Request with own router handler or cast it to type any or object.

try res.json(req['user']) or res.json( (<any>req).user )

You may also use module/global augmentation

```<code>import { Request } from "express"

declare module "express" {
  export interface Request {
    user: any
  }
}
</code>```

newer express definition may need to augment the core def instead

```<code>declare module 'express-serve-static-core' {
  export interface Request {
    user: any
  }
}
</code>```

You can also make your own handler wrapper (instead of extending Router functionality in ExpressJs).

```<code>import * as express from 'express';

interface IUserRequest extends express.Request {
    user: any
}

function myHandler(handler: (req: IUserRequest, res: express.Response, next?: express.NextFunction) => any) {
    return (req: express.Request, res: express.Response, next: express.NextFunction) => {
        try {

            validateUser(req, res, (err) => { // your validateUser handler that makes a user property in express Request
                if(err)
                     throw err;

                let requestWrapper: IUserRequest = <IUserRequest>req;

                handler(requestWrapper, res, next);
            })
        }
        catch (ex) {
            next(ex);
        }
    }
}

let app = express();
// init stuff for express but this.validateUser handler is not needed

app.use('/testuser', myHandler((req, res) => {
    res.json(req.user);
}));
</code>```

UPDATED:
Since Typescript is evolving I would also consider using Type Guards

```<code>if (hasUser(req)) {
    console.log(req.user)
}

function hasUser(request: Request): request is Request & { user: number } {
    return 'user' in request && typeof request['user'] == 'number'
}
</code>```

Body:
I have the following piece of code in my express app

router.get('/auth/userInfo', this.validateUser,  (req, res) => {
    res.json(req.user);
});

and my IDE seems to be complaining with the error

error TS2339: Property 'user' does not exist on type 'Request'.

When I compile my typescript code it seems to be throwing this error. Any ideas why this is happening?

Body:
req is probably of type Request from "express" package and user does not exist there. You have to either extend Request with own router handler or cast it to type any or object.

try res.json(req['user']) or res.json( (<any>req).user )

You may also use module/global augmentation

import { Request } from "express"

declare module "express" {
  export interface Request {
    user: any
  }
}

newer express definition may need to augment the core def instead

declare module 'express-serve-static-core' {
  export interface Request {
    user: any
  }
}

You can also make your own handler wrapper (instead of extending Router functionality in ExpressJs).

import * as express from 'express';

interface IUserRequest extends express.Request {
    user: any
}

function myHandler(handler: (req: IUserRequest, res: express.Response, next?: express.NextFunction) => any) {
    return (req: express.Request, res: express.Response, next: express.NextFunction) => {
        try {

            validateUser(req, res, (err) => { // your validateUser handler that makes a user property in express Request
                if(err)
                     throw err;

                let requestWrapper: IUserRequest = <IUserRequest>req;

                handler(requestWrapper, res, next);
            })
        }
        catch (ex) {
            next(ex);
        }
    }
}

let app = express();
// init stuff for express but this.validateUser handler is not needed

app.use('/testuser', myHandler((req, res) => {
    res.json(req.user);
}));

UPDATED:
Since Typescript is evolving I would also consider using Type Guards

if (hasUser(req)) {
    console.log(req.user)
}

function hasUser(request: Request): request is Request & { user: number } {
    return 'user' in request && typeof request['user'] == 'number'
}

ContentLicense: CC BY-SA 4.0


问:
Apple Mach-O Linker (ld) Error Group clang: error: linker command failed with exit code 1 (use -v to see invocation)
I tried this in Xcode Version 8.3.2 (8E2002).
Trying in IBM mobile first(7.1) to integrate Cordova FCM Plugin.(https://github.com/arnesson/cordova-plugin-firebase/).
Its success in android.

When I included FCM sdk (.framework) file using General->Linked Framework and libraries. This issue is coming.
(I tried pod libraries instead of these SDK. Same error happens)

I tried BITCODE to NO. tried POD libraries , I got the same issue
  again. Tried Clean and Build. Removed Derived data from xcode
  preference. I checked Duplicate files.(No duplicates). I had given
  -ObjC in other linker flags.

Framework search path

$(inherited)

      $(SRCROOT)
     "$(SRCROOT)/Frameworks"
      $(PROJECT_DIR)/Firebase/Analytics
      $(PROJECT_DIR)/Firebase/Crash
      $(PROJECT_DIR)/Firebase/Messaging

      $(PROJECT_DIR)/Firebase/RemoteConfig

      $(PROJECT_DIR)/Frameworks

Library Search path

$(inherited)

  $(SRCROOT)

  $(PROJECT_DIR)/Classes/HotlineSDK

Other linker flags

Debug :

-ObjC

Distribution:

-force_load
  "$(BUILT_PRODUCTS_DIR)/libCordova.a"
  -ObjC

Release

-force_load
  "$(BUILT_PRODUCTS_DIR)/libCordova.a"
  -ObjC

If I remove these FCM sdk frameworks . Link error will disappear.

Please help me to clear this.

Build Log

Showing All Issues

Build target CordovaLib of project CordovaLib with configuration Debug

Build target myIphone of project myIphone
  with configuration Debug

warning: User supplied UIDeviceFamily key in the Info.plist will be
  overwritten. Please use the build setting TARGETED_DEVICE_FAMILY and
  remove UIDeviceFamily from your Info.plist.

CompileC
  /Users/it-devops-roney/Library/Developer/Xcode/DerivedData/luluforexLuluoneIphone-exmdpkdrgewycqgnuvmbntthipqx/Build/Intermediates/luluforexLuluoneIphone.build/Debug-iphoneos/luluforexLuluoneIphone.build/Objects-normal/armv7/HotlinePlugin.o
  Classes/HotlinePlugin.m normal armv7 objective-c
  com.apple.compilers.llvm.clang.1_0.compiler
      cd "/Users/it-devops-roney/Documents/Roney/Work Tools/Trial2/lulumoneyapp-web/package/luluone/apps/luluone/iphone/native"
      export LANG=en_US.US-ASCII
      export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"
      /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang
  -x objective-c -arch armv7 -fmessage-length=0 -fdiagnostics-show-note-include-stack -fmacro-backtrace-limit=0 -std=c99 -fobjc-arc -gmodules -Wno-trigraphs -fpascal-strings -O0 -Wno-missing-field-initializers -Wno-missing-prototypes -Wno-implicit-atomic-properties -Wno-arc-repeated-use-of-weak -Wno-missing-braces -Wparentheses -Wswitch -Wno-unused-function -Wno-unused-label -Wno-unused-parameter -Wunused-variable -Wunused-value -Wno-empty-body -Wno-uninitialized -Wno-unknown-pragmas -Wno-shadow -Wno-four-char-constants -Wno-conversion -Wno-constant-conversion -Wno-int-conversion -Wno-bool-conversion -Wno-enum-conversion -Wno-shorten-64-to-32 -Wpointer-sign -Wno-newline-eof -Wno-selector -Wno-strict-selector-match -Wno-undeclared-selector -Wno-deprecated-implementations -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.3.sdk
  -fstrict-aliasing -Wprotocol -Wdeprecated-declarations -miphoneos-version-min=6.0 -g -fvisibility=hidden -Wno-sign-conversion -Wno-infinite-recursion -iquote /Users/it-devops-roney/Library/Developer/Xcode/DerivedData/luluforexLuluoneIphone-exmdpkdrgewycqgnuvmbntthipqx/Build/Intermediates/luluforexLuluoneIphone.build/Debug-iphoneos/luluforexLuluoneIphone.build/LuLuOne-generated-files.hmap
  -I/Users/it-devops-roney/Library/Developer/Xcode/DerivedData/luluforexLuluoneIphone-exmdpkdrgewycqgnuvmbntthipqx/Build/Intermediates/luluforexLuluoneIphone.build/Debug-iphoneos/luluforexLuluoneIphone.build/LuLuOne-own-target-headers.hmap -I/Users/it-devops-roney/Library/Developer/Xcode/DerivedData/luluforexLuluoneIphone-exmdpkdrgewycqgnuvmbntthipqx/Build/Intermediates/luluforexLuluoneIphone.build/Debug-iphoneos/luluforexLuluoneIphone.build/LuLuOne-all-target-headers.hmap -iquote /Users/it-devops-roney/Library/Developer/Xcode/DerivedData/luluforexLuluoneIphone-exmdpkdrgewycqgnuvmbntthipqx/Build/Intermediates/luluforexLuluoneIphone.build/Debug-iphoneos/luluforexLuluoneIphone.build/LuLuOne-project-headers.hmap
  -I/Users/it-devops-roney/Library/Developer/Xcode/DerivedData/luluforexLuluoneIphone-exmdpkdrgewycqgnuvmbntthipqx/Build/Products/Debug-iphoneos/include
  -I/Users/it-devops-roney/Documents/Roney/Work\ Tools/Trial2/lulumoneyapp-web/package/luluone/apps/luluone/iphone/native/CordovaLib/build/Debug-iphoneos/include
  -I/Users/it-devops-roney/Library/Developer/Xcode/DerivedData/luluforexLuluoneIphone-exmdpkdrgewycqgnuvmbntthipqx/Build/Products/Debug-iphoneos/usr/local/lib/include
  -I/Users/it-devops-roney/Library/Developer/Xcode/DerivedData/luluforexLuluoneIphone-exmdpkdrgewycqgnuvmbntthipqx/Build/Intermediates/UninstalledProducts/include
  -I/Users/it-devops-roney/Library/Developer/Xcode/DerivedData/luluforexLuluoneIphone-exmdpkdrgewycqgnuvmbntthipqx/Build/Products/Debug-iphoneos
  -I/Users/it-devops-roney/Library/Developer/Xcode/DerivedData/luluforexLuluoneIphone-exmdpkdrgewycqgnuvmbntthipqx/Build/Intermediates/UninstalledProducts/iphoneos/include
  -I/Users/it-devops-roney/Library/Developer/Xcode/DerivedData/luluforexLuluoneIphone-exmdpkdrgewycqgnuvmbntthipqx/Build/Intermediates/luluforexLuluoneIphone.build/Debug-iphoneos/luluforexLuluoneIphone.build/DerivedSources/armv7
  -I/Users/it-devops-roney/Library/Developer/Xcode/DerivedData/luluforexLuluoneIphone-exmdpkdrgewycqgnuvmbntthipqx/Build/Intermediates/luluforexLuluoneIphone.build/Debug-iphoneos/luluforexLuluoneIphone.build/DerivedSources
  -F/Users/it-devops-roney/Library/Developer/Xcode/DerivedData/luluforexLuluoneIphone-exmdpkdrgewycqgnuvmbntthipqx/Build/Products/Debug-iphoneos
  -F/Users/it-devops-roney/Documents/Roney/Work\ Tools/Trial2/lulumoneyapp-web/package/luluone/apps/luluone/iphone/native
  -F/Users/it-devops-roney/Documents/Roney/Work\ Tools/Trial2/lulumoneyapp-web/package/luluone/apps/luluone/iphone/native/Frameworks
  -F/Users/it-devops-roney/Documents/Roney/Work\ Tools/Trial2/lulumoneyapp-web/package/luluone/apps/luluone/iphone/native/Firebase/Analytics
  -F/Users/it-devops-roney/Documents/Roney/Work\ Tools/Trial2/lulumoneyapp-web/package/luluone/apps/luluone/iphone/native/Firebase/Crash
  -F/Users/it-devops-roney/Documents/Roney/Work\ Tools/Trial2/lulumoneyapp-web/package/luluone/apps/luluone/iphone/native/Firebase/Messaging
  -F/Users/it-devops-roney/Documents/Roney/Work\ Tools/Trial2/lulumoneyapp-web/package/luluone/apps/luluone/iphone/native/Firebase/RemoteConfig
  -DDEBUG -include /Users/it-devops-roney/Library/Developer/Xcode/DerivedData/luluforexLuluoneIphone-exmdpkdrgewycqgnuvmbntthipqx/Build/Intermediates/PrecompiledHeaders/luluforexLuluoneIphone_Prefix-efjdqfhfrwriwydvgpcaroblwpch/luluforexLuluoneIphone_Prefix.pch -MMD -MT dependencies -MF /Users/it-devops-roney/Library/Developer/Xcode/DerivedData/luluforexLuluoneIphone-exmdpkdrgewycqgnuvmbntthipqx/Build/Intermediates/luluforexLuluoneIphone.build/Debug-iphoneos/luluforexLuluoneIphone.build/Objects-normal/armv7/HotlinePlugin.d
  --serialize-diagnostics /Users/it-devops-roney/Library/Developer/Xcode/DerivedData/luluforexLuluoneIphone-exmdpkdrgewycqgnuvmbntthipqx/Build/Intermediates/luluforexLuluoneIphone.build/Debug-iphoneos/luluforexLuluoneIphone.build/Objects-normal/armv7/HotlinePlugin.dia
  -c /Users/it-devops-roney/Documents/Roney/Work\ Tools/Trial2/lulumoneyapp-web/package/luluone/apps/luluone/iphone/native/Classes/HotlinePlugin.m
  -o /Users/it-devops-roney/Library/Developer/Xcode/DerivedData/luluforexLuluoneIphone-exmdpkdrgewycqgnuvmbntthipqx/Build/Intermediates/luluforexLuluoneIphone.build/Debug-iphoneos/luluforexLuluoneIphone.build/Objects-normal/armv7/HotlinePlugin.o

/Users/it-devops-roney/Documents/Roney/Work
  Tools/Trial2/lulumoneyapp-web/package/luluone/apps/luluone/iphone/native/Classes/HotlinePlugin.m:15:17:
  warning: method definition for 'registerPushNotification:' not found
  [-Wincomplete-implementation] @implementation HotlinePlugin:CDVPlugin
                  ^ In file included from /Users/it-devops-roney/Documents/Roney/Work
  Tools/Trial2/lulumoneyapp-web/package/luluone/apps/luluone/iphone/native/Classes/HotlinePlugin.m:10:
  /Users/it-devops-roney/Documents/Roney/Work
  Tools/Trial2/lulumoneyapp-web/package/luluone/apps/luluone/iphone/native/Classes/HotlinePlugin.h:16:1:
  note: method 'registerPushNotification:' declared here
  -(void)registerPushNotification:(CDVInvokedUrlCommand*)command; ^ 1 warning generated.

CompileC
  /Users/it-devops-roney/Library/Developer/Xcode/DerivedData/luluforexLuluoneIphone-exmdpkdrgewycqgnuvmbntthipqx/Build/Intermediates/luluforexLuluoneIphone.build/Debug-iphoneos/luluforexLuluoneIphone.build/Objects-normal/armv7s/HotlinePlugin.o
  Classes/HotlinePlugin.m normal armv7s objective-c
  com.apple.compilers.llvm.clang.1_0.compiler
      cd "/Users/it-devops-roney/Documents/Roney/Work Tools/Trial2/lulumoneyapp-web/package/luluone/apps/luluone/iphone/native"
      export LANG=en_US.US-ASCII
      export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"
      /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang
  -x objective-c -arch armv7s -fmessage-length=0 -fdiagnostics-show-note-include-stack -fmacro-backtrace-limit=0 -std=c99 -fobjc-arc -gmodules -Wno-trigraphs -fpascal-strings -O0 -Wno-missing-field-initializers -Wno-missing-prototypes -Wno-implicit-atomic-properties -Wno-arc-repeated-use-of-weak -Wno-missing-braces -Wparentheses -Wswitch -Wno-unused-function -Wno-unused-label -Wno-unused-parameter -Wunused-variable -Wunused-value -Wno-empty-body -Wno-uninitialized -Wno-unknown-pragmas -Wno-shadow -Wno-four-char-constants -Wno-conversion -Wno-constant-conversion -Wno-int-conversion -Wno-bool-conversion -Wno-enum-conversion -Wno-shorten-64-to-32 -Wpointer-sign -Wno-newline-eof -Wno-selector -Wno-strict-selector-match -Wno-undeclared-selector -Wno-deprecated-implementations -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.3.sdk
  -fstrict-aliasing -Wprotocol -Wdeprecated-declarations -miphoneos-version-min=6.0 -g -fvisibility=hidden -Wno-sign-conversion -Wno-infinite-recursion -iquote /Users/it-devops-roney/Library/Developer/Xcode/DerivedData/luluforexLuluoneIphone-exmdpkdrgewycqgnuvmbntthipqx/Build/Intermediates/luluforexLuluoneIphone.build/Debug-iphoneos/luluforexLuluoneIphone.build/LuLuOne-generated-files.hmap
  -I/Users/it-devops-roney/Library/Developer/Xcode/DerivedData/luluforexLuluoneIphone-exmdpkdrgewycqgnuvmbntthipqx/Build/Intermediates/luluforexLuluoneIphone.build/Debug-iphoneos/luluforexLuluoneIphone.build/LuLuOne-own-target-headers.hmap -I/Users/it-devops-roney/Library/Developer/Xcode/DerivedData/luluforexLuluoneIphone-exmdpkdrgewycqgnuvmbntthipqx/Build/Intermediates/luluforexLuluoneIphone.build/Debug-iphoneos/luluforexLuluoneIphone.build/LuLuOne-all-target-headers.hmap -iquote /Users/it-devops-roney/Library/Developer/Xcode/DerivedData/luluforexLuluoneIphone-exmdpkdrgewycqgnuvmbntthipqx/Build/Intermediates/luluforexLuluoneIphone.build/Debug-iphoneos/luluforexLuluoneIphone.build/LuLuOne-project-headers.hmap
  -I/Users/it-devops-roney/Library/Developer/Xcode/DerivedData/luluforexLuluoneIphone-exmdpkdrgewycqgnuvmbntthipqx/Build/Products/Debug-iphoneos/include
  -I/Users/it-devops-roney/Documents/Roney/Work\ Tools/Trial2/lulumoneyapp-web/package/luluone/apps/luluone/iphone/native/CordovaLib/build/Debug-iphoneos/include
  -I/Users/it-devops-roney/Library/Developer/Xcode/DerivedData/luluforexLuluoneIphone-exmdpkdrgewycqgnuvmbntthipqx/Build/Products/Debug-iphoneos/usr/local/lib/include
  -I/Users/it-devops-roney/Library/Developer/Xcode/DerivedData/luluforexLuluoneIphone-exmdpkdrgewycqgnuvmbntthipqx/Build/Intermediates/UninstalledProducts/include
  -I/Users/it-devops-roney/Library/Developer/Xcode/DerivedData/luluforexLuluoneIphone-exmdpkdrgewycqgnuvmbntthipqx/Build/Products/Debug-iphoneos
  -I/Users/it-devops-roney/Library/Developer/Xcode/DerivedData/luluforexLuluoneIphone-exmdpkdrgewycqgnuvmbntthipqx/Build/Intermediates/UninstalledProducts/iphoneos/include
  -I/Users/it-devops-roney/Library/Developer/Xcode/DerivedData/luluforexLuluoneIphone-exmdpkdrgewycqgnuvmbntthipqx/Build/Intermediates/luluforexLuluoneIphone.build/Debug-iphoneos/luluforexLuluoneIphone.build/DerivedSources/armv7s
  -I/Users/it-devops-roney/Library/Developer/Xcode/DerivedData/luluforexLuluoneIphone-exmdpkdrgewycqgnuvmbntthipqx/Build/Intermediates/luluforexLuluoneIphone.build/Debug-iphoneos/luluforexLuluoneIphone.build/DerivedSources
  -F/Users/it-devops-roney/Library/Developer/Xcode/DerivedData/luluforexLuluoneIphone-exmdpkdrgewycqgnuvmbntthipqx/Build/Products/Debug-iphoneos
  -F/Users/it-devops-roney/Documents/Roney/Work\ Tools/Trial2/lulumoneyapp-web/package/luluone/apps/luluone/iphone/native
  -F/Users/it-devops-roney/Documents/Roney/Work\ Tools/Trial2/lulumoneyapp-web/package/luluone/apps/luluone/iphone/native/Frameworks
  -F/Users/it-devops-roney/Documents/Roney/Work\ Tools/Trial2/lulumoneyapp-web/package/luluone/apps/luluone/iphone/native/Firebase/Analytics
  -F/Users/it-devops-roney/Documents/Roney/Work\ Tools/Trial2/lulumoneyapp-web/package/luluone/apps/luluone/iphone/native/Firebase/Crash
  -F/Users/it-devops-roney/Documents/Roney/Work\ Tools/Trial2/lulumoneyapp-web/package/luluone/apps/luluone/iphone/native/Firebase/Messaging
  -F/Users/it-devops-roney/Documents/Roney/Work\ Tools/Trial2/lulumoneyapp-web/package/luluone/apps/luluone/iphone/native/Firebase/RemoteConfig
  -DDEBUG -include /Users/it-devops-roney/Library/Developer/Xcode/DerivedData/luluforexLuluoneIphone-exmdpkdrgewycqgnuvmbntthipqx/Build/Intermediates/PrecompiledHeaders/luluforexLuluoneIphone_Prefix-dyliholualcvxycaywvucajqygrc/luluforexLuluoneIphone_Prefix.pch -MMD -MT dependencies -MF /Users/it-devops-roney/Library/Developer/Xcode/DerivedData/luluforexLuluoneIphone-exmdpkdrgewycqgnuvmbntthipqx/Build/Intermediates/luluforexLuluoneIphone.build/Debug-iphoneos/luluforexLuluoneIphone.build/Objects-normal/armv7s/HotlinePlugin.d
  --serialize-diagnostics /Users/it-devops-roney/Library/Developer/Xcode/DerivedData/luluforexLuluoneIphone-exmdpkdrgewycqgnuvmbntthipqx/Build/Intermediates/luluforexLuluoneIphone.build/Debug-iphoneos/luluforexLuluoneIphone.build/Objects-normal/armv7s/HotlinePlugin.dia
  -c /Users/it-devops-roney/Documents/Roney/Work\ Tools/Trial2/lulumoneyapp-web/package/luluone/apps/luluone/iphone/native/Classes/HotlinePlugin.m
  -o /Users/it-devops-roney/Library/Developer/Xcode/DerivedData/luluforexLuluoneIphone-exmdpkdrgewycqgnuvmbntthipqx/Build/Intermediates/luluforexLuluoneIphone.build/Debug-iphoneos/luluforexLuluoneIphone.build/Objects-normal/armv7s/HotlinePlugin.o

/Users/it-devops-roney/Documents/Roney/Work
  Tools/Trial2/lulumoneyapp-web/package/luluone/apps/luluone/iphone/native/Classes/HotlinePlugin.m:15:17:
  warning: method definition for 'registerPushNotification:' not found
  [-Wincomplete-implementation] @implementation HotlinePlugin:CDVPlugin
                  ^ In file included from /Users/it-devops-roney/Documents/Roney/Work
  Tools/Trial2/lulumoneyapp-web/package/luluone/apps/luluone/iphone/native/Classes/HotlinePlugin.m:10:
  /Users/it-devops-roney/Documents/Roney/Work
  Tools/Trial2/lulumoneyapp-web/package/luluone/apps/luluone/iphone/native/Classes/HotlinePlugin.h:16:1:
  note: method 'registerPushNotification:' declared here
  -(void)registerPushNotification:(CDVInvokedUrlCommand*)command; ^ 1 warning generated.

CompileC
  /Users/it-devops-roney/Library/Developer/Xcode/DerivedData/luluforexLuluoneIphone-exmdpkdrgewycqgnuvmbntthipqx/Build/Intermediates/luluforexLuluoneIphone.build/Debug-iphoneos/luluforexLuluoneIphone.build/Objects-normal/arm64/HotlinePlugin.o
  Classes/HotlinePlugin.m normal arm64 objective-c
  com.apple.compilers.llvm.clang.1_0.compiler
      cd "/Users/it-devops-roney/Documents/Roney/Work Tools/Trial2/lulumoneyapp-web/package/luluone/apps/luluone/iphone/native"
      export LANG=en_US.US-ASCII
      export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"
      /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang
  -x objective-c -arch arm64 -fmessage-length=0 -fdiagnostics-show-note-include-stack -fmacro-backtrace-limit=0 -std=c99 -fobjc-arc -gmodules -Wno-trigraphs -fpascal-strings -O0 -Wno-missing-field-initializers -Wno-missing-prototypes -Wno-implicit-atomic-properties -Wno-arc-repeated-use-of-weak -Wno-missing-braces -Wparentheses -Wswitch -Wno-unused-function -Wno-unused-label -Wno-unused-parameter -Wunused-variable -Wunused-value -Wno-empty-body -Wno-uninitialized -Wno-unknown-pragmas -Wno-shadow -Wno-four-char-constants -Wno-conversion -Wno-constant-conversion -Wno-int-conversion -Wno-bool-conversion -Wno-enum-conversion -Wshorten-64-to-32 -Wpointer-sign -Wno-newline-eof -Wno-selector -Wno-strict-selector-match -Wno-undeclared-selector -Wno-deprecated-implementations -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.3.sdk
  -fstrict-aliasing -Wprotocol -Wdeprecated-declarations -miphoneos-version-min=6.0 -g -fvisibility=hidden -Wno-sign-conversion -Wno-infinite-recursion -iquote /Users/it-devops-roney/Library/Developer/Xcode/DerivedData/luluforexLuluoneIphone-exmdpkdrgewycqgnuvmbntthipqx/Build/Intermediates/luluforexLuluoneIphone.build/Debug-iphoneos/luluforexLuluoneIphone.build/LuLuOne-generated-files.hmap
  -I/Users/it-devops-roney/Library/Developer/Xcode/DerivedData/luluforexLuluoneIphone-exmdpkdrgewycqgnuvmbntthipqx/Build/Intermediates/luluforexLuluoneIphone.build/Debug-iphoneos/luluforexLuluoneIphone.build/LuLuOne-own-target-headers.hmap -I/Users/it-devops-roney/Library/Developer/Xcode/DerivedData/luluforexLuluoneIphone-exmdpkdrgewycqgnuvmbntthipqx/Build/Intermediates/luluforexLuluoneIphone.build/Debug-iphoneos/luluforexLuluoneIphone.build/LuLuOne-all-target-headers.hmap -iquote /Users/it-devops-roney/Library/Developer/Xcode/DerivedData/luluforexLuluoneIphone-exmdpkdrgewycqgnuvmbntthipqx/Build/Intermediates/luluforexLuluoneIphone.build/Debug-iphoneos/luluforexLuluoneIphone.build/LuLuOne-project-headers.hmap
  -I/Users/it-devops-roney/Library/Developer/Xcode/DerivedData/luluforexLuluoneIphone-exmdpkdrgewycqgnuvmbntthipqx/Build/Products/Debug-iphoneos/include
  -I/Users/it-devops-roney/Documents/Roney/Work\ Tools/Trial2/lulumoneyapp-web/package/luluone/apps/luluone/iphone/native/CordovaLib/build/Debug-iphoneos/include
  -I/Users/it-devops-roney/Library/Developer/Xcode/DerivedData/luluforexLuluoneIphone-exmdpkdrgewycqgnuvmbntthipqx/Build/Products/Debug-iphoneos/usr/local/lib/include
  -I/Users/it-devops-roney/Library/Developer/Xcode/DerivedData/luluforexLuluoneIphone-exmdpkdrgewycqgnuvmbntthipqx/Build/Intermediates/UninstalledProducts/include
  -I/Users/it-devops-roney/Library/Developer/Xcode/DerivedData/luluforexLuluoneIphone-exmdpkdrgewycqgnuvmbntthipqx/Build/Products/Debug-iphoneos
  -I/Users/it-devops-roney/Library/Developer/Xcode/DerivedData/luluforexLuluoneIphone-exmdpkdrgewycqgnuvmbntthipqx/Build/Intermediates/UninstalledProducts/iphoneos/include
  -I/Users/it-devops-roney/Library/Developer/Xcode/DerivedData/luluforexLuluoneIphone-exmdpkdrgewycqgnuvmbntthipqx/Build/Intermediates/luluforexLuluoneIphone.build/Debug-iphoneos/luluforexLuluoneIphone.build/DerivedSources/arm64
  -I/Users/it-devops-roney/Library/Developer/Xcode/DerivedData/luluforexLuluoneIphone-exmdpkdrgewycqgnuvmbntthipqx/Build/Intermediates/luluforexLuluoneIphone.build/Debug-iphoneos/luluforexLuluoneIphone.build/DerivedSources
  -F/Users/it-devops-roney/Library/Developer/Xcode/DerivedData/luluforexLuluoneIphone-exmdpkdrgewycqgnuvmbntthipqx/Build/Products/Debug-iphoneos
  -F/Users/it-devops-roney/Documents/Roney/Work\ Tools/Trial2/lulumoneyapp-web/package/luluone/apps/luluone/iphone/native
  -F/Users/it-devops-roney/Documents/Roney/Work\ Tools/Trial2/lulumoneyapp-web/package/luluone/apps/luluone/iphone/native/Frameworks
  -F/Users/it-devops-roney/Documents/Roney/Work\ Tools/Trial2/lulumoneyapp-web/package/luluone/apps/luluone/iphone/native/Firebase/Analytics
  -F/Users/it-devops-roney/Documents/Roney/Work\ Tools/Trial2/lulumoneyapp-web/package/luluone/apps/luluone/iphone/native/Firebase/Crash
  -F/Users/it-devops-roney/Documents/Roney/Work\ Tools/Trial2/lulumoneyapp-web/package/luluone/apps/luluone/iphone/native/Firebase/Messaging
  -F/Users/it-devops-roney/Documents/Roney/Work\ Tools/Trial2/lulumoneyapp-web/package/luluone/apps/luluone/iphone/native/Firebase/RemoteConfig
  -DDEBUG -include /Users/it-devops-roney/Library/Developer/Xcode/DerivedData/luluforexLuluoneIphone-exmdpkdrgewycqgnuvmbntthipqx/Build/Intermediates/PrecompiledHeaders/luluforexLuluoneIphone_Prefix-cbrpxglmvouqlzdqvhoxutszcgmk/luluforexLuluoneIphone_Prefix.pch -MMD -MT dependencies -MF /Users/it-devops-roney/Library/Developer/Xcode/DerivedData/luluforexLuluoneIphone-exmdpkdrgewycqgnuvmbntthipqx/Build/Intermediates/luluforexLuluoneIphone.build/Debug-iphoneos/luluforexLuluoneIphone.build/Objects-normal/arm64/HotlinePlugin.d
  --serialize-diagnostics /Users/it-devops-roney/Library/Developer/Xcode/DerivedData/luluforexLuluoneIphone-exmdpkdrgewycqgnuvmbntthipqx/Build/Intermediates/luluforexLuluoneIphone.build/Debug-iphoneos/luluforexLuluoneIphone.build/Objects-normal/arm64/HotlinePlugin.dia
  -c /Users/it-devops-roney/Documents/Roney/Work\ Tools/Trial2/lulumoneyapp-web/package/luluone/apps/luluone/iphone/native/Classes/HotlinePlugin.m
  -o /Users/it-devops-roney/Library/Developer/Xcode/DerivedData/luluforexLuluoneIphone-exmdpkdrgewycqgnuvmbntthipqx/Build/Intermediates/luluforexLuluoneIphone.build/Debug-iphoneos/luluforexLuluoneIphone.build/Objects-normal/arm64/HotlinePlugin.o

/Users/it-devops-roney/Documents/Roney/Work
  Tools/Trial2/lulumoneyapp-web/package/luluone/apps/luluone/iphone/native/Classes/HotlinePlugin.m:118:46:
  warning: values of type 'NSInteger' should not be used as format
  arguments; add an explicit cast to 'long' instead [-Wformat]
      NSLog(@" The unread count value is: %d", unreadCount);
                                          ~~   ^~~~~~~~~~~
                                          %ld  (long) /Users/it-devops-roney/Documents/Roney/Work
  Tools/Trial2/lulumoneyapp-web/package/luluone/apps/luluone/iphone/native/Classes/HotlinePlugin.m:15:17:
  warning: method definition for 'registerPushNotification:' not found
  [-Wincomplete-implementation] @implementation HotlinePlugin:CDVPlugin
                  ^ In file included from /Users/it-devops-roney/Documents/Roney/Work
  Tools/Trial2/lulumoneyapp-web/package/luluone/apps/luluone/iphone/native/Classes/HotlinePlugin.m:10:
  /Users/it-devops-roney/Documents/Roney/Work
  Tools/Trial2/lulumoneyapp-web/package/luluone/apps/luluone/iphone/native/Classes/HotlinePlugin.h:16:1:
  note: method 'registerPushNotification:' declared here
  -(void)registerPushNotification:(CDVInvokedUrlCommand*)command; ^ 2 warnings generated.

Ld
  /Users/it-devops-roney/Library/Developer/Xcode/DerivedData/luluforexLuluoneIphone-exmdpkdrgewycqgnuvmbntthipqx/Build/Intermediates/luluforexLuluoneIphone.build/Debug-iphoneos/luluforexLuluoneIphone.build/Objects-normal/armv7s/LuLuOne
  normal armv7s
      cd "/Users/it-devops-roney/Documents/Roney/Work Tools/Trial2/lulumoneyapp-web/package/luluone/apps/luluone/iphone/native"
      export IPHONEOS_DEPLOYMENT_TARGET=6.0
      export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"
      /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang
  -arch armv7s -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.3.sdk
  -L/Users/it-devops-roney/Library/Developer/Xcode/DerivedData/luluforexLuluoneIphone-exmdpkdrgewycqgnuvmbntthipqx/Build/Products/Debug-iphoneos
  -L/Users/it-devops-roney/Documents/Roney/Work\ Tools/Trial2/lulumoneyapp-web/package/luluone/apps/luluone/iphone/native
  -L/Users/it-devops-roney/Documents/Roney/Work\ Tools/Trial2/lulumoneyapp-web/package/luluone/apps/luluone/iphone/native/Classes/HotlineSDK
  -F/Users/it-devops-roney/Library/Developer/Xcode/DerivedData/luluforexLuluoneIphone-exmdpkdrgewycqgnuvmbntthipqx/Build/Products/Debug-iphoneos
  -F/Users/it-devops-roney/Documents/Roney/Work\ Tools/Trial2/lulumoneyapp-web/package/luluone/apps/luluone/iphone/native
  -F/Users/it-devops-roney/Documents/Roney/Work\ Tools/Trial2/lulumoneyapp-web/package/luluone/apps/luluone/iphone/native/Frameworks
  -F/Users/it-devops-roney/Documents/Roney/Work\ Tools/Trial2/lulumoneyapp-web/package/luluone/apps/luluone/iphone/native/Firebase/Analytics
  -F/Users/it-devops-roney/Documents/Roney/Work\ Tools/Trial2/lulumoneyapp-web/package/luluone/apps/luluone/iphone/native/Firebase/Crash
  -F/Users/it-devops-roney/Documents/Roney/Work\ Tools/Trial2/lulumoneyapp-web/package/luluone/apps/luluone/iphone/native/Firebase/Messaging
  -F/Users/it-devops-roney/Documents/Roney/Work\ Tools/Trial2/lulumoneyapp-web/package/luluone/apps/luluone/iphone/native/Firebase/RemoteConfig
  -filelist /Users/it-devops-roney/Library/Developer/Xcode/DerivedData/luluforexLuluoneIphone-exmdpkdrgewycqgnuvmbntthipqx/Build/Intermediates/luluforexLuluoneIphone.build/Debug-iphoneos/luluforexLuluoneIphone.build/Objects-normal/armv7s/LuLuOne.LinkFileList
  -miphoneos-version-min=6.0 -dead_strip -Xlinker -object_path_lto -Xlinker /Users/it-devops-roney/Library/Developer/Xcode/DerivedData/luluforexLuluoneIphone-exmdpkdrgewycqgnuvmbntthipqx/Build/Intermediates/luluforexLuluoneIphone.build/Debug-iphoneos/luluforexLuluoneIphone.build/Objects-normal/armv7s/LuLuOne_lto.o
  -Xlinker -no_deduplicate -fobjc-arc -fobjc-link-runtime -ObjC -framework IBMMobileFirstPlatformFoundationHybrid -framework FirebaseRemoteConfig -framework FirebaseMessaging -framework
  FirebaseCrash -framework FirebaseAnalytics -framework FirebaseCore
  -framework FirebaseInstanceID -framework GoogleToolboxForMac -lc++ -lstdc++.6 -framework CoreTelephony -framework ImageIO -framework sqlcipher
  /Users/it-devops-roney/Library/Developer/Xcode/DerivedData/luluforexLuluoneIphone-exmdpkdrgewycqgnuvmbntthipqx/Build/Products/Debug-iphoneos/libCordova.a
  -framework Security -framework CoreMedia -lz -framework Foundation -framework UIKit -framework CoreGraphics -framework AddressBook -framework AddressBookUI -framework AudioToolbox -lFDHotlineSDK -framework AssetsLibrary -framework AVFoundation -framework CFNetwork -framework CoreLocation -framework MediaPlayer -framework QuartzCore -framework SystemConfiguration -framework CoreMotion -framework MobileCoreServices -framework CoreData -Xlinker -dependency_info
  -Xlinker /Users/it-devops-roney/Library/Developer/Xcode/DerivedData/luluforexLuluoneIphone-exmdpkdrgewycqgnuvmbntthipqx/Build/Intermediates/luluforexLuluoneIphone.build/Debug-iphoneos/luluforexLuluoneIphone.build/Objects-normal/armv7s/LuLuOne_dependency_info.dat
  -o /Users/it-devops-roney/Library/Developer/Xcode/DerivedData/luluforexLuluoneIphone-exmdpkdrgewycqgnuvmbntthipqx/Build/Intermediates/luluforexLuluoneIphone.build/Debug-iphoneos/luluforexLuluoneIphone.build/Objects-normal/armv7s/LuLuOne

ld: file is universal (4 slices) but does not contain a(n) armv7s
  slice: /Users/it-devops-roney/Documents/Roney/Work
  Tools/Trial2/lulumoneyapp-web/package/luluone/apps/luluone/iphone/native/Firebase/Analytics/FirebaseAnalytics.framework/FirebaseAnalytics
  file '/Users/it-devops-roney/Documents/Roney/Work
  Tools/Trial2/lulumoneyapp-web/package/luluone/apps/luluone/iphone/native/Firebase/Analytics/FirebaseAnalytics.framework/FirebaseAnalytics'
  for architecture armv7s clang: error: linker command failed with exit
  code 1 (use -v to see invocation)

Build failed    06/06/17, 12:35 PM

答:
You are trying to build an app with armv7s as one of the architecture. As this architecture slice is not packaged in  FirebaseAnalytics.framework, it will cause build failure.

Kindly remove armv7s from the valid architectures which you can find inside Build Architectures tab & re-build your app. This will resolve the issue.


问:
How to restrict input field length (max length) using <md-autocomplete>
I would like to achieve the behavior to restrict/limit users entr to only 10 numbers for ex:

Anyone know how to do this?

I do see that they have an attribute md-input-maxlength, but i am not able to get it work, or find an example.

Appreciate your inputs.

答:
Extend from John Smith's answer, you can try </p>

```<code>md-search-text-change="searchText = searchText.substring(0,10)"
</code>```

Body:
Extend from John Smith's answer, you can try

md-search-text-change="searchText = searchText.substring(0,10)"


问:
Addressing instance name string in __init__(self) in Python
I am doing something like this:

```<code>class Class(object):
    def __init__(self):
        self.var=#new instance name string#
</code>```

How do I make the __ init __ method of my instance to use the instance name string for 'c'? Say in case:

```<code>c=Class()
</code>```

I want c.var equal to 'c'.

Thanks for your replies, I am implementing persistence and Class is persistent object's class. I want __ init __ to add an entry to the database when:

```<code>c=Class()
</code>```

Then, suppose:

```<code>del c
</code>```

Later on:

```<code>c=Class()
</code>```

sholuld create an instance using data from database if there already is an entry 'c', otherwise create new entry.

Thanks for your replies, I am implementing persistence and Class is persistent object's class. I want __ init __ to add an entry to the database when:

```<code>c=Class()
</code>```

Then, suppose:

```<code>del c
</code>```

Later on:

```<code>c=Class()
</code>```

sholuld create an instance using data from database if there already is an entry 'c', otherwise create new entry.

答: You can't do this. The reason for this is that the object of the class is created first, and only afterwards is this object bound to the name of the instance.</p>

OwnerDisplayName: xktybot

Body:
I am doing something like this:

class Class(object):
    def __init__(self):
        self.var=#new instance name string#

How do I make the __ init __ method of my instance to use the instance name string for 'c'? Say in case:

c=Class()

I want c.var equal to 'c'.

Thanks for your replies, I am implementing persistence and Class is persistent object's class. I want __ init __ to add an entry to the database when:

c=Class()

Then, suppose:

del c

Later on:

c=Class()

sholuld create an instance using data from database if there already is an entry 'c', otherwise create new entry.

Thanks for your replies, I am implementing persistence and Class is persistent object's class. I want __ init __ to add an entry to the database when:

c=Class()

Then, suppose:

del c

Later on:

c=Class()

sholuld create an instance using data from database if there already is an entry 'c', otherwise create new entry.

LastEditorDisplayName: xktybot

OwnerDisplayName: sykora


问:
How to find month no,name from week number using php
How to find month no,name from week number using php</p>

答:
Have a look at php date() - http://php.net/manual/en/function.date.php

Here are some good examples:

```<code><?php
// set the default timezone to use. Available since PHP 5.1
date_default_timezone_set('UTC');

// Prints something like: Monday
echo date("l");

// Prints something like: Monday 8th of August 2005 03:12:46 PM
echo date('l jS \of F Y h:i:s A');

// Prints: July 1, 2000 is on a Saturday
echo "July 1, 2000 is on a " . date("l", mktime(0, 0, 0, 7, 1, 2000));

/* use the constants in the format parameter */
// prints something like: Mon, 15 Aug 2005 15:12:46 UTC
echo date(DATE_RFC822);

// prints something like: 2000-07-01T00:00:00+00:00
echo date(DATE_ATOM, mktime(0, 0, 0, 7, 1, 2000));
?>
</code>```

Body:
Have a look at php date() - http://php.net/manual/en/function.date.php

Here are some good examples:

<?php
// set the default timezone to use. Available since PHP 5.1
date_default_timezone_set('UTC');

// Prints something like: Monday
echo date("l");

// Prints something like: Monday 8th of August 2005 03:12:46 PM
echo date('l jS \of F Y h:i:s A');

// Prints: July 1, 2000 is on a Saturday
echo "July 1, 2000 is on a " . date("l", mktime(0, 0, 0, 7, 1, 2000));

/* use the constants in the format parameter */
// prints something like: Mon, 15 Aug 2005 15:12:46 UTC
echo date(DATE_RFC822);

// prints something like: 2000-07-01T00:00:00+00:00
echo date(DATE_ATOM, mktime(0, 0, 0, 7, 1, 2000));
?>


问:
POST JSON data in Python
```<code>def post():
    url = "someurl.com"
    with open(jsonfile) as myfile:
        for line in myfile:
            post_fields = line
            print(post_fields)
            request = Request(url, urlencode(post_fields).encode())
            json = urlopen(request).read().decode()
            print(json)

post()
</code>```

I am trying to post my JSON data to a website using the code above. However, I met up with an error. The error is

not a valid non-string sequence or mapping object

Below is my JSON data.

```<code>[{"ContentUrl": "https://twitter.com/realDonaldTrump/status/871331574649901056", "Text": "Do you notice we are not having a gun debate right now? That's because they used knives and a truck!", "PublishDate": "4:43 AM - 4 Jun 2017", "Title": "", "SourceUrl": "https://twitter.com/@realDonaldTrump", "SocialNetwork": "Twitter", "Source": "", "Author": "Donald J. Trump", "Like_count": "147,875 likes", "Replies_count": "57,397 replies", "Retweets_count": "45,500 retweets", "Schema": "SOCIAL_MEDIA"}]
</code>```

Any help or suggestions for me?

答:
```<code>def post():
    url = "someurl.com"
    with open(jsonfile) as myfile:
        for line in myfile:
            json_data = json.loads(line)
    response = requests.post(url, data=json.dumps(json_data))
    print(response.status_code, response.reason)

post()
</code>```

I tried combining methods i see from around the net and this finally work for me.

Title: POST JSON data in Python

Body:
def post():
    url = "someurl.com"
    with open(jsonfile) as myfile:
        for line in myfile:
            post_fields = line
            print(post_fields)
            request = Request(url, urlencode(post_fields).encode())
            json = urlopen(request).read().decode()
            print(json)

post()

I am trying to post my JSON data to a website using the code above. However, I met up with an error. The error is

not a valid non-string sequence or mapping object

Below is my JSON data.

[{"ContentUrl": "https://twitter.com/realDonaldTrump/status/871331574649901056", "Text": "Do you notice we are not having a gun debate right now? That's because they used knives and a truck!", "PublishDate": "4:43 AM - 4 Jun 2017", "Title": "", "SourceUrl": "https://twitter.com/@realDonaldTrump", "SocialNetwork": "Twitter", "Source": "", "Author": "Donald J. Trump", "Like_count": "147,875 likes", "Replies_count": "57,397 replies", "Retweets_count": "45,500 retweets", "Schema": "SOCIAL_MEDIA"}]

Any help or suggestions for me?

Body:
def post():
    url = "someurl.com"
    with open(jsonfile) as myfile:
        for line in myfile:
            json_data = json.loads(line)
    response = requests.post(url, data=json.dumps(json_data))
    print(response.status_code, response.reason)

post()

I tried combining methods i see from around the net and this finally work for me.


问:
CUDA cube map textures
How to deal with OpenGL cube map textures in CUDA?

When one want to use OpenGL textures in CUDA kernel one of the things to do is to retrieve a CUDA array from registered image and mapped resource, in this case a texture. In driver API it is done by cuGraphicsSubResourceGetMappedArray call, which in a case of 2D texture is not a problem. But when talking about aforementioned cube map, third parameter of this function requires a face enum (like CU_CUBEMAP_FACE_POSITIVE_X). Thus some questions arise - when one passes such an enum, then the returned texture array will contain only data of that particular face, right? Then how to use cube texture as a whole, to perform cube mapping, likewise:

```<code>color = texCube(cubeMap, x, y, z);
</code>```

Or is it impossible to do so in CUDA kernel and one need to use 2D textures with proper calculations and sampling in user code?

答:
OK - I managed to solve the problem myself, though the solution isn't as simple as using another CUDA function.

To bind a CUDA texture reference with any texture, be it one obtained from OpenGL or D3D, one has to provide a CUDA array that is mapped to a resource, using cuGraphicsSubResourceGetMappedArray to retrieve it. As I mentioned in the question, it is simple in case of a one or two dimensional texture. But with other available types it is more complicated.

At any time we need a CUDA array that the reference is bound to. Same goes with the cube map texture. But in such a case the array has to be a 3D one. The problem is that CUDA driver API provides only the aforementioned function to retrieve a single layer from such a texture resource, and map it to a single, two dimensional array. To get what we want we have to make ourselves the 3D array containing all the layers (or faces in case of a cube map).

First of all we have to get arrays for each layer/face using the above function. Next step is to create the 3D array by call to  cuArray3DCreate, fed with proper set of parameters (size/number of layers, level of detail, data format, number of channels per texel and some flags). Then we have to copy the layers' arrays to the 3D one with a series of calls to cuMemcpy3D, one for each layer/face array.

Finally, we set our target CUDA texture reference with cuTexRefSetArray, fed with the 3D array we created and copied to. Inside of the device code we create a reference with proper texture type and mode (float4 and cube map) and sample it with texCubemap.

Below I put a fragment of the function which does all that, available in full length in CIRT Repository (cirt_server.c file, function cirtTexImage3D).

```<code>//...
if (result)
{
    // Create a 3D array...
    CUDA_ARRAY3D_DESCRIPTOR layeredTextureDescr;
    layeredTextureDescr.Width = w;
    layeredTextureDescr.Height = h;
    layeredTextureDescr.Depth = d;
    layeredTextureDescr.Format = map_type_to_format(type);
    layeredTextureDescr.NumChannels = format == CIRT_RGB ? CIRT_RGBA : format;
    layeredTextureDescr.Flags = map_target_to_flags(target);

    if (result) result = LogCUDADriverCall(cuArray3DCreate(&hTexRefArray, &layeredTextureDescr),
        FUN_NAME(": cuArray3DCreate_tex3D"), __FILE_LINE__);

    // Copy the acquired layer/face arrays into the collective 3D one...
    CUDA_MEMCPY3D layerCopyDescr;
    layerCopyDescr.srcMemoryType = CU_MEMORYTYPE_ARRAY;
    layerCopyDescr.srcXInBytes = 0;
    layerCopyDescr.srcZ = 0;
    layerCopyDescr.srcY = 0;
    layerCopyDescr.srcLOD = 0;

    layerCopyDescr.dstMemoryType = CU_MEMORYTYPE_ARRAY;
    layerCopyDescr.dstLOD = 0;

    layerCopyDescr.WidthInBytes = layeredTextureDescr.NumChannels * w;
    layerCopyDescr.Height = h;
    layerCopyDescr.Depth = target == CIRT_TEXTURE_CUBE_MAP ? 1 : d;
    layerCopyDescr.dstArray = hTexRefArray;

    for (i = 0; i < num_layers; ++i)
    {
        layer = ((num_layers == 6) ? CU_CUBEMAP_FACE_POSITIVE_X + i : i);
        layerCopyDescr.dstXInBytes = 0;
        layerCopyDescr.dstY = 0;
        layerCopyDescr.dstZ = i;
        layerCopyDescr.srcArray = hLayres[i];

        if (result) result = LogCUDADriverCall(cuMemcpy3D(&layerCopyDescr),
            FUN_NAME(": cuMemcpy3D_tex3D"), __FILE_LINE__);
    }

    // Finally bind the 3D array with texture reference...
    if (result) LogCUDADriverCall(cuTexRefSetArray(hTexRef, hTexRefArray, CU_TRSA_OVERRIDE_FORMAT),
        FUN_NAME(": cuTexRefSetArray_tex3D"), __FILE_LINE__);

    if (hLayres)
        free(hLayres);

    if (result)
        current->m_oTextureManager.m_cuTextureRes[current->m_oTextureManager.m_nTexCount++] = hTexResource;
}
//...
</code>```

I've checked it with cube maps only for now but it should work just fine with 3D texture as well.

Title: CUDA cube map textures

Body:
How to deal with OpenGL cube map textures in CUDA?

When one want to use OpenGL textures in CUDA kernel one of the things to do is to retrieve a CUDA array from registered image and mapped resource, in this case a texture. In driver API it is done by cuGraphicsSubResourceGetMappedArray call, which in a case of 2D texture is not a problem. But when talking about aforementioned cube map, third parameter of this function requires a face enum (like CU_CUBEMAP_FACE_POSITIVE_X). Thus some questions arise - when one passes such an enum, then the returned texture array will contain only data of that particular face, right? Then how to use cube texture as a whole, to perform cube mapping, likewise:

color = texCube(cubeMap, x, y, z);

Or is it impossible to do so in CUDA kernel and one need to use 2D textures with proper calculations and sampling in user code?

Body:
OK - I managed to solve the problem myself, though the solution isn't as simple as using another CUDA function.

To bind a CUDA texture reference with any texture, be it one obtained from OpenGL or D3D, one has to provide a CUDA array that is mapped to a resource, using cuGraphicsSubResourceGetMappedArray to retrieve it. As I mentioned in the question, it is simple in case of a one or two dimensional texture. But with other available types it is more complicated.

At any time we need a CUDA array that the reference is bound to. Same goes with the cube map texture. But in such a case the array has to be a 3D one. The problem is that CUDA driver API provides only the aforementioned function to retrieve a single layer from such a texture resource, and map it to a single, two dimensional array. To get what we want we have to make ourselves the 3D array containing all the layers (or faces in case of a cube map).

First of all we have to get arrays for each layer/face using the above function. Next step is to create the 3D array by call to  cuArray3DCreate, fed with proper set of parameters (size/number of layers, level of detail, data format, number of channels per texel and some flags). Then we have to copy the layers' arrays to the 3D one with a series of calls to cuMemcpy3D, one for each layer/face array.

Finally, we set our target CUDA texture reference with cuTexRefSetArray, fed with the 3D array we created and copied to. Inside of the device code we create a reference with proper texture type and mode (float4 and cube map) and sample it with texCubemap.

Below I put a fragment of the function which does all that, available in full length in CIRT Repository (cirt_server.c file, function cirtTexImage3D).

//...
if (result)
{
    // Create a 3D array...
    CUDA_ARRAY3D_DESCRIPTOR layeredTextureDescr;
    layeredTextureDescr.Width = w;
    layeredTextureDescr.Height = h;
    layeredTextureDescr.Depth = d;
    layeredTextureDescr.Format = map_type_to_format(type);
    layeredTextureDescr.NumChannels = format == CIRT_RGB ? CIRT_RGBA : format;
    layeredTextureDescr.Flags = map_target_to_flags(target);

    if (result) result = LogCUDADriverCall(cuArray3DCreate(&hTexRefArray, &layeredTextureDescr),
        FUN_NAME(": cuArray3DCreate_tex3D"), __FILE_LINE__);

    // Copy the acquired layer/face arrays into the collective 3D one...
    CUDA_MEMCPY3D layerCopyDescr;
    layerCopyDescr.srcMemoryType = CU_MEMORYTYPE_ARRAY;
    layerCopyDescr.srcXInBytes = 0;
    layerCopyDescr.srcZ = 0;
    layerCopyDescr.srcY = 0;
    layerCopyDescr.srcLOD = 0;

    layerCopyDescr.dstMemoryType = CU_MEMORYTYPE_ARRAY;
    layerCopyDescr.dstLOD = 0;

    layerCopyDescr.WidthInBytes = layeredTextureDescr.NumChannels * w;
    layerCopyDescr.Height = h;
    layerCopyDescr.Depth = target == CIRT_TEXTURE_CUBE_MAP ? 1 : d;
    layerCopyDescr.dstArray = hTexRefArray;

    for (i = 0; i < num_layers; ++i)
    {
        layer = ((num_layers == 6) ? CU_CUBEMAP_FACE_POSITIVE_X + i : i);
        layerCopyDescr.dstXInBytes = 0;
        layerCopyDescr.dstY = 0;
        layerCopyDescr.dstZ = i;
        layerCopyDescr.srcArray = hLayres[i];

        if (result) result = LogCUDADriverCall(cuMemcpy3D(&layerCopyDescr),
            FUN_NAME(": cuMemcpy3D_tex3D"), __FILE_LINE__);
    }

    // Finally bind the 3D array with texture reference...
    if (result) LogCUDADriverCall(cuTexRefSetArray(hTexRef, hTexRefArray, CU_TRSA_OVERRIDE_FORMAT),
        FUN_NAME(": cuTexRefSetArray_tex3D"), __FILE_LINE__);

    if (hLayres)
        free(hLayres);

    if (result)
        current->m_oTextureManager.m_cuTextureRes[current->m_oTextureManager.m_nTexCount++] = hTexResource;
}
//...

I've checked it with cube maps only for now but it should work just fine with 3D texture as well.


问:
Unknown column 'submittedby' in 'field list'
I am pretty new to PHP and MySQL and I just can't figure this one out. I
have searched all around the forum but haven't found an answer I can make sense of.

I get the following error: Unknown column 'submittedby' in 'field list', the problem is with this line of the code -

```<code>$update="update users set enrol_Date='".$enrol_Date."', username='".$username."', firstname='".$firstname."', lastname='".$lastname."', identificationCard='".$identificationCard."', email='".$email."',contact='".$contact."', submittedby='".$submittedby."' where id='".$id."'";
</code>```

The whole code is:

```<code><?php
  require('db.php');
  include("auth.php");
  $id=$_REQUEST['id'];
  $query = "SELECT * from users where id='".$id."'";
  $result = mysqli_query($con, $query) or die ( mysqli_error());
  $row = mysqli_fetch_assoc($result);
?>

<?php
  $status = "";
  if(isset($_POST['new']) && $_POST['new']==1)
  {
    $id=$_REQUEST['id'];
    $enrol_Date = date("Y-m-d H:i:s");
    $username =$_REQUEST['username'];
    $firstname =$_REQUEST['firstname'];
    $lastname =$_REQUEST['lastname'];
    $identificationCard =$_REQUEST['identificationCard'];
    $email =$_REQUEST['email'];
    $contact =$_REQUEST['contact'];
    $submittedby = $_SESSION["username"];
    $update="update users set enrol_Date='".$enrol_Date."', username='".$username."', firstname='".$firstname."', lastname='".$lastname."', identificationCard='".$identificationCard."', email='".$email."',contact='".$contact."', submittedby='".$submittedby."' where id='".$id."'";
    mysqli_query($con, $update) or die(mysqli_error($con));
    $status = "Profile Updated Successfully. </br></br>
    <a href='view.php'>View Updated Record</a>";
    echo '<p style="color:#FF0000;">'.$status.'</p>';
  }else {
?>
</code>```

Here is my form code:

```<code><form name="form" method="post" action="">
  <input type="hidden" name="new" value="1" />
  <input name="id" type="hidden" value="<?php echo $row['id'];?>" />
  <label for="username"> Username : </label>
  <p><input type="text" name="username" placeholder="Username"
  required value="<?php echo $row['username'];?>" /></p>
  <label for="firstname"> Firstname : </label>
  <p><input type="text" name="firstname" placeholder="Firstname"
  required value="<?php echo $row['firstname'];?>" /></p>
  <label for="lastname"> Lastname : </label>
  <p><input type="text" name="lastname" placeholder="Lastname"
  required value="<?php echo $row['lastname'];?>" /></p>
  <label for="i/cno"> I/C No : </label>
  <p><input type="text" name="identificationCard" placeholder="I/C"
  required value="<?php echo $row['identificationCard'];?>" /></p>
  <label for="email"> Email : </label>
  <p><input type="text" name="email" placeholder="Email"
  required value="<?php echo $row['email'];?>" /></p>
  <label for="contact"> Contact : </label>
  <p><input type="text" name="contact" placeholder="Contact"
  required value="<?php echo $row['contact'];?>" /></p>
  <p><input name="submit" type="submit" value="Submit" /></p>
</form>
</code>```

Thanks.

答:
Plainly, submittedby is not a column in the table.

FWIW, I find this much easier to read...

```<code>update="
update users
   set enrol_Date = '$enrol_Date'
     , username = '$username'
     , firstname = '$firstname'
     , lastname = '$lastname'
     , identificationCard = '$identificationCard'
     , email '$email'
     , contact = '$contact'
     , submittedby = '$submittedby'
 where id = '$id'
";
</code>```

... however, you should really be using parametrised queries with mysqli, so see about that too.

Body:
I am pretty new to PHP and MySQL and I just can't figure this one out. I
have searched all around the forum but haven't found an answer I can make sense of.

I get the following error: Unknown column 'submittedby' in 'field list', the problem is with this line of the code -

$update="update users set enrol_Date='".$enrol_Date."', username='".$username."', firstname='".$firstname."', lastname='".$lastname."', identificationCard='".$identificationCard."', email='".$email."',contact='".$contact."', submittedby='".$submittedby."' where id='".$id."'";

The whole code is:

<?php
  require('db.php');
  include("auth.php");
  $id=$_REQUEST['id'];
  $query = "SELECT * from users where id='".$id."'";
  $result = mysqli_query($con, $query) or die ( mysqli_error());
  $row = mysqli_fetch_assoc($result);
?>

<?php
  $status = "";
  if(isset($_POST['new']) && $_POST['new']==1)
  {
    $id=$_REQUEST['id'];
    $enrol_Date = date("Y-m-d H:i:s");
    $username =$_REQUEST['username'];
    $firstname =$_REQUEST['firstname'];
    $lastname =$_REQUEST['lastname'];
    $identificationCard =$_REQUEST['identificationCard'];
    $email =$_REQUEST['email'];
    $contact =$_REQUEST['contact'];
    $submittedby = $_SESSION["username"];
    $update="update users set enrol_Date='".$enrol_Date."', username='".$username."', firstname='".$firstname."', lastname='".$lastname."', identificationCard='".$identificationCard."', email='".$email."',contact='".$contact."', submittedby='".$submittedby."' where id='".$id."'";
    mysqli_query($con, $update) or die(mysqli_error($con));
    $status = "Profile Updated Successfully.

    View Updated Record";
    echo '
'.$status.'
';
  }else {
?>

Here is my form code:

<form name="form" method="post" action="">
  <input type="hidden" name="new" value="1" />
  <input name="id" type="hidden" value="<?php echo $row['id'];?>" />
   Username :

<input type="text" name="username" placeholder="Username"
  required value="<?php echo $row['username'];?>" />

   Firstname :

<input type="text" name="firstname" placeholder="Firstname"
  required value="<?php echo $row['firstname'];?>" />

   Lastname :

<input type="text" name="lastname" placeholder="Lastname"
  required value="<?php echo $row['lastname'];?>" />

   I/C No :

<input type="text" name="identificationCard" placeholder="I/C"
  required value="<?php echo $row['identificationCard'];?>" />

   Email :

<input type="text" name="email" placeholder="Email"
  required value="<?php echo $row['email'];?>" />

   Contact :

<input type="text" name="contact" placeholder="Contact"
  required value="<?php echo $row['contact'];?>" />

<input name="submit" type="submit" value="Submit" />

</form>

Thanks.

Body:
Plainly, submittedby is not a column in the table.

FWIW, I find this much easier to read...

update="
update users
   set enrol_Date = '$enrol_Date'
     , username = '$username'
     , firstname = '$firstname'
     , lastname = '$lastname'
     , identificationCard = '$identificationCard'
     , email '$email'
     , contact = '$contact'
     , submittedby = '$submittedby'
 where id = '$id'
";

... however, you should really be using parametrised queries with mysqli, so see about that too.


问:
How to get source code directory in Gradle plugin?
I want to get the directory of Java files in a Groovy plugin.

For example, I have a Java file in a directory:

```<code>"/gradleProject/src/main/java/com/file.java"
</code>```

How can I get:

```<code>"src/main/java"
</code>```

In Maven there is Build.getSourceDirectory(), what is the equivalent in Gradle?

答:
In Gradle, those source folders are managed by SourceSets, that are brought to you by the Java plugin. The java plugin adds two sourceSets named main and test.

once the java plugin is applied, you can access those sourceSets and their properties (e.g. the folders you're looking) simply by name: project.sourceSets.main.srcDirs - this will give you all the configured source directories for the main sourceSet in your project.

Body:
I want to get the directory of Java files in a Groovy plugin.

For example, I have a Java file in a directory:

"/gradleProject/src/main/java/com/file.java"

How can I get:

"src/main/java"

In Maven there is Build.getSourceDirectory(), what is the equivalent in Gradle?


问:
Apache mod_python with django issue
While running a django application on top of apache2 mod_python, I am getting this error message in my apache error log.

```<code>[Tue Dec 14 14:26:45 2010] [error] [client SOME_IP] IOError: Write failed, client closed connection., referer: http://example.com/
Traceback (most recent call last):
  File "/usr/lib/python2.6/dist-packages/mod_python/importer.py", line 1931, in ReportError
    req.write(text)
IOError: Write failed, client closed connection.
[Tue Dec 14 14:26:45 2010] [error] [client SOME_IP] python_handler: Dispatch() returned non-integer., referer: http://example.com/
</code>```

Can anyone please suggest some solution on this?

答:
The better long-term solution is to not use mod_python, since mod_python is no longer in development, and will not be supported in future versions of Django. Consider using mod_wsgi instead.

The Django documentation has this to say about mod_python:

Support for mod_python has been deprecated, and will be removed in Django 1.5. If you are configuring a new deployment, you are strongly encouraged to consider using mod_wsgi or any of the other supported backends.

Title: Apache mod_python with django issue

Body:
While running a django application on top of apache2 mod_python, I am getting this error message in my apache error log.

[Tue Dec 14 14:26:45 2010] [error] [client SOME_IP] IOError: Write failed, client closed connection., referer: http://example.com/
Traceback (most recent call last):
  File "/usr/lib/python2.6/dist-packages/mod_python/importer.py", line 1931, in ReportError
    req.write(text)
IOError: Write failed, client closed connection.
[Tue Dec 14 14:26:45 2010] [error] [client SOME_IP] python_handler: Dispatch() returned non-integer., referer: http://example.com/

Can anyone please suggest some solution on this?


问:
Return response error 500 React Native
I am using react-native framework for developing my small android app.I'm trying to redirect to Home.js from index.android.js.when i run it,it showing red error message on my Emulator

index.android.js

```<code>import React, { Component } from 'react';
import {AppRegistry,Text,View} from 'react-native';
import Home from 'App/Component/Home';

export default class mylApp extends Component {
  render() {
    return (
      <View>
         <Home />
      </View>
    );
  }
}

AppRegistry.registerComponent('reactTutorialApp', () => reactTutorialApp);
</code>```

Home.js

```<code>import React, { Component } from 'react';
import {Text,View} from 'react-native';

class Home extends Component {
   state = {
      myTxt: 'hiiiiiiiiiiiiiiiiiiiiiii';
   }

   render() {
      return (
         <View>
            <Text>
               {this.state.myTxt}
            </Text>
         </View>
      );
   }
}

export default Home;
</code>```

答:
Check with this import Path import Home from 'App/Component/Home';. I assume the Home.js is inside the Project(Folder) -> App (Folder) -> Component (Folder) -> Home.js. If it so then you need import like this import Home from './App/Component/Home';

Update 1:

index.android.js

```<code>import React, { Component } from 'react';
import {AppRegistry,Text,View} from 'react-native';
import Home from './App/Component/Home';

export default class mylApp extends Component {
  render() {
    return (
      <View>
         <Home />
      </View>
    );
  }
}

AppRegistry.registerComponent('reactTutorialApp', () => mylApp);
</code>```

Update 2

Home.js

```<code>import React, { Component } from 'react';
import {Text,View} from 'react-native';

class Home extends Component {
   state = {
      myTxt: 'hiiiiiiiiiiiiiiiiiiiiiii'
   }

   render() {
      return (
         <View>
            <Text>
               {this.state.myTxt}
            </Text>
         </View>
      );
   }
}

export default Home;
</code>```

Title: Return response error 500 React Native

Body:
I am using react-native framework for developing my small android app.I'm trying to redirect to Home.js from index.android.js.when i run it,it showing red error message on my Emulator

index.android.js

import React, { Component } from 'react';
import {AppRegistry,Text,View} from 'react-native';
import Home from 'App/Component/Home';

export default class mylApp extends Component {
  render() {
    return (
      <View>
         <Home />
      </View>
    );
  }
}

AppRegistry.registerComponent('reactTutorialApp', () => reactTutorialApp);

Home.js

import React, { Component } from 'react';
import {Text,View} from 'react-native';

class Home extends Component {
   state = {
      myTxt: 'hiiiiiiiiiiiiiiiiiiiiiii';
   }

   render() {
      return (
         <View>
            <Text>
               {this.state.myTxt}
            </Text>
         </View>
      );
   }
}

export default Home;

Body:
Check with this import Path import Home from 'App/Component/Home';. I assume the Home.js is inside the Project(Folder) -> App (Folder) -> Component (Folder) -> Home.js. If it so then you need import like this import Home from './App/Component/Home';

Update 1:

index.android.js

import React, { Component } from 'react';
import {AppRegistry,Text,View} from 'react-native';
import Home from './App/Component/Home';

export default class mylApp extends Component {
  render() {
    return (
      <View>
         <Home />
      </View>
    );
  }
}

AppRegistry.registerComponent('reactTutorialApp', () => mylApp);

Update 2

Home.js

import React, { Component } from 'react';
import {Text,View} from 'react-native';

class Home extends Component {
   state = {
      myTxt: 'hiiiiiiiiiiiiiiiiiiiiiii'
   }

   render() {
      return (
         <View>
            <Text>
               {this.state.myTxt}
            </Text>
         </View>
      );
   }
}

export default Home;


问:
C Memory Buffer corrupting micro-controller memory allocation - Atmel ATxmega
I am using the ATxmega128A1 8-bit microcontroller, and I am trying to figure out why my memory buffer is behaving strangely.

I have a FIFO buffer of the following structure:

```<code>typedef struct
{
  FIFOid ID;                        //ID value to determine the type of FIFO being used
  BOOL LOCK;                        //A lock to prevent multiple FIFO accessing (i.e. data corruption)
  UINT16 Start, End;                //Value of the current start and end FIFO index
  UINT16 volatile NbBytes;          //Number of bytes currently inside the FIFO
  UINT8 Buffer[FIFO_SIZE];          //Memory buffer for the FIFO buffer
} TFIFO;
</code>```

And I define 2 FIFOs:

```<code>//FIFO Buffers for USART
TFIFO RxFIFO;           //Creates the Receive FIFO
TFIFO TxFIFO;           //Creates the Transmit FIFO
</code>```

Where FIFO_SIZE is

```<code>#define FIFO_SIZE 256
</code>```

When I want to get a byte from the Buffer[] I pass a pointer to the FIFO through this function:

```<code>BOOL FIFO_Get(TFIFO * const FIFO, UINT8 * const dataPtr);
</code>```

This works fine, however, once I increase my FIFO_SIZE above ~510 bytes - Passing this FIFO pointer through this function causes another one of my FIFOs' buffer to be altered.

I have seen on my debugger, there is no problem at this line:

```<code>if(FIFO_Get(&TxFIFO, &data)){       //Get a byte from TxFIFO
</code>```

And once I step over, and it is passed through to the function, the RxFIFO->Buffer[] array is modified, namely the larger address values.
FIFO_Get function:

```<code>// ----------------------------------------
// FIFO_Get
// ----------------------------------------
// Remove one character from the FIFO
// Input:
//   FIFO is a  pointer to a FIFO struct with data to be retrieved
//   dataPtr is a pointer to a memory location to place the retrieved byte
// Output:
//   TRUE if the operation was successful and the data is valid
// Conditions:
//   Assumes that FIFO_Init has been called

BOOL FIFO_Get(TFIFO * const FIFO, UINT8 * const dataPtr)
{
    BOOL FIFOGetSuccess;
    FIFOGetSuccess = bFALSE;

    //disable interrupts
    //if we're GETTING from the USART receive FIFO
    //we need to disable the receive interrupt so
    //there is no data being 'Put' during a 'Get'
    if(FIFO->ID == URX){
        USARTD0.CTRLA = USART_RXCINTLVL_OFF_gc; //Rx interrupts off
        USARTD1.CTRLA = USART_RXCINTLVL_OFF_gc; //Rx interrupts off
    }

    //Attempt to get a byte from the FIFO
    if(FIFO->LOCK == bFALSE){                           //Check that the FIFO is not locked
        FIFO->LOCK = bTRUE;                             //lock the FIFO
        if (FIFO->NbBytes == 0){                        //Checks whether FIFO is empty; number of bytes in FIFO = 0
            FIFOGetSuccess = bFALSE;                    //If empty, false is Returned
        }else{
            *dataPtr = FIFO->Buffer[FIFO->Start];       //Reads the byte in the FIFO start position, and saves it to the location of the data pointer
            if (FIFO->Start == (FIFO_SIZE - 1)){        //Checks whether the start position is equal to FIFO size, the last valid 8 bit number
                FIFO->Start = 0;                        //If so, the position is set to 0
            }else{                                      //If not fifo size;
                FIFO->Start++;                          //Increments the start position by 1
            }
            FIFO->NbBytes--;                            //Decrements the number of bytes in the FIFO by 1
            FIFOGetSuccess =  bTRUE;                    //Returns true if this is successful
        }
        FIFO->LOCK = bFALSE;                            //unlock the FIFO
    }

    //re-enable interrupts
    if(FIFO->ID == URX){
        USARTD0.CTRLA = USART_RXCINTLVL_LO_gc;  //low level interrupts on Rx
        USARTD1.CTRLA = USART_RXCINTLVL_LO_gc;  //low level interrupts on Rx
    }

    return FIFOGetSuccess;
}
</code>```

My guess is that i am not safely allocating memory in the microcontroller, however there seems to be plenty of memory left in the chip, after build:

```<code>        Program Memory Usage    :   21460 bytes   15.4 % Full
        Data Memory Usage       :   6967 bytes   12.1 % Full
</code>```

How do I go about fixing this & what am I doing wrong?

EDIT:

I have found that increasing the FIFO SIZE maps the FIFO buffer over the SRAM address range (the SRAM of the ATxmega128A1 goes from 0x2000 to 0x3FFF)

FIFO address mapping

The addresses 0x3FF7 to 0x3FFF are changing when the other FIFO is passed through a function

EDIT 2:
Elf Files

答:
No. Just no.

Your concept is wrong. With FIFO buffer, you should use only one write and only one read point in your program. In you case, write would be inside UART RX interrupt and read would be for example in while (1) loop of your program.

Sufficient structure info is this:

```<code>#define FIFO_SIZE       100
typedef struct {
    uint16_t Write, Read;
    uint8_t Buffer[FIFO_SIZE];
} FIFO;
</code>```

And then you need 2 (better 3) functions:

FIFO_Write(FIFO* f, uint8_t ch)

FIFO_Get(FIFO* f, uint8_t* ch)

FIFO_Init(FIFO* f);

And the implementation something similar as:

```<code>void FIFO_Init(FIFO* f) {
    f->Write = 0;
    f->Read = 0;
}

//This function needs check if buffer is full, will update it.
void FIFO_Write(FIFO* f, uint8_t ch) {
    //Check here if buffer is full first
    f->Buffer[f->Write++] = ch;
    if (f->Write >= FIFO_SIZE) {
        f->Write = 0;
    }
}

uint8_t FIFO_Read(FIFO* f, uint8_t* ch) {
    volatile uint16_t write = f->Write, read = f->Read;
    if (write == read) {
        return 0;  //FIFO empty, return 0
    }
    *ch = f->Buffer[f->Read++];
    if (f->Read >= FIFO_SIZE) {
        f->Read = 0;
    }
    return 1;      //character is valid
}
</code>```

Functions for writing and reading are now safe of each other. You can write from IRQ or everywhere and read at the same time without worrying at all.

You can use FIFO_Write inside interrupt easily and when you read from FIFO, you don't need to disable interrupts. That's the purpose of FIFO. Single write point, single read point.

Hope it helps.

Body:
I am using the ATxmega128A1 8-bit microcontroller, and I am trying to figure out why my memory buffer is behaving strangely.

I have a FIFO buffer of the following structure:

typedef struct
{
  FIFOid ID;                        //ID value to determine the type of FIFO being used
  BOOL LOCK;                        //A lock to prevent multiple FIFO accessing (i.e. data corruption)
  UINT16 Start, End;                //Value of the current start and end FIFO index
  UINT16 volatile NbBytes;          //Number of bytes currently inside the FIFO
  UINT8 Buffer[FIFO_SIZE];          //Memory buffer for the FIFO buffer
} TFIFO;

And I define 2 FIFOs:

//FIFO Buffers for USART
TFIFO RxFIFO;           //Creates the Receive FIFO
TFIFO TxFIFO;           //Creates the Transmit FIFO

Where FIFO_SIZE is

#define FIFO_SIZE 256

When I want to get a byte from the Buffer[] I pass a pointer to the FIFO through this function:

BOOL FIFO_Get(TFIFO * const FIFO, UINT8 * const dataPtr);

This works fine, however, once I increase my FIFO_SIZE above ~510 bytes - Passing this FIFO pointer through this function causes another one of my FIFOs' buffer to be altered.

I have seen on my debugger, there is no problem at this line:

if(FIFO_Get(&TxFIFO, &data)){       //Get a byte from TxFIFO

And once I step over, and it is passed through to the function, the RxFIFO->Buffer[] array is modified, namely the larger address values.
FIFO_Get function:

// ----------------------------------------
// FIFO_Get
// ----------------------------------------
// Remove one character from the FIFO
// Input:
//   FIFO is a  pointer to a FIFO struct with data to be retrieved
//   dataPtr is a pointer to a memory location to place the retrieved byte
// Output:
//   TRUE if the operation was successful and the data is valid
// Conditions:
//   Assumes that FIFO_Init has been called

BOOL FIFO_Get(TFIFO * const FIFO, UINT8 * const dataPtr)
{
    BOOL FIFOGetSuccess;
    FIFOGetSuccess = bFALSE;

    //disable interrupts
    //if we're GETTING from the USART receive FIFO
    //we need to disable the receive interrupt so
    //there is no data being 'Put' during a 'Get'
    if(FIFO->ID == URX){
        USARTD0.CTRLA = USART_RXCINTLVL_OFF_gc; //Rx interrupts off
        USARTD1.CTRLA = USART_RXCINTLVL_OFF_gc; //Rx interrupts off
    }

    //Attempt to get a byte from the FIFO
    if(FIFO->LOCK == bFALSE){                           //Check that the FIFO is not locked
        FIFO->LOCK = bTRUE;                             //lock the FIFO
        if (FIFO->NbBytes == 0){                        //Checks whether FIFO is empty; number of bytes in FIFO = 0
            FIFOGetSuccess = bFALSE;                    //If empty, false is Returned
        }else{
            *dataPtr = FIFO->Buffer[FIFO->Start];       //Reads the byte in the FIFO start position, and saves it to the location of the data pointer
            if (FIFO->Start == (FIFO_SIZE - 1)){        //Checks whether the start position is equal to FIFO size, the last valid 8 bit number
                FIFO->Start = 0;                        //If so, the position is set to 0
            }else{                                      //If not fifo size;
                FIFO->Start++;                          //Increments the start position by 1
            }
            FIFO->NbBytes--;                            //Decrements the number of bytes in the FIFO by 1
            FIFOGetSuccess =  bTRUE;                    //Returns true if this is successful
        }
        FIFO->LOCK = bFALSE;                            //unlock the FIFO
    }

    //re-enable interrupts
    if(FIFO->ID == URX){
        USARTD0.CTRLA = USART_RXCINTLVL_LO_gc;  //low level interrupts on Rx
        USARTD1.CTRLA = USART_RXCINTLVL_LO_gc;  //low level interrupts on Rx
    }

    return FIFOGetSuccess;
}

My guess is that i am not safely allocating memory in the microcontroller, however there seems to be plenty of memory left in the chip, after build:

        Program Memory Usage    :   21460 bytes   15.4 % Full
        Data Memory Usage       :   6967 bytes   12.1 % Full

How do I go about fixing this & what am I doing wrong?

EDIT:

I have found that increasing the FIFO SIZE maps the FIFO buffer over the SRAM address range (the SRAM of the ATxmega128A1 goes from 0x2000 to 0x3FFF)

FIFO address mapping

The addresses 0x3FF7 to 0x3FFF are changing when the other FIFO is passed through a function

EDIT 2:
Elf Files

Body:
No. Just no.

Your concept is wrong. With FIFO buffer, you should use only one write and only one read point in your program. In you case, write would be inside UART RX interrupt and read would be for example in while (1) loop of your program.

Sufficient structure info is this:

#define FIFO_SIZE       100
typedef struct {
    uint16_t Write, Read;
    uint8_t Buffer[FIFO_SIZE];
} FIFO;

And then you need 2 (better 3) functions:

FIFO_Write(FIFO* f, uint8_t ch)

FIFO_Get(FIFO* f, uint8_t* ch)

FIFO_Init(FIFO* f);

And the implementation something similar as:

void FIFO_Init(FIFO* f) {
    f->Write = 0;
    f->Read = 0;
}

//This function needs check if buffer is full, will update it.
void FIFO_Write(FIFO* f, uint8_t ch) {
    //Check here if buffer is full first
    f->Buffer[f->Write++] = ch;
    if (f->Write >= FIFO_SIZE) {
        f->Write = 0;
    }
}

uint8_t FIFO_Read(FIFO* f, uint8_t* ch) {
    volatile uint16_t write = f->Write, read = f->Read;
    if (write == read) {
        return 0;  //FIFO empty, return 0
    }
    *ch = f->Buffer[f->Read++];
    if (f->Read >= FIFO_SIZE) {
        f->Read = 0;
    }
    return 1;      //character is valid
}

Functions for writing and reading are now safe of each other. You can write from IRQ or everywhere and read at the same time without worrying at all.

You can use FIFO_Write inside interrupt easily and when you read from FIFO, you don't need to disable interrupts. That's the purpose of FIFO. Single write point, single read point.

Hope it helps.


问:
Facebook SDK Android, java.lang.RuntimeException: Unable to get provider com.facebook.internal.FacebookInitProvider
Has anyone encountered this error before with Facebook SDK for Android?

java.lang.RuntimeException: Unable to get provider
  com.facebook.internal.FacebookInitProvider:
  java.lang.ClassNotFoundException: Didn't find class
  "com.facebook.internal.FacebookInitProvider" on path: DexPathList[[zip
  file "/data/app/com.hellogold.app.dev-2/base.apk"]

答: I've got same problem and was because I call MultiDex.install in App.onCreate, moving to App.attachBaseContext() solved the problem. Because provides installing starts before App.onCreate.</p>