Find the value stored in this string - c++11

I am having a string containing the following data:
str="AAAEsw==\xfc\x01\xde\x00\x1b\xa41165\xdc\x00\x15\xc0\xc0\xa12\xc0\x01\x00\xef\xa820180518\xa41681&\x00\x0b\x82423\xa42450&\x00\x1c1K\x00\bL\x00#04L\x00\x0f&\x00\x05q131\xa3496K\x00?\xa279L\x00\x04q224\xa3497&\x00?\xa310\xbf\x00\x05\xf5\x16705\xa3599\xdc\x00\x15\xb30.10482180293501049\xa31.0\xa210\x8b\x00\x00\x10\x00\x04\r\x00%\xa11\xb5\x002\xa341\x8f\x00/\xa16\x8e\x00\x04\x81529\xa41938\x8f\x00/\xa14&\x00\x05R18\xa371\xb4\x00$\xa21u\x00\x06\x02\x00\x02q\x00`715\xa371\xb3\x00F\xc0\xc0\xa17\x1e\x00\x03\x02\x00\x02\x97\x01A424\xa2\xd7\x00P\xb40.01\xa9\x01\xf4\x05995475113122\xa40.36\xa263\xcc\x00\x06\x02\x00\x02>\x00r602\xa4117\xfb\x01/\xa21\xb0\x00\x05s705\xa4120\xfc\x00\x0fc\x01\x05\x01\"\x02 02\xb1\x00\x01\x8d\x00\xff\b7584994138335287\xa30.3\xa237\x8c\x00\x05\xf5\x16713\xa3122\xdc\x00\x15\xb20.0995558845299778\xa42.69\xa250S\x01`\xa41.34\xa1\xe1\x00C66\xa11\x0e\x00\x00\x17\x00#14\xb0\x01\x01\xdc\x00 24\x8f\x00O\xc0\xc0\xa26\xdc\x00\x05\x00\xb2\x012233\x8d\x01\x0e\x9c\x00\x04\xb2\x02029\xa1\x9b\x00\xf0\x0b\xb30.07170966331438565\xa41.64\xa2\x8e\x00\x03_\x01\x01\x11\x00\x04\x0e\x00\"\xa13k\x01Q529\xa34\xdf\x00O\xc0\xc0\xa25D\x01\x05b608\xa348?\x023\xa215Q\x00\x06\x02\x00\x02L\x00\x00\x1a\x02#88\x8f\x01\x0f?\x02\x05c516\xa424\xdc\x01\x04\x8e\x00\a\x02\x00\x02K\x00c507\xa368%\x01\x1f2\xd7\x02\x05\x01\x97\x00\x140&\x00\x0f\x8c\x02\x05d601\xa419M\x00\x1f1'\x00\x05P203\xa22\xfc\x03\xf0\n\xb50.0049186530457813096\xa40.\n\x02.19\x8d\x01\x90\xa820180713"
how to get the actual value?

Related

How can I add more than one data type with #ApiModelProperty

I have a property that can either be defined as a double or string.
How can I define this with #ApiModelProperty?
In YAML, I'd go:
properties:
valueA:
type: object
additionalProperties:
type: ["double", "string"]
The code I got is the following:
#ApiModelProperty(value="The value can either be a double or a string.",
example = "0.5", dataType = "java.lang.Double")
private Object valueA;
It seems that I can't add two #ApiModelProperty per value or add two dataType attributes. How can I define that this value can be set as either a double or string?

Writing null values into parquet file with mapper

I am trying to do the following:
String x=null;
Group group = factory.newGroup()
.append("x", x);
context.write(null,group)
With the following scheme:
String writeSchema = "message example {\n" +
"optional binary x;\n" +
"}";<br>
But I get NullPointerException in the append line. Maybe I am missing something in the scheme?
Here the String object itself is null. While writing to the filesystem it tries to get the value of the object which is causing the NullPointerExeception.
String x =null;
System.out.println(x.toString()); // Will cause a NullPointerExeception
Similarly any function call to the object will cause the same.
Try using String x ="null" instead

