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
23
votes
6 answers

Fastest way to print a single line in a file

I have to fetch one specific line out of a big file (1500000 lines), multiple times in a loop over multiple files, I was asking my self what would be the best option (in terms of performance). There are many ways to do this, i manly use these 2 cat…
JBoy
  • 5,398
  • 13
  • 61
  • 101
22
votes
3 answers

When do you put Javascript in body, when in head and when use doc.load?

Possible Duplicate: Where to place Javascript in a HTML file? Should I write script in the body or the head of the html? I've always wondered, mainly because when creating pages I always run into trouble, based on the following thing: When do you…
Sander Schaeffer
  • 2,757
  • 7
  • 28
  • 58
21
votes
4 answers

Can React Helmet inject a javascript object into tag?

I've a question, I need to inject into the HEAD tag a javascript object, for tag management purposes. This is my Helmet component, but it accepts only specific parameters to set to metadata serverside through rewind() function. Is there a way still…
axel
  • 3,778
  • 4
  • 45
  • 72
21
votes
2 answers

Jquery add css to head

I am asynchronously adding a few scripts and style sheets to a project that I am building and would like to keep the style sheets all grouped together in the HEAD. home
Deac Karns
  • 1,191
  • 2
  • 13
  • 26
20
votes
3 answers

What is the real difference between the "head" and "header" tag?

The Question I've been coding for a while and realized that the head and header look exactly the same. Are they the same, and what is the difference between them? Does it make a difference? After researching a bit I couldn't find much info on…
makertech81
  • 898
  • 2
  • 7
  • 20
19
votes
2 answers

How to output lines 800-900 of a file with a unix command?

I want to output all lines between a and b in a file. This works but seems like overkill: head -n 900 file.txt | tail -n 100 My lack of unix knowledge seems to be the limit here. Any suggestions?
Jesper Rønn-Jensen
  • 106,591
  • 44
  • 118
  • 155
18
votes
1 answer

Best way to split several heads from a list with Erlang?

So, Erlang is a real joy to work with, but there's one problem I run into occasionally, that I'm wondering if there is a nicer way to solve. Often, I find myself needing to split several items from a list. The syntax for splitting a list into a Head…
18
votes
1 answer

How to move the HEAD to the latest date in git?

What I wish to do is to get the version of the file that has a specific comment, get it and use it, then change it to the latest code. git log -g --grep="code submitted version 0.1.2.3" This returns a hash 123456, then I do: git checkout…
max
  • 9,708
  • 15
  • 89
  • 144
17
votes
5 answers

How to add Adsense to a website built with GatsbyJS?

I'd like to know where I should add the provided by Google Adsense. They say to add it into the , but in Gatsby you have Helmet as . I tried also to add the script inside an html.js file where it's located a…
Joe Doe
  • 433
  • 3
  • 7
17
votes
2 answers

How to round values only for display in pandas while retaining original ones in the dataframe?

I wish to only round values in the DataFrame for display purposes, when I use head() or tail() but I want the DataFrame to retain the original values. I tried using the round method but it changes the values in the original DataFrame. I don't wish…
xennom
  • 171
  • 1
  • 5
17
votes
2 answers

How to tail the last line of multiple files using "tail -1 */filename"

tail */filename works, but tail -1 */filename doesn't. Why is this? And is there a 1 liner to perform this task without loops? head -1 */filename works for some strange reason.
mrkent
  • 333
  • 2
  • 4
  • 13
16
votes
6 answers

Detached HEAD Issue in Android Studio

I am new to Android Studio and have began developing a Navigation Drawer app. After having made a mistake in a commit, I played around with the Version control's "Checkout Revision" and now I can no longer push my project onto Github due to a…
Adam Arcaro
  • 451
  • 7
  • 19
16
votes
9 answers

unstaged files gone after git reset --hard

I tried the git reset --hard HEAD@{n} from git reflog and I lost everything with my current unstaged files :'( the unstaged files is the last git add I did, before then I tried git reset to the last git commit. And all my files gone, I can't go back…
mochadwi
  • 1,190
  • 9
  • 32
  • 87
15
votes
5 answers

What is the easiest way to use the HEAD command of HTTP in PHP?

I would like to send the HEAD command of the Hypertext Transfer Protocol to a server in PHP to retrieve the header, but not the content or a URL. How do I do this in an efficient way? The probably most common use-case is to check for dead web links.…
fuenfundachtzig
  • 7,952
  • 13
  • 62
  • 87
14
votes
6 answers

How do I send a HEAD request manually using Firefox?

I'm debugging my webserver, and I'd like to manually send HEAD requests to some web pages. Is there a way to do this in Firefox? Some extension perhaps. I want to use firefox so that it can be part of a normal session (ie cookies set, logged in,…
Paul Biggar
  • 27,579
  • 21
  • 99
  • 152
1
2
3
53 54