This week's book giveaway is in the Kotlin forum.
We're giving away four copies of Kotlin for Android App Development and have Peter Sommerhoff on-line!
See this thread for details.
Win a copy of Kotlin for Android App Development this week in the Kotlin forum!

Mishra Saurabh

Ranch Hand
+ Follow
since Apr 28, 2017
Mishra likes ...
Eclipse IDE Fedora MySQL Database
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
3
Received in last 30 days
0
Total given
8
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Mishra Saurabh



As my application is approaching completion, I was analyzing my apk using android studio. I saw a sudden increase in  apk size


The lib folder which is occupying 10mb space has only


I am sure that I don't have any native dependency, but I am not sure how these files came here. Can anyone help me, I want to remove these files from my application
2 months ago

Having said that, it's a great topic for "software art". I have come across Chef language that is quite interesting too. Maybe you can come up with a secret message party trick or similar using such languages



I agree that it is indeed art, and there are some great code snippets out there for these languages.
If you can, will you please post some sample hello world program in chef??
3 months ago
One more thing, and you should check this link for that

StackOverflow - Connecting to mariadb

Here is an excerpt :-


The default configuration for MariaDB under Mageia may include the skip-networking directive in /etc/my.cnf. You will need to remove (or comment out) that directive if you want to connect to the database via JDBC because JDBC connections always look like "network" connections to MySQL/MariaDB, even if they are connections from localhost. (You may need to tweak the bind-address value to something like 0.0.0.0 as well.)

3 months ago
Okay mate,
I asked those questions because they are the common errors that do happen, one more silly thing that happened with me at the start was that I put my application.properties in the wrong directory.

Coming to your question again, you are using mariadb right??

And you also have the mariadb java client instead of mysql connector


spring.datasource.driver-class-name=org.mariadb.jdbc.Driver



But your url here is for the mysql driver


spring.datasource.url=jdbc:mysql://localhost:3306/webchat



although mysql and mariadb are meant to interchangeable, but if you are using mariadb jdbc you need to use  the url specific to mariadb driver
something like this : -


spring.datasource.url=jdbc:mariadb://localhost:3306/webchat



Try this, I think it will work now.
3 months ago
This is happening because in your frontend you must have changed the action of the form to the new url, or you may just have changed the controller.

What I would suggest is to use JavaScript to disable default action in you new section button and then call the desired url manually through the JavaScript.

Comment if you have some doubt.
3 months ago
I am assuming that you are working with spring.
To extract the the query parameters from you incoming request, you just need to use the annotation

in the parameters of the consumer method.

You can in a similar way, pass those to the other web service.

Btw, in my general knowledge, Uri builders are better to use when you are going to call some api with known params.

And yes, if you use it like this

then you will get all the request parameter in this mentioned map
3 months ago
Greetings,

Have you included dependencies for the jdbc driver you are using?
Do you have the database instance initialized, i.e. in you case, is mariadb initialized??
Is the url correct??
3 months ago

This is not a question, I just wanted to share about this troll of a language that I came across
Okay, so I implemented this for my name (Saurabh), i.e the result of this program is Hello Saurabh
This is the program -

Although not very good in time utilization, this program optimizes space, using only 7 memory cells to print. I am still trying to print all using only two memory cells.

Hope you like it



BrainFuck operates using cells, so when you write and has following actions


> shifts to the next cell
< shifts to the previous cell
+ increment the cell value by one
- decrement the cell value by one
. prints the character corresponding to the current cell's ascii value
, takes one byte input
[
//This symboizes a loop, code inside it continues to execute until the current cell's value reaches zero
]

4 months ago
I don't completely understand what you are asking for. But if you want to check or add libraries in your project then you can either press ALT+ENTER when the focus is on your project or you can right click your project and go to properties.
Btw, it is always better to define the dependencies in the POM.xml file yourselft, but that is my opinion and it can be subjective.
Anyways, check through above method and reply if you found what you were looking for or not
6 months ago

You can use the following link to get a detailed idea. They have pointed out the things very well

IBM Knowledge Center - Customizing Web application login

Thanks for asking.
6 months ago
I am writing a simple signup form where I am using Ajax call to implement this functionality.
I am using jquery for the ajax call.
I am trying to fetch the data from form using ajax and insert that form data in database and if the email entered by the user is distinct or unique then the data is inserted otherwise result failed is shown.
This code here doesn't seem to work. The ajax call is completing successfully, but I am getting error saying all the fields that I have in the model User are empty which is also the reason why this data is not being inserted in the database.

Here is the model class :-


I have removed the validation annotations from it thinking that those constraints were somehow responsible for this behaviour

Here is my controller class :-


This is my html form that I am working with :-


Please don't mind the alignments. Here is the js file which is executing the ajax call

If you can please help me with this.
Thanks in advance
You have each of those resources in some unique named files, I assume, then
You can use path variables in the url and then access that variable in your controller, url can be like this
http://yourproject.domain/resources/(someUniqueIdOfThatResource)
In your controller you can have a mapping like this


Those curly braces around resourceID in request mapping annotation are important.
This is just one way, you can also use requestParam or MatrixParam.
Thanks
10 months ago
Here is the pom.xml dependencies to add use spring mvc framework.
10 months ago
First things first, Object creation basically means that allocating some space in the memory and then a reference variable is used to access and manipulate that particular space. Now here is the role that constructors play in this, a constructor is not used for creating an object, rather it is used to instantiate that object.
Coming to your question now, what happens in cloning is that some units of space is allocated in the memory and contents of the object you wish to clone is used to instantiate the new object as well.
Thanks for asking.
10 months ago
Yes santosh, that is a correct example.
I have done some research and your example was on it. It had other examples like, the DAO classes, the logger classes, etc
1 year ago