I receive a JSON object as :
Pots veure bé les anotacions que tenen accents? O caràcters "estranys"? Tipus l'ampersand &, les cometes ", les u's amb dièresis ü, apòstrofs ' i coses així?","numAnotacions"
when really is :
Pots veure bé les anotacions que tenen accents? O caràcters "estranys"? Tipus l'ampersand &, les cometes ", les u's amb dièresis ü, apòstrofs ' i coses així?","numAnotacions"
So, I don´t find the way to decode the string. I get the string :
NSString *responseString = [request responseString];
Please anyone can help me ?
Thanks
I thing JSONKit can help with parsing JSON (example).
Related
I find a lot of tutorial to check if a variable is null or not in a th: text.
But I can not find to check several, and change the text.
here is my example:
th:text="|${item?.startDate} ${item?.endDate} ${item?.startTime} ${item?.endTime}|"
See that sometimes one or more of its 4 variables can be null, so sometimes I have null displayed.
I therefore want to display
From XX to YY at 10 a.m. until 7 p.m.
And if possible, be able to use the locales 'From' 'To' 'to' and 'to' so that this line is multi-lingual.
Precision:
I use internalization well:
message1= Starts on(en), Débute le (fr)
message2= Ends on( en), se termine le (fr)
message 3= begins to (en), commence à(fr)
message4= finishes at (en), se termine à (fr)
So I want to Show
Fr: Débute le item.startDate se termine le item.endDate commence à item.startTime se termine à item.endTime
en: Starts on item.startDate ends on item.endDate begins to item.startTime finishes at item.endTime
but the problem is that sometimes I have item.startTime and / or item.endTime which is / are null
So I want to display the message partially:
Fr: Débute le item.startDate se termine le item.endDate
en: Starts on item.startDate ends on item.endDate
And sometimes I can have item.startTime and item.endTime not null but item.startDate and item.endDate null
So I will want to display the following message:
Fr: commence à item.startTime se termine à item.endTime
en: begins to item.startTime finishes at item.endTime
I can't find the correct syntax for this example
thanking you
In order to set the color of a batch script's console/terminal, color can be used. E.g. color 70. However, in order to reset the color of a the console, color without any arguments/values can be used. What is causing confusion for me is why it only works inside the command prompt or a called script but not a script started specifically with cmd /c. It fails and returns an errorcode of 1. Is there some legacy reason for this or is it a bug in Windows?
cmd /c color || echo foobar
Output: foobar
Expected output:
cmd /c color 70 || echo foobar
Output:
Expected output:
call color || echo foobar
Output:
Expected output:
To have no error, try to put the default color, as you said,
the color of a the console
That means the default color, I gess, so put color 07, to switch to color black-light grey.
For more info for colors in a .bat file create a .bat file and put in it color h, only this, save it and run it. It will give you all the info about colors.
If you are not able to do this, here is what it will show you. (Sorry, it's in french, but I gess you can understand)
Change les couleurs par défaut du premier et de l'arrière plan de la console.
COLOR [attr]
attr Spécifie les attributs de couleurs de l'apparence de la console
Les attributs de couleurs sont spécifiés par DEUX chiffres hexadécimaux -- le
premier correspond à l'arrière plan, le second au premier plan. Chaque chiffre
peut prendre n'importe quelle de ces valeurs :
0 = Noir 8 = Gris
1 = Bleu foncé 9 = Bleu clair
2 = Vert A = Vert clair
3 = Bleu-gris B = Cyan
4 = Marron C = Rouge
5 = Pourpre D = Rose
6 = Kaki E = Jaune
7 = Gris clair F = Blanc
Si aucun argument n'est donné, cette commande restaure les couleurs
sélectionnées au moment où CMD.EXE a été ouvert. Cette valeur vient soit de la
fenêtre de la console, du commutateur en ligne de commande /T, ou de la valeur
DefaultColor du registre.
Appuyez sur une touche pour continuer...
Again, sorry that is in french
Kalolol
team!
When I use "config.tabSpaces = 20;" in justified text, he gets different spaces. for example:
first paragraph:
<p style="text-align:justify"> Além disso, constata-se que a parte reclamante recebeu, como última remuneração, valor <strong><u>muito acima do piso dos bancários, diferenciando-o de um SIMPLES CAIXA, quer seja pelas atividades desenvolvida, quer seja pela maior remuneração auferida.</u></strong></p>
second paragraph:
<p style="text-align:justify"> Nesse passo, verifica-se que era depositada uma confiança acima do comum, além daquela que é inerente a qualquer relação de emprego, <strong>e muito diferenciada das responsabilidades daqueles que exercem cargos de base (caixas, agentes ou atendentes comerciais)</strong>, estes sim, bancários comuns.</p>
see that tab spaces were different, microsoft word redistributes spaces as the length of the sentence
someone can help me?
CKEditor is not Microsoft Word. CKEditor is focused on editing fragments of HTML documents from the semantical (structural) POV, not from the visual POV. You cannot expect it to work as Microsoft Word which, despite the seeming similarities, is a totally different tool.
So the behaviour you encountered is the right behaviour, because it is caused by how HTML and CSS works.
I need a php script that convert certain special characters to ascii code( , . / - and all the letter with accent)
eg.
original:
Dingo a accidentellement fait tomber la pièce porte-bonheur de Mickey tout au fond du lac. Le Professeur Von Drake va utiliser son camping-car et le transformer en sous-marin pour explorer les eaux profondes.
result:
Dingo a accidentellement fait tomber la pièce porte-bonheur de Mickey tout au fond du lac. Le Professeur Von Drake va utiliser son camping-car et le transformer en sous-marin pour explorer les eaux profondes.
I've tried htmlspecialchars() doesn't seems work out it only convert the characters which are special significance in HTML
If you look at the documentation of htmlspecialchars() you will see:
If you require all input substrings that have associated named entities to be translated, use htmlentities() instead.
I have this prolog code:
libro(autor('Chomsky', 'Noah'),
titulo('Aspectos de la Teoría de la sintaxis'),
editorial('Madrid', 'Aguilar'),
fecha(1970)).
libro(autor('Matthews', 'P'),
titulo('Inflectional Morphology'),
editorial('Cambridge', 'Cambridge University Press'),
fecha(1972)).
libro(autor('Chomsky', 'Noah'),
titulo('Estructuras sintácticas'),
editorial('Mexico', 'Siglo XXI'),
fecha(1974)).
I need to find all books written by Chomsky (in my case). What is the rutine to obtain them?
Thank You
You just need to match on the pattern autor('Chomsky',_) as below:
?- libro(autor('Chomsky',_),T,E,Y).
T = titulo('Aspectos de la Teoría de la sintaxis'),
E = editorial('Madrid', 'Aguilar'),
Y = fecha(1970) ;
T = titulo('Estructuras sintácticas'),
E = editorial('Mexico', 'Siglo XXI'),
Y = fecha(1974).
You need to type a semicolon to fetch the next result.
You could also use findall to get all results as a list, for example:
?- findall(libro(T,E,Y),libro(autor('Chomsky',_),T,E,Y),R).
R = [libro(titulo('Aspectos de la Teoría de la sintaxis'), editorial('Madrid', 'Aguilar'), fecha(1970)), libro(titulo('Estructuras sintácticas'), editorial('Mexico', 'Siglo XXI'), fecha(1974))].