w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
Update cursor command for ArcGIS updating coordinates, but coordinate location is not updating?
You're updating the fields Latitude and Longitude, but not the actual geometry. To update the record's geometry, you need to create a new point object and store it in the shape field. rows = arcpy.UpdateCursor("C:UsersHannahDesktopMarcellus Shale dataGDB and MapsMarcellus.gdbMarcellus_WellsUpdate_Cursor") for row in rows: point = new arcpy.point() latitude = float(raw_input('Latitude: ')) longitude = float(raw_input('Longitude: ')) row.Latitude = latitude row.Longitude = longitude point.Y = latitude point.X = longitude pointGeometry = arcpy.PointGeometry(point) row.setValue('SHAPE', pointGeometry) rows.updateRow(row) del row del rows That should get you pretty close. If possible, you should use the data access cursors. They are much faster

Categories : Python

asp.net MVC 4 - Many to Many data not updating - Updating Entity Framework with ViewModel Edit View
Avoid db.Entry(ptvm.place).State = EntityState.Modified; as it causes conflicts with no updation. You must use UpdateModel(table object, "model"); Full Example is as belows : [HttpPost] public ActionResult PlaceTag(PlacesWithTagsViewModel model) { if (ModelState.IsValid) { tag tagtest = GetTagById(model.tagid); tag.name= model.tag.name; tag.nameplural = model.tag.nameplural; UpdateModel(tag, "model"); db.SaveChanges(); return RedirectToAction("Index", "Dashboard", new { id = 5 }); } } The advantage of UpdateModel is that you have to mention only those fields which you update avoiding those which remain static. In this way you can update your related data with Viewmodel in Edit View.

Categories : Asp Net

