Questions tagged [head]

DO NOT USE as this is an ambigous tag. It might refer to HTML

element, UNIX command, HTTP HEAD method. Instead use [html] for questions about html, [http-head] for questions about the HTTP HEAD method, [unix-head] for question about the UNIX head command.

The <head> element is a container for all the head elements.

The element must include a title for the document, and can include scripts, styles, meta information, and more.

The following elements can go inside the element:

<title> (this element is required in the head section)
<style>
<base>
<link>
<meta>
<script>
<noscript>

head is also a unix command which displays the first lines of a file. It's counterpart which displays the last lines is tail ().

Example: head -n 10 file will output first 10 lines of file.


Related

807 questions
9
votes
1 answer

Prolog-iterating through list

Let's say i have list Xs = [a,b,c]. Now i want to iterate through all elements and call another function for this elements. My question is: how to do this using head and tail? I would be grateful for help.
Dago
  • 788
  • 2
  • 9
  • 24
9
votes
4 answers

Why does Linq not have Head and Tail?

I often find myself wanting to use Head and Tail methods on IEnumerables, which don't exist as part of Linq. While I could easily write my own I wonder whether they have been purposefully left out. For example, var finalCondition = new Sql("WHERE @0…
Jim Jeffries
  • 9,841
  • 15
  • 62
  • 103
8
votes
4 answers

PHP: get_headers set temporary stream_context

I guess PHP's get_headers does not allow for a context, so I have to change the default stream context to only get the HEAD of a request. This causes some issues with other requests on the page. I can't seem to figure out how to reset the default…
Senica Gonzalez
  • 7,996
  • 16
  • 66
  • 108
8
votes
2 answers

How to auto-merge 2 heads with mercurial

We just changed over to mercurial from subversion and there is one thing that is taking up more time than expected; merging heads. We love the fact that it keeps merges independent from the 2 commits (compared to subversion) but we end up on a…
Babouchk
  • 83
  • 1
  • 5
8
votes
7 answers

Adding custom code to in Drupal

I'm trying to figure out where the for all of the pages in Drupal is (I'm using Orange theme if it matters). I have to add analytics code into the . Inside which file would I find the ?
AKor
  • 8,550
  • 27
  • 82
  • 136
8
votes
1 answer

How to get 3D coordinate Axes of head pose estimation in Dlib C++

Dlib C++ can detect landmark and estimate face pose very well. However, how can I get 3D coordinate Axes direction (x,y,z) of head pose?
Rain Maker
  • 152
  • 1
  • 3
  • 6
8
votes
10 answers

How can I read first n and last n lines from a file?

How can I read the first n lines and the last n lines of a file? For n=2, I read online that (head -n2 && tail -n2) would work, but it doesn't. $ cat x 1 2 3 4 5 $ cat x | (head -n2 && tail -n2) 1 2 The expected output for n=2 would be: 1 2 4 5
Amir
  • 5,996
  • 13
  • 48
  • 61
8
votes
1 answer

curl gives error when piped to head command

This works great, no errors: $ curl -sSL https://coinbase.com/api/v1/prices/historical 2014-04-27T18:19:17-07:00,430.52 2014-04-27T18:10:24-07:00,436.25 2014-04-27T17:56:57-07:00,436.14 ... This gives the following error: $ curl -sSL…
Evan Hahn
  • 12,147
  • 9
  • 41
  • 59
8
votes
1 answer

In Amazon S3, what permissions do I need to get HEAD on an object?

I'm trying to get HEAD on an object, and I'm getting 403 forbidden. What permissions do I need to, in order to get HEAD on the object, using the REST API? I have the code in place to get the full object contents using a signed URL... but when I…
Derick Bailey
  • 72,004
  • 22
  • 206
  • 219
8
votes
2 answers

How to programmatically add JS and CSS resources to

I need to add programmatically JavaScript and CSS resources to of a JSF page. It isn't clear how to achieve this. How can I do it or is there a kickoff example?
Younes
  • 1,635
  • 1
  • 19
  • 33
7
votes
1 answer

Proper method for Django template inheritance of content

I have a base.html template with sitewide tags for charset, google-site-verification, stylesheets, js.... I also need to set up blocks for page specific title tags and meta descriptions. I am wondering, should I set up a {% block head %} in my…
shipwreck
  • 305
  • 3
  • 12
7
votes
1 answer

Next.js - How to add a tag inside the with literal onload attribute string value?

On a Next.js project, I'd like to get some initial HTML with this exact same content inside the : What I have in my code, inside Next.js's component, is: { /*…
Danziger
  • 19,628
  • 4
  • 53
  • 83
7
votes
1 answer

default HEAD in git when multiple branch HEADs refer to the same SHA1

in my project, I usually have a (development) branch leading to the next release version at which point the development branch will be merged into the release branch, and then a new development branch will be created. This means, two branch HEADs…
Andre D
  • 71
  • 1
7
votes
1 answer

rotate face from non-front to front opencv

I've struggled for a week with a problem that I can't rotate a face from non-front like the Left Face in this image to front like the Right Face in the same image. 1). I use a tutorial about delaunay at learnopencv website to get all the triangle…
Rain Maker
  • 152
  • 1
  • 3
  • 6
7
votes
4 answers

tag isn't showing up on the web page</a></h3> <div class="excerpt">I was watching tutorials about html for beginners and tried to make a simple html file. when I open this on google chrome the body "hello" is showing up but the title part "first page" doesn't. Did I type something wrong? thanks in advance for your…</div> <div class="grid ai-start jc-space-between fw-wrap"> <div class="grid gs4 fw-wrap tags "> <a href="../../questions/tagged/html" class="post-tag grid--cell" title="show questions tagged 'html'" rel="tag">html</a> <a href="../../questions/tagged/tags" class="post-tag grid--cell" title="show questions tagged 'tags'" rel="tag">tags</a> <a href="../../questions/tagged/title" class="post-tag grid--cell" title="show questions tagged 'title'" rel="tag">title</a> <a href="../../questions/tagged/head" class="post-tag grid--cell" title="show questions tagged 'head'" rel="tag">head</a> </div> <div class="started mt0"> <div class="s-user-card s-user-card__deleted"> <time class="s-user-card--time" datetime="asked Mar 26 '13 at 06:23">asked Mar 26 '13 at 06:23</time> <div class="s-avatar s-avatar__32 s-user-card--avatar"> </div> <div class="s-user-card--info">user2151008</div> </div> </div> </div> </div> </div> </div> <div class="s-pagination pager fr"> <a class="s-pagination--item" href="../../questions/tagged/head_page=3" rel="prev" title="Go to page 3">Prev </a> <a class="s-pagination--item" href="../../questions/tagged/head_page=1" rel="" title="Go to page 1">1</a> <a class="s-pagination--item" href="../../questions/tagged/head_page=2" rel="" title="Go to page 2">2</a> <a class="s-pagination--item" href="../../questions/tagged/head_page=3" rel="" title="Go to page 3">3</a> <div class="s-pagination--item s-pagination--item__clear">…</div> <a class="s-pagination--item" href="../../questions/tagged/head_page=53" rel="" title="Go to page 53">53</a> <a class="s-pagination--item" href="../../questions/tagged/head_page=54" rel="" title="Go to page 54">54</a> <a class="s-pagination--item" href="../../questions/tagged/head_page=5" rel="next" title="Go to page 5"> Next</a> </div> </div> </div> </div> </div> <script src="../../static/js/stack-icons.js"></script> <script src="../../static/js/fromnow.js"></script> </body> </html>