## Detecting line separators and line breaks in Python CSV

Here is how I’m detecting a field separator and line break in a CSV file for which I do not already know the format. Does this look sufficient, or are there other things I should be adding here?

SEPARATORS=['\x00', '\x01',  '^', ':', ',', '\t', ':', ';', '|', '~', ' '] LINE_TERMINATORS_IN_ORDER = ['\x02\n', '\r\n', '\n', '\r']  def get_csv_info(f):     with open(f, 'r') as csvfile:         line = next(csvfile)         dialect = csv.Sniffer().sniff(line, SEPARATORS)         for _terminator in LINE_TERMINATORS_IN_ORDER:             if line.endswith(_terminator):                 terminator = _terminator                 break         return (dialect.delimiter, terminator)  get_csv_info('/Users/david/Desktop/validate_headers/artist') ('\x01', '\x02\n') 

Note: using the normal csv.Sniffer without params fails most of the time I use it.

## Content search webpart is not returning values of multiple line of text in SP2013

I am working with content search webpart wich is not displaying values of multiple line of text even in ‘Twolines’ display template. I have created a new site column with type multiline and added site column in content type of that library. Then add a new item with value in multiline text. Do a full crawl, still it is showing blank. Can anyone please help on these. I have been trying for this for last 2 days.

## Google Doc – applying headers to single line only – after pasting as plain text

The issue: https://youtu.be/OXS3wTR7YJw

1. Make notes in “Notes” (better for offline)
2. Paste into Google Doc
3. Apply a header
4. Sh!t the whole thing is formatted now

Related but not the same: Create documents with plain text formatting in Google Docs

## Automate copying part of a text and paste it somewhere else on the same line for multiple lines

I have text files with some information I want to copy from one place and paste somewhere else on the same line. For instance, I have something like:

Random text here { Name = "Tropical Delight", UniqueId = "1110100", More random text}; Random text here { Name = "Tropical Delight", UniqueId = "1110110", More random text}; Random text here { Name = "Tropical Mango Delight", UniqueId = "1110120", More random text}; . . . Random text here { Name = "Tropical Delight", UniqueId = "2000110", More random text}; 

and I want the numbers after UniqueId to be copied and placed at the end of Delight on the same line like so

Random text here { Name = "Tropical Delight 1110100", UniqueId = "1110100", More random text}; Random text here { Name = "Tropical Delight 1110110", UniqueId = "1110110", More random text}; Random text here { Name = "Tropical Mango Delight 1110120", UniqueId = "1110120", More random text}; . . . Random text here { Name = "Tropical Delight 2000110", UniqueId = "2000110", More random text}; 

As long as there is a space after the words that are in quotes after Name and then the UniqueId numbers. The name can be anything, the UniqueId is unique for each line.

So using the first line as example, in a text editor I would highlight 1110100 and copy it and put a space after Delight then paste. Then I would do the same thing for the next line and so on. Can this task be automated somehow for each line? I’ll try any script or Windows program. Even something that does “for each line copy 7 digits after 3rd double-quotes and paste before 2nd double-quotes” or some such would work.

## Elliptic curve over projective line with four points of multiplicative reduction

Consider the elliptic surface $$E$$ with affine equation

$$y^2 = x(x-1)(x-t^2)$$

over the base $$\mathbf{P}^1$$ with parameter $$t$$ (with complex scalar field). Then $$E$$ has four points of bad reduction, namely $$0$$, $$1$$, $$-1$$, and $$\infty$$. One can check that the reduction type is multiplicative at each bad place. Is this the only elliptic surface with multiplicative reduction at those four places? I understand that the condition of multiplicative reduction means that the corresponding local system has unipotent monodromy around each of the four bad points, but I don’t know how to use this to classify such elliptic surfaces.

## 4 Words to Save and 4 Words to Kill Your Email Subject Line

Hey guys! Want to share a quick excerpt from Mailchimp's research here.

MailChimp did a research and analyzed millions of email subject lines. They have found that 1 word increases open rate by 57% for all users on average.

Here you can see what you can gain or lose when you use specific words in your subject line.

Positive impact on open rate:
Free: +2%
Freebie: +26%
Urgent: +79%
Thank you: +57%

Negative impact on open rate:
Cancelled: -40%
Helping: -12%
Donate: -56%
Last chance: -45%…

4 Words to Save and 4 Words to Kill Your Email Subject Line

## Warning: mysqli_fetch_array() expects parameter 1 to be mysqli_result, boolean given in C:\xampp\htdocs\Unicornio\produto_detalhe.php on line 11 [duplicada]

Esta pergunta já tem uma resposta aqui:

