Posts

amazon s3 - EBS Volume from Ubuntu to RedHat -

i use ebs volume data on i've been working in ubuntu ami in redhat 6 ami. issue i'm having redhat says volume not have valid partition table. fdisk output unmounted volume. disk /dev/xvdk: 901.9 gb, 901875499008 bytes 255 heads, 63 sectors/track, 109646 cylinders units = cylinders of 16065 * 512 = 8225280 bytes sector size (logical/physical): 512 bytes / 512 bytes i/o size (minimum/optimal): 512 bytes / 512 bytes disk identifier: 0x00000000 disk /dev/xvdk doesn't contain valid partition table interestingly, volume isn't 901.9 gb 300 gb.. don't know if means anything. concerned possibly erasing data in volume accident. can give me pointers formatting volume redhat without deleting contents? i checked volume works in ubuntu instance , does. i'm not able advise on partition issue such, other stating neither need nor want format it, because formatting indeed (potentially) destructive operation. best guess redhat isn't able identify file...

c# - Accessing objects from within the scope of a using block through the object being used -

i'd know if possible following: using (myclass o = new myclass()) { theclassiwantmyclasstosee x = new theclassiwantmyclasstosee(); x.dostuff(); } i'd create class (myclass) , use in using block. inside block, want work objects of type (theclassiwantmyclasstosee). when using block falls out of scope, want perform actions on these (theclassiwantmyclasstosee) objects. is possible make class aware of other objects declared in scope transparently? i realise add object instances myclass object, i'd make easier developers working api i'm building. any ideas welcome. thanks. the way make myclass aware of theclassiwantmyclasstosee creating reference 1 other. there no way navigate , explore classes in scope. statement true regardless of whether scope relates using block, method block, foreach loop or other. why not have simple myclass.addrelationship(theclassiwantmyclasstosee child) method makes class a...

.net - Adding TimeStamps with EF 4.3 Migrations -

i'm using code first migrations , i'm altering model add timestamp fields tables. i'm trying add timetamp fields in second migration. here sample of code looks like public class user { public int userid { get; set; } public string username { get; set; } public byte[] timestamp { get; set; } } public class usermodelconfiguration: entitytypeconfiguration<user> { public usermodelconfiguration() { property(p => p.username).isrequired().hasmaxlength(250); property(p => p.timestamp).isrowversion(); } } the generated migration looks public override void up() { addcolumn("users", "timestamp", c => c.binary(nullable: false, fixedlength: true, timestamp: true, storetype: "rowversion")); } when execute update-database command, error message says "defaults cannot created on columns of data type timestamp. ...

c++ - ERROR_PATH_NOT_FOUND vs ERROR_FILE_NOT_FOUND, what is the difference? -

possible duplicate: what's difference between path_not_found , name_not_found i error_file_not_found when try open file that's not there, fopen fails error_path_not_found . so difference between error_file_not_found , error_path_not_found ? in winerror.h , error_file_not_found has descriptive text "the system cannot find file specified." , error_path_not_found has descriptive text "the system cannot find path specified." this doesn't particularly clarify matters. usually, however, "file not found" refers case file cannot found , "path not found" refers case component of path (one of directory names specified) cannot found.

Perform actions after WPF DataGrid data is completely bound -

i have old windows forms application @ work converting wpf. part of this, there button which, when clicked, creates brand new datagridview , adds page, binding data sql query. data bever written database, new column added end of data checkbox on it, , when checkbox changed id row passed method along state of checkbox. in wpf, have dynamic grid creation working, , data binding. having found couldn't directly add column datagrid itself, i've added source dataset table before binding. works , whos data along checkbox each row. however, can't event fire when individual checkbox clicked. i have managed find code @ http://forums.silverlight.net/t/11547.aspx , causes row commit whenever checkbox changed, code pass id , bool value resides in editending event. updatesourcetrigger added each checkbox looping on each row in checkbox column during "loaded" event of datagrid, failing, , after internet searching seems because "loaded" doesn't guarantee dat...

Google Maps API v3: SVG graphics clip / disappear when zooming -

test link: http://kwestievan.nl/reizen what i'm doing here: implemented own overlayview draw curved lines marker marker arrowheads @ end of each line svg. add div element map of width , height contain line , arrowhead. put inline svg code in div let browser draw line , arrow. if viewed in safari or chrome annoying , unexpected behavior occurs. in safari whole svg graphic disappears beyond zoom level, , in chrome arrowheads @ end of line disappear , re-appear @ random zoom levels seems. in firefox , opera behavior not happening , arrowheads visible @ zoom level. don't mind red boxes and/or displacement of arrows. that's work in progress. what going on here? svg not compatible google maps or doing wrong? the marker infowindow shadow? marker shadow set same values infowindow . duplicate variable maybe? change name of marker shadow 'path'. may have inadvertently used same identifier marker path name infowindow shadow path. i agree star. started ...

java - How to refresh ImageVIew on every button click with new image from the web? -

i new android , trying create first app. should have imageview along 2 buttons (back , next). when user clicks on next button, image in imageview should replaced next image (hosted on server). names of files 1.jpg, 2.jpg, 3.jpg... using following code, not working. when activity starts first image loaded properly, when click next button nothing happens (nothing in logcat also). public class slidesactivity extends activity { private imageview imageview; private int imagenumber = 1; private string plakatiurl = "http://plakati.bg/" + integer.tostring(imagenumber) + ".jpg"; public void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); setcontentview(r.layout.slides); final drawable image = loadimagefromweb(plakatiurl); imageview = new imageview(getbasecontext()); imageview = (imageview) findviewbyid(r.id.imageview1); imageview.setimagedrawable(image); button nextbutton = (but...