Node, express, passport - updating session after updating record
If your using express you have middleware that looks like: function (res, req, next){} When you get session data you can add it to the req object. function (res, req, next){ // get the session here... req.session = session; } Then any other middleware will have access to the req.session object which will contain the user's session.

Categories : Node Js

Updating the dynamic PHP in a jQuery Mobile site after updating the database
I'm not extremely familiar with jQuery Moblie but here's what I found: function refreshPage() { jQuery.mobile.changePage(window.location.href, { allowSamePageTransition: true, transition: 'none', reloadPage: true }); } I think the reloadPage to true should do the trick. If that doesn't work, check out this answer: jQuery Mobile Page refresh mechanism Hope this helps!

Categories : PHP

Hibernate updating child entities while updating parent entity
you must set your cascade since cascade can't be set during runtime (save): @Cascade({CascadeType.SAVE_UPDATE,CascadeType.MERGE}) you must at least remove the CascadeType.MERGE. because MERGE means something complex that approximates "save" but is more like "push this detached entity back into managed status and save its state changes". the cascading means that all associated entities get pushed back the same way, and the managed-entity handle you get back from .merge() has all managed entities associated with it.

Categories : Hibernate

Android TextView text not updating but color updating
try by Re-initializing inside Delete() public void Delete(View view) { TextView time=(TextView)findViewById(R.id.your_text_view_id); time.setText("0"); } Edit or Try following in your onCreate() ImageButton ib = (ImageButton) findViewById(R.id.delete_sound); ib.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { // TODO Auto-generated method stub Delete(v); } });

Categories : Android

Grid not updating when updating viewmodel
Remove the Datacontext Definition from your XAML file and add it in the Codebehind. Your code creates two instances of the ViewModel. You have added the ServerInfo to the instance that isn't bound to the View an therefore couldn't see the change. ViewModel public class ServerInfo_ViewModel : INotifyPropertyChanged { public ServerInfo_ViewModel() { this.Servers = new ObservableCollection<ServerInfo>(); LoadInitialServerList(); } public ObservableCollection<ServerInfo> Servers { get { return servers; } set { if(servers != value) { servers = value; OnPropertyChanged("Servers"); } } } private ObservableColl

Categories : C#

Binary Search in Python 2 variable not updating causing an infinite loop.....why is the variable not updating?
def binary_search (z, A, start, end): if end < start: return None else: mid = start + (end - start) / 2 if (z < A[mid]): return binary_search(z, A, start, mid-1) elif (z > A[mid]): return binary_search(z, A, mid+1, end) else: return mid I changed a couple of things around. I check first changed end < start: because if len(A) == 0: will stay constant and won't allow you to use it as a base case. Also, you when you a returning the binary search you need to skip the mid value, because that's the one you are returning. I tested the code and it works!

Categories : Python

Updating one entity via another updating
Although I would agree with the comments advising against storing calculated fields in a database, if you wanted to you could use interceptors to intercept any changes to the invoice items and from there re-calculate the invoice. There is a good example of implementing interceptors here: http://iextendable.com/2010/10/20/implementing-ef4-change-interceptors/ It is based on EF4 but does work for EF5. There is a NuGet packages which contains the interceptor code called Isg.EntityFramework which is again on the above site Using the latest version of that NuGet packages the code would look something like: public class RecalculateInvoiceTotalInterceptor : Isg.EntityFramework.Interceptors.TypeInterceptor { public RecalculateInvoiceTotalInterceptor(Type targetType) : base(target

Categories : Entity Framework

Row updating is not done
Read the below mentioned article. It has doj field that is filled in 3 day,month and year dropdownlists on click of edit button inside gridview and it is updating properly. Hope this will resolve your problem Bind,Save,Edit,Update,Cancel,Delete,Paging example in GridView in asp.net C# http://www.webcodeexpert.com/2013/07/bindsaveeditupdatecanceldeletepaging.html

Categories : Asp Net

How to fix the url bar not updating
You need to add an event handler for the webview's load_committed event then change the text in your urlentry text box to reflect the current url ... self.webview = WebKit.WebView() self.webview.connect('load_committed', self.change_url) self.scrolledwindow.add(self.webview) self.webview.show() def change_url(self, widget, data=None): self.urlentry.set_text( widget.get_main_frame().get_uri() ) ...

Categories : Python

Updating CI from 2.1.0 to 2.1.4
Below changes to be done in total for moving from 2.1.0 to 2.1.4 ALTER TABLE ci_sessions CHANGE ip_address ip_address varchar(45) default '0' NOT NULL This config file has been updated to contain more user mime-types, please copy it to application/config/mimes.php. Replace the system folder. Replace index.php file.

Categories : Codeigniter

Updating gcc on osx 10.8
You might consider using clang with OS X. Otherwise you can install gcc-4.8.1 with Homebrew or MacPorts. Don't try updating or replacing the 'system' compilers (bundled with Xcode) manually. You can search previous questions on the details for using these port systems.

Categories : Osx

Updating inner doc from mongo
Your code will create a new document consisting only of the new user. To add a new element to an array in an existing document, use the $push operator BasicDBObject where = new BasicDBObject("_id", new ObjectId("51f20148a85e39af87510305"); BasicDBObject doc = //... your new user object BasicDBObject push = new BasicDBObject("$push", doc); con.update(where, push); To modify a field of an existing document, you can use the set-operator combined with the $-placeholder. This changes the user_name from "foo" to "bar" BasicDBObject where = new BasicDBObject("users.user_name", "foo"); BasicDBObject value = new BasicDBObject("users.$.user_name", "bar"); BasicDBObject set = new BasicDBObject("$set", value); con.update(where, set); But the least headache-inducing way is to just keep the whol

Categories : Java

Nullpointerexception while updating UI
Because of view recycling, listView.getChildAt() will only return a view for the positions it is displaying, not severals. you can check this other question here. it has the answer you are looking for: ListView getChildAt returning null for visible children

Categories : Android

MySQL, updating ONE row
The problem with your code is that when a user hits 'Update Price' and your forms submits you are no longer have the value of item['id']. You can store id values for your items in hidden fields in your forms. Your code for edit page might look like <?php // If it was an update submission do the update first if(isset($_POST['newprice']) && isset($_POST['id']) && $_POST['newprice'] && $_POST['id']) { $new = $db->real_escape_string($_POST['newprice']); $id = $db->real_escape_string($_POST['id']); $db->real_query("UPDATE lukevalues SET price='$new' WHERE id = '$id'"; echo "<br><br>Done! <a href='/admin/index.php?_page=manageitems'>Go back</a> to manage items."; } // Now fetch all items and produce edit fo

Categories : PHP

TextView not updating
Try this way private Handler mHandler = new Handler(); mHandler.post(new Runnable() { public void run() { msgcntr.setText("test"); } });

Categories : Android

Updating a map in java
Why you don't use ready methods? You do not have to write all manually ;). 1) Method putAll() copies all values from one map to the second. http://docs.oracle.com/javase/7/docs/api/java/util/Map.html#putAll(java.util.Map) 2) Method containsKey() and only one loop.

Categories : Java

Self updating application in vb.net
One way to handle this is make a separate(smaller exe) in your project that handles the downloading of the new version. First it would close the current version and since it's not tied to the original app the uploader app is still running, it downloads, then installs it and then launches the new version.

Categories : Vb.Net

UITableView not updating
You're setting eventsArray via setter: [self setEventsArray:[daBank getFetchArray]]; Why don't you access it via getter? You might be using another instance of array self.eventsArray or [self eventsArray]

Categories : IOS

d3.js: Updating a pie with lables
You were almost there. The key is to treat the text exactly the same as the paths and handle the .exit() selection by removing it. I've modified your jsfiddle here. I've removed the g elements to make it a bit easier to understand.

Categories : D3 Js

Page not updating
In your categoryIdChanged you are redefining your groupedQuestions each time when the method is called. You only need to define your groupedQuestions once and inside your computed you can reference your vm.category and then Kncokout will automatically update your groupedQuestions when your vm.category changes in the categoryIdChanged function. So you will need to restructure your code to something like this: function categoryIdChanged(category) { vm.category(category); } vm.groupedQuestions = ko.computed(function () { var groups = []; var index = 0; var group; if (!vm.category()) // no category is selected return empty groups return groups; ko.utils.arrayForEach(vm.category().questions(), function (item) { if (index % 5 === 0) {

Categories : Javascript

PHP updating database
$sql = "UPDATE Level01 SET Deaths =' . $id .' WHERE DeathID= ' . $deaths . '" ; Should be $sql = "UPDATE Level01 SET Deaths ='" . $deaths . "' WHERE DeathID= '" . $id . "'";

Categories : PHP

Updating a VB6 application to .net
VB6 and VB.NET are radically different. The syntax has changed, and so has the underlying structures, forms, custom controls, and almost every single aspect you can possibly think about. A complete redesign and reassessment of needs and functionality is imperative. With .NET the plethora of new libraries and features supersede the antiquated VB6 libraries, OCXs, etc. Also if you feel bold, you can migrate your code to C# and other CIL languages aside from VB.

Categories : Misc

Updating my Graphics
When doing anything based on a timer in Swing, the javax.swing.Timer class is your best friend. It's JavaDocs explains its usage pretty well, so here's an example. public class GTest extends JFrame implements ActionListener { private Color textColor = Color.BLACK; private Random random = new Random(); @Override public void paint(Graphics g) { super.paint(g); g.setColor(textColor); g.drawString("[Game goes here]", 100, 150); } @Override public void actionPerformed(ActionEvent e) { textColor = new Color(random.nextInt(0x00ffffff)); repaint(); } public GTest() { setSize(Toolkit.getDefaultToolkit().getScreenSize().width / 3, Toolkit.getDefaultToolkit().getScreenSize().width / 3 + 50);

Categories : Java

Updating Python for use with AWS CLI
If you installed aws with the easy_install that came with Python 2.6, it will be hardcoded to use Python 2.6—its first line will be something like this: #!/usr/bin/python2.6 This shebang line means that the script will run with /usr/bin/python2.6. Installing Python 3.3 won't change what's at /usr/bin/python2.6. It has nothing to do with what's on the PATH, or what the first thing called python is on the PATH. The PATH only comes into play if a script uses /usr/bin/env on the shebang line. And /usr/bin/env python2.6 would of course still find Python 2.6. In fact, even /usr/bin/env python would still find Python 2.6, because 3.3 doesn't have anything named python, just python3. Meanwhile, even if you managed to hack it up to run with Python 3.3 instead (e.g., by changing that first lin

Categories : Python

Updating value according to time
I would not give coins out based on a timer running in the client, if this is what you are thinking. This would allow the most basic of cheats. Anyone can modify the code running in the browser to give themselves rewards using a tool like fiddler. Instead I would store lastActiveTimestamp in the users profile on the server and either use a cron job to iterate through the userlist awarding coins as necessary at the given time, or, I prefer, don't actually even give the reward at 9am - just calculate their reward due when their account is next active by reading lastActiveTimestamp and calculating the timespan from Datetime.Now(). Hope that makes sense.

Categories : C#

SQL not Updating from PHP form
Here's a quick test you can do - try $_POST['imei'] and the same for any other post variables... or add this code to the top of your code. foreach($_POST as $key=>$value){ // Optional code $value = addslashes($value); $value = stripslashes($value); $$key = $value; // Optional code $k[] = $value; $counter++; } This is just a test to make sure you're actually getting the POST data from the form.

Categories : PHP

AngularJS not updating?
Ok an attempt with fiddle. Firstly you had two ng-controller directives pointing to the same function. Secondly I don't really understand the domain here, but I'm guessing this is what you need. Heres a fiddle. <div ng-controller="AuthenticateCtrl"> <div id="account-info"> <h5>Account: </h5> {{account.name}} </div> <div> <div modal="shouldBeOpen" options="opts"> <div class="modal-header"> <h3>Select your account</h3> </div> <div class="modal-body"> <div class="account-btn" ng-repeat="item in items" ng-click="close(item)"> {{item.name}} </div> </div> </div> </div> </div> <sc

Categories : Javascript

Updating textarea
Here is an example using scope and setTimeout function Go(){ var i = 0, fn = function () { if (i >= 6) return; document.getElementById("ta").value = i; ++i; window.setTimeout(fn, 500); }; fn(); }

Categories : Javascript

Updating a .jar file that is in use
I would say that there is no (easy) way to achieve this. The few ideas I can think of might be to; Download the updates into a separate download location. Each time the application is launched, try and install the updates, if any fail, rollback and try again later. Use some kind of lock file to indicate the either the program is running or an update is in progress and take action accordingly. For example. If you have updates and the "running" and "update" lock file do not exist, create an "update" lock file and install the updates, deleting the "update" lock when your done. If you do way updates and the "update" lock file exists, wait until the "update" lock file is removed, you may want to check the updates again before installing them. If you have updates and the "running" loc

Categories : Java

Updating S3 folder name using AWS sdk for PHP
Folders are not really folders in s3. They are just parts of the object key. To "rename" the folder, you will need to rename all the objects inside the folder to include a different folder in its path.

Categories : PHP

Updating an asp.net web service
Based on this question, I found that it seems to be a bug in VS2010. Following a comment there, I removed and re-added the table to the model (wasn't a big deal in my case) and that solved it.

Categories : C#

Error updating changes svn
Working copy format has changed in Subversion 1.8, so after upgrading to TortoiseSVN 1.8 you should upgrade your working copies or checkout the new ones. After you've upgraded a working copy to the newer format, older Subversion clients will be unable to work with the upgraded working copy. So, you've upgraded your working copy to the new format (SVN 1.8). It seems that another SVN client on your system is SVN 1.8 (e.g. TortoiseSVN 1.8.0?), but PHPStorm is still 1.7.x. SVN 1.7 can't work with 1.8 working copy and vice-verse. See "Subversion 1.8 Release Notes | Upgrading the Working Copy".

Categories : Svn

glReadPixels() not updating
You are resetting the gesture recognizer's translation after every detected event. This means that the coordinates in colorPoint do not vary much. You should calculate colorPoint by using sender.view.center and converting this into iv's coordinate system. CGPoint translation = [sender translationInView:self.view]; [sender setTranslation:CGPointZero inView:self.view]; CGPoint center = sender.view.center; center.x += translation.x; center.y += translation.y; sender.view.center = center; CGPoint colorPoint = [sender.view.superview convertPoint:center toView:iv]; Now colorPoint is the current position of the gesture recognizer's view, expressed in iv's coordinate system.

Categories : IOS

Location not updating
Please try to use this class. public class LocationListenerClass { private static LocationListenerClass instance; private static Context context; private LocationManager myLocationManager; private LocationListener myLocationListener; private static Double latitude = 0d; private static Double longitude = 0d; public static LocationListenerClass getInstance(Context context) { LocationListenerClass.context = context; if (null == instance) { instance = new LocationListenerClass(); } return instance; } public void getCurrentLocation() { try { myLocationManager = (LocationManager) context .getSystemService(Context.LOCATION_SERVICE); myLocationListener = new MyLocationListener(); myLocationManager.reques

Categories : Android

Updating a particular div using jquery
You can refer the following links: Refreshing a DIV after form submission in ruby on rails How to update a 'div' content after that ActiveRecord values are changed without reload the page? Refresh a div without reloading the page Update only div panel on button click in Ruby on Rails Hope these links will help you. Thanks

Categories : Ruby On Rails

ObservableCollection not updating the UI
If the properties are being changed on your Station objects, you need to implement INotifyPropertyChanged on it, and fire the PropertyChanged event in your property setters. It seems like the chart object isn't being notified when your other thread changes the properties. The ObservableCollection will only cause an update in the chart when Station objects are added or removed, not when their properties change. You say that when you hover over the chart you see the updated values, but this may be because the chart is actually calling the getter on the property to display that, so you will see the updated value there (but I'm speculating on this).

Categories : C#

Updating a queryset
Just a small typo, you missed the function call: tests = Stock.objects.all() If you prod around in an interactive shell you can see that: >>> type(Stock.objects.all) <type 'instancemethod'> while invoking the all() method will return an iterable object, namely a Django QuerySet.

Categories : Django

iframe updating only once
Try this <iframe src="" id="player" class="youtube-player" type="text/html" width="701" height="308" frameborder="0"></iframe> <script type="text/javascript"> $(document).ready(function(){ $(".youtube").click(function(){ var Link = $(this).attr("id"); $("#player").attr("src","http://www.youtube.com/embed/"+Link); }); }); </script>

Categories : Jquery



© Copyright 2017 w3hello.com Publishing Limited. All rights reserved.