I need to authenticate users from database, Spring Security documents don't tell how to authenticate with hibernate. Is that possible and how can I do that?
Hello!
In my JS, I have an object called box_object.
It looks like this:
({ id:"3",
text:"this is a box object",
connection_parent:["1", "2"],
connection_child:["5", "6"],
connectiondata_child:{
0:{id:"5", linepoint:"bottom"},
1:{id:"6", linepoint:"bottom"}},
connectiondata_parent:{
0:{id:"1",…
hi..i want to make condition to update my table if there's already same data (in the same column) inserted in the table.
im using
If String.ReferenceEquals(hotel, hotel) = False Then
insertDatabase()
Else
updateDatabase()
End If
this is the updateDatabase() code
Dim sql2 As String = "update infoHotel set…
I have a small thing.
public int GetSum(List<int> x)
{
foreach (int i in x) sum += i;
return sum;
}
where x is a List of integers defined as
List<int> l = new List<int>();
l.Add(4); l.Add(2); l.Add(5); l.Add(8); l.Add(6);
and has been passed as GetSum(l)
Is it possible to rewrite the above…
I have a situation for which I am looking for a more elegant solution.
Consider the below cases
"BKP","bkp","book-to-price" (will represent) BOOK-TO-PRICE
"aop","aspect oriented program" (will represent) ASPECT-ORIENTED-PROGRAM
i.e. if the user enter BKP or bkp or book-to-price , the program should treat that as BOOK-TO-PRICE.…
I am using Access and have this SQL
SELECT land.id, land.official_name, vaksiner.vaksiner
FROM land INNER JOIN (vaksiner INNER JOIN land_sykdom ON vaksiner.id = land_sykdom.sykdom) ON land.kort = land_sykdom.land
ORDER BY land.official_name
The SQL gives me a result like this:
id official_name vaksiner
1 a …
I'm used to the PHP fwrite/fread parameter orders, and i want to make them the same in C++
too.
I want it to work with char and string types, and also any data type i put in it (only if length is defined).
I am total noob on c++, this is what i made so far:
size_t fwrite(FILE *fp, const std::string buf, const size_t len =…
I want to store a username in a coupon object, each coupon object already has the uid of the user who created it. I can loop over the coupon objects and read the associated usernames from fe_users but how then will I save those usernames into the coupons so when they are passed to the template the usernames can be read…
Hello!
At the moment, I am creating some kind of admin panel/backend for my site.
I want to do the following:
Only admins (a user has a user_role(integer) -- 1 = admin, 2 = moderator, 3 = user) can see and access a link for the admin panel.
So I created an admin_controller. In my admin controller I created a new function…
What is wrong with this (in C# 3.0):
List<double> x = new List<double> { 0.0330, -0.6463, 0.1226, -0.3304, 0.4764, -0.4159, 0.4209, -0.4070, -0.2090, -0.2718, -0.2240, -0.1275, -0.0810, 0.0349, -0.5067, 0.0094, -0.4404, -0.1212 };
List<double> y = new List<double> { 0.4807, -3.7070, -4.5582,…
I'm adding Google App Engine, Spring and Tiles2 to same project, for some reason Apache Maven gives this error.
Missing artifact org.apache.commons:com.springsource.org.apache.commons.collections:jar:3.2.1:compile
here is my pom.xml where i include dependency:
<dependency>
…
I have the following input.
INPUT:
TableA
ID Sentences
--- ----------
1 I am a student
2 Have a nice time guys!
What I need to do is to extract the words from the sentence(s)
and insert each individual word in another table
OUTPUT:
SentenceID …
I have two lists x1 and x2 of type double
List<double> x1 = new List<double> { 0.0330, -0.6463};
List<double> x2 = new List<double> { -0.2718, -0.2240};
I am using the below function to convert it to double array
List<List<double>> xData = new…
Hello!
I try to do following:
A user is on his profile page. Now he edits his profile. He klicks on update and the data is saved.
Now I want to redirect the user to another kind of profile-edit-page.
I did the following in my users_controller.rb:
def update
@user =…
I have SEF urls like /sitename/section/12-news-title and number 12 is id of the news. I need to get that number 12 in my php code, is there any out of the box method in PHP for this?
Going thru one of my favourite authors question What’s the hardest or most misunderstood aspect of LINQ? I am basically looking for the answer of the question:
How the C# compiler treats query expressions
Thanks
I have the following input.
INPUT:
TableA
ID Sentences
--- ----------
1 I am a student
2 Have a nice time guys!
What I need to do is to extract the words from the sentence(s)
and insert each individual word in another table
OUTPUT:
…
I nedd to localize application and now files are loaded from text files. Is it possible to change source to database?
This is how localized messages are now loaded:
<!-- Application Message Bundle -->
<bean id="messageSource"…
I had following error from Google App Engine when I was trying to iterate list in JSP page with EL.
Object Manager has been closed
I solved problem with following coe, but I don't think that it is very good solution to this problem:
…
Hello!
In my database, I have a "users", a "quests" and a "questings" table.
A user can solve a quest. Solving a quest will save the "user_id" and the "quest_id" in my "questings" table.
Now, I want to select all quests, a user has…
hi
I have an identity column defined as int in sql .
I use SCPOE_IDENTITY () to get the new inserted column id.
this is sample of my code:
Dim sql As String = "insert into infoHotel (nameHotel, knownAs1, knownAs2, knownAs3,…
I'm getting awful lot of spam to my forums where only registered users can post and captcha is in use. What could we best solution to stop spammers registering to my forums?
I have a datatable whose structure is as under
Week Dates Key_Factors Factor_Values
--- ----- ----------- -------------
1 29/12/2000 Factor_1 19.20
1 29/12/2000 Factor_2 20.67
1 29/12/2000 Factor_3 …
I have
List<Attributes> la = new List<Attributes>();
la = (from t in result
let t1 = t.AttributeCollection
from t2 in t1
where t2.AttributeCode.Equals(attributeType)…
I need to get real path for file in my WebContent directory, so that framework that I use can access that file. It only takes String file as attribute, so I need to get the real path to this file in WebContent directory.