How to re-position each chapter at the beginning of the page/ :-) With the following preamble how can I reposition where the chapters start? Meaning each section is defined to start at almost the 2/3 of the page. There is a small space and then goes the "Section 1: blah blah". Can I start each section at the beginning of the page like the other pages?  \documentclass[a4paper,12pt]{book} \setcounter{secnumdepth}{-2}  \titleformat{\chapter}[display]{\normalfont\huge\bfseries}{}{20pt}{\Huge}  \let\cleardoublepage\clearpage \usepackage[english,greek]{babel} \usepackage[utf8x]{inputenc} \usepackage{blindtext} \usepackage[pdftex]{graphicx} \usepackage[skip=2pt, font=small, labelformat = empty]{caption}  \newcommand{\gr}{\selectlanguage{greek}} \newcommand{\en}{\selectlanguage{english}} \usepackage{wrapfig} \usepackage[paperwidth=17cm, paperheight=24cm]{geometry} \usepackage[onehalfspacing]{setspace} \usepackage{textcomp} \useshorthands{;} \defineshorthand{;}{?} \usepackage{fancyhdr} \fancyhf{} \fancyhead[LE]{\nouppercase{\leftmark}} \fancyhead[RO]{\nouppercase{\rightmark}} \fancyfoot[LE,RO]{\thepage} \pagestyle{fancy}  \renewcommand{\chaptermark}[1]{ \markboth{#1}{} } \renewcommand{\sectionmark}[1]{ \markright{#1}{} }
How to adjust the size and placement of chapter heading in report class How could I adjust the size and placement of chapter heading in my custom class? I am using report class as my base. When I used titlesec package inside my custom class, it threw error     ! Package titlesec Error: Not allowed in `easy'   settings.
Inspired by this Hagon Von Eitzen's answer( ) I started investigating how I could express natural numbers as differences of squares. Using the method explained in the solution, I investigated natural numbers up to $60$ manually. I observed the following:  There is no way to express numbers of the form $4k+2$ as a difference of two squares.  2.There is one and only one way to express prime numbers (except $2$) as a difference of two squares.  The smallest number that can be expressed as a difference of two squares in two different ways is $15$ and the smallest number that can be expressed as a difference of two squares in three different ways is $45$.  As, $15= 8^2-7^2=4^2-1^2$. $45=23^2-22^2=9^2-6^2=7^2-2^2$. I could prove point $2$ easily but could not prove point $1$. Also I am interested in knowing how I could find the smallest natural number that could be expressed as a difference of two squares in four different ways without manual calculation. Do you use NULL or 0 (zero) for pointers in C++? Intuitive explanation of the inverse square power $\frac{1}{r^2}$ in Newton's law of gravity I need a number of different full-page DOM samples for my qUnit test suite What is the rule for adjective order? I remember being taught that the correct order of adjectives in English was something along the lines of "Opinion-Size-Age-Color-Material-Purpose."  However, it's been a long time and I'm pretty sure I've forgotten a few categories (I think there were eight or nine). Can anyone fill them in? How to change permissions of multiple files found with find command? Does it increase security if the CBC chunks of a AES-256 encrypted bytestream are uploaded to different clouds? I want to backup my data according to the 3-2-1 rule. I am already back up to 2 different drives (2 different systems) at home. In addition, I would like to use cloud storage (Google, Amazon, etc.). Considering the future weakening of cryptography by advancements in computing power (e.g. key guessing by quantum computing) I want my data to be as safe as possible because once it's uploaded it's prone to decryption in the future (i can't guarantee the data is deleted if I delete it from the cloud(s)). Does it increase the security of my data if I split the CBC chunks to let's say 2 clouds? Uploading the even-numbered CBC elements to e.g. Google and the odd-numbered elements to Amazon. Since one storage hoster is constantly missing the next part of the CBC-Chain (1/2 in total) shouldn't this increase security of the data even if the AES key is known by the hoster(s)? How to convert a string of bytes into an int? How can I convert a string of bytes into an int in python?   Say like this: 'y\xcc\xa6\xbb'  I came up with a clever/stupid way of doing it:  sum(ord(c) &lt;&lt; (i * 8) for i, c in enumerate('y\xcc\xa6\xbb'[::-1]))   I know there has to be something builtin or in the standard library that does this more simply...  This is different from  for which you can use int(xxx, 16), but instead I want to convert a string of actual byte values.  UPDATE:  I kind of like James' answer a little better because it doesn't require importing another module, but Greg's method is faster:  &gt;&gt;&gt; from timeit import Timer &gt;&gt;&gt; Timer('struct.unpack("&lt;L", "y\xcc\xa6\xbb")[0]', 'import struct').timeit() 0.36242198944091797 &gt;&gt;&gt; Timer("int('y\xcc\xa6\xbb'.encode('hex'), 16)").timeit() 1.1432669162750244   My hacky method:  &gt;&gt;&gt; Timer("sum(ord(c) &lt;&lt; (i * 8) for i, c in enumerate('y\xcc\xa6\xbb'[::-1]))").timeit() 2.8819329738616943   FURTHER UPDATE:  Someone asked in comments what's the problem with importing another module. Well, importing a module isn't necessarily cheap, take a look:  &gt;&gt;&gt; Timer("""import struct\nstruct.unpack("&gt;L", "y\xcc\xa6\xbb")[0]""").timeit() 0.98822188377380371   Including the cost of importing the module negates almost all of the advantage that this method has. I believe that this will only include the expense of importing it once for the entire benchmark run; look what happens when I force it to reload every time:  &gt;&gt;&gt; Timer("""reload(struct)\nstruct.unpack("&gt;L", "y\xcc\xa6\xbb")[0]""", 'import struct').timeit() 68.474128007888794   Needless to say, if you're doing a lot of executions of this method per one import than this becomes proportionally less of an issue. It's also probably i/o cost rather than cpu so it may depend on the capacity and load characteristics of the particular machine. Intuition behind logistic regression Recently I began studying machine learning, however I failed to grasp the intuition behind .   The following are the facts about logistic regression that I understand.   As the basis for hypothesis we use . I do understand why it's a correct choice, however why it's the only choice I don't understand. Hypothesis represents the probability that the appropriate output is $1$, therefore the domain of our function should be $[0,1]$, this is the only property of sigmoid function I found useful and appropriate here, however many functions satisfy this property. In addition, sigmoid function has a derivative in this form $f(x)(1-f(x))$, but I don't see the utility of this special form in logistic regression.   Question: what so special about sigmoid function, and why we cannot use any other function with domain $[0,1]$? The cost function consists of two parameters ${\rm Cost}(h_{\theta}(x),y)=-\log(h_{\theta}(x))$ if $y=1, {\rm Cost}(h_{\theta}(x),y)=-\log(1-h_{\theta}(x))$ if $y=0$. In the same was as above, I do understand why it's correct, however why is it the only form? For example, why couldn't $|h_{\theta(x)}-y|$ be a good choice for the cost function?  Question: what is so special about the above form of cost function; why cannot we use another form?   I would appreciate if you could share your understanding of logistic regression. Arriving at a different port of entry in the same state in USA? I am a girl in my early twenties traveling to USA from India and in my visa application I have provided the contact address for a relative in San Francisco, and their invitation letter. I would like to visit LA first. Will I face problems during immigration if I land in LA (with an immediate on wards ticket to SF)? I dont plan to get on the flight from LA to SFO.  Initially I was planning to fly to SFO from India and then fly to LA immediately after completing immigration at SFO airport. Is it possible to have a different background for each workspace? I normally use 4 different workspaces for different things, and they are always the same. Can I make a different background image for each one of them?   I would like an answer that works for GNOME 3 desktop environment, Unity and the Classic desktop environment.     This question has multiple answers covering different Ubuntu versions: Let $A$ be a real square matrix en let $I$ be the identity matrix with the same size. Let $n&gt;0$ be the smallest natural number for which there exist  $a_0,a_1,...a_{n-1} \in {R}$ such that $A^n+a_{n-1}A^{n-1}+....+a_1A+a_0I=O$.  Show that A is invertible if and only if $a_0\neq0 $.  So i need to proof    $A$ invertible $\rightarrow$$a_0 \neq 0$ $a_0 \neq0 \rightarrow$ $A$ invertible    I don't really know where to start with 1, and with 2 I tried to prove it with a contradiction but I don't think it's right either. Change default CSS of Google Chrome I would like to be able to change the default CSS used by chrome, such as removing the underlines for links, etc. However, I cannot find the default CSS file used by Chrome. Does anyone know where it is? Cross-platform space remaining on volume using python I need a way to determine the space remaining on a disk volume using python on linux, Windows and OS X. I'm currently parsing the output of the various system calls (df, dir) to accomplish this - is there a better way? I have a question related to modeling short time-series. It is not a question , but how. What method would you recommend for modeling (very) short time-series (say of length $T \leq 20$)? By "best" I mean here the most robust one, that is the least prone to errors due the fact of limited numbers of observations. With short series single observations could influence the forecast, so the method should provide a cautious estimate of errors and possible variability connected to the forecast. I am generally interested in univariate time-series but it would be also interesting to know about other methods. Proof that for $a,b,c\in \mathbb{R}$, hold that $\left |\sqrt {a^2+b^2}-\sqrt {a^2+c^2} \right |\leq \left |b-c \right |$. Proof that for $a,b,c\in \mathbb{R}$, hold that $\left |\sqrt {a^2+b^2}-\sqrt {a^2+c^2}  \right |\leq \left |b-c  \right |$. Give me a clue, I don't have any idea to work with that inequality. How to create dummy webcam? I would like to join some videoconference, but I don't own a webcam and the conference software requires one.  So my question is, can I create a dummy one? I don't care what the cam will cast, I just need to appear to have one. How find this $x^3-5x+10=2^y$ let $x,y$ is positive integer,and such $$x^3-5x+10=2^y$$ find all $x,y$.  since $$x=1\Longrightarrow 1^3-5+10=6$$ can't $$x=2,2^3-5\cdot 2+10=8=2^3$$ so $x=2,y=3$  $$x=3,LHS=27-15+10=22$$ $$x=4,LHS=64-20+10=54$$ $$x=5,LHS=125-25+10=110$$ $$x=6,LHS=216-30+10=236$$ $$\cdots$$  I find $$(x,y)=(2,3)$$  I only find $x\le 7$ this solution.  maybe this have other solution.and This problem is from Mathematical olympiad problems Thank you How is canonicity of derivative works determined for Star Wars? For all types of derivative works, namely:   Movies Novels Comic books Other written works (including RPG materials) Cartoons Video games Derivative movies (such as the infamous Ewok movies and even more infamous )   According to what rules does something become "canon" and who is responsible for the evaluation of a published work? Proving a function is bounded Hi i was wondering if  anyone could help me with my revision This is a question of a past paper i'm stuck on.  Let $$f:[a,b]\to \Re$$ be Riemann intergrable. Part (a) is to prove that f is bounded and part (b) is to Give an example of a bounded function f that is not Riemann integrable  my attempt for part (a) is since f is Riemann intergrable then it is continuous on [a,b] which means that it must also be bounded? or is this incorrect i find this topic rather difficult  For part (b) i dont really have a clue i cant recall any function like the one they ask for