Search update

60548 results
2

votes
1

answer

QueryDSL: How to insert or update?

I'm trying to implement https://stackoverflow.com/a/16392399/14731 for a table called 'Modules' using QueryDSL. Here is my query: String newName = 'MyModule'; QModules modules = QModules.modules; BooleanExpression moduleNotExists = session.subQuery(). from(modules).where(modules.name.eq(newName)).no...
Gili
2

votes
3

answer

OnActivityResult doesn't update ImageView in Android

In my app I have set image in activity called Day. Now, when the user wants to change the image he choses the button and selects the image from Gallery. Here is the code : private void choosePhoto() { Intent pickPhoto = new Intent(Intent.ACTION_PICK, android.provider.MediaStore.Images.Media.EXTERNAL...
filipp.kowalski
14

votes
1

answer

Update shared forked repository using git

Consider repository A a github repository that is managed via Gerrit. I cloned repository A and I created a new branch starting from the master branch of repository A. I pushed this new branch on a new gitlab repository B. I am admin on repository B and I shared it with other developers. Developers...
user1382278
3

votes
2

answer

SQL Server Update trigger for bulk updates

Below is a SQL Server 2005 update trigger. For every update on the email_subscriberList table where the isActive flag changes we insert an audit record into the email_Events table. This works fine for single updates but for bulk updates only the last updated row is recorded. How do I convert the b...
Gary Boyle
4

votes
1

answer

Update/insert/retrieve accented character in DB?

I am using oracle 12G when i run @F:\update.sql from sql plus it displays accented character é as junk character when I retrieve from either sqlplus or sql developer By when run the individual statement from sql plus. Now if I retrieve it from sqlplus, it displays the correct character, but when I...
user3198603
12

votes
2

answer

Java socket/serialization, object won't update

I am writing a little socket based program. I am using a class ModelEvent to pass information through the socket. inside ModelEvent, there's a variable obect of type (Object). The object itself is a 2D-array with some values. object[1][2] = 2; ModelEvent event = new ModelEvent('allo', object); disp...
maniak
3

votes
2

answer

UPDATE a whole row in PL/pgSQL

I have plpgsql function: CREATE OR REPLACE FUNCTION test() RETURNS VOID AS $$ DECLARE my_row my_table%ROWTYPE; BEGIN SELECT * INTO my_row FROM my_table WHERE id='1'; my_row.date := now(); END; $$ LANGUAGE plpgsql; I would like to know if it's possible to directly UPDATE my_row record. The only way I...
Jeroni
3

votes
1

answer

update android-query maven library dependency

Currently the latest version provided in google code is 0.26.7 https://code.google.com/p/android-query/downloads/list But the jar in maven repository is still in 0.25.9, which is more than a year ago. http://mvnrepository.com/artifact/com.googlecode.android-query/android-query Is there anyway for pu...
JR Tan
3

votes
2

answer

Django Rest Framework update nested serializer

I have a big misunderstanding with DRF nested serializers. I read docs about this and found out that I need to provide my own update method. So, here it is: class SkillsSerializer(serializers.ModelSerializer): class Meta: model = Skills class ProfileSerializer(serializers.ModelSerializer): skills =...
NONAMA
12

votes
2

answer

npm update does not do anything

When I execute this code in my application folder where the package.json is located: npm update or npm update --save-dev it does not do anything. But when I do npm outdated is shows many outdated packages. So how do I update all packages? OS: Win 10 x64 nodejs: 6.2.2 npm:3.10.7 package.json { 'name'...
Elisabeth
3

votes
0

answer

Heart rate update frequency on Phone

I have an iOS 10 iPhone app, with a WatchKit 3 Watch app extension. The Watch app is running an HKWorkoutSession, and successfully querying .heartRate data. A sample is returned about every 5 seconds. The phone app is running a similar query, but generally returns an empty samples array, although oc...
Ashley Mills
3

votes
3

answer

Python Pandas Update Dataframe Column Types

I am reading an excel into pandas and all column headers are datetime except first one. I want to format the datetime column headers. This is the test data and code. import pandas as pd import datetime d = { datetime.datetime(2018, 01, 31, 8, 00): [9.1, 8.5, 7.4, 6.5, 5.3], datetime.datetime(2018,...
ProgSky
1

votes
4

answer

Cannot update Date field - MySQL PHP

My webpage has a date field which uses javascript calendar. The format of the date field on web page is MM/DD/YYYY. When the user enters all information and hits submit, all fields except the corresponding field of Date gets updated. Here are details: HTML: *Date: PHP Code:
name_masked
2

votes
1

answer

Gspread keep alive after update google auth2

There are several examples for 'keep the connection with google spreadsheet alive' But all I found are based on the 'old' Google Sign-In system which isn't work anymore since april 2015 What is the proper methode to keep the connection with googlespreadsheet alive using OAuth 2.0 I've Tried this i...
Richard
2

votes
3

answer

Update Database from Model (when model changed)?

I'm developing an application (for my education, not commercial) using MVC3 and Model First approach. I created a model and generated the SQL CE 4 database from it. Next, I may need to change my model - i.e. add a column to a table, which is not a primary or foreign key column. I only see an option...
Evgeny
2

votes
2

answer

Update CSS property from Code behind

I am new to web programming and need some help. I am using this CSS code to control look of a label dynamically. how can I change the value of the attribute 'width'from code behind dynamically?Also I need to flash the label text. Please find my code below **strong text** .bar { position: relative; w...
user2801184
2

votes
3

answer

How to update jsonb string with PostgreSQL?

I'm using PostgreSQL 9.4.5. I'd like to update a jsonb column. My table is structured this way: CREATE TABLE my_table ( gid serial PRIMARY KEY, 'data' jsonb ); JSON strings are like this: {'files': [], 'ident': {'id': 1, 'country': null, 'type ': '20'}} The following SQL doesn't do the job (synta...
wiltomap
2

votes
2

answer

MySQL: multi-row update with one query

I have an array with 3,000+ rows fomrated like this $COUNTS = array( 1=>5, 2=>22, 3=>120, 4=>0, .... ); where the key represents an ID and value is the calculated COUNT... I need to update all the rows in my table with these new values (with php)... so right now I am updating them one by one (simpli...
DS_web_developer
5

votes
1

answer

Backbone - Update URL from view function

I'm stumbling through my first backbone project, and am trying to update the URL after a button element is clicked. I can manually set the URL via window.location.hash, but I assume this is not the correct way. Can anyone tell me what is the preferred way to update the URL? var AppView = Backbone.Vi...
Matt
36

votes
2

answer

Update text of notification, not entire notification

Prelude I'm trying to add a chronometer on the notification. The chronometer is a service. Every second this line is called (continue Thread is a the 'running' boolean, timeString is the elaborated String showing the time): NotificationChrono.updateNotification(getApplicationContext(), continueThrea...
David Corsalini
2

votes
2

answer

Update value of array field using mongoid

I'm trying to find a way to update a single array item using mongoid. I'm using Rails 4 and Mongodb. My model looks like this class User include Mongoid::Document include Mongoid::Timestamps field :my_book_list, type: Array, default: [] field :book_name, type: String I'm able to add entry to the arr...
ArkoD
3

votes
4

answer

MERGE - Multiple WHEN MATCHED cases with update

When I launch this request, I receive the SQL Server number error 10714. I understand that I can't use more than one UPDATE with WHEN MATHED but I don't know how can I do. MERGE INTO Photo p USING TmpPhoto tp ON p.ProductNumberID = tp.ProductNumberID and p.SHA1 = tp.SHA1 WHEN MATCHED AND p.Rank = tp...
Seb
2

votes
1

answer

How to update a plot event driven?

How can I update a matplotlib plot event driven? Background: I wanna program a tool that displays me measured values I receive via a serial port. These values will be send by a serial connected device when it has measured values and not when the host requests. Current State: It seems there is no wa...
Fabian
2

votes
2

answer

MS Access Too Many fields during UPDATE

When I try to UPDATE a table in MS Access, it gives and error saying too many fields defined. I googled and saw that i need to Repair and Compact, which I did, but still does not work? Anyone has any ideas? Also, what actually count towards the 'too many field' counter? Thanks.
Jake
38

votes
6

answer

PrimeFaces commandButton doesn't navigate or update

I'am using Primefaces to make my app a little bit more beautiful. I noticed that p:commandButton and h:commandButton don't work the same way. The p:commandButton calls the method and nothing else hapens. The h:commandButton calls the method and returns a navigation. I have got trouble with redirecti...
Sven
3

votes
1

answer

Simplify multiple subqueries in UPDATE statement

I want to make my Flarum forum update its discussion records after manual intervention into the database. (Flarum is still in beta and still lacks many features, so fixing things manually isn't that uncommon.) I managed to compose the following query which does what I wanted: UPDATE discussions as d...
firegurafiku
2

votes
1

answer

MethodNotAllowed when trying to do an update.

I'm using PHPstorm with Laravel 5.2.3, and currently trying to update a persons information by reusing a form from my create page. I've followed everything to the T from the laracast tutorials, but for some reason I'm getting the MethodNotAllowed error when I hit submit on an update. Routes Route::...
ph0bolus
5

votes
2

answer

How to update .value inside controller angularjs?

I tried to pass value form one module to another module in angularjs. using .value which is working fine. working:- var app = angular.module('app', []); app.value('movieTitle', 'The Matrix'); var app1 =angular.module('app1', ['app']); app1.controller('MyController', function (movieTitle) { //Here I...
Suresh B
6

votes
2

answer

How to force QGLWidget to update screen?

I’m drawing a simple scene with Open GL. I’ve subclassed QGLWidget and overriden paintGL(). Nothing fancy there: void CGLWidget::paintGL() { glClearColor(0.0f, 0.0f, 0.0f, 0.0f); glClear(GL_COLOR_BUFFER_BIT); glMatrixMode(GL_MODELVIEW); glLoadIdentity(); gluLookAt (120.0, 160.0, -300.0, 0.0 + 12...
Violet Giraffe
5

votes
4

answer

AngularJS : Update A Function In RealTime

I have in a controller: $scope.timeAgoCreation = function(order) { return moment(order.createdAt).fromNow(); }; And in a view: {{timeAgoCreation(order)}} It return the correct value: 9 minutes ago. But this value is not updated in realtime. I have to refresh the page. Is it possible to make it updat...
Alex
2

votes
2

answer

Update with multiple values in WHERE

I need to update the field in database when it match the two conditions below is my code this is the query which is working fine for one value in WHERE condition query2 = 'UPDATE Game_mygame SET game_played = '+str(set_game_played)+' WHERE home_teamID = '+str(i.home_teamID) but I need to match...
Ranjeet singh
3

votes
2

answer

update a dataframe column with new values

df1 has fields id and json; df2 has fields idand json df1.count() => 1200; df2.count() => 20 df1 has all the rows. df2 has an incremental update with just 20 rows. My goal is to update df1 with the values from df2. All the ids of df2 are in df1. But df2 has updated values(in the json field) for thos...
suprita shankar
2

votes
1

answer

Mongodb update array with another field

I have a DB with a set of fields f1,f2,f3, where f3 is an array. I would like to do an update operation such as this db.collection.update ({f1:1},{$push:{f3:{$each:[f2's value],$slice:-2}}}) I searched on the internet and was not abole to find anything. I am not sure if this is even possible. Any he...
Sai
3

votes
2

answer

MongoDB arrays - atomic update or push element

I have following document in MongoDB. { '_id' : ObjectId('521aff65e4b06121b688fabc'), 'user' : 'abc', 'servers' : [ { 'name' : 'server1', 'cpu' : 4, 'memory' : 4 }, { 'name' : 'server2', 'cpu' : 6, 'memory' : 6 }, { 'name' : 'server3', 'cpu' : 8, 'memory' : 8 } ] } Based on certain events, I have to...
Ravi Singal
1

votes
2

answer

sql update with inner join and where

UPDATE newsreactions SET newsreactions.enabled = '0' FROM newsreactions INNER JOIN users ON newsreactions.memberId = users.id WHERE users.active = '0' AND users.comment LIKE '%spam%' For some reason I'm getting a syntax error: 1064 - You have an error in your SQL syntax; check the manual that corr...
1

votes
2

answer

Update screen when “all” asynctasks are done

I am using asynctask to do lengthy operations such as DB reads. I want to start a new activity and render its contents when all the asynch tasks are done. What would be the best way to achieve this? I know that onPostExecute is used to update screen. But I dont want to update screen unless all the...
Snake
2

votes
2

answer

Rails default_scope being applied to update

I'm using default_scope in rails to siphon out anything that has a value of is_deleted = true (anything with this value should never be shown, but I still want to keep the row in the database). But there is one controller action that should actually undelete something (sets is_deleted = false), but...
bswinnerton
19

votes
3

answer

MySQL - Update values based on subquery

let's say I have select, which return me from table1: ID Name 1 Bob 2 Alice 3 Joe Then I want UPDATE values in another table based on this result: UPDATE table2 SET Name = table1.Name WHERE ID = table1.ID As I understood, I can only do internal select in one place, like: UPDATE table2 SET Name =...
MasterClass
1

votes
3

answer

Can we write Update statement in linq?

can we write update statement in linq? example: var query = Update customer set isEdit = 1 where id = 1 Thanks
user2285357
2

votes
4

answer

Observable pattern applied in massive record update

I'm trying to apply Observer pattern to a class that contains a set of records. In Java pseudo code my class is: public class MyClass extends Observable { private ArrayList items = new ArrayList(); public MyClass() { } public void add(E e) { this.items.add(e); setChanged(); notifyObservers(); } pub...
Carlo