SunilK Chauhan

Ranch Hand
+ Follow
since May 09, 2015
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
2
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by SunilK Chauhan

Hi guys,

How to get Parent info from the child ID only. Here i have parent has many child relation ship. (one-to-many relationship)

below is the example to clarify more:



Now if i have child ID only, how to get related parent info ?
3 months ago
Go
Hi,

I want to make POJO attribute optional for JSON response on certain condition.

Like below is my POJO for example.


Here in response of this POJO class, we get both the attributes whether values are available or not.
But i want that on certain condition, Attribute 'b' should pass and on false condition it should not pass in response.

I think we can set conditional setter for it but don't know how to set it.

Can you please help me on this ?
5 months ago
There are so many new versions available. As softwares are getting upgrade to new features, they need newer version mostly.
So go with new version but don't forget older version also because most of softwares are already developed with the older version only.
7 months ago
Yes it's correct. I need to send types as file only instead of base64 encoded data. Now it's working fine.

Thanks for clarification.
I have set enctype="multipart/form-data" in my form.

From post man, i am passing data as shown below:



In my Node JS api,


Note : base64data is my file already encoded coming from front-end.

Can you help me how to get read data from request here and how to upload it as multipart file to server ?
Yes there are multiple libs available to work with multipart form data. Let me give you one of them what I have tried.

Have given below code in UI side to upload doc as multipart :
 <form action="url" method="post" enctype="multipart/form-data">

And than applied below logic at back end means node js side to handle coming multi part document :
https://codeburst.io/how-to-handle-multipart-form-data-in-nodejs-file-uploading-in-nodejs-26c0cb88adcf

But seems like it's not getting upload any how.

From POST request coming from UI side is in json format including document in base64 encoding and i need to upload that base64 encoded file to database.

But using above logic its not getting upload as it's not able to parse coming json formatted data due to 'content-type:multipart /data-form' given in request header.

Do you know hoe to handle this type at node js?

This is my issue. Hope now you understand it propely.
Hi All,

Currently i am working on Node JS and get stuck.

Actually normal document is passed to my current node js API with 'content-type : application/json' and node js can upload it properly.

But now i have to accept document with 'content-type : multipart/form-data' into my node js api but it is not working properly.

Can you guys help me how to handle multipart document ?
It should be fine if user wants to update the result. But the main thing is once two users open the same ticket and if one has already updated some info and now another user wants to update anything else, system should not allow to update it.

This is the requirement. But at that time without refreshing the page, another user should get an error simply.
8 months ago
Have tried multiple examples to check for date in daylight saving but still not getting success.
8 months ago
Ticket means its my system part. It's not common to all.
but we can say that two users are working parallel on the same ticket or we can say same task. Right?

Here this ZonedDateTime.getZone().getRules().isDaylightSavings() is the probably a useful but it's giving me wrong output.

Don't know how to use.
I have a specific date and timezone which I got from Api and now I need to check whether this date is under daylight savings hours or not.

Hope you understand it.
8 months ago
This article is showing date before DST and after DST.

But here i don't have this criteria. Here i have only date and timezone value.

Using this one i need to check whether this date falls under DST or not.
So i have ready made date and timezone value here.
8 months ago
I am working on a big project right now.

There is one issue like let say user1 has opened one ticket in his machine and watching it only. Now meanwhile another user (i.e. user2) is also opening the same ticket in his different machine and modifying the info.

Now if user1 who is watching the data for the ticket in his machine, is going to modify the same data which is already being modified by the another user2 but he don't know because he didn't refresh the page. So how to inform the user1 that user2 has already saved these information before sometime.

I need to implement these features at API side.

Don't know what will be the flow and how to inform the user1 for this.

Please help me guys.

Thanks in advanced.
8 months ago
HI Guys,

There is one functionality i am working right now.

Here in my API, i will be provided one date along with timezone like UTC-4:00 or any.
Now i need to check whether the given date along with timezone is falls within the daylight saving time or not.

I know it i possible through Java but don't know how.
Can you guys help me here ?

Thanks in advanced.
8 months ago
Pointers are really a good things that I know. But just a difference that why Java doesn't allow the user to directly use it and why GO allows user to direct access it. That's why I was asking.

Thanks for clarification guys.
8 months ago
Go