Could not load project, Xcode 7.3.1 [duplicate] - ios

I have just localized the file Localizable.strings in my Xcode project in order to localise my application to a few different languages. However, having edited each of the files in the standard "key = value" format, I receive the following parsing error, which does not specify a file making it hard to track down what it is referring to.
CFPropertyListCreateFromXMLData(): Old-style plist parser: missing semicolon in dictionary on line 10. Parsing will be abandoned. Break on _CFPropertyListMissingSemicolon to debug.
I have looked through each of the *.strings files, specifically on line 10, and I found nothing of any interest or regards as to what is causing the issue. Please can you tell me where I am going wrong.
Here is a sample of a Localizable.strings file in my project. All other files follow the same format.
"Enter URL" = "Voer adres in"
"Headers" = "Koppen"
"Key" = "sleutel"
"Value" = "waarde"
"Parameters" = "Parameters"
"Tap to add a new line" = "Tik om een nieuwe lijn toe te voegen"
"Perform request" = "Verzoek Uitvoeren"
"Response" = "Antwoord"
"Received Headers" = "Ontvangen Koppen"
"Error" = "Fout"
"Loading" = "Verzoek aan het versturen"
I then use NSLocalizedString() to provide the translated string.

As stated in the error message, you're missing semicolons at the end of each line.
"foo" = "bar";
Is the correct format

"Enter URL" = "Voer adres in";
"Headers" = "Koppen";
"Key" = "sleutel";
"Value" = "waarde";
"Parameters" = "Parameters";
"Tap to add a new line" = "Tik om een nieuwe lijn toe te voegen";
"Perform request" = "Verzoek Uitvoeren";
"Response" = "Antwoord";
"Received Headers" = "Ontvangen Koppen";
"Error" = "Fout";
"Loading" = "Verzoek aan het versturen";
this is the correct formula

This message can also be come due to use of :(colon) instead of ;(semicolon) at line end. Please be sure there is semicolon(;) at each end of line and also there is no colon(:) also.

Swift 4
make sure the one for all Apps file for Localizable.strings don't make more than one page just one
local.string English "hi" = "hi";
local.string Arabic "hi" = "هاي";
using
and put this extension in your app
extension String {
var localizedLized: String {
return NSLocalizedString(self, comment: "")
}
}

In my case the error was caused by a missing quotation mark.
"CFBundleDisplayName" = myTestApp";

Related

creating learner in mlr3: Error in sprintf(msg, ...) : too few arguments

I want to create a learner in mlr3, using the distRforest package.
my code:
library(mlr3extralearners)
create_learner( pkg = "." ,
classname = 'distRforest',
algorithm = 'regression tree',
type = 'regr',
key = 'distRforest',
package = 'distRforest',
caller = 'rpart',
feature_types = c("logical", "integer", "numeric","factor", "ordered"),
predict_types = c('response'),
properties = c("importance", "missings", "multiclass",
"selected_features", "twoclass", "weights"),
references = FALSE,
gh_name = 'CL'
)
gives the following error : Error in sprintf(msg, ...) : too few arguments
in fact, replicating the code in the tutorial https://mlr3book.mlr-org.com/extending-learners.html throws the same error.
Any ideas? Thanks a lot - c
thanks for your interest in extending the mlr3 universe!
Couple of things, firstly the example in the book works fine for me, and secondly your example cannot work because you are including classif properties for a regr learner. As I am unable to reproduce your error it's hard for me to debug what's going wrong, it would be helpful if you could run the following:
reprex::reprex({
create_learner(
pkg = ".",
classname = "Rpart",
algorithm = "decision tree",
type = "classif",
key = "rpartddf",
package = "rpart",
caller = "rpart",
feature_types = c("logical", "integer", "numeric", "factor", "ordered"),
predict_types = c("response", "prob"),
properties = c("importance", "missings", "multiclass", "selected_features", "twoclass", "weights"),
references = TRUE,
gh_name = "CL"
)
}, si = TRUE)
If you're still getting an error and the output is too long to print here then head over to the GitHub and open an issue there.

