updating

Autoupdating .net applications

这一生的挚爱 提交于 2019-12-03 09:08:38
I've written 2 reasonably large scale apps in .net so far, and both of them have needed an updating facility to automatically update the application when I roll out new code. I've found the 'Enterprise application block updater' a bit too complex for my needs, and I've found 'click once' frustrating when it comes to publishing. The most adequate updating code I've found is the .net Application Updater Component , which I've used for both projects. I've had to modify it recently because it uses web dav, which isn't always installed on our web servers (it still needs directory browsing, however)

How to update a JSON file by using Python?

只谈情不闲聊 提交于 2019-12-03 07:35:33
I am using Python and I have a JSON file in which I would like to update a value related to a given key. That is, I have the my_file.json containing the following data {"a": "1", "b": "2", "c": "3"} and I would like to just change the value related to the b key from 2 to 9 so that the updated file look as like: {"a": "1", "b": "9", "c": "3"} How can I make that? I tried the following but without success (the changes are not saved to the file): with open('my_file.json', 'r+') as f: json_data = json.load(f) json_data['b'] = "9" f.close() You did not save the changed data at all. You have to

FragmentPagerAdapter with ViewPager and two Fragments. Go to the first from the second and update first's text

…衆ロ難τιáo~ 提交于 2019-12-03 03:10:09
I'm not familiar with FragmentPagerAdapter , so this is going to be one of those questions that we (you) read the description critically. Structure: I have a FragmentPagerAdapter (code below), that will hold two fragments at a time. The first displays book excerpts, and the second a list of book titles. Goal: I want to achieve what is described in the title: the user can navigate to the second fragment in the pager, click on a title, and then I want to move the user back to the first fragment and tell the first fragment to update the text. The first fragment has a triggerRefresh method for

Sharepoint: What happens to lists based on content type when content type is updated?

≡放荡痞女 提交于 2019-12-03 02:58:49
I have kind of hypothetical question (at least for now :)) Let's say I create list based on some custom content-type. I add some 1000 items into that list (in production). Then customer comes and he say that he need to modify that custom content type. What happens to list if I modify custom content type? Will it be updated automatically (I doubt) ? And what about already created list items? Do any of you have some experience with this? Anders Rask So a couple of issues regarding content types: First of all, content types comes in two flavours: Site content types and list content types. Site

Self Updating

…衆ロ難τιáo~ 提交于 2019-12-02 19:44:47
What's the best way to terminate a program and then run additional code from the program that's being terminated? For example, what would be the best way for a program to self update itself? You have a couple options: You could use another application .exe to do the auto update. This is probably the best method. You can also rename a program's exe while it is running. Hence allowing you to get the file from some update server and replace it. On the program's next startup it will be using the new .exe. You can then delete the renamed file on startup. It'd be really helpful to know what language

Error multiple objects with the same key DbContext

被刻印的时光 ゝ 提交于 2019-12-02 17:40:21
问题 I am getting an Error "An object with the same key already exists in the ObjectStateManager. The ObjectStateManager cannot track multiple objects with the same key." I used this method in two places. In first place - work correctly, but in second I have error. How decided this problem? My method: public static void UpdateMehod(ModelEntities context, ProcessedFilest processedFiles) { context.Set<ProcessedFiles>().Attach(processedFiles); context.Entry(processedFiles).Property(p => p.ID)

Self updating app

人盡茶涼 提交于 2019-12-02 14:19:02
TL:DR; version ;) my app should run without user interaction (autostart etc works) it should update itself (via apk) without any user interaction rooted devices are possible . problem: querying a newer apk from a server works when starting the apk with a (view?) intent, the "install app" prompt pops and needs a user confirmation How do I solve this without any user interaction? http://code.google.com/p/auto-update-apk-client/ This seems to be a solution, but there must be better approach. I already found this: Install Application programmatically on Android but that doesn't solve my problem.

Error multiple objects with the same key DbContext

徘徊边缘 提交于 2019-12-02 13:24:55
I am getting an Error "An object with the same key already exists in the ObjectStateManager. The ObjectStateManager cannot track multiple objects with the same key." I used this method in two places. In first place - work correctly, but in second I have error. How decided this problem? My method: public static void UpdateMehod(ModelEntities context, ProcessedFilest processedFiles) { context.Set<ProcessedFiles>().Attach(processedFiles); context.Entry(processedFiles).Property(p => p.ID).IsModified = true; context.SaveChanges(); } I create new method: public static void UpdateProtocol

accessing threads continually in tkinter loop

柔情痞子 提交于 2019-12-02 08:18:37
I am trying to make a GUI that continually plot a signal received from a micro processor. I have tried to make this happen by use of classes only, but that failed since only the GUI class was oppend. Now i have implemented threading (or at least I think I have!?) but each thread is only run once. which make me believe that I don't understand how the mainloop in tkinter works, so can I remake my code in away that the threads become active? import Tkinter import tkMessageBox as messagebox from serial import * from matplotlib.backends.backend_tkagg import FigureCanvasTkAgg from matplotlib.figure

Java Swing Updating JList

ⅰ亾dé卋堺 提交于 2019-12-02 06:43:00
I'd like to know if there is any way that I can update a Jlist after the user adds or removes an item to it and after a user sorts it. Is there any way that I can write a standardized method to update the display based on the order of items in an array or vector, and when the user remove or adds an object from the array that the JList is based on? Thank you. Updates should be made to the ListModel, not the Array that was used to create the model. However, if you want to refresh the list with completely new items or change the order of the items then you create a new DefaultListModel and use