Jump to content

Wikipedia:Reference desk/Archives/Computing/2014 September 2

From Wikipedia, the free encyclopedia
Computing desk
< September 1 << Aug | Sep | Oct >> September 3 >
Welcome to the Wikipedia Computing Reference Desk Archives
The page you are currently viewing is an archive page. While you can leave answers for any questions shown below, please ask new questions on one of the current reference desk pages.



September 2

[edit]

the text "chapter no # " missing

[edit]

I m writing a thesis using a thesis template in latex , But I have problem with the title of chapter. In my thesis each chapter starts with only chapter name but before this the text "Chapter No ... " is missing.I want this to appear. thesis style file has the following code at start:

\NeedsTeXFormat{LaTeX2e}[1996/12/01]
\ProvidesClass{Thesis}
              [2007/22/02 v1.0
   LaTeX document class]
\def\baseclass{book}
\DeclareOption*{\PassOptionsToClass{\CurrentOption}{\baseclass}}
\def\@checkoptions#1#2{
  \edef\@curroptions{\@ptionlist{\@currname.\@currext}}
  \@tempswafalse
  \@tfor\@this:=#2\do{
    \@expandtwoargs\in@{,\@this,}{,\@curroptions,}
    \ifin@ \@tempswatrue \@break@tfor \fi}
  \let\@this\@empty
  \if@tempswa \else \PassOptionsToClass{#1}{\baseclass}\fi
}
\@checkoptions{11pt}{{10pt}{11pt}{12pt}}
\PassOptionsToClass{a4paper}{\baseclass}
\ProcessOptions\relax
\LoadClass{\baseclass}
\newcommand\bhrule{\typeout{------------------------------------------------------------------------------}}
\newcommand\Declaration[1]{
\btypeout{Declaration of Authorship}
\addtotoc{Declaration of Authorship}
\thispagestyle{plain}
\null\vfil
%\vskip 60\p@
\begin{center}{\huge\bf Declaration of Authorship\par}\end{center}
%\vskip 60\p@
{\normalsize #1}
\vfil\vfil\null
%\cleardoublepage
}

\newcommand\btypeout[1]{\bhrule\typeout{\space #1}\bhrule}
\def\today{\ifcase\month\or
  January\or February\or March\or April\or May\or June\or
  July\or August\or September\or October\or November\or December\fi
  \space \number\year}
\usepackage{setspace}
\doublespacing

\setlength{\parindent}{0pt}
\setlength{\parskip}{2.0ex plus0.5ex minus0.2ex}
\usepackage{vmargin}
\setmarginsrb           { 1.0in}  % left margin
                        { 1.0in}  % top margin
                        { 1.0in}  % right margin
                        { 1.0in}  % bottom margin
                        {  20pt}  % head height
                        {0.25in}  % head sep
                        {   9pt}  % foot height
                        { 0.3in}  % foot sep
\raggedbottom
\setlength{\topskip}{1\topskip \@plus 5\p@}
\doublehyphendemerits=10000       % No consecutive line hyphens.
\brokenpenalty=10000              % No broken words across columns/pages.
\widowpenalty=9999                % Almost no widows at bottom of page.
\clubpenalty=9999                 % Almost no orphans at top of page.
\interfootnotelinepenalty=9999    % Almost never break footnotes.
\usepackage{fancyhdr}
\lhead[\rm\thepage]{\fancyplain{}{\sl{\rightmark}}}
\rhead[\fancyplain{}{\sl{\leftmark}}]{\rm\thepage}
\chead{}\lfoot{}\rfoot{}\cfoot{}
\pagestyle{fancy}
%\renewcommand{\chaptermark}[1]{\btypeout{\thechapter\space #1}\markboth{\@chapapp\ \thechapter\ #1}{\@chapapp\ \thechapter\ #1}}

please help me to overcome this — Preceding unsigned comment added by 182.187.106.65 (talkcontribs)

Well, I don't know if it's 'missing', it's just not there :) Anyway, you can do this by adding the appropriate commands into an declaration in the preamble. My first guess is to try \atbeginchapter, but a quick google indicates that doesn't exist. This is the kind of stuff that I usually just google and experiment with. Also, consider that making it look just the way you want may not be the best use of your research time... if the template has passed muster at your university, I would urge caution before messing with it. Surely you have heard horror stories of a thesis being rejected because something was slightly off with the fonts or margins? This is why they pass around a LaTeX template, to help eliminate that risk. So it might be the case that doing what you want will cause your document to break the rules.
Anyway, see here [1], for a discussion of how to \renewcommand{\chapter} to change things around a bit. And you can also ask this question at that site, if you don't get enough satisfactory answers here. SemanticMantis (talk) 21:55, 5 September 2014 (UTC)[reply]
Oh, and I just realized that your last line is commented out. Try removing the % symbol to let the \renewcommand{\chaptermark} take effect, that might solve the problem tight there. SemanticMantis (talk) 21:58, 5 September 2014 (UTC)[reply]

What is the best code to use to create a WikiBot?

[edit]

Currently I am learning HTML and CSS. Based on the list provided, is there a language that would best fit my needs? I plan to have a personal bot for large edits, and possibly another for fixing syntax differences such as:

* [[File:Example_22.png|thumb|Caption text]]

compared to

*[[File: example 22.png |thumb|caption text]]

.

I have been suggested to use PHP or Python, although I would like to have a second opinion with reasons of versatility for the language. DC64 (talk) 01:20, 2 September 2014 (UTC)[reply]

There are some who give damning critiques of PHP. However, I have only heard good about Python 3. Σσς(Sigma) 01:22, 2 September 2014 (UTC)[reply]
I would say python is a good option as there is the Manual:Pywikibot framework which will do a lot of the tricky bits for you. PHP only makes sense if you have the code running on a webserver, say if you have an account on WP:LABS. With python it will typically run from the command line or via a GUI. You might find the actual type of edit you want to do is better handled with WP:AWB which can use regular expressions to make changes like turning File:Example_22.png into File:Example 22.png you may even find that sort of change is already done by WikiProject Check Wikipedia.--Salix alba (talk): 06:26, 2 September 2014 (UTC)[reply]
Pywikibot does not at present support Python3.[2] I understand it is highly functional with Python2.x.-gadfium 03:08, 3 September 2014 (UTC)[reply]

Google drive permissible file types

[edit]

Does Google Drive support arbitrary file types, or is there hidden away somewhere in their terms-of-service agreement some requirement that certain well-known file types be used? I've noticed that they've cut prices considerably, and a large mirrored cloud storage space is becoming affordable. I'm considering mirroring a dedicated disk (or two), where I keep encrypted, compressed versions of the stuff on my hard drives. 3TB, perhaps. I roll my own encryption scheme, and like to package the data in .WAV containers, so that I by listening can confirm that the content is truly random (white noise). ENT is nice for that purpose, too. This will of course thwart the deduplication that I suppose is the basis of Google's pricing. Could I risk that Google converts my WAV files to MP3... --NorwegianBlue talk 13:01, 2 September 2014 (UTC)[reply]

Google Drive will let you store binary blobs, at least if you're a paying customer. I think that rolling your own crypto and hoping to hear patterns in WAV files is a really bad idea, though. Use something standard like GnuPG. "Ent" looks like an untrustworthy home-brew utility as well. -- BenRG (talk) 21:26, 3 September 2014 (UTC)[reply]
Thanks, both for the info and the advice! --NorwegianBlue talk 08:30, 4 September 2014 (UTC)[reply]