How can I push a new project to my hg mercurial URL? - mercurial

I have a URL that is storing all of our Repositories at: http://xxx.xx.xx.x:xxxx
I've created a new project called MyProject1 in Visual Studios.
I open command prompt and did cd MyProject1
I did hg init
Everything is good.
I then want to push this project to my repository, I do
hg add
Everything looks good.
I do hg commit -m "Initial Version"
Everything looks good.
I do hg push http://xxx.xx.xx.x:xxxx
I get this back:
pushing to http://xxx.xx.xx.x:xxxx
abort: 'http://xxx.xx.xx.x:xxxx' does not appear to be an hg repository:
---%<--- (text/html; charset=cp1252)
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11
DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
<head>
<link rel="icon" href="/static/hgicon.png" type="image/png" />
<meta name="robots" content="index, nofollow" />
<link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
<script type="text/javascript" src="/static/mercurial.js"></script>
<title>Mercurial repositories index</title>
</head>
<body>
<div class="container">
<div class="menu">
<a href="https://mercurial-scm.org/">
<img src="/static/hglogo.png" width=75 height=90 border=0 alt="mercurial" /></a
</div>
<div class="main">
<h2 class="breadcrumb">Mercurial </h2>
<table class="bigtable">
<thead>
<tr>
<th>Name</th>
<th>Description</th>
<th>Contact</th>
<th>Last modified</th>
<th> </th>
---%<---
!
What in the world am I doing wrong? Am I missing something trivial here?
Thanks in advance

First, check that you have a repository at http://xxx.xx.xx.x:xxxx. based on response it is not. You can always go and change file .hg/hgrc/default adding something like
[paths]
default = http://bitbucket.org/xxxx/xxx
Which would point your default branch to a repo.

Related

Index.html not accessed when opening website

I have a website, norway-yv.epizy.com. I use InfinityFree to host (I just want to use the website for practise and as a fun hobby project). They use filemanager.ai to manage my files. I have a vast system of files and folders (see below), and instead of having to upload every file and every folder I have made it so that everything is in the website folder. This way, I do not need to upload everything every time I change something in my local copy of the website. I want norway-yv.epizy.com to redirect to norway-yv.epizy.com/website/home.html, and have done this trough an index.html file. However, it only gives error 404.
My files
.htaccess
DirectoryIndex index.php index.html index.htm index2.html
ErrorDocument 403 https://infinityfree.net/errors/403/
ErrorDocument 404 https://infinityfree.net/errors/404/
ErrorDocument 500 https://infinityfree.net/errors/500/
I have configured http://norway-yv.epizy.com/website/myerrorpages/[errornum].html as error page path in InfinityFree control panel
htdocs (folder, automatically created)
index.html
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>norway-yv</title>
</head>
<body>
<meta http-equiv="refresh" content="0; url=website/home.html">
</body>
</html>
website (folder, manually created)
index.html
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>norway-yv</title>
</head>
<body>
<meta http-equiv="refresh" content="0; url=home.html">
</body>
</html>
home.html
<html lang="en">
<head>
<title>norway-yv | home</title>
<link rel="icon" type="image/png" href="../files/icons/favicon.png">
<link rel="stylesheet" href="style/normal.css">
</head>
<body>
<header>
<a href="home.html">
<img class="logoTop" src="files/icons/favicon.png" alt="Logo" />
</a>
</header>
<h1>This is the website of norway-yv</h1>
<p>I'm sorry for the horrible look of my website, but it is the best I can do</p>
<h2>About me</h2>
<p>I am a hobby developer who likes programming in Python. I am a student in Norwegian upper secondary school, year 1.<br>
Some of my best projects can be found <a href="projects.html" >here.</a><br>
Feel free to contact me trough GitHub.</p>
<h2>Contact</h2>
<p>
<a href="https://stackoverflow.com/users/17496608/norway-yv" >StackOverflow</a><br>
GitHub (via GitHub e-mail)<br>
</p>
</body>
</html>
projects.html
<html lang="en">
<head>
<title>norway-yv | projects</title>
<link rel="icon" type="image/png" href="../files/icons/favicon.png">
<link rel="stylesheet" href="style/normal.css">
</head>
<body>
<header>
<a href="home.html">
<img class="logoTop" src="files/icons/favicon.png" alt="Logo" />
</a>
</header>
<h1>My projects</h1>
<p>I have made tons more than this, mainly for scientific and mathematic purposes, but these are some of the projects I am most proud of:</p>
<h2>kode24-calculator</h2>
<p>An ongoing project, where I try to calculate expected wage for Norwegian developers using many different parametres.<br>
For more information, see here. </p>
<h2>binary-calculator</h2>
<p>A project that sort of is finished, but still has a long way to go. Currently, it can calculate the sum of two binary numbers up to 32 bit size and output it.<br>
For more information, see here. </p>
</body>
</html>
My comments in the end
I have much more than this in my website, with several other folders. I can add them to the question if that is necessary. But I hope not.The same problems do occur when previewing (using edge showing the local version). So it's more of a problem with my files than InfinityFree.
Maybe it's not working because you are missing the <base> tag in your <head>.
The base tag defines the base URL, from where relative URLS are redirected.
For more

SpringBoot, Thymeleaf

