Tag Archives: The picture

Solution to latex “too many unprocessed floats” error

This error occurred because more than 18 graphs and tables were placed in a row without any text in between.These solutions are available online:
1. Using macro package \usepackage[section]{placeins}
2. Start using \ ClearPage on each pageBut after the author used the above method, although the error is not reported, but the layout of the picture is still a bit messy.

In fact, this error is caused by the continuous placement of too many floating graphics.

The author to check the LaTex books (http://www.ctex.org/documents/latex/graphics/node2.html), 20 according to the book. Do not float the figure, remove the figure environment (that is, add pictures as non-floating graphics), the problem is solved.

Code used by the author:

\centerline{\includegraphics[width=12cm]{fig1}}
\caption{fig1}\label{fig1}
%\vspace{5mm}
\centerline{\includegraphics[width=12cm]{fig2}}
\caption{fig2}\label{fig2}
%\vspace{5mm}
\centerline{\includegraphics[width=12cm]{fig3}}
\caption{fig3}\label{fig3}
.
.
.
%\vspace{5mm}
\centerline{\includegraphics[width=12cm]{fig20}}
\caption{fig20}\label{fig20}

where vspace{5mm} can be adjusted for image spacing.
Update: If you must use the Figure environment, you can combine \ ClearPage with! H parameters are used together, such as:

\begin{figure}[!h]
\centerline{\includegraphics[width=12cm]{fig17}}
\caption{Experimental results of the 17th image frame}\label{fig17}
\end{figure}

\clearpage

\begin{figure}[!h]
\centerline{\includegraphics[width=12cm]{fig18}}
\caption{Experimental results of the 18th image frame}\label{fig18}
\end{figure}

\ ClearPage where it was at the end of the previous page.

“Failed to convert @ drawable / XX into a drawable exception details are logged in window”

Problem description

Image resource reference error, there are usually the following similar error logs:

java.lang.NumberFormatException: Color value 
'@drawable/xx' must start with #

reason

The most likely cause of this problem is that your image resource name is wrong, and it is likely to start with a number. In Android, if your image is named after a number, the system will treat it as a hexadecimal color value by default, and the definition of these color values often starts with “#”, so there is the following numberformatexception.

Solution

At this time, you need to check whether the name of the wrong resource starts with a number. If it starts with a number, rename it. If not, try to check whether the name of the resource starts with a space in eclipse (of course, the error at this time is that the drawable file cannot be found). If so, modify it. If not, delete the image and add it again.

After renaming, if the layout file cannot be displayed normally, refresh the preview of the layout view or restart the development tool.

Python modifies word document content and inserts pictures

The following code

#!/usr/bin/python
# coding:utf-8
import docx
def main():
    filepath = 'test.docx'
    filepath1 = 'wtest.docx'
    newdocx = docx.Document(filepath)
    table = newdocx.tables
    for oTable in table:
        rows_num = len(oTable.rows)
        columns_num = len(oTable.columns)
        cell = oTable.cell(3, 0)
        # cell.add_paragraph("a")
        cell.text = ""
        cell.paragraphs[-1].runs[0].add_picture('t1.jpg')
        print(rows_num)
        print(columns_num)
        newdocx.save(filepath1)
if __name__ == '__main__':
    main()

CFNetwork internal error (0xc01a:/BuildRoot/Library/Caches/com.apple.xbs/Sources/CFNetwork/CFNetwork

Just started a project from the N layer of JSON data to take an array of URL, after a variety of traversal what finally get the correct URL, but the running program found that the image does not display, print URL image display normal. Report the following questions, a variety of Baidu also did not find any description of the answer to the question. See also: stackoverflow.com

The discovery is all about the problem in the URL, and finally check the code:

Found that in fact the website repeatedly wrote, change back OK