• Mysqli_fetch_row() expects parameter 1 to be mysqli_result [fechada] 4 respostas

Produto | Unicornio

<div class="flex container">     <div class="flex-cabecalho">         <div style="flex-grow:1">             <img src="img/Menu.png" height="45px">             <a href="index.php"><img src="img/Logo.png" height="45px"></a>         </div>         <div style="flex-grow: 9">             <?php                 if(isset($_SESSION['loginCliente']) &&$  _SESSION['loginCliente']){                     echo "<a href='login.php'><img src='img/Usuario.png' height=45px'></a>";                 }else {                     echo "<a href='login.php'><img src='img/Usuario.png' height='45px'></a>";                    }             ?>             <?php                 if(isset($_SESSION['loginCliente']) &&$  _SESSION['loginCliente']){                     echo"<a href='carrinho.php'><img src='img/Carrinho.png' height='45px'></a>";                 }else {                     echo '';                 }             ?>         </div>     </div>         <div class="flex-cabecalho">             <div id="divBusca">                 <form>                     <input type="search" placeholder="Search" name="busca">                 </form>             </div>         </div>         <br>         <hr>                 <div>                 <center>                 <img src="produtos/<?php echo $produto['id'];?>.jpg" height="300px" width="300px"> </center> </div> <div> <center> <p class="nome-produto"> <?php echo$  produto['nome']?>                 </p>                 <p class="preco-real">                              de <?php echo "R$".$  produto['preco'] ?>                 </p>                 <p class="preco-comdesconto">                            por <?php echo"R$".$  produto['preco']*.9  ?>                 </p>                 <p class="preco-parcelado">                              Ou em até 10x de <?php echo "R$".$  produto['preco']/10  ?>                 </p>         <hr>                 <p class="descricao">                     <?php echo $produto['descricao']?> </p> <?php if(isset($  _SESSION['loginCliente']) && $_SESSION['loginCliente']) { ?> <p class="comprar"> <a href="comprar.php?idProduto=<?php echo$  produto['id'];?>">Comprar</a>                     </p>                 <?php }else { ?>                     <p class="comprar">                         <a href="cadastro-login?idProduto=<?php echo \$  produto['id'];?>">Comprar</a>                     </p>                 <?php }?>                 </center>             </div>     <div class="flex-rodape">         <p><a href="index.php"> Página Inicial</a></p>         <p><a href="cadastro-login.php"> Acesse sua conta </a></p>         <p><a href="carrinho.php"> Carrinho de compras </a></p>         <p><a href="index.php"> Produtos em promoção </a></p>         <p><a href="index.php"> Produtos da loja </a></p>         <p><a href="sobre.php"> Sobre a loja </a></p>     </div>     <div class="flex-rodape-social">         <p><a href="https://www.facebook.com"><img/ src=redes_sociais/facebook.png height="50px"></a></p>         <p><a href="https://www.instagram.com/?hl=pt-br"><img/ src="redes_sociais/instagram.png" height="50px"></a></p>         <p><a href="https://twitter.com/login?lang=pt"><img/ src="redes_sociais/twitter.png" height="50px"></a></p>         <p><a href="https://www.youtube.com/"><img/ src="redes_sociais/youtube.png" height="50px"></a></p>         <p><a href="https://mail.google.com/mail/u/0/"><img/ src="redes_sociais/e-mail.png" height="50px"></a></p>     </div>     <div class="flex-rodape">         <p align="center"> Unicórnio Papelaria</p>         <p align="center"> Telefone: 998456573</p>         <p align="center"> CNPJ: 99.999.999/9999-99</p>         <p align="center"> Endereço: Rua José Antônio N°1234</p>     </div> 

Esse é o meu codigo e esta dando erro sempre

## Points to B-splines to line segments?

I’d like to generate a smooth path between points in 3D, and I think this is usually done by B-splines, though it’s not really a requirement.

The input is a set of points (like 10 to 20 of them) and the output should be another set of points, a configurable number of them, which basically describe a point-to-point path for easy runtime interpolation, together with orientation information for the character which is on that path (though this could be inferred from the path itself).

This seems like it should be a common problem, but I don’t know what to search for?

No obstacle avoidance etc is needed.

## Found a real nice app for sending push notifications to your iPhone with simple line of code

Hi all,
I found a real nice mobile app called 'push me alert'! Now you can push notifications to your own mobile phone.
I have an iphone and it works well. Now I get a push message whenever a new user registers on my website

Easy use: Integrate a request in your own code (any language) to https://api.pushmealert.com/?user=****&key=****&title=New%20user%20registered&message=New%20user%20registered%with%20ip%20********website: pushmealert.com