Can somebody explain me what's going on?
I'm using thymeleaf and springboot
i got template file
out.html
<html lang="en" xmlns:th="http:www.thymeleaf.org">
<head>
<meta charset="UTF-8">
<title>SAD</title>
<link th:href="#{/css/style.css}" rel="stylesheet"/>
</head>
<body>
<h1>sad</h1>
<div class="container">
<div th:if="${not #lists.isEmpty(list)}">
<h2>People to deport</h2>
<table class ="table table-striped">
<tr>
<th>Name</th>
<th>Surname</th>
<th width="100px">Age</th>
</tr>
<tr th:each = "people :${list}">
<td th:text="${people.name}"></td>
<td th:text="${people.surname}"></td>
<td th:text="${people.age}"></td>
</tr>
</table>
</div>
</div>
<p th:text="#{hello}">text</p>
</body>
</html>
I got request mapping on it in my controller. It works correctly. But as you see i used resource bundle and my default language is russian. (it has displayed '?' signs) on that place.
<p th:text="#{hello}">text</p>
So i wanted to display russian language content on my page . I changed charset from UTF-8 to UTF-16 and everything crashed. Actually codding type is not matter cause i tried to do that with charset=ISO-8859-1
Server starts, displays other templates. But that one does not work even if i turn back UTF-8 charset back and restart server.
I solved it like:
1. I copied my html from it;
2.Delete the file and create new named also out.html;
3.Put that html in the file and it works.
So can somebody explain what is going on?

HTML not showing style on (local) browser

I have made an HTML file (code will be shown below for reference) using some images and style sheet (from local filesystem).
My Folders are as follows:
Main (contains the StyleSheet Style1.cs and HTML file Page1.html)
Images are placed in folder Main/pics
The style is perfectly visible in Code Editor (VS 2010), but whenever I run the file on Mozilla or Edge, etc, its failing to show any image or even style. Here is screenshot of html in editor:
Yes I have seen the question here but my problem is not fixing even though I tried it on both IE and Mozilla (Edge as well). (And I have followed the preventive measures as prescribed by the question above)
My code is pretty simple:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
<title>Untitled Page</title>
<link rel="stylesheet" type="text/css" href="/Style1.css" />
</head>
<body>
<div id="HeaderDiv" class="top-header-blue">
Header
</div>
<div id="CentreDiv" class="content-header-white">
Test
</div>
<div id="footerDiv" class="footer-centre">
CopyRights 2015 -
</div>
</body>
</html>
Any help will be so valuable. Thanks
you have given the wrong path in style as / in before the Style1.css just replace
<link rel="stylesheet" type="text/css" href="Style1.css" />

HTML Page of GWT Project

In the Project of GWT/GXT.
in project.html.
I added the favicon and change the color of the body and also put an image .
But when i run the web project. i cant see the the change in body color, favicon and the Image.
My web Projects starts from login page which is in a center of on the RootPanel.
I want add a Image and Fevicon in HTML
In my test page test.html i can display favicon and image.
gwt project.html
<!doctype html>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<title>My Page</title>
<link rel="icon" type="image/png" href="fevicon.png" />
<link rel="stylesheet" type="text/css" href="gxt/css/gxt-all.css" />
<link rel="stylesheet" type="text/css" href="project.css" />
</head>
<body style="background-color:d8d8d8;>
<img class="normal" src="main.png" width="700" height="80" />
<script language='javascript' src='project/project.nocache.js'></script>
<iframe src="javascript:''" id="__gwt_historyFrame" style="position:absolute;width:0;height:0;border:0"></iframe>
</body>
</html
>
As #Manolo suggest check working folder. i.e. war/modulename and also clear cache of browser. because if browser already have cache of it so sometime changes does not reflect.
It seems you are modifying a page which is not being copied to the working folder of your app
when running in web mode.
Sometimes eclipse does not update files from sources to working dir.
Try to find the file test.html in other folders and compare their sizes.
In your src/main/webapp changes not seen at a moment. Refresh project and restart development mode. If any changes recompile your project(Last choice).

Generate html with images from pdf using Linux -poppler-utils-pdftohtml

Currently I am working with pdftohtml, under CentOS, poppler-utils. The concept is simple - user uploads the PDF file and sees the HTML version of that file. I use the simple command -
$> pdftohtml source.pdf target.html
but it doesn't work! Later on, I try to create html using complex switch with no frames:
$> pdftohtml -c - noframes source.pdf target.html
Still no Luck! The problem is - The image of the pdf file (the images are inside of that pdf file) can't appear in html, sometimes, the image overlaps! Any ideas?
Here is the PHP Code -
Add.php
<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<link href="css/style.css" rel="stylesheet" type="text/css"/>
<title>CompleteView</title>
</head>
<body>
<form method="post" action="save.php" enctype="multipart/form-data">
<input type="hidden" name="action" value="add">
<tr class="dark_bgcolor text-content">
<td align="left" width="20%">Upload</td>
<td align="left" width="1%">:</td>
<td align="left">
<input type="file" name="img_full" class="look" size="50">
(Only .pdf)
</td>
</tr>
<tr class="bottom_bgcolor">
<td align="center" colspan="3"><input type="submit" name="" value="Upload" class="look"></td>
</tr>
</form>
</body>
</html>
Save.php
<?php
$myNewFolderPath=rand();
mkdir($myNewFolderPath);
$fname="full_".uniqid("");
$filename=$fname.'.pdf';
//$uploadpath=SPL_IMG_UPLOADPATH.$filename;
move_uploaded_file($_FILES['img_full']['tmp_name'], $myNewFolderPath.'/'.$filename);
chmod($myNewFolderPath.'/'.$filename, 0777);
echo ('/usr/local/bin/pdftohtml '.$myNewFolderPath.'/'.$filename);
exec('/usr/local/bin/pdftohtml -c -noframes'.$myNewFolderPath.'/'.$filename);
header('Location:'.$fname.'.html');
//exec('/usr/local/bin/pdftohtml 2098602105/EssentialC.pdf');
?>
One More thing - the pdftohtml version is -0.36
Here is The Screenshots -
Result -
$ pdftohtml -c source.pdf target.html
This will output in complex mode. You can't use -noframes with the complex flag.
$ man pdftohtml
-noframes generate no frames. Not supported in complex output mode.