Hi all,
I"m new to Hibernate. I have 3 tables: Companies, Profiles and Sites. The relation is - one company has many Profiles and Sites (one-to-many).
<hibernate-mapping>
<class name="com.bla.dataobject.CompanyData" table="companies">
<id name="companyId" column="company_id">
<generator class="increment"/>
</id>
<property name="...
I have searched through google and SO for possible answers to this question, but can only find small bits of information scattered around the place, most of which appear to be personal opinion.
I'm aware that this question could be considered subjective, but I'm not looking for personal opinion, rather facts with reasons (e.g. past exp...
Hello,
I have this code
foreach (MyType o in myList)
{
var res = from p in myOriginalList
where p.PropertyA == o.PropertyA && p.PropertyB == o.PropertyB
select p;
//Need to update myOriginalList
//....
}
I'd like in the myOriginalList do an update for each record found by the Linq select. How can I do th...
UPDATE: I narrowed it down, when I got rid of this tag in the header.php file it all works, can someone please explain this.
<script src="#" type="text/javascript"></script>
Hi I'm having quite an annoying issue with my php code. I am trying to update a php database, from a form, when I do this however the fields in the data base beco...
I have a database containing a userId and a note. The user doesn't know if there already is a note in the DB so they write one and click the 'Submit' button. I want to insert this note if there is no note for the userId or update that userId's already existing note:
notesDb.open();
boolean updateResult = notesDb.upda...
I have this code:
require 'rubygems'
require 'activeresource'
ActiveResource::Base.logger = Logger.new("#{File.dirname(__FILE__)}/exercises.log")
class Exercise < ActiveResource::Base
self.site = "http://localhost"
exercises = Exercise.find(:all)
ex = Exercise.find(741)
ex.name += "_TEST"
ex.save
end
And the generated url...
I'm trying to update a record using the ORM library built in to Kohana 2.3.4. I'm basically modifying the script I use to insert the record in the first place. My problem is the record is getting inserted again, not updated. Here's my script:
public function edit($id)
{
// Find the selected blog entry
$blog = ORM::factory('...
Hey, I am trying to make a password retrieval system on my site, and I am having problems updating the password reset field in my database. I have tried everything, but nothing seems to work.
This is my code so far:
$passwordreset = md5(mt_rand()) . md5(mt_rand()) . md5(mt_rand());
$con = mysql_connect("localhost","XXX","XXX");
if...
How can we update datetime value in a column using sql
say, if we want to update any of datetime values by adding an hour or 5 minutes etc.
UPDATE TableLastCalls
SET [NEXT_UPDATE_TIME] = ?? // want to add an hour
...
I use QCompleter with QLineEdit, and I want to update QCompleter's model dynamically. i.e. the model's contents are updated according to QLineEdit's text.
1) mdict.h
#include <QtGui/QWidget>
class QLineEdit;
class QCompleter;
class QModelIndex;
class mdict : public QWidget
{
Q_OBJECT
public:
mdict(QWidget *parent = 0);
~...
Hi,
I'm working on a rails project and I experienced that the response to ajax calls are slow in both development and production. Response comes around 8 sec. I observed also that i have some actions that has a response time around 80ms. The difference in the two acitions is that the slower was rendered using render :update do |page| .....
My C# WinForms UI has some parameters that the user can adjust using sliders. Many parts of the UI can interactively update based on the slider values. However, some parts require a longer calculation that requires some overhead to set up. I would like to only initiate this update process once the user has stopped moving the sliders f...
Hi,
I have a txt file with some data that looks like this:
a:1(2,3) 55(33,45,67)
b:2(1,33,456) 4(123,12444)
which means that word "a" appear in text 1 in places 2 and 3 and in text 55 in places 33,45 and 67..
I have some texts and I go all over those texts and if I see that the word "a" appears in a text then I need to update the te...
I'm trying to update an MSSQL table using SqlCommand, I think it's a syntax error with my T-SQL, but here is what I have so far:
SqlCommand sqlCmd = new SqlCommand("UPDATE yak_tickets SET email = @emailParam, subject = @subjectParam, text = @textParam, statusid = @statusIDParam, ticketClass = @ticketClassParam WHERE id = @ticketIDParam"...
I want to update a table:
$result=mysql_query("select balance from tablename where userid='$userid")or die(mysql_error());
$row=mysql_fetch_assoc($result);
$accountbalance=$row['balance'];
if($accountbalance>$cost)
{
$result=mysql_query("update tablename set balance-'$cost' where userid='$userid")or die(mysql_error());
}
else {
...
}
...
The thing is I load context menu items dynamically and it takes time to load, so context menu appears with default values the first time. But if you right-click again, yo see the loaded values.
Is there a way to refresh items while the menu is still opened?
or someway to reload it?
...
Hi all,
I'm trying to create a little test application which reads chunks of a FileStream and appends it to a VarBinary(max) column on an SQL Server 2005 Express.
Everything works - the column gets filled as it's supposed to, but my machine still seems to buffer everything into memory and I just can't see why.
I'm using the following ...
We develop Linux-based networking application which will run on multiple servers. We need to develop some solution for remote application update.
All I can think of now is using rpm/deb packages but we prefer not to lock this to some distro-specific solution. Besides copying files via SSH by some Bash script what would you recommend?
Th...
The software system I work on is a medical billing system, large amounts of data and data tables, and stored procedures.
I was reading the article "12 Steps to Better Code" and in The Joel Test #2 states: Can you make a build in one step?
Now I was wondering, does this mean deployment build (so that a customer can update their deployme...
Hi,
I have an Access application in which I need to do a 'mass-update'. I have a form on which I have a dropdown, a listbox, and a checkbox. I also have a Update button, and when the user clicks it, I want to insert rows into my table with the same value for the dropdown and checkbox fields in all the rows, but I want different values f...