Questions tagged as 'string'

1
answer

Regular PHP expression, how to remove open html tags?

Hello! I need to remove from my string an html snippet that bugged, it goes like this: e="text-align:left;"> Texto normal ... This causes a visual error. Another error that is generating at the end of the text ex: <p style="text-ali...
asked by 16.05.2016 / 15:44
1
answer

Allocation and memory cleaning in C - how much should I care?

I am learning C from the book "Use the Head! C" (condemn me). Given a lesson, I need to create a struct called " island " with the following code: typedef struct island { const char *name; const char *opens; const char *clos...
asked by 03.11.2015 / 00:18
1
answer

Take out all html TAGS less the line break

My question is simple, I think. I get via post the description: $descricao = strip_tags(mysql_escape_string(trim($_POST['descricao']))); And when I print on the screen I use: nl2br($foto_user_visitado->descricao) This sho...
asked by 22.09.2015 / 01:40
1
answer

Query vector from one table to update another in C

Hello. I'm new here and I do not even know if I was very objective in the title. But let's go. I'm almost finishing my final C Algorithm project, and I'm not able to update an item from one table with information from another. More specific:...
asked by 05.06.2015 / 02:58
1
answer

VBA returns wrong date string

I made a code to return a string from the first day of the month acts: Dia = "1/" & CStr(Month(Now)) & "/" & CStr(Year(Now)) Then I put it in a cell Cells(rowx,colx).value = Dia The pasted value change position the day with...
asked by 02.02.2016 / 21:15
1
answer

What is the difference between QString and QStringLiteral?

What's the difference between the two? Which one is best to use?     
asked by 02.12.2015 / 21:11
1
answer

'itoa' is not recognized

I'm trying to compile the code below with GCC 4.7.4, but I always get the error    error: 'itoa' was not declared in this scope #include "otpch.h" #include <iomanip> #include <stdlib.h> #include <boost/config.hpp> #includ...
asked by 26.03.2015 / 19:42
1
answer

Convert reverse_iterator to iterator?

I'm writing an XML interpreter in C ++, when I find a bad XML formation I'd like to show the line and column of the error. I'm working with string iterators and created a function to format the error as follows: string msgLocalizadaXML(string:...
asked by 08.01.2015 / 23:13
1
answer

Error writing text file: can not convert std :: string to const char *

I am not able to write a string in file .txt in C ++ (CodeBlocks). // aux é um inteiro // aux2 é uma string // foi dado fopen no arquivo...abaixo só segue a parte com erro aux = x.retorne_energia(); aux2 = x.retorna_nome(); fprint...
asked by 12.06.2014 / 00:00
0
answers

'str' object has no attribute biopython

I'm working with biopython. I ask the input of an input (): enz_name1 = input('ENZYME 1 NAME: ') enz_name2 = input('ENZYME 2 NAME: ') However, when I want to use input () to use the .catalyse option, like this: rb=RestrictionBatch()...
asked by 12.08.2018 / 14:39