Alpha Vantage - Getting data for symbols containing space - alpha-vantage

I'm trying to get data (TIME_SERIES_DAILY) from the Nasdaq OMX exchange but fails on symbols containing a space.
For example:
STO:ABB works fine but STO:ADDT B does not. I've tried several combinations like "STO:ADDT B", STO:"ADDT B", STO:ADDTB or even STO:ADDT_B without luck.
Anyone solved this and knows how to correctly "encode" the symbol containing a space?

try and use dash - for example VOLV-B

Related

How do I use an SF Symbol in Swift using its symbol literal instead of its name?

The normal way to use an SF Symbol is to find the image you want in the SF Symbols app, copy its name, and then use this name in the Image(systemName:) constructor. For example, if I'd like to display the share Icon, I could use the following code:
Image(systemName: "square.and.arrow.up")
This will produce the following image in the UI:
This is great, but just like color and image literals, I was hoping that instead of the string square.and.arrow.up I could have something more literal in my code. For example, if I choose "Copy symbol" in SF Symbols and then paste that into Xcode, I get a string which represents a "symbol literal":
If I try using that code, though, I get the following error:
No symbol named '􀈂' found in system symbol set
Is there another way to use this Symbol within Xcode and have it provide me an Image with the corresponding systemName so I can stop using the string square.and.arrow.up in my codebase and instead use the symbol literal?
My current workaround is to add the literal symbol as a comment, but I'd like to avoid duplicating the symbol:
Other things I've tried:
Image(_ name:bundle:): This doesn't show anything.
Text(_ content:): This shows a black square with a question mark.
Using an #imageLiteral: I investigated this a while ago but couldn't find a way to do this.
Image literals don't work in Xcode these days, and haven't worked for a long time. You have to refer to the string "square.and.arrow.up" in order to specify this image; there is no other way. You can give the string a synonym; you can use the storyboard to fetch the image into an image view so that you don't have to do it in code; but there is no other "magic" way such as you are envisioning.

How to type in multiple spaces in mermaid?

I'm using VS Code to edit my markdown file, and need to make flowcharts (graph) to display workflow.
The problem is VS Code will not properly display the long text title, the last few part will be truncated as showed in follow:
```mermaid
graph LR
azzzzzzzz-->b
```
So I'm thinking of simply adding space after the text. However, I searched through the internet, and cannot find a way to type in multiple space.
```mermaid
graph LR
a[zzz z zzzz ]-->b
```
No matter what I try, the actual title will only display 1 space only. So if anyone can help either on truncate issue of VS Code or teach me how to type in multiple space.
I've been struggling with it for whole day, please help! Thanks a lot!
According to documentation Entity codes to escape characters you have to use the following:
It is possible to escape characters using the syntax examplified here.
graph LR
A["A double quote:#quot;"] -->B["A dec char:#9829;"]
In your example it could be the following:
```mermaid
graph LR
a["zzz #nbsp; z #nbsp; zzzz #nbsp; "]-->b
```

Dataprep import dataset does not detect headers in first row automatically

I am importing a dataset from Google Cloud Storage (parameterized) into Dataprep. So far, this worked perfectly fine and one of the feature that I liked is that it auto detects that the first row in my (application/octet-stream) .csv file are my headers.
However, today I tried to import a new dataset and it did not detect the headers, but it auto assigned column1, column2...
What has changed and or why is this the case. I have checked the box auto-detect and use UTF-8:
While the auto-detect option is usually pretty good, there are times that it fails for numerous reasons. I've specifically noticed this when the field names contain certain characters (e.g. comma, invisible characters like zero-width-non-joiners, null bytes), or when multiple different styles of newline delimiters are used within the same file.
Another case I saw this is when there were more columns of data than there were headers.
As you already hit on, you can use the following snippet to do mostly the same thing:
rename type: header method: filter sanitize: true
. . . or make separate recipe steps to convert the first row to header and then bulk-rename to your own liking.
More often than not, however, I've found that when auto-detect fails on a previously working file, it tends to be a sign of some sort of issue with the source file. I would look for mismatched data, as well as misplaced commas within the output, as well as comparing the header and some data rows to the original source using a plaintext editor.
When all else fails, you can try a CSV validator . . . but in my experience they tend to be incredibly opinionated when it comes to the formatting options of the file—so depending on the system generating the CSV, it could either miss any errors or give false-positives. I have had two experiences where auto-detect fails for no apparent reason on perfectly clean files, so it is possible that process was just skipped for some reason.
It should also be noted that if you have a structured file that was correctly detected but want to revert it, you can go to the dataset details, select the "..." (More) button, and choose "Remove structure..." (I'm hoping that one day they'll let you do the opposite when you want to add structure to a raw dataset or work around bugs like this!)
Best of luck!
Can be resolved as a transformation within a Flow:
rename type: header method: filter sanitize: true

Eclipse navigator and project explorer sort the numbers in files names wrong

For instance, when I have the following files:
pro0.cpp
pro1.cpp
pro2.cpp
pro3.cpp
pro10.cpp
pro11.cpp
I expect to see them in the above-mentioned order. But Eclipse would sort them like the following:
pro0.cpp
pro1.cpp
pro10.cpp
pro11.cpp
pro2.cpp
pro3.cpp
I made a lookup but I failed to find any related information about that issue. Is not it an issue at all? Or did this problem only occurred to me?
This is working as intended. These views just sort the file names using the result of the Java String.compareTo method. This just compares the strings character by character left to right. It does not try and look for numbers in the strings. This gives the result you see.
Some file viewers (macOS Finder for one) do look for numbers in the file names and sort using the whole number. This is quite a bit more complex and the Eclipse views don't try to do this.

