Tag Archives: ProgrammerAH

How to keep textview and ImageView on the same line

Effect: text on the left, icon on the right
When text is short, an icon relies only on text
When the text is long, the text wraps and the icon is on the right

  <TextView
        android:id="@+id/chargingTitle"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginStart="24dp"
        android:layout_marginTop="10dp"
        app:layout_constrainedWidth="true"
        app:layout_constraintHorizontal_bias="0"
        app:layout_constraintHorizontal_chainStyle="packed"
        app:layout_constraintEnd_toStartOf="@+id/chargingPrepareIcon"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@+id/toolbar_layout"
        />

    <ImageView
        android:id="@+id/chargingPrepareIcon"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:src="@drawable/base_icon_warning"
        android:layout_marginStart="8dp"
        android:layout_marginEnd="24dp"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toEndOf="@+id/chargingTitle"
        app:layout_constraintTop_toTopOf="@+id/chargingTitle"
        app:layout_constraintBottom_toBottomOf="@+id/chargingTitle"
        />

If the text is too long in the ConstraintLayout, the TextView will exceed the constraint.

Uncaught Error: _registerComponent(…): Target container is not a DOM element

Uncaught error:_registerComponent(…): target container is not DOM element

<script type="text/babel">
    var SessionPage = React.createClass({

        getInitialState: function () {
            var context = {
                context: {}
            };
            return context;
        },

        componentDidMount: function () {
            this.serverRequest = $.ajax({
                url: this.props.url,
                data: {},
                type: 'GET',
                dataType: 'json',
                success: function (data) {
                    this.setState({
                        context: data
                    })
                }.bind(this), // If you don't bind it, the this inside the method is $.ajax({this object}), and the bind incoming this should be the component. You can console the output and see.
                error: function (msg) {
                    console.log("error:" + msg);
                }.bind(this)
            })
        },

        componentWillUnmount: function () {
            this.serverRequest.abort()
        },


        render: function () {
            var creatItem = function (it) {
                return (<code>JSON.stringify(it)</code>)
            };

            return (
                    <div>{creatItem(this.state.context)}</div>
            );
        }
    });

    ReactDOM.render(<SessionPage url="/api/session"/>);
</script>

It’s just a problem of not finding DOM nodes.
To:
ReactDOM.render(< SessionPage url=”/api/session”/> , document.getElementById(“App”));

Expected unqualified ID before string constant

The answer is: My code is missing a “;”
= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
site:

back to the error of the line, found no problem.

error file: ptlogin2_api.h (line 22) : With the unqualified id before string constant

, in the middle of my CPP code (definitely not in the header file), a function XXX from the file ptlogin2_api.h,

#ifdef cplusplus
extern “C” {====== > Which line
#endif

turns out to be wrong?

I’m contains ptlogin2_api. H a recent include file
# include “dev_db_def. H” = = = = = = = = = = = = = = = = = = = “inside out of the question! Enumeration value definition ends with “; “missing. . Ptlogin_app_id.
# include “h”
# include “panel_auth. H”

= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
there are multiple solutions can be found that the problem
1) add new code removed entirely, including the header files, to ensure that your code can be compiled through.
2) since there is no problem with the error, there is a problem near the code, or there is a problem with another file nearby. It is often the case that a file ends up missing the “;” , error in another file.
3) vi dev_insert.o is a versatile way to expand the code and see the state of the file when the compiler finally compiles the code. But it’s also the most complicated.

my dev_insert.o expand as follows:

