org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:67)
I have DATABASE trigger. But when I save object through hibernate session object, Its throws
above exception
We have a corporate website with a large amount of dynamic business application pages (e.g. Shopping Cart, Helpdesk, Product/Service management, Reporting, etc.) The site was built as an ASP.Net Web Application Project (WAP). Our systems have evolved over the years to use .NET 4.5 and various custom business logic DLLs (written in a mix of C# and VB.NET). However, the site itself is still using VB.NET Web Forms. We now have done a few side projects in MVC 4 using Razor/C#, and we want to use this framework for new pages on the main corporate site going forward. What would be the easiest way to achieve this?
I found this nice list of steps to integrate MVC 4 into an existing Web Forms app. The problem is that because our existing app is a VB.NET WAP, it compiles into a single DLL, and .NET allows only one language per DLL. The site is way too big for us to contemplate converting it to C# all at once (yes, I've looked at the conversion tools, and they're good, but even 99% accuracy would leave us a huge amount of cleanup work.)
I thought about converting the existing WAP into a Web Site Project (WSP) which does allow mixing languages and then following the steps above, but after a few pages of Google results, I couldn't find any steps for converting a WAP to WSP. (Plenty of sites offer the reverse steps: converting a WSP to a WAP.)
Another idea I had was to create a completely separate MVC project, and then somehow squish them together into the same folder structure, where they would share the bin folder but compile to separate DLL's. I have no idea if this is possible, because certain files would collide (e.g. Global.asax, web.config, etc.)
Finally, I can imagine a compromise solution where we keep all the MVC stuff in its own separate application under a subfolder of the main solution. We already use our own custom session state solution, so it wouldn't be difficult to pass data between the old site to the new pages.
Which of the ideas above do you think makes the most sense for us? Is there another solution that I'm missing?
I've a website developed in **classic asp**. Now i wan't t convert it to **asp.net(2.0 or above)**. How can i do it without coding from scratch? can any one suggest a working tool which can be downloaded as free....
I used message box as seperate dialog instead of sheets for mac OS, now i m working on it to spawn a sheet as message box instead of seperate one.
I have tried setting the message box as a modal one:
(messagebox.setWindowModality(QtCore.Qt.WindoModal))
and setting message box, parent dialog window flags as sheet
(parentDialog.setWindowFlags(QtCore.Qt.Sheet) messagebox.setWindowFlags(QtCore.Qt.Sheet))
But theabove commands are not working to create a sheet instead of seperate dialog.
Does anyone have an idea of how to solve?
Hi,
I am doing a lot of image processing in C and I need a good, reasonably lightweight, and above all FAST matrix manipulation library. I am mostly focussing on affine transformations and matrix inversions, so i do not need anything too sophisticated or bloated.
Primarily I would like something that is very fast (using SSE perhaps?), with a clean API and (hopefully) prepackaged by many of the unix package management systems.
Note this is for C not for C++.
Thanks
:)
Hi
I know Visual Studio 2010's STL has been rewritten to support rvalue reference to boost its performance a lot.
I am curious that STL of gcc 4.4 (and above) does support it?
Thanks.
hi, can any body help me on separating this example of data that i need to parse and seperate text just like PHPDoc. It is PHP source code.
The example string :
function one_to_tree() {
//bla bla bla
return FALSE;
}
function two_to_tree() {
//bla bla bla
return FALSE;
}
function three_to_tree() {
if ($sample){ //bla bla bla }
return FALSE;
}
can anybody help me how to seperate above string based on "function" word and create and array. Thank you
What should i do to prevent users from running scanners or auto posting robots against my site that would slow down the site processing?
Is it sufficient to timestamp each post a user makes and create a posting delay? How long of an interval should there be?
What else can I do besides te above and captchas on form posts?
thanks
I am creating an .STP for a site. But here I have a DLL file in BIN , a XAP file in 12 Hive Folder and few more custom entries in teh Web.Config. How do I include there in the .STP File? When I say IncludeContent when I create a .STP file for the Site , then also theabove said things are not getting included.
I recently upgraded to Visual Studio 2010 and found out that when i press Ctrl-Backspace on a empty line it will delete the line, which is what it did in 2008, but then it will also delete the last character on the line above. I have tried to see if there is any settings anywhere but i cant seem to find any. Does anyone know if you can change this or did they make it default in 2010
Im using C#, if that makes a difference.
I have a Ubuntu Server.
From the terminal, how should I install JDK?
In this guide it says to use this command:
sudo apt-get install sun-java6-bin sun-java6-jre sun-java6-jdk
But on Suns website, it says JDK includes the JRE, so why the JRE in the line above?
Anybody know how to actually install Java?
Every guide and every forum shows different ways of doing it.
BTW: It is a VPS (virtual private server)
Thanks
Refer to: http://stackoverflow.com/questions/1613454/retrieving-one-element-and-filter-by-another
In theabove linked posting, I don't understand why the two template blocks don't get executed upon in the incoming XML at the same time. As far I can can see, the XSL risks the second template executing for every Document element whether it is called with apply-templates or not.
Could someone explain this to my stifled brain, please?
Thanks,
Matt.
How to fix corrupted xsd and wsdl files, is there any IDE which can suggest what is wrong? such as eclipse for java code when pressing CTRL + 1 , or where can I find books tutorials to understand formatting of these file types better? thank you
Here is concrete message error I have
[ERROR] 'item' is already defined
line 223 of file:/C:/project/src/main/resources/schema.xsd
[ERROR] (related to above error) the first definition appears here
line 22 of file:/C:/project/src/main/resources/schema.xsd
I have a Ruby on Rails app running on 12001. I am currently redirecting a subdomain to 127.0.0.1:12001 using some ReWriteCond detection.
Now I want to redirect my subdirectory to that rails app.
http[s]://domain.com/redmine
to
127.0.0.1:12001
The current rules apply REQUEST_URI to theabove rails path, but I need to strip "/redmine" from the front of REQUEST_URI...
Any ideas?
Hi
I have a need to move an item in an IEnumerable< up, that is move one item above another. What is the simplest way to do this?
A similar question was asked here but I don't have a generic list only an IEnumerable<: http://stackoverflow.com/questions/450233/generic-list-moving-an-item-within-the-list
Hi
I have to write an object in to binary file.My struct looks like this.
Struct Company
{
int numberofemployees
list of Struct Employee.
}
Struct Employee
{
string EmployeeName;
string Designation;
}
What is the best way to do theabove operation?
Regards
Raju
If have the following web.config:
<configuration>
<system.web>
<authentication mode="Forms">
<forms name="MembershipCookie"
loginUrl="Login.aspx"
protection="All"
timeout="525600"
slidingExpiration="true"
enableCrossAppRedirects="true"
path="/" />
</authentication>
<authorization>
<deny users="?" />
</authorization>
</system.web>
<location path="Default.aspx">
<system.web>
<authorization>
<allow users="*"/>
</authorization>
</system.web>
</location>
</configuration>
The application is an ASP.NET 2.0 application running on Windows 2008R2/IIS7.5.
If the site's application pool is configured to run ASP.NET 2.0 and I browse to http://example.com then Default.aspx is rendered as you'd expect from the rules above.
However if the application pool is set to run ASP.NET 4.0 I am redirected to the login page. If I explicitly specify http://example.com/default.aspx then all is good and default.aspx renders.
I've tried rewriting / -> /default.aspx (using IIS UrlRewriter 2.0) but the result is still the same, I get kicked to the login page.
I've also tried this with an ASP.NET 4.0 application with the same result (which is where the problem initially arose). The reason I tried this with a 2.0 application was to see if there was a change in behaviour, and it seems that / is handled differently in 4.0.
So to summarise, using the configuration abovethe following is observed:
ASP.NET Version Url Behaviour
-------------------------------------------------------------------------
2.0 http://example.com Renders Default.aspx
2.0 http://example.com/Default.aspx Renders Default.aspx
4.0 http://example.com Redirects to Login.aspx
4.0 http://example.com/Default.aspx Renders Default.aspx
Is this a bug/breaking change or have I missed something glaringly obvious?
how to display the text on ImageButton. or how to have a linkbutton on Image
I have tried this:
<asp:LinkButton ID="lbYear" runat="server" CausesValidation="false" Text="HOME">
<asp:Image ID="Image1" runat="server" ImageUrl="~/images/menu.png" Width="90px" Height="39px" />
</asp:LinkButton>
but it is showing the text abovethe Image..
Can someone please give the Java equivalent of the below python (which slices a given array into given parts) which was originally written by ChristopheD here:
def split_list(alist, wanted_parts=1):
length = len(alist)
return [ alist[i*length // wanted_parts: (i+1)*length // wanted_parts]
for i in range(wanted_parts) ]
I don't know any python but can really use theabove code in my Java app. Thanks
select x from X x where x.a.id = :a_id -- Always 0 objects selected
Why does theabove JPQL statement not work, but the one below work?
select a from A a where a.id = :a_id -- a_obj
select x from X x where x.a = :a_obj -- Always correct number of objects selected
Neither query throws an exception during execution, but a different number of results are obtained.
Thanks
The user can enter a math problem like 5 + 654, 6 ^ 24, 2!, sqrt(543), log(54), sin 5, sin(50). After some reformatting (e.g. change sin 5 into sin(5)), and doing an eval, PHP gives me the right result. However, this is quite unsafe. Can anyone point me in the right direction parsing and solving a math question like the examples above, which is safe? Thanks.
Consider the following snippet:
puts 'hello'.gsub(/.+/, '\0 \\0 \\\0 \\\\0')
This prints (as seen on ideone.com):
hello hello \0 \0
This was very surprising, because I'd expect to see something like this instead:
hello \0 \hello \\0
My argument is that \ is an escape character, so you write \\ to get a literal backslash, thus \\0 is a literal backslash \ followed by 0, etc. Obviously this is not how gsub is interpreting it, so can someone explain what's going on?
And what do I have to do to get the replacement I want above?
Hi,
Is there a way to declare a constant in Python. In java I will we can create constant in this manner:
public static final String CONST_NAME = "Name";
What is the equivalent of theabove java constant declaration in python ?
Cheers,
Hi,
When a seam application on JBOSS using java 1,5 is deployed in Unix platform, I am getting this error.
errorjava.lang.NoClassDefFoundError
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:141)
at java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(GraphicsEnvi
ronment.java:62)
It runs fine on windows platform. On my local linux machine it runs fine. but on another linux machine it works some times and sometimes it throws up theabove error
Hi,
I want to send the following JSON text {"Email":"[email protected]","Password":"123456"} to a web service and read the response. I know to how to read JSON. The problem is that theabove jason object must be sent in a variable name jason. How can i do this from android? Like creating a request object setting content headers etc.