{"id":856,"date":"2022-08-30T15:08:19","date_gmt":"2022-08-30T15:08:19","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2013\/11\/09\/problem-about-code-collection-of-common-programming-errors\/"},"modified":"2022-08-30T15:08:19","modified_gmt":"2022-08-30T15:08:19","slug":"problem-about-code-collection-of-common-programming-errors","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2022\/08\/30\/problem-about-code-collection-of-common-programming-errors\/","title":{"rendered":"problem about code-Collection of common programming errors"},"content":{"rendered":"<ul>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/2b1ef5eb8af2d0392763508bfb7971d8?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nFrank<br \/>\nfloats code<br \/>\nMy document starts with\\documentclass{sig-alternate} \\usepackage{listings}and it includes listings like this:\\begin{lstlisting}[label=samplecode,float=tb,caption=My super code] \/\/ code \\end{lstlisting}I also tried frame=tb. However, the listing is placed as flow-text right in the surrounding text. It&#8217;s not floating. I also tried including the float package, didn&#8217;t help either.PS There are figures and tables in the document that are placed as floats.EDIT (.log):This is pdfTeX, Version 3.1415926-1.40.10 (TeX Live 2009\/Debian) (format=pdflatex 2012.12.23) 22 APR 2013 16:41 entering extended mode%&amp;-line parsing enabled. **paper.tex (.\/paper.tex LaTeX2e Babel and hyphenation patterns for english, usenglishmax, dumylang, noh yphenation, farsi, arabic, croatian, bulgarian, ukrainian, russian, czech, slov ak, danish, dutch, finnish, french, basque, ngerman, german, german-x-2009-06-1 9, ngerman-x-2009-06-19, ibycus, monogreek, greek, ancientgreek, hungarian, san skrit, italian, latin, latvian, lithuanian, mongolian2a, mongolian, bokmal, nyn orsk, romanian, irish, coptic, serbian, turkish, welsh, esperanto, uppersorbian , estonian, indonesian, interlingua, icelandic, kurmanji, slovenian, polish, po rtuguese, spanish, galician, catalan, swedish, ukenglish, pinyin, loaded. (.\/sig-alternate.cls (\/usr\/share\/texmf-texlive\/tex\/latex\/graphics\/epsfig.sty Package: epsfig 1999\/02\/16 v1.7a (e)psfig emulation (SPQR)(\/usr\/share\/texmf-texlive\/tex\/latex\/graphics\/graphicx.sty Package: graphicx 1999\/02\/16 v1.0f Enhanced LaTeX Graphics (DPC,SPQR)(\/usr\/share\/texmf-texlive\/tex\/latex\/graphics\/keyval.sty Package: keyval 1999\/03\/16 v1.13 key=value parser (DPC) \\KV@toks@=\\toks14 ) (\/usr\/share\/texmf-texlive\/tex\/latex\/graphics\/graphics.sty Package: graphics 2009\/02\/05 v1.0o Standard LaTeX Graphics (DPC,SPQR)(\/usr\/share\/texmf-texlive\/tex\/latex\/graphics\/trig.sty Package: trig 1999\/03\/16 v1.09 sin cos tan (DPC) ) (\/etc\/texmf\/tex\/latex\/config\/graphics.cfg File: graphics.cfg 2009\/08\/28 v1.8 graphics configuration of TeX Live ) Package graphics Info: Driver file: pdftex.def on input line 91.(\/usr\/share\/texmf-texlive\/tex\/latex\/pdftex-def\/pdftex.def File: pdftex.def 2010\/03\/12 v0.04p Graphics\/color for pdfTeX \\Gread@gobject=\\count79 )) \\Gin@req@height=\\dimen102 \\Gin@req@width=\\dimen103 ) \\epsfxsize=\\dimen104 \\epsfysize=\\dimen105 ) (\/usr\/share\/texmf-texlive\/tex\/latex\/amsfonts\/amssymb.sty Package: amssymb 2009\/06\/22 v3.00(\/usr\/share\/texmf-texlive\/tex\/latex\/amsfonts\/amsfonts.sty Package: amsfonts 2009\/06\/22 v3.00 Basic AMSFonts support \\@emptytoks=\\toks15 \\symAMSa=\\mathgroup4 \\symAMSb=\\mathgroup5 LaTeX Font Info: Overwriting math alphabet `\\mathfrak&#8217; in version `bold&#8217; (Font) U\/euf\/m\/n &#8211;&gt; U\/euf\/b\/n on input line 96. )) (\/usr\/share\/texmf-texlive\/tex\/latex\/amsmath\/amsmath.sty Package: amsmath 2000\/07\/18 v2.13 AMS math features \\@mathmargin=\\skip41For additional information on amsmath, use the `?&#8217; option. (\/usr\/share\/texmf-texlive\/tex\/latex\/amsmath\/amstext.sty Package: amstext 2000\/06\/29 v2.01(\/usr\/share\/texmf-texlive\/tex\/latex\/amsmath\/amsgen.sty File: amsgen.sty 1999\/11\/30 v2.0 \\@emptytoks=\\toks16 \\ex@=\\dimen106 )) (\/usr\/share\/texmf-texlive\/tex\/latex\/amsmath\/amsbsy.sty Package: amsbsy 1999\/11\/29 v1.2d \\pmbraise@=\\dimen107 ) (\/usr\/share\/texmf-texlive\/tex\/latex\/amsmath\/amsopn.sty Package: amsopn 1999\/12\/14 v2.01 operator names ) \\inf@bad=\\count80 LaTeX Info: Redefining \\frac on input line 211. \\uproot@=\\count81 \\leftroot@=\\count82 LaTeX Info: Redefining \\overline on input line 307. \\classnum@=\\count83 \\DOTSCASE@=\\count84 LaTeX Info: Redefining \\ldots on input line 379. LaTeX Info: Redefining \\dots on input line 382. LaTeX Info: Redefining \\cdots on input line 467. \\Mathstrutbox@=\\box26 \\strutbox@=\\box27 \\big@size=\\dimen108 LaTeX Font Info: Redeclaring font encoding OML on input line 567. LaTeX Font Info: Redeclaring font encoding OMS on input line 568. \\macc@depth=\\count85 \\c@MaxMatrixCols=\\count86 \\dotsspace@=\\muskip10 \\c@parentequation=\\count87 \\dspbrk@lvl=\\count88 \\tag@help=\\toks17 \\row@=\\count89 \\column@=\\count90 \\maxfields@=\\count91 \\andhelp@=\\toks18 \\eqnshift@=\\dimen109 \\alignsep@=\\dimen110 \\tagshift@=\\dimen111 \\tagwidth@=\\dimen112 \\totwidth@=\\dimen113 \\lineht@=\\dimen114 \\@envbody=\\toks19 \\multlinegap=\\skip42 \\multlinetaggap=\\skip43 \\mathdisplay@stack=\\toks20 LaTeX Info: Redefining \\[ on input line 2666. LaTeX Info: Redefining \\] on input line 2667. ) Document Class &#8216;sig-alternate&#8217;<\/li>\n<\/ul>\n<p id=\"rop\"><small>Originally posted 2013-11-09 22:49:09. <\/small><\/p>","protected":false},"excerpt":{"rendered":"<p>Frank floats code My document starts with\\documentclass{sig-alternate} \\usepackage{listings}and it includes listings like this:\\begin{lstlisting}[label=samplecode,float=tb,caption=My super code] \/\/ code \\end{lstlisting}I also tried frame=tb. However, the listing is placed as flow-text right in the surrounding text. It&#8217;s not floating. I also tried including the float package, didn&#8217;t help either.PS There are figures and tables in the document that [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-856","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/856","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/comments?post=856"}],"version-history":[{"count":0,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/856\/revisions"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=856"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=856"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=856"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}