asp.net mvc razor string with double quotes

I am trying to use a string with double quotes but unable to get it work
#{
string disableMessage = "";
var disableAttr = "";
if (ViewBag.IsApplicable)
{
disableMessage = "You dont have permission to add new Item.";
disableAttr = "class=" + "disableItem" +" title="+"\""+ disableMessage +"\"";
}
}
expected: disableAttr as
class=disableItem title="You dont have permission to add new demand."
I got struck at getting double quotes for title attribute.
Why not deal with the two attributes separately:
#{
string disableTitle = null;
string disableClass = null;
if (ViewBag.IsApplicable)
{
disableTitle = "You dont have permission to add new Item.";
disableClass = "disableItem";
}
}
<div class="#disableClass" title="#disableTitle">Content</div>
Note that Razor V2 (in MVC4+) has a "conditional attribute" feature. When an attribute value is null, then Razor won't output anything at all for the attribute. So in the example above, if ViewBag.IsApplicable is false, the output will be:
<div>Content</div>
Ross's answer is much more elegant. However, keeping the line of your original code, you could do the following:
disableAttr = "class='disableItem'" +" title='"+ disableMessage +"'";
This will render the following text inside disableAttr:
class='disableItem' title='your_message_here';

invalid syntax error while reading text file

trying to write and read.
Text is written in the file but while reading I get "invalid syntax" on the print line:
Thank you
text_file = open ("write_to_file.txt", "w")
t = input( "enter name ")
a = input ("address ")
enter code here`n =input ("number ")
text_file.write(t)
text_file.write(a)
text_file.write(n)
text_file.close()
text_file = open("write_to_file.txt", "r")
print text_file.read()
text_file.close()

How can I efficiently parse formatted text from a file in Qt?

I would like to get efficient way of working with Strings in Qt. Since I am new in Qt environment.
So What I am doing:
I am loading a text file, and getting each lines.
Each line has text with comma separated.
Line schema:
Fname{limit:list:option}, Lname{limit:list:option} ... etc.
Example:
John{0:0:0}, Lname{0:0:0}
Notes:limit can be 1 or 0 and the same as others.
So I would like to get Fname and get limit,list,option values from {}.
I am thinking to write a code with find { and takes what is inside, by reading symbol by symbol.
What is the efficient way to parse that?
Thanks.
The following snippet will give you Fname and limit,list,option from the first set of brackets. It could be easily updated if you are interested in the Lname set as well.
QFile file("input.txt");
if (!file.open(QIODevice::ReadOnly | QIODevice::Text))
qDebug() << "Failed to open input file.";
QRegularExpression re("(?<name>\\w+)\\{(?<limit>[0-1]):(?<list>[0-1]):(?<option>[0-1])}");
while (!file.atEnd())
{
QString line = file.readLine();
QRegularExpressionMatch match = re.match(line);
QString name = match.captured("name");
int limit = match.captured("limit").toInt();
int list = match.captured("list").toInt();
int option = match.captured("option").toInt();
// Do something with values ...
}

Documentation for SimpleForm in luci

I try to manipulate the code that generates the config mode in the freifunk firmware gluon but I cannot find the documentation how to add a TEXTAREA instead of an INPUT field at this lines:
o = s:option(Value, "_contact", "Kontakt")
o.default = string.format("%f", uci:get_first("gluon-contact", "contact", "public_info", ""))
I found some documentation here:
http://luci.subsignal.org/trac/wiki/Documentation/CBI
So a textarea is called TextValue:
o = s:option(TextValue, "_contact", "Kontakt")
o.default = string.format("%s", uci:get_first("gluon-contact", "contact", "public_info", ""))
o.rmempty = false
o.datatype = "string"
o.description = "z.B. E-Mail, Telefon oder Chat-Name"
o.size = 35

Resources