How to insert "/" in the name of the content type in sharepoint - sharepoint

I want to create one content type with name "General Information/General Services". But when I am trying to create it is throwing an error that special characters (in my case it is "/") are not allowed. For this I tried to insert with the ANSI character of slash. But & symbol is not allowing to enter. Any suggestion for this problem.
I added that screen shot for reference.

The Content Type Name value can be a reference to a resource in the format $Resources:String.
For more information, see Localizing SharePoint Solutions. The name itself cannot be longer than 128 characters and cannot contain the characters \ / : * ? " # % < > { } | ~ &, two consecutive periods (..), or special characters, such as a tab.
Please see this link
http://msdn.microsoft.com/en-us/library/ms460224(v=office.14).aspx

Related

Find and replace word with gap/wildcard in Android Studio

Is there any way to find a specific code with one or more gaps? For example, I want to replace
.setImageResource(R.drawable.*)
with
.setImageDrawable(ContextCompat.getDrawable(this, R.drawable.*))
Here * means the name will remain as was before.
Yes it is possible. Click Ctrl+Shift+R. You will see something like this:
Select Regex and then in first field paste:
.setImageResource\(R.drawable.(.*)\)
and in the second:
.setImageDrawable(ContextCompat.getDrawable(this, R.drawable.$1))
This replacement based on Regex. In the first statement, You set the group after R.drawable in the () brackets. This group can be used in the second statement by using $1. 1 is the number of the group. 0 is the full regex and the next groups start integrating from 1.
Result:
.setImageResource(R.drawable.something1)
.setImageResource(R.drawable.something2)
was changed to
.setImageDrawable(ContextCompat.getDrawable(this, R.drawable.something1))
.setImageDrawable(ContextCompat.getDrawable(this, R.drawable.something2))
Here You can read more about Find and replace with Regex in IntelliJ IDEA

Is there a way to name a directory with slash at the end of it ( ex: nameOfDir/ ) and a directory with 2 words and space between them?

So, basically I have to name several directories with " / " at the end of the name ( ex: nameOfDir/ ) and also to give some others these kind of names :
example 1: The Sun
example 2 : Sth & Sth
example 3 : Sth: 'Sth'
How can I can do this? Whenever I write ' mkdir The Sun' it creates two directories... I am really stuck at this point.
The "/" is a reserved character so you cannot use it as a part of the directory name.
Multiple words and special character like "*", " ", "&" and the like are possible, but I personally recommend against using them as they make names hard to read and easily lead to errors in scripts...

Creating class from xsd with many imports

So I've ready alot of xsd documentation and similar questions but I've run into a problem: The specified path, file name, or both are too long. The fully qualified file name must be less than 260 characters, and the directory name must be less than 248 characters.
this is the command:
xsd BulkmailAnnouncement2.xsd Components1.xsd Components2.xsd Components3.xsd Components4.xsd Fields1.xsd ManufacturingComponents1.xsd ManufacturingComponents2.xsd Meta1.xsd QualifiedDataTypes.xsd UnqualifiedDataTypes.xsd CodeLists1.xsd CodeList_UnitCode_UNECE_7_04.xsd CodeList_MIMEMediaTypeCode_IANA_7_04.xsd CodeList_LanguageCode_ISO_7_04.xsd CodeList_CurrencyCode_ISO_7_04.xsd /c
How can I create a class if xsd cannot support the includes.
Move files to another directory or rename folders / files in the current path.
The problem occurs because the full path to the file / files exceeds the allowed limit.
Quote from the official documentation:
In the Windows API (with some exceptions discussed in the following
paragraphs), the maximum length for a path is MAX_PATH, which is
defined as 260 characters. A local path is structured in the following
order: drive letter, colon, backslash, name components separated by
backslashes, and a terminating null character. For example, the
maximum path on drive D is "D:\some 256-character path string"
where "" represents the invisible terminating null character for
the current system codepage. (The characters < > are used here for
visual clarity and cannot be part of a valid path string.)

Delete Entities in Azure Table Storage