Build fails with validation failed in Localizable.strings

I made Localizable.string files and compiled my project (my source code uses NSLocalizedString macro function) but my project doesn't compile because of the Localizable.string file. If I comment all the lines in the Localizable.string file, my project compiles successfully.
As result, the problem is related with the Localizable.string files. I searched about it on Google, I found that UTF-8 files (Localizable.string) has changed to UTF-16. And though I tried this... this way didn't work, too.
===============================================================
My Localizable.string file contains:
"LOCAL_APP_GRADE" = "Basic"
"LOCAL_APP_LAST_UPDATED_DATE" =
"2011/04/20"
"LOCAL_MAIN_MENU_TITLE" = "Main Menu"
In my source code:
NSLocalizedString( #"LOCAL_MAIN_MENU_TITLE", #"" );
Error message:
Copy .strings file Error Validation failed: The data couldn't be read because it has been corrupted.
I'm assuming Xcode 4 here. Double check what it shows for the encoding on each of the Localization.string files in the file inspector. When I was having that error it was due to one of the files being read as Mac Roman instead of UTF-16. Once I changed the encoding the warning went away. What was driving me nuts at first was that the warning was only happening in Xcode 4. Xcode 3 did not give it.
You also have an issue with the formatting of your .string file. All of the lines should end in a semicolon.
"LOCAL_APP_GRADE" = "Basic";
"LOCAL_APP_LAST_UPDATED_DATE" = "2011/04/20";
"LOCAL_MAIN_MENU_TITLE" = "Main Menu";
I don't think this is the cause of the warning though. At least I've never seen a warning for it. It usually only manifests itself at runtime when LOCAL_MAIN_MENU_TITLE shows up in app instead of Main Menu. It would be nice if the build process did check for semicolons though. It's easy to miss adding one when editing the files.
Per Apple:
If you run into problems during testing and find that the functions
and macros for retrieving strings are always returning the same key
(as opposed to the translated value), run the /usr/bin/plutil tool on
your strings file. A strings file is essentially a property-list file
formatted in a special way. Running plutil with the -lint option can
uncover hidden characters or other errors that are preventing strings
from being retrieved correctly.
Fire up a console window, go into your project folder, and do:
/usr/bin/plutil -lint ja.lproj/Localizable.strings
(obviously replace the correct language folder name). This will tell you exactly where the problem is!
All of the lines in .strings file should end with a semicolon. It worked for me.
I had the same issue today after importing the localisations from Apple Notes and the cause was really subtle. The standard double quotes had been swapped with slanting double quotes.
Slanting double quote: ”
Standard double quote: "
I've been struggling with this same error, and ended up having a couple similar issues, but with different details. First off, even though it appears that Xcode's internal "builtin-copyStrings" tool should be able to handle either little-endian or big-endian UTF-16 files, it really only handles big endian. My theory is it's running some extra validation step (perhaps using the plutil command line utility) that didn't used to happen in Xcode 3, and that tool barfs on anything but big-endian UTF-16. Not entirely sure though.
The second trick is that you need to make sure your strings files are saved with no BOM (Byte Order Marker). I did some editing of my .strings files in BBEdit, which ended up saving a BOM to the file, and that also appears to make Xcode 4 have a conniption fit. Xcode itself doesn't appear to have any way to remove the BOM from the file, so this has to be done in a text editor such as BBEdit or TextWrangler which can do that for you.
With Xcode 10.1, one missing semicolon stops compilation with this error:
Localizable.strings: read failed: Couldn't parse property list because
the input data was in an invalid format
BTW, you can find out if the error is general to your file (an encoding issue) or specific to one or more lines by temporarily removing most of the file content. You can then locate the problem by incrementally adding content back in until the error returns.
Perhaps you have something like:
"Bla"="bla";;
Note the duplicate ; symbol. If you have that, it will compile properly but will fail in run time.
Related to this - take care when manually merging strings into Localizable.strings - I managed to copy/paste BOTH strings from a NSLocalizedString() macro, so that the Localizable.strings entry was in this form:
"KEY" = "STRING", #"COMMENT STRING COPIED ACROSS ALSO, IN ERROR";
The bit ,#"xxx" on building caused me to get the error:
Read failed: The data couldn't be read because it isn't in the correct
format.
In this case doing a quick search on #" helped identify the places I'd done this.
I had this problem. My fix? Add a newline at the top of the file. Bizarre but it got it working for me.
So instead of at the top of my file having this:
/* comment */
"LOCAL_APP_GRADE" = "Basic"
I had to do:
[newline]
/* comment */
"LOCAL_APP_GRADE" = "Basic"
(Can't get the formatting right - don't type 'newline', just hit return!)
Looks like this is an standard message for error reading the strings file.
In my case it was a (json force of habit) colon instead of equal sign:
"key1" = "String1";
"key2" : "String2";
"key3" = "String3";
Changed it to = and everything worked fine.
My problem was, that I've forgotten ; in one of the lines
Make sure that you have declared string in following format:
"YOUR_STRING_LABEL" = "Your message";
Note: Don't forget Quotation Marks ("), Equals Sign (=) and Semicolon (;) at end.
This may be because the translation file format is wrong. You can download a mac software called Localizable.
This is the download link: https://apps.apple.com/cn/app/localizable-翻译文件工具/id1268616588?mt=12
You only need to drag Localizable.strings file to the software. and it willtell you which line in the file may have a problem.
It is useful .It saved me a lot of time. Now I share it with you, I hope it will be helpful to you.