Semantic Mediawiki error: processing error text "#category " cannot be used as a property name in this wiki - mediawiki

Following this guide I've created a page with the following source code
{{#subobject:mysubobject
|url = https://www.instagram.com/p/CXeE2j-NT6s/
|title = Bullismo: proposta una legge in Francia per punirlo penalmente. Si rischia anche il carcere
|#category = bullismo|violenza|leggi|punizioni|+sep=;
}}
But I get the following error message:
processing error text "#category " cannot be used as a property name in this wiki.
Any hint on what's going on? I couldn't find any answer on google.

Try removing the space after #category. Also, note that a semicolon is used to separate several categories in your case:
{{#subobject:mysubobject
|url = https://www.instagram.com/p/CXeE2j-NT6s/
|title = Bullismo: proposta una legge in Francia per punirlo penalmente. Si rischia anche il carcere
|#category=bullismo;violenza;leggi;punizioni|+sep=;
}}

Within a subobject you are creating proporties, you cannot give them a separate category. And here you are saying give me a property #category within my subobject.
Some classes/properties are protected. The name category is one of them

Related

AVQueuePlayer SeekToTime

[queuePlayer seekToTime:CMTimeMake(time,1)];
While I take seekToTime, the audio does replay, not seek to the time.
How to create CMTime para or you can tell me how to do all.
Please try below code:
UISlider *s = (UISlider*)sender;
[appDelegate.queuePlayer seekToTime:CMTimeMakeWithSeconds(s.value, queuePlayer.currentTime.timescale)];
first para is progress (0-1.0)
second para like this 'queuePlayer.currentTime.timescale'

How to get data from a specific section in MediaWiki supported wikis

I am parsing a Wikia article and trying to get the data from the right hand side highlighted block, I have already got the left one using the following URL
http://hetalia.wikia.com/api.php?action=parse&prop=revisions&prop=sections&page=America&format=json
But don't know the reference about the right one. What will be the parameter?
The original URL is,
http://hetalia.wikia.com/wiki/America
I believe the only way to get info from the Infoboxes would be to get the page source, which can be done with this query
http://hetalia.wikia.com/api.php?action=query&prop=revisions&rvprop=content&titles=America&format=json
And then parsing the text to get the information, as the source of that box is in this format
{{Character
|name = America
|jname = アメリカ
|image = America0.png
|country = [[wikipedia:United States|The United States of America]]
|human = Alfred F.Jones (アルフレッド・F・ジョーンズ, ''Arufureddo F. Joonzu'')
|age = 19
...
|japanese = [[Katsuyuki Konishi]], Ryoko Shimizu (Young America, drama CD "Prologue"), [[Ai Iwamura]] (Young America, anime), [[Axis Powers Hetalia: The CD|Osamu Ikeda]] (''Flower Of Iris'')
|english = [[Eric Vale]], Stephanie Young (young America)}}
You could use Regex to extract the data from the text, such as using \|age\s*=\s*(\d*) to get the age attribute.

How to interpretHTML code inside uib-tooltip

After looked for a solution, I have found a lot of article but not a way to do what I want so I'm there.
My problem:
I use uib-tooltip to set some explanation on the use/utility of some fields. I also use $translate with i18n files to do some translation.
These i18n files contains some html codes for special chars (because of servers issue I can't simply use UTF-8...).
And so, when I use simply for exemple:
<span translate="create.period"></span>
It's working fine, the HTML is interpreted fine and I have the good result.
Exemple of value on my i18n file:
create.period:'Ce champ contient la valeur de la période'
Result from the previus code:
Ce champ contient la valeur de la période
But if I use the uib-tooltip I have some issue.
Exemple of my code:
<span class='glyphicon glyphicon-question-sign pointer signColor' uib-tooltip="{{'create.period' | translate}}"></span>
And here the reult on the tooltip popup is :
Ce champ contient la valeur de la période
I have seen lot of thing like old way to do (uib-tooltip-html) or way to do with
$sce and ng-bind-html, but I can't do that here because I on the uib-tooltip.
So do I have miss some simple thing?
Or have you a solution for me? (and explanatinons :p)
Thank you very much ! :)
I add a try for a filter:
filter("htmlToPlaintext", ['$sce', '$compile', function ($sce, $compile) {
return function (val) {
return $sce.valueOf($sce.trustAsHtml(val));;
};
}])
Saddly not worky.
$scope.create.period = $sce.trustAsHtml('Ce champ contient la valeur de la période');
scope variable
<span class='glyphicon glyphicon-question-sign pointer signColor' uib-tooltip-html="create.period"></span>
pass '$sce' dependency in your controller

