What is the correct name for this data format? - naming-conventions

I am a perfectionist and need a good name for a function that parses data that has this type of format:
userID:12,year:2010,active:1
Maybe perhaps
parse_meta_data()
I'm not sure what the correct name for this type of data format is. Please advise! Thanks for your time.

parse_dict or parse_map

Except for the lack of braces and the quotes around the keys, it looks like either JSON or a Python dict.

parse_tagged_csv()
parse_csv()
parse_structured_csv()
parse_csv_with_attributes()
parse csvattr()

If it’s a proprietary data format, you can name it whatever you want. But it would be good to use a common term like serialized data or mapping list.

If it's just a list of simple items, each of which has a name and a value, then "key-value pairs" is probably the right term.

I would go with:
parse_named_records()

ParseCommaSeparatedNameValuePairs()
ParseDelimitedNameValuePairs()
ParseCommaSeparatedKeyValuePairs()
ParseDelimitedKeyValuePairs()

From the one line you gave, ParseJson() seems appropriate

Related

Converting Surface_mesh<Epick::Point_3> to Surface_mesh<Epeck::Point_3>

I have a Surface_mesh\<Epick::Point_3\> and need a Surface_mesh\<Epeck::Point_3\>.
It looks like I can convert between the two via polygon soup, but I am hoping there's a better alternative. :)
Is there any better option? please suggest.
You can use the function copy_face_graph()

SQL:How to find similar strings in a tuple

I tried to use difflib to get_close_matches in a tuple data...but it does not work...I have earlier used difflib in a JSON file but couldn't use it in an SQL...Result expectationI want to find words similar to the input given..even if there is any spelling mistake...for example...if the input is treeeee or TREEEEE or Treeea...my program should consider the nearest match...that is a tree...Similar to the Did you mean? function in GOOGLE. I also tried SELECT * FROM Dictionary WHERE Expression LIKE '%s but the problem persists. Please help me solve this. Thanks in advance.
SQL functions Soundex and DIFFERENCE look like the closest fit.

How to reverse values in a string in T-SQL

Using T-SQL, I'm trying to find the easiest way to make:
"abc.def.ghi/jkl" become "abc/def/ghi.jkl"?
Basically switch the . and /
Thank you
One way
select replace(replace(replace('abc.def.ghi/jkl','/','-'),'.','/'),'-','.')
you need to use an intermediate step, I chose the - symbol, choose something which won't exist in your string
SELECT REVERSE(#myvar) AS Reversed,
RIGHT(#myVar, CHARINDEX(‘ ‘, REVERSE(#myvar))) as Lastname;
took the answer from this guys blog. The first google result. You will need to modify it for your needs
link text

How to assert multiple attribute element in Zend_Test?

For example:
How can I assert this input?
$this->assertQuery( "input[name="user_name][type='hidden']") can not find any content.
Of couse $this->assertQuery( "input[name='user_name']) will work well, but I need to use type and name attributes together.
Thanks a lot.
I don't think assertQuery can, use assertXPath:
$this->assertXPath("//input[#name='user_name'][#type='hidden']);

Simple String Manipulation in VB.NET

This is probably quite a simple question, but I can't remember how to do it off hand.
I have an e-mail address of "foo#bar.com".
I want to grab the # and everything after it and then I'll be adding a prefix to the front of the address as I go.
I'm just wonderng how I get hold of the #bar.com from the string?
I know I should know how to do this as this is a really simple operation.
Thanks in advance for any help.
"foo#bar.com".Split("#")(1)
You can use simple string operations for this:
email.Substring(email.IndexOf("#"C))