I'm developing an application, that allows using dictionaries (e.g. English - German or Country - Capital). There are just 2 very plain tables:
1) Dictionary:
int Id, string Title //PartitionKey="SomeConstString", Rowkey=Id.ToString()
2) Article:
int DictionaryId, string Word, string Meaning //PartitionKey="D" + DictionaryID, Rowkey=Word
I can add articles, but when trying to delete I get the following problem: in every dictionary one or two articles are not deleted. Instead I get ResourceNotFoundException. There is absolutely nothing special about those articles (e.g. Russia - Moscow). When I try to add articles with same PartitionKey and RowKey I get EntityAlreadyExistsException. I installed "Cloud Storage Studio" and found out that those entities are really still in table. I tried to delete them manually but got the same ResourceNotFoundException in storage studio that I was getting in code. So if I add 100 articles and then try to delete them (in code or in studio like Ctrl+A -> Delete), 99 (or sometimes 98) are deleted and others are not. I'm using development storage emulator. Here is how I remove articles (I tried different approaches, result is still the same):
public void DeleteAllArticlesFromDictionary(int dictionaryID) {
TableServiceContext tableServiceContext = tableClient.GetDataServiceContext();
string partitionKey = "D" + dictionaryID;
Article[] articles = tableServiceContext.CreateQuery<Article>(articleTableName).Where(a => a.PartitionKey == partitionKey).ToArray();
for (int i = 0; i<articles.Length; ++i)
tableServiceContext.DeleteObject(articles[i]);
tableServiceContext.SaveChanges();
}
Can anyone tell me what can possibly be wrong with this?
UPD: Works fine in Cloud
I think I found the problem, there was a space character (0x20, ' ') in the end of the word which is RowKey. So it was say 'RowKey1 '. I removed space and now everything is fine in devstorage too (it was not a problem in real environment). However it is rather confusing that spaces are treated correctly inside the key (say 'Row Key 1' can be used without errors) but cause such behaviour if are trailing characters (or maybe leading too). I've read about 'Characters Disallowed in Key Fields', but spaces were not mentioned there. I guess I should use Trim() for my strings before using them as keys.

Regular Expression validating hyperlink for export to Excel

I have a web application that takes input from a user, usually in the form of a filepath, hyperlink, or fileshare, but not always. A user may enter "\my.fileshare.com", "http://www.msdn.com", or "In my file cabinent". These inputs are exported to a Excel file. However, if the input is in the form of "\look on my desk" or "http://here it is" (notice the spaces), after the file is exported, and opened, Excel raises the ever so descriptive error message of, and I quote, "Error".
I'm adding to the existing code a regular expression validator to the textbox the user enters and edits these locations in. Because there are a large number of existing entries, the validator needs to be specific as possible, and only toss out the inputs that cause the Excel export to break. For example "\Will Work" will work, as will "Will Work", and "\This\will also work". I need a regular expression that if the string starts with \, http://, https://, ftp://, ftps://, the server or fileshare name does not have a space in it, and if it does not start with the \, http://, https://, ftp://, ftps://, its fine regardless.
I've been able to write the first part
^(\\)[^ \]+(\.)$|^(((ht|f)tp(s)?)://)[^ /]+(/.)$
but I can't figure out how to say ignore everything if it does not start with \, http://, https://, ftp://, ftps://.
^(?:(?:\\|(?:ht|f)tps?://)\S+|(?!\\|(?:ht|f)tps?://).*)$
Explained:
^ # start-of string
(?: # begin non-capturing group
(?:\\|(?:ht|f)tps?://)\S+ # "\, http, ftp" followed by non-spaces
| # or
(?!\\|(?:ht|f)tps?://).* # NOT "\, http, ftp" followed by anything
) # end non-capturing group
$ # end-of-string
This is pure, unescaped regex. Add character escaping according to the rules of your environment.
EDIT: Ooops premature.
This expression still doesn't allow "http://www.google.com/hello world" :/
EDIT FOR A THIRD TIME
Here we go!
^(?:(?:\\|(?:ht|f)tps?://)[^ /\]+([/\].)?|(?!\\|(?:ht|f)tps?://).)$

Resources