PIC BTFSC and BTFSS not working on PORTA

I've always blinked leds on PORTB in PIC16F628A.
Nowdays i need to do that on PORTA because I'm trying keypad matrix on PORTB.
The code below runs perfectly on RB3 of PORTB, but I doesn't in PORTA.
Here is the example in PORTA.
I've tested and the problem is in BTFSS and BTFSC function... Because if I turn led off or on manually is functioning well.
(also I've ommited delay_1s_routine code)
main
;*********CONFIGURACION LED**********
clrf Puerto_Led
movlw 0x07
movwf CMCON
bsf STATUS,RP0
clrf TRISA
bcf STATUS,RP0
loop
call prende_apaga_Led
call delay_1s_routine
goto loop
prende_apaga_Led
btfsc PORTA,RA1 ;si esta en 0 salta el GOTO
goto $+3
bsf PORTA,RA1 ;Pongo en '1' el bit del Led Verde
return
bcf PORTA,RA1 ;Pongo en '1' el bit del Led Verde
return
Thanks in Advice!!
EDITED: Put real values on code
PD: Tested this instruction separately and works great
- bsf PORTA,RA1
- bcf PORTA, RA1
I prefer:
Instead of going into techno quirks and philosophical debates, bypass the problem..
I always use shadow registers for port states and test and drive over them.
So use a bit in your RAM to reflect the state of PORTA, RA1. Trust me it will work seamlessly.
In your code after the label prende_apaga_Led,
You seem to be treating the LED pin once as an input (testing using btfsc), and once as an output (bsf and bcf). The pin can not be used as both at the same time. Either you set the associated TRISA bit as input or output and stick to it.
It seems to me that the code you are trying to do toggles the value of the LED based on its previous state. The way you are doing it won't work. An easier way to do it is by using the xor function as follows:
movlw 0xYY; where YY is the pattern in which 0 means no change to the pin output, 1 means toggle then follow by
xorlw PORTA
so simply it will be as:
clrf Puerto_Led
movlw 0x07
movwf CMCON
bsf STATUS,RP0
clrf Conf_Led
bcf STATUS,RP0
loop
movlw 0xYY ; change YY, i.e. if the LED is on RA2 YY will be 0x04
xorlw Puerto_Led
call delay_1s_routine
goto loop

How to write a transformer for Ruby Sanitize Gem to transform <br> into newlines?

I'm using a wrapper for the Sanitize Gem's clean method to solve some our issues:
def remove_markup(html_str)
html_str.gsub /(\<\/p\>)/, "#{$1}\n"
marked_up = Sanitize.clean html_str
ESCAPE_SEQUENCES.each do |esc_seq, ascii_seq|
marked_up = marked_up.gsub('&' + esc_seq + ';', ascii_seq.chr)
end
marked_up
end
I recently add the gsub two lines as a quick way to do what I wanted:
Replace insert a newline wherever a paragraph ended.
However, I'm sure this can be accomplished more elgantly with a Sanitize transformer.
Unfortunately, I think I must be misunderstanding a few things. Here is an example of a transformer I wrote for the tag that worked.
s2 = "<p>here is para 1<br> It's a nice paragraph</p><p>Don't forget para 2</p>"
br_to_nl = lambda do |env|
node = env[:node]
node_name = env[:node_name]
return if env[:is_whitelisted] || !node.element?
return unless node_name == 'br'
node.replace "\n"
end
Sanitize.clean s2, :transformers => [br_to_nl]
=> " here is para 1\n It's a nice paragraph Don't forget para 2 "
But I couldn't come up with a solution that would work well for <p> tags.
Should I add a text element to the node as a child? How to make it show up immediately after the element?
related question (answered) How to use RubyGem Sanitize transformers to sanitize an unordered list into a comma seperated list?