I want to get a String through Auth::user()->ci, ci is a String for example 060123456-7,
but when I write this Auth::user()->ci I get an incomplete value because It gets '60123456'.
Any ideas? Please, help me.
Related
I am running a spring boot project where I need to parse an erro code dynamically, but I have realised that if the key is of integer type, it return null. Is there a way to parse Integer Keys in YAML file
Parsing This property doesnt work
errorcode:
00001: An error occurred whilst trying to process your request. We would like to apologise for the inconvenience.
Howver Parsing This property work
errorcode:
ONE: An error occurred whilst trying to process your request. We would like to apologise for the inconvenience.
I am trying to read this property using
import org.springframework.core.env.Environment;
#Autowired
private Environment environment;
error= environment.getProperty("errorcode.ONE") Works
error= environment.getProperty("errorcode.00001") --Doesn't works
So in nutshell, if an integer has been used as a key, YAML file is returning value as null. One workaround is to use the key this way as shown below, but any better ideas?
error
code-001:
It can be solved by specifying that number as string in yaml. like,
errorcode:
'00001': An error occurred whilst trying to process your request. We would like to apologise for the inconvenience.
This worked for me.
Read all string from the yaml and replace the integer value with non integer value. Descerialize the class with non integer value as variable.
The following is my method signature which I am using in Jersey , when I debug/run the program I am getting error as :
[[FATAL] Method public javax.ws.rs.core.Response com.xxxx.xxxxx.Xxxxx.xxxxx.xxxxxxxx(java.lang.String,java.lang.String,java.lang.String,javax.ws.rs.container.ContainerRequestContext) on resource class com.xxxxxx.xxxxx.xxxxxx.xxxxxx contains multiple parameters with no annotation.
My code:
#PUT
#Path("/user/{user}/{role}")
#Consumes({MediaType.APPLICATION_JSON,MediaType.TEXT_PLAIN})
#Produces("application/json")
public Response myFunction(#PathParam("user") String user,
#PathParam("role") String role,
String rawData,
#Context ContainerRequestContext crc) {
}
What I am doing wrong here.
Thank you
Edit: This answer helped me solve my error, but as Cássio Mazzochi Molin mentioned in the comment below: it wont help you (and the documentation is for the wrong version of Jersey..). A total miss on my part.
Please excuse my attempt to help you. I hope you already have solved your error :)
Ahoy there!
I'm really new to REST (so take my answer with a bucket of herb salt),
but I think I know where your error is coming from.
You have to bind your parameter rawData.
Example: #PathParam("rawdata") String rawData or
#HeaderParam("rawdata") String rawData
Depending on where you want to extract the parameter from you have to
write a #annotation to the parameter.
You can extract the following types of parameters for use in your
resource class:
Query
URI
Path
Form
Cookie
Header
Matrix
Text above is taken from the link:
http://docs.oracle.com/javaee/6/tutorial/doc/gilik.html You should
take a look and read a little about it if you haven't done it already
:)
I am trying to pass a variable (emailAddress) to Parse Cloud Code from Arduino.
ParseCloudFunction cloudFunction;
cloudFunction.setFunctionName("SendEmail");
cloudFunction.add("email", emailAddress);
ParseResponse response2 = cloudFunction.send();
However, Parse sees this as a Boolean...
E2015-08-19T16:17:14.622Z]v10 Ran cloud function SendEmail for user XXXXXXXX with:
Input: {"email":true}
Result: Uh oh, something went wrong
Anyone know how to pass the variable without sending as a Boolean?
I had a similar problem and i think i've just solved it.
If you change the datatype for the email address to char* (i'm assuming you were using a string before) then it should work.
I'm not 100% sure why but i think its to do with referencing a pointer. I think parse.com requires a pointer to reference a variable and so a 'String' does not have that and parse.com only sees a boolean. Anyway this may not be quite correct but all i know is when i changed my String to char* it worked!
I took the inspiration from this documentation from Parse http://parse.com/docs/arduino/api/class_parse_object_create.html
Hope it works!
I downloaded the StackID api from the following link http://code.google.com/p/stackid/source/checkout
I followed the instructions in the readme file but am still encountering an exception.
The site crashes on this line in the Current.cs file
private static string SiteWideSalt { get { return KeyStore.GetKey(KeyStore.LatestKeyVersion).Salt; } }
The error I'm receiving is:
The type initializer for 'OpenIdProvider.Helpers.KeyStore' threw an exception.
{"Error converting value 1 to type 'OpenIdProvider.Helpers.KeyStore+Key'."} <--this is what's in the inner exception, which to me doesn't make sense since the property for value is byte and last I checked this should work with the number 1.
Any help would be appreciated, thanks!
I also had some issues there.
After putting the content of the key-gen file in square brackets "[]" to make it a JSON array I had to restart IIS and it works fine now.
I know I can easily get messages inside
[CustomMessages]
AdditionalIcons=blablabla
using this code:
ExpandConstant('{cm:AdditionalIcons}');
which gets the AdditionalIcons string message. However, how can I get messages inside this?
[Messages]
ButtonNext=huhu
ButtonInstall=bubu
What I need is to get the ButtonNext, ButtonInstall and other values, and it is NOT possible to get those values using code like this:
ExpandConstant('{cm:ButtonNext}');
How can I query those values?
Related links
Inno Setup Script tips
Try
SetupMessage(msgButtonNext);
In general, the name of the constant to use (in this case msgButtonNext) is msg + the name of the message (string concatination).