45053 # 42 “.. H “
45054 enum _errorcode55 {
45056 DR_ERR_OK = 0,
45057 dr_err_validity = 1000,
45058 DR_ERR_LOGIN_STATE,
45059 DR_ERR_INSERT_DEV,
45060 DR_ERR_SELECT_DEV,
45061 DR_ERR_UPDATE_DEV,
45062 DR_ERR_ACTION_TYPE,
45063
45064}
45065 # 15 “dev_insert.cpp” 2
45066 # 1 “/data/home/nemo/code/isd_qzoneappbase_proj/base_class/base_lib/include/ptlogin_app_id.h” 1
45067 # 16 “dev_insert.cpp” 2
45068 # 1 “/data/home/ code/isd_qzoneappbase_proj/outerlib/panel_auth/include/panel_auth. H “1
45069
45070
45071
45072 # 1
45072 # 1 “/data/home/ code/isd_qzoneappbase_proj/base_class/extern_libs/tdev/include/toiw_all.h” 1
45073 # 5 “/data/home/ code/isd_qzoneappbase_proj/outerlib/panel_auth/include/panel_auth. H” 2
45074 # 1 “/data/home/nemo/code/isd_qzoneappbase_proj/base_class/extern_libs/tbase/include/tbase_all.h” 1
45075 # 6 “/data/home/ code/isd_qzoneappbase_proj/outerlib/panel_auth/include/panel_auth. H “2
45076 # 1 “/data/home/ code/isd_qzoneappbase_proj/outerlib/panel_auth/include/ptlogin2_api.h” 1
45077 # 25 “/ data/home/nemo/code/isd_qzoneappbase_proj/outerlib/panel_auth/include/ptlogin2_api. H”
45078 extern “C” {45079

= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
For detailed debugging procedures, you can refer to a document in the mailbox and search for the keyword debugging using GCC.

= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
the GCC common error of the error, less often because;

expected unqualified-id before ****
generally occurs with the following prompt information as well as the unqualified ‘; ‘, and look up from the error to see if there is a semicolon missing at the end of the header file and at the end of the enumeration definition included above.

error: multiple types in one declaration
>
error: multiple types in one declaration
> In the second class, the last error.

= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
type redefine link failure, if can’t find the cause of the code, may be written makefile have problems
the same. The two o file link, in this mistake. Depressed.
Make your own makefiles under GCC. Be very careful.

Python3 reports an error [errno 5] input / output error. Print is used when there is no stdout

Process description
Shortly after, I wrote a project with Tornado that was supposed to be deployed on Nginx, but for some reason the company didn’t use Nginx and started it directly from the command line
When I boot from the command line, it is normally accessible

python start.py &

However, when I close the remote SSH connection, the program is out of order, nothing happens, but the process is sitting in the process pool waiting for the CPU to call. By try catch the exception [Errno 5] Input/output error
After checking, the problem was found, because I had print statement in the program. When I quit the remote SSH, it was equivalent to closing its shell. Without shell process print, there was no place to output characters and could not “write” to the screen, so I would report a I/O error
The solution

    does not use the command line to start, put the program into crontab to start regularly or delete the program where there are print statements in the program, use nohup to run the command permanently, it has nothing to do with the user terminal, disconnection of SSH will not affect the program to run

 

XLReport / Excel 2013 Ole Error 800A03EC

Ole Error 800A03EC is a well-known Error, and the cause of the Error is widely debated.
Recently, I have been using XLReport VCL to generate EXcel reports. This control (2003) was a great piece of Delphi7. Unfortunately, the following part did not update it for any reason, and even the company was cancelled.
Encountered this error Delphi developers are not a few, but have not been able to say why, have not been solved!
https://www.board4all.biz/threads/xlreport-excel-2013-ole-error-800a03ec.611247/
Through the debug tracking the problem is that call xlEngine. Procedure of pas units TxlExcelDataSource. GetRangeInfo
When ir.unmerge is executed, Ole Error 800A03EC, a nasty exception, occurs. The general view is caused by the upgrade of Excel version, but the original company has abandoned this product, no one can maintain and modify the source code, it is a pity, so excellent VCL.
Because there is source code, so after foreign experts modify, Delphi XE2 subsequent version can be installed and used, after constant exploration, finally solved the Ole Error 800A03EC exception, for the report development work brought high efficiency!

Macro generated_ UCLASS_ Body () and generated_ Analysis of body ()


Classes that inherit from the UE4 engine generate some macro code. The purpose of this macro code is to help generate constructors and associated member functions

UCLASS()
class SECTION1_API ASUsableActor : public AActor
{
	GENERATED_BODY()
	
public:	
		
	
};
UCLASS()
class SURVIVALGAME_API ASUsableActor : public AActor
{
	GENERATED_UCLASS_BODY()

public:

	
};

F12 jumps to the declaration file for both macros

#define GENERATED_BODY() \
PRAGMA_DISABLE_DEPRECATION_WARNINGS \
public: \
	ASUsableActor_RPC_WRAPPERS_NO_PURE_DECLS \
	ASUsableActor_CALLBACK_WRAPPERS \
	ASUsableActor_INCLASS_NO_PURE_DECLS \
	ASUsableActor_ENHANCED_CONSTRUCTORS \
private: \
PRAGMA_POP

GENERATED_BODY() will be replaced by a series of macros that replace the bottommost member with private: that is, after GENERATED_BODY() without significantly changing the member’s access mode, it will be private

#define GENERATED_UCLASS_BODY() \
PRAGMA_DISABLE_DEPRECATION_WARNINGS \
public: \
	ASUsableActor_RPC_WRAPPERS \
	ASUsableActor_CALLBACK_WRAPPERS \
	ASUsableActor_INCLASS \
	ASUsableActor_STANDARD_CONSTRUCTORS \
public: \
PRAGMA_POP

and the member variable after GENERATED_UCLASS_BODY() is public.

#define ASUsableActor_RPC_WRAPPERS
#define ASUsableActor_CALLBACK_WRAPPERS

these two are empty macros, in C/C++ hollow macros will be replaced by Spaces mostly used to indicate comments

The two non-null macros in GENERATED_UCLASS_BODY() are declared as

#define ASUsableActor_INCLASS \
	private: \
	static void StaticRegisterNativesASUsableActor(); \
	friend SECTION1_API class UClass* Z_Construct_UClass_ASUsableActor(); \
	public: \
	DECLARE_CLASS(ASUsableActor, AActor, COMPILED_IN_FLAGS(0), 0, Section1, NO_API) \
	DECLARE_SERIALIZER(ASUsableActor) \
	/** Indicates whether the class is compiled into the engine */    enum {IsIntrinsic=COMPILED_IN_INTRINSIC}; \
	UObject* _getUObject() const { return const_cast<ASUsableActor*>(this); }

The main purpose of these lines is to declare some member methods for the class

#define ASUsableActor_STANDARD_CONSTRUCTORS \
	/** Standard constructor, called after all reflected properties have been initialized */ \
	NO_API ASUsableActor(const FObjectInitializer& ObjectInitializer); \
	DEFINE_DEFAULT_OBJECT_INITIALIZER_CONSTRUCTOR_CALL(ASUsableActor) \
private: \
	/** Private copy-constructor, should never be used */ \
	NO_API ASUsableActor(const ASUsableActor& InCopy); \
public:

Here you can see that a public constructor and a private copy constructor are declared, with the public constructor taking a reference constant for FObjectInitializer. The copy constructor is declared private, indicating that the copy constructor is not available

The following two are non-null macro declarations referenced in GENERATED_BODY()

#define ASUsableActor_RPC_WRAPPERS_NO_PURE_DECLS \
	static inline void StaticChecks_Implementation_Validate() \
	{ \
	}

#define ASUsableActor_INCLASS_NO_PURE_DECLS \
	private: \
	static void StaticRegisterNativesASUsableActor(); \
	friend SECTION1_API class UClass* Z_Construct_UClass_ASUsableActor(); \
	public: \
	DECLARE_CLASS(ASUsableActor, AActor, COMPILED_IN_FLAGS(0), 0, Section1, NO_API) \
	DECLARE_SERIALIZER(ASUsableActor) \
	/** Indicates whether the class is compiled into the engine */    enum {IsIntrinsic=COMPILED_IN_INTRINSIC}; \
	UObject* _getUObject() const { return const_cast<ASUsableActor*>(this); }
#define ASUsableActor_ENHANCED_CONSTRUCTORS \
private: \
	/** Private copy-constructor, should never be used */ \
	NO_API ASUsableActor(const ASUsableActor& InCopy); \
public: \
	DEFINE_DEFAULT_CONSTRUCTOR_CALL(ASUsableActor)

DEFINE_DEFAULT_CONSTRUCTOR_CALL didn’t track where and how to declare it in VS, so the literal definition is to define the default constructor, which is the basic constructor.
Also the copy constructor is not available

From the above analysis, you can think of GENERATED_BODY() as generating the default constructor for us, and GENERATED_UCLASS_BODY() as generating the constructor with the specified parameter type for us

Package pdftex.def Error

In the recent texLive presentation of the paper to be submitted, the template requires the illustrations to be in.EPS format

Errors:
./template.tex:172: Package pdftex.def Error: File `E1-1-eps-converted-to.pdf’ not found. [\centerline{\includegraphics{E1-1.eps} }]
./template.tex:394: Package pdftex.def Error: File `E1-2-eps-converted-to.pdf’ not found. [\includegraphics{E1-2.eps}]
./template.tex:417: Package pdftex.def Error: Eps – converted File ` no.e1-2 – – to.. PDF ‘not found. [\ includegraphics {E1-2. Eps}]

the solution:
First, add the macro package
\usepackage{epstopdf}
Second, compile from the command line
pdflatex –shell-escape template.tex
To complete.

12c Instant Client Throws System Error Code 126 or 193 or 106

Applicable to:
Oracle ODBC Driver – Version 12.1.0.1 and later
Microsoft Windows x64 (64-bit)
Microsoft Windows (32-bit)
symptom (of an illness)
Unable to load Oracle setup routine in instantclient_12_1 ODBC driver due to system error code 126: Unable to find the specified module. Oracle (C: \ \ instantclient_12_1 \ SQORAS32.DLL)
In a few cases, the error code is 193 or 106.
Note:This issue also applies to the full client and other lower versions.
Cause
There may not be a Visual c++ 2010 redistributable package on the system.
The solution
Install the “Visual c++ 2010 x86 Redistributable Package” to create a 32-bit DSN.
http://www.microsoft.com/en-in/download/details.aspx?id=5555
To create a 64-bit application or to create a 64-bit DSN install the following redistributable packages:
http://www.microsoft.com/en-in/download/details.aspx?id=13523
Oracle client, you need to install the Visual c++ 2013 redistributable package to resolve the issue.

How to deal with the error reported by live mail

Server Error: 0 x80048820
Server: ‘http://mail.services.live.com/DeltaSync_v2.0.0/Sync.aspx’
Windows Live Mail Error ID: 0 x80048820
 
——————————
To log in to MSN, click on the top right corner “ inbox ” (maybe you don’t have to click, just log in to MSN).
The cause may be login MSN in different places, resulting in inconsistent status, only through MSN login again to eliminate this repetition.
 
Company: MSN, MailLive not installed, inbox display 100 mail.
Home: MSN+MailLive,MailLive has collected part of it

Reproduced in: https://www.cnblogs.com/rock_chen/archive/2010/11/02/1867512.html

Texstudio prompts an error when compiling and viewing latex documents: package inputerror: Unicode character

error content:
Package inputenc Error: Unicode Character, (U+FF0C)(inputenc) not set up for use with LaTeX… · CE sensor data from specific scenarios,

cause:
Chinese characters may exist in the.tex file

solution:
Method 1 (recommended) :
screen Chinese punctuation, generally according to the error of the last can locate the problems in the paragraph, such as commas and periods in Chinese to English, compile again see no problem method 2 (not recommended)
[tools] – [orders] – [XeLatex] compile properly check (not recommended, after all, English expression symbols mixed not be appropriate)

Android studio — java.lang.nullpointerexception(no error message)

If Android Studio in Java. Lang. Nullpointerexception (no error message), then delete the project. Gradle folder, restart the Android Studio, and problem solving

Detailed answers address

http://stackoverflow.com/questions/39183674/java-lang-nullpointerexception-no-error-message

From: http://blog.csdn.net/huangxiaohui123/article/details/53900373