head

How to make Head point to master in git?

╄→尐↘猪︶ㄣ 提交于 2019-12-05 03:46:21
Please help to make Head point to master in git I tried to git rebase HEAD master and git checkout master Nothing of those helps. Updated: Strange I tried: git symbolic-ref HEAD refs/heads/master then git rev-parse refs/heads/master fc550e5ff2fe49d64ee1d8bf0da09b2b24bf2cd7 and then I got strange warning after the following command git rev-parse HEAD warning: refname 'HEAD' is ambiguous. fc550e5ff2fe49d64ee1d8bf0da09b2b24bf2cd7 New Update: There was HEAD branch in remotes -> origin . After removing it everything is ok. I do not have that warning anymore. VonC IF you don't have any local work in

HTML & CSS - put <link> tag outside of the <head> [duplicate]

不羁岁月 提交于 2019-12-04 22:23:46
This question already has an answer here: Does <STYLE> have to be in the <HEAD> of an HTML document? 10 answers Is it ok to put the <link> to a css file out of the <head/> tag, for example in the footer side? Which are bad and good results of this? I ask this, cause actually i have a css file which doesn't styles anything but brings just some css3 animations to my website, so i would like to put it to the end of the html just for performance reason... thanks Style sheets are linked in the <head> so that the browser can style the HTML and render it as it goes. If you put the style information

Webkit moves head content to body, and adds extra space?

…衆ロ難τιáo~ 提交于 2019-12-04 16:46:39
It seems Webkit moves all my head tags to the body, and adds a lot of whitespace before the body. When I look at the source, the tags are in the right place. When I inspect the elements using the Chrome browser, the tags have been moved. I suspect it's Webkit because the same happened in Safari, but not in Opera or Firefox. I use the latest of all browsers. Here is my source code start, as appears when I press "Show Source": <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http

combining head and tail methods in R

大城市里の小女人 提交于 2019-12-04 11:12:16
I use the head(d) and tail(d) methods in R package utils a lot - frequently one after the other. So i wrote a simple wrapper for the two functions: ht <- function(d, m=5, n=m){ # print the head and tail together cat(" head --> ", head(d,m), "\n", "--------", "\n", "tail --> ", tail(d,n), "\n") } And i got some unexpected results ... can someone please help me understand why? (so i can fix it ... or at least understand your solution!). Some background... Numeric is fine: x <- 1:100 ht(x) As is complex: ni <- as.complex(1:100) ht(ni) and character: ll <- letters[1:26] ht(ll) Matrix loses it's

Reversing a List in Prolog

心已入冬 提交于 2019-12-03 02:58:53
I have finished a homework assignment for my programming class. I was supposed to create a Prolog program that reverses a list. I, however, am having trouble understanding why exactly it works. %1. reverse a list %[a,b,c]->[c,b,a] %reverse(list, rev_List). reverse([],[]). %reverse of empty is empty - base case reverse([H|T], RevList):- reverse(T, RevT), conc(RevT, [H], RevList). %concatenation What exactly is RevT in this case? I know it is supposed to represent the reverse of T or the rest of the given list, but I don't see how it could have any value as I haven't assigned it to anything.

Prolog list of lists get all elements

江枫思渺然 提交于 2019-12-02 20:45:57
问题 I have a lists of lists: decide([[1,2,-3],[-2,3],[6],[4]],K). I want to return all the possible solutions pressing ';'. The rule is to first return the values that its list has size 1. Then I want to return the values that its size is bigger than 1. size([],0). size([_|Xs],L) :- size(Xs,N),L is N+1. head([],[]). head([X|_],X). return_list_members([X|_], X). return_list_members([_|T], X):-return_list_members(T, X). decide([], []). decide([L|Ls], Lit):- size(L, N), N == 1, head(L, Lit). decide(

Django中模板编码引发extend的问题

Deadly 提交于 2019-12-02 18:47:42
用django1.5的模板继承的时候遇到一个很诡异的问题: 用{% extend %}继承父模板后,在chrome中查看源码, <head> 中的内容诡异的到 <body> 标签中了,各种排查都不行。 最后发现是模板文件格式为dos的,换行符\r\n,用dos2unix转一下就OK了,这个是个坑啊,记一下。 来源: oschina 链接: https://my.oschina.net/u/266979/blog/165696

Delete all local changesets and revert to tree

你。 提交于 2019-12-02 13:58:28
I'm using Mercurial and I've got into a terrible mess locally, with three heads. I can't push, and I just want to delete all my local changes and commits and start again with totally clean code and a clean history. In other words, I want to end up with (a) exactly the same code locally as exists in the tip of the remote branch and (b) no history of any local commits. I know hg update -C overwrites any local changes. But how do I delete any local commits? To be clear, I have no interest in preserving any of the work I've done locally. I just want the simplest way to revert back to a totally

Print names of files with proper head

為{幸葍}努か 提交于 2019-12-02 10:53:07
问题 I want to get the name of files in current directory such that the first line of the file is equal to myWord . I wanted to combine find . -type f command with -exec option with head -1 filename but to no avail. Is there some clever, one-line solution to this problem? 回答1: You can use find with awk : find . -maxdepth 1 -type f -exec awk '/myWord/{print FILENAME} {nextfile}' {} + awk command will search first line of each file for the word myWord then it prints that filename. Or using gnu sed :

Print names of files with proper head

痴心易碎 提交于 2019-12-02 04:59:51
I want to get the name of files in current directory such that the first line of the file is equal to myWord . I wanted to combine find . -type f command with -exec option with head -1 filename but to no avail. Is there some clever, one-line solution to this problem? You can use find with awk : find . -maxdepth 1 -type f -exec awk '/myWord/{print FILENAME} {nextfile}' {} + awk command will search first line of each file for the word myWord then it prints that filename. Or using gnu sed : find . -type f -exec sed '/myWord/F;Q' {} \; Many thanks to @chepner and @123 for extremely helpful