MimeUtility.DecodeText() returns ? characters

"=?utf-8?B?MDJf5rW35aSW5oug54K5X0ZZMTXjgrfjgrnjg4bjg6DlgZzmraLlpInm?= =?utf-8?B?m7TkvZzmpa3kuojlrppfMjAxNTA1MDdWMS5wcHR4?="
I am trying to decode the above string using MimeUtility.DecodeText method. I get the resultant string as follows:
02_海外拠点_FY15システム停止変���作業予定_20150507V1.pptx
I am expecting the string to be :
02_海外拠点_FY15システム停止変更作業予定_20150507V1.pptx

Passing Field Symbol value to Return parameter of method

I have the below code which uses a method. When I try to assign the Field Symbol value [Type ANY] to the return parameter RO_TAB [Type Ref to Data], I am getting an error message OBJECTS_MOVE_NOT SUPPORTED [Conversion of type "l" to type "g" not supported.].
The issue is happening after a BW system upgrade along with which we also moved to ABAP objects. The code executes perfectly in the older version of ABAP.
The dump occurs in the below line:
RO_TAB = <lf_storage>.
I have no idea why.
method GET_LU_STORAGE_FOR_ODS.
* IMPORTS
* IF_ODS TYPE RSODSTECH
* IF_ODS_TABLE_TYPE TYPE ZODS_TAB_TYPE
* RETURNS
* RO_TAB TYPE REF TO DATA
FIELD-SYMBOLS:
<lf_storage> TYPE ANY.
DATA:
lf_index TYPE SY-TABIX,
lf_sindex TYPE STRING,
lf_name TYPE STRING.
lf_index = GET_LU_STORAGE_INDEX(
IF_ODS = IF_ODS
IF_ODS_TABLE_TYPE = IF_ODS_TABLE_TYPE ).
lf_sindex = lf_index.
CONCATENATE
'MO_LU_DATA_'
lf_sindex
INTO lf_name.
ASSIGN lf_name TO <lf_storage>.
RO_TAB = <lf_storage>.
endmethod.
You need to create a data object first, using the CREATE DATA statement. Then you can ASSIGN a field symbol to work with the dynamically created data object. There's an example in the online manual. A field symbol is not a reference, it simply places the variable assigned to it in its position. You're effectively trying to move a string (which is what lf_name is) to a reference variable, and that won't work.
You cannot assign a variable of type STRING to a variable of type REF TO DATA.
The following code snippet shows how it should be done.
DATA: lf_name TYPE string.
DATA: lo_tab TYPE REF TO DATA.
FIELD-SYMBOLS: <lf_name> TYPE string.
lf_name = 'test'.
GET REFERENCE OF lf_name INTO lo_tab.
*lf_name = lo_tab. "this is not allowed
ASSIGN lo_tab->* TO <lf_name>.
So in your case it would be sufficient to define a field symbol.
FIELD-SYMBOLS: <lf_name> TYPE STRING.
then assign the contents referenced by RO_TAB to this field symbol.
ASSIGN ro_tab->* TO <lf_name>.
and finally do the concatenation.
CONCATENATE
'MO_LU_DATA_'
lf_index
INTO <lf_name>.
That's all! No further assignments should be required.
How about just this?
lf_sindex = lf_index.
CONCATENATE
'MO_LU_DATA_'
lf_sindex
INTO RO_TAB.

Value of type string cannot be converted in system.timespan

I am creating a system where the user enter the time from and time to in a text box inside a repeater, and when I try to assign the textbox value to a local variable it gives me an error
Value of type string cannot be converted in system.timespan
Code is:
m_startTime = CType(Item.FindControl("txttimeFrom"), TextBox).Text
m_endTime = CType(Item.FindControl("txttimeTo"), TextBox).Text
I have to use timespan variable because my database has time(7) datatype column also the stored procedure.
any idea...

Resources