update

How to make a file update?

I have an SWF on a USB pen that I would like to check a web server each time that I open it to see if there is a more recent version of the SWF. If there is I want the SWF to download it. How does one goes about doing so? What can I use? Im absolutely clueless on this. ...

How to update a submodule in git to the HEAD commit in that external repo

I had problems finding the answer to this so I am posting it for posterity. The situation is, you have a git repo with a submodule (similar to an svn external). You want to update that reference to point to a different commit in the external repository. You might think 'git submodule sync' or 'git submodule update' would do that - you...

SQL Update to flip sign of a value?

Someone entered a ton of numeric data into a table with the sign backwards. Is there a clean way to flip the sign in the numeric column with a SQL statement? ...

HowTo update/modify LINQ EntitySet?

In my LINQ to SQL generated classes I have some classes containing EntitySets. Everything looks great until I need to modify the EntitySet (add, delete some relationships). I thought that it was going to work doing something like: User.Actions = newUserActions; //This is how I used it with NHibernate Then when I try to submit chang...

how do i add htmltablecell data to database after i click submit

i created an htmltable in .aspx.vb, because i have a lot of rows that come from database and they depend on the querystring. that part is fine. But when someone makes a change in one of the cells how do i save data back to database? code - Dim tr As New HtmlTableRow Dim td As New HtmlTableCell td = New HtmlTableCell Dim txtbox1 As New...

Write Queries on Excel sheet in c#

I want to update specific row of excel sheet from my asp.net application. I m able to read excel, but how can i update the records.Can i write Update query . How . please send me code: string strQuery = "UPDATE [Sheet1$] SET Child Name=" + "\"" + strDataToUpdate[0] + "\","; strQuery = strQuery + "Pickup Point Name=" + "...

Invalidate(); Vs. Update();

Hi All I have code that lets be drag around a borderless form in winforms that I've been using for several months now, which works extremely well. But when I first was given the code, they used this.Invalidate(); in the MouseMove event of the Form, and the Form flickered a little and was slow when dragging around. So, I replaced Invali...

Updating table with the earliest date from another table.

IR.DOC_ID D.DOC_ID D.WORK_ID I.WORK_ID I.DATE_SUB IR.DATE_SUB 1812450 1812450 8521 8521 11-AUG-09 1812301 1812301 8521 8521 11-AUG-09 1812400 1812400 8521 8521 11-AUG-09 1814250 1814250 8521 8521 12-AUG-09 1822300 1822300 8521 8521 18-AUG-09 18143...

Preferred way to add surrogate key to existing Oracle DB table

I have to modify an existing table in a Oracle 10g DB with a few thousand records to add a surrogate autonumber key. One way that comes to my mind is to Create a new sequence Create the id column, allowing null values Updating the id column with the sequence Alter table to add "not null" and "primary key" for the new id column Is th...

Spring injection failure after update to Grails 1.2.1

I used an older grails version, latest that was out in November 2009, and upgraded to 1.2.1 now. Unfortunately. I did not touch the app, checked it out of VCS. Now the spring injection does not work anymore. I depend on external libraries (JmsTemplate, ActiveMQ, ...) and define all the beans in my resources.xml file. To test if spring i...

Self updating application question

I've been looking at a simple machanism for self-updating executable files. (I can't use Click-Once due to the nature of the application - trust me on this) I've noticed that an in-flight assembly can move itself to another location on disk, presumably because the executing assembly is actually an in-memory copy), and that the original...

Oracle UPDATE command with multiple conditions in Java

Hello I'm having issues with the Java code below. It is supposed to update certain records in a table where the ID is given, and where the STATUS column is 'good' (this is only one row at any given time). However, when I run the code below, it seems to be ignoring the AND STATUS = 'good' part, and updating all NUMRECS wherever the ID ma...

WPF Binding issue (UNIQUE CONSTRAINT violation on UPDATE) how to reject changes?

ok please be gentle, I am new to WPF and LINQ - I have a strange problem here. I have a search screen and an add/edit screen. I have the add/edit screen bound to a 'CompanyContact' object and a search screen bound to a collection (CompanyContacts). I have a 3 column unique constraint (FirstName, LastName, CompanyId) on the CompanyConta...

Rails ActiveRecord updating fields

My Example: class Category < ActiveRecord::Base has_many :tags, :as => :tagable, :dependent => :destroy def tag_string str = '' tags.each_with_index do |t, i| str+= i > 0 ? ', ' : '' str+= t.tag end str end def tag_string=(str) tags.delete_all Tag.parse_string(str).each { |t| tags.build(:tag...

jQuery DOM cross-browser updating problems

Hey there, I am running a jQuery animation driven splash / web page with (soon to be) hash and hijax driven links and pages. When proceeding through the splash to a specific page, every modern browser is capable of hijaxing links and applying the jQuery rollovers, etc. However, when going directly to a hashed link from an outside page ...

Cache problems when updating an object from another model

I have a problem with making changes to an object from within another model as well as within the object's model. I have the following models: class Foo < ActiveRecord::Base has_many :bars def do_something self.value -= 1 # Complicated code doing other things to this Foo bars[0].do_other save! end end class Bar...

How to refresh dbgrid without close and open dataset in delphi?

I need to refresh dbgrid constantly, in real time. Close and open dataset works fine, but blink the dbgrid. What can I do to avoid this? I'd like a solution like Ajax, that update only the necessary. Thanks ...

Is There a way to update/refresh only one record in delphi dbgrid?

Is it possible? How? ...

How dangerous is this sql query?

The query: UPDATE node as n right join content_type_product as c on n.nid = c.nid right join uc_products as p on p.nid = n.nid set c.field_product_price_eur_value = p.sell_price * 0.0961, c.field_product_price_zar_value = p.sell_price * 1, c.field_product_price_gbp_value = p.sell_pric...

is this LINQ save function acceptable? (to have a shared INSERT/UPDATE logic like this?) looking for feedback...

Hey guys, new to WPF and really struggling with 'the right way' to do things... public void Save(CompanyContact entityToSave) { try { var saveEntity = (from cc in db.CompanyContacts where cc.CompanyContactId == entityToSave.CompanyContactId select cc).SingleOrDefault(); if (saveEntity == null) { /...