updates

Do I have to refresh entities after bulk updates / deletes with HQL?

旧城冷巷雨未停 提交于 2019-12-02 07:05:14
I have written some DAO methods that do bulk updates / deletes with HQL but I see that when the query is executed the entities in memory are not sychronized (the cache is not updated). Say, I have a collection of Projects with a collection of Groups each and I want to delete all Groups. I can iterate the Groups and delete each but I prefer to run a bulk delete with HQL and IN operator. However, the list has the old objects after the query is executed. I realized that I have to refresh the objects with session.refresh(). Is there any other way I can bulk update and update cache automatically?

Changing the proxy server during Selenium

安稳与你 提交于 2019-12-02 04:00:50
So everything works fp = webdriver.FirefoxProfile() fp.set_preference("network.proxy.type", 1) fp.set_preference("network.proxy.http", PROXY_HOST) fp.set_preference("network.proxy.http_port", int(PROXY_PORT)) fp.update_preferences() driver = webdriver.Firefox(firefox_profile=fp) But if the driver has already been created, the proxy can not install. It does not work driver = webdriver.Firefox() driver.profile.set_preference("network.proxy.type", 1) driver.profile.set_preference("network.proxy.http", PROXY_HOST) driver.profile.set_preference("network.proxy.http_port", int(PROXY_PORT)) driver

commandButton inactive after ajax rendering

三世轮回 提交于 2019-12-02 01:54:01
I have a problem with these two commandButton : Join and Leave. I want to hide Join if I click on leave and vice-versa. When I put ajax on false, there is no problem (but all the page is refresh and I don't find this optimal). But when ajax attribut is on true with specific updating (cf comment in the code), the rendering is good but the new button whitch appear become inactive. If I click on it, nothing happens (well it's seems the actionListener trigger but the view is not refreshed, I have to manual refresh to see the difference) Thanks for reading. <h:form id="formWaitingList" rendered="#

Update field annotated with @Value in runtime

可紊 提交于 2019-12-01 22:34:53
Let's imagine we have such a component in Spring: @Component public class MyComponent { @Value("${someProperty}") private String text; } If we define the property placeholder: <context:property-placeholder location="classpath:myProps.properties"/> And myPropos.properties contains the value for someProperty the value will be injected to the text field when the context is initialized. That's quite simple and easy. But let's say that I have a service that enables user to change the value of the someProperty : public void changeProp(String name, String newValue); Is there a chance I can re-inject

Entity framework DbContext update value without query and by foreign key

烈酒焚心 提交于 2019-12-01 21:37:49
问题 I have a method for updating some tables. For update I need get first of TestProcess , but I don't like that. How can I update TestProcess without select(firstOrDefault) operation, used only for the update operation? Example of method: public void UpdateTestProcess(int id, string updateID) { using (TestEntities context = new TestEntities()) { TestProcess pr = context.TestProcess.FirstOrDefault(x => x.MyID == id); pr.UpdateID = updateID; context.TestProcess.Attach(pr); context

Updating javascript code in Cordova app after it has been published in the app store [closed]

心不动则不痛 提交于 2019-12-01 18:36:26
I'm developing some apps where the clients wants to implement design changes, adding new content fields etc after the app has been delivered. Also at the moment the apps are done through RhoMobile but I'm planning to switch away to Cordova. So far I'm just doing it all as it comes along and then sending it off to be approved by the powers that be. But for relatively small changes coming from the clients and then waiting for the app to get approved again… Sure, this is also a management issue when they don't think things through enough, but I'm just trying to see if there's a way of offsetting

android application updates [duplicate]

别说谁变了你拦得住时间么 提交于 2019-12-01 14:32:16
Possible Duplicate: Is there a way to automatically update application on Android? I am looking to create a private android application for my organization. I do not want to publish it publicly on Google Play, since it is only being used for internal purposes. Is there a way to have the application auto-update? Or, is there a way to publish an app to Google play and make it private? Alexander Lucas There is not currently a way on Market to filter for private groups. I'd recommend the following: -Host your apk on a private server -Have a URL on said server where the app can ping to check the

Incrementing Number Property in AWS DynamoDB Objective C

对着背影说爱祢 提交于 2019-12-01 11:30:33
I am struggling with incrementing a number property value of an item already saved in my table on DynamoDB my code currently is: AWSDynamoDBUpdateItemInput *updateItemInput = [AWSDynamoDBUpdateItemInput new]; updateItemInput.tableName = @"Table"; updateItemInput.key= @{ @"KeyPropertyName":@"KeyValue" }; updateItemInput.updateExpression = @"SET(counter = counter + :val)"; updateItemInput.expressionAttributeValues =@{ @":val":@1 }; AWSDynamoDB *dynamoDB = [AWSDynamoDB defaultDynamoDB]; [[dynamoDB updateItem:updateItemInput] continueWithBlock:^id(AWSTask *task) { if (task.error) { NSLog(@"The

How to remove NVD3 chart resize/update delay

六眼飞鱼酱① 提交于 2019-12-01 10:33:55
I've created an NVD3 multiBarChart and placed it in a jQuery resizable container. When resizing the chart, each render incurs the same delay as when the chart is first drawn: staggered left-to-right delayed drawing of the bars. This looks cool when the chart is first drawn, but it's a nuisance when resizing the chart. I've experimented with nv.d3.css, reducing every delay to 0ms to no avail. Haven't yet inspected the NVD3 JS and am hoping not to need to. Fiddle: http://jsfiddle.net/a5Fnj/10/ var container = $("#mycontainer"); $(container[0]).resizable(); var svg = d3.select(container[0])

Visual Studio 2015 test explorer doesn't show any test after update

删除回忆录丶 提交于 2019-12-01 09:33:01
I updated my Visual Studio Community 2015 (Update 3) and it doesn't show the unit tests of my project at all! I've tried to reinstall VS, it changed nothing, and it also shows we the message "connected services package failed" (and I don't know what it is). And I can't find out how to download an older version of Visual Studio that works, from their idiotic site. I asked the question at their community, nobody answered. Help me! I can't work without tests!!! It's a known issue from the new update. As it's having a missing resource DLL. Please follow the steps in this below Microsoft connect