Search Results

Search found 17443 results on 698 pages for 'base convert'.

Page 12/698 | < Previous Page | 8 9 10 11 12 13 14 15 16 17 18 19  | Next Page >

  • How to merge arbitrary snapshot into base vdi in Virtualbox

    - by jmathew
    I botched a transfer of a VM from one harddisk to the other. Now I'm left with the base vdi and a whole bunch of snapshots. My steps Copied old VM directory over to new HDD Deleted old VM and added new VM using using Machine-add and providing the old XML file Couldn't add base vdi file due to conflict so changed the UUID of base vdi with VBOXMANGE.EXE internalcommands sethduuid <path/to/vdi> Attempt to rollback to a snapshot, but it seems the VM is looking for the snapshots on the old HDD (which is formatted and gone) This is the error (networked is the name): Failed to restore the snapshot networked of the virtual machine lfs. Could not open the medium 'H:\vm\ft.vdi'. VD: error VERR_PATH_NOT_FOUND opening image file 'H:\vm\ft.vdi' (VERR_PATH_NOT_FOUND). Result Code: E_FAIL (0x80004005) Component: Medium Interface: IMedium {53f9cc0c-e0fd-40a5-a404-a7a5272082cd} The old HDD was drive H: the new one is drive N: How can I modify the snapshots/VM to look in N:\vm\ft.vdi for the base vdi? I've already set the default settings in VirtualBox in general (default vm/vm snapshot location). Or if not that how can I merge the old snap shot with the base vdi given that the only things that have changed is the base vdi's UUID?

    Read the article

  • VirtualBox how to merge arbitrary snapshot into base vdi

    - by jmathew
    I botched a transfer of a VM from one harddisk to the other. Now I'm left with the base vdi and a whole bunch of snapshots. My steps Copied old VM directory over to new HDD Deleted old VM and added new VM using using Machine-add and providing the old XML file Couldn't add base vdi file due to conflict so changed the UUID of base vdi with VBOXMANGE.EXE internalcommands sethduuid Attempt to rollback to a snapshot, but it seems the VM is looking for the snapshots on the old HDD (which is formatted and gone) This is the error (networked is the name): Failed to restore the snapshot networked of the virtual machine lfs. Could not open the medium 'H:\vm\ft.vdi'. VD: error VERR_PATH_NOT_FOUND opening image file 'H:\vm\ft.vdi' (VERR_PATH_NOT_FOUND). Result Code: E_FAIL (0x80004005) Component: Medium Interface: IMedium {53f9cc0c-e0fd-40a5-a404-a7a5272082cd} The old HDD was drive H: the new one is drive N: How can I modify the snapshots/VM to look in N:\vm\ft.vdi for the base vdi? I've already set the default settings in VirtualBox in general (default vm/vm snapshot location). Or if not that how can I merge the old snap shot with the base vdi given that the only things that have changed is the base vdi's UUID? Thanks

    Read the article

  • How to convert a DataSet object into an ObjectContext (Entity Framework) object on the fly?

    - by Marcel
    Hi all, I have an existing SQL Server database, where I store data from large specific log files (often 100 MB and more), one per database. After some analysis, the database is deleted again. From the database, I have created both a Entity Framework Model and a DataSet Model via the Visual Studio designers. The DataSet is only for bulk importing data with SqlBulkCopy, after a quite complicated parsing process. All queries are then done using the Entity Framework Model, whose CreateQuery Method is exposed via an interface like this public IQueryable<TTarget> GetResults<TTarget>() where TTarget : EntityObject, new() { return this.Context.CreateQuery<TTarget>(typeof(TTarget).Name); } Now, sometimes my files are very small and in such a case I would like to omit the import into the database, but just have a an in-memory representation of the data, accessible as Entities. The idea is to create the DataSet, but instead of bulk importing, to directly transfer it into an ObjectContext which is accessible via the interface. Does this make sense? Now here's what I have done for this conversion so far: I traverse all tables in the DataSet, convert the single rows into entities of the corresponding type and add them to instantiated object of my typed Entity context class, like so MyEntities context = new MyEntities(); //create new in-memory context ///.... //get the item in the navigations table MyDataSet.NavigationResultRow dataRow = ds.NavigationResult.First(); //here, a foreach would be necessary in a true-world scenario NavigationResult entity = new NavigationResult { Direction = dataRow.Direction, ///... NavigationResultID = dataRow.NavigationResultID }; //convert to entities context.AddToNavigationResult(entity); //add to entities ///.... A very tedious work, as I would need to create a converter for each of my entity type and iterate over each table in the DataSet I have. Beware, if I ever change my database model.... Also, I have found out, that I can only instantiate MyEntities, if I provide a valid connection string to a SQL Server database. Since I do not want to actually write to my fully fledged database each time, this hinders my intentions. I intend to have only some in-memory proxy database. Can I do simpler? Is there some automated way of doing such a conversion, like generating an ObjectContext out of a DataSet object? P.S: I have seen a few questions about unit testing that seem somewhat related, but not quite exact.

    Read the article

  • How to convert between Enums where values share the same names ?

    - by Ross Watson
    Hi, if I want to convert between two Enum types, the values of which, I hope, have the same names, is there a neat way, or do I have to do it like this...? enum colours_a { red, blue, green } enum colours_b { yellow, red, blue, green } static void Main(string[] args) { colours_a a = colours_a.red; colours_b b; //b = a; b = (colours_b)Enum.Parse(typeof(colours_b), a.ToString()); } Thanks, Ross

    Read the article

  • How can I convert a bunch of .asp to .aspx ?

    - by Jerome WAGNER
    Hello, I want to port an existing, legacy, ecommerce website from ASP to ASP.NET. What approaches do I have ? is there a way to run an ASP file with an ASP.NET engine ? are there tools to automatically convert ASP to ASP.NET and do they work on complex websites ? other approaches ? Thanks for your help Jerome Wagner

    Read the article

  • How do I convert integers to characters in C#?

    - by Mike Webb
    I am trying to convert an index of 1 to 27 into the corresponding uppercase letter. I know that in C++ I could type this: char letter = 'A' + (char)(myIndex % 27); This same code does not work in C#. How can I accomplish this task in C#? EDIT: I'd rather not have to encode an enum or switch statement for this if there is a better mathematical solution like the one above.

    Read the article

  • polymorphism, inheritance in c# - base class calling overridden method?

    - by Andrew Johns
    This code doesn't work, but hopefully you'll get what I'm trying to achieve here. I've got a Money class, which I've taken from http://www.noticeablydifferent.com/CodeSamples/Money.aspx, and extended it a little to include currency conversion. The implementation for the actual conversion rate could be different in each project, so I decided to move the actual method for retrieving a conversion rate (GetCurrencyConversionRate) into a derived class, but the ConvertTo method contains code that would work for any implementation assuming the derived class has overriden GetCurrencyConversionRate so it made sense to me to keep it in the parent class? So what I'm trying to do is get an instance of SubMoney, and be able to call the .ConvertTo() method, which would in turn use the overriden GetCurrencyConversionRate, and return a new instance of SubMoney. The problem is, I'm not really understanding some concepts of polymorphism and inheritance yet, so not quite sure what I'm trying to do is even possible in the way I think it is, as what is currently happening is that I end up with an Exception where it has used the base GetCurrencyConversionRate method instead of the derived one. Something tells me I need to move the ConvertTo method down to the derived class, but this seems like I'll be duplicating code in multiple implementations, so surely there's a better way? public class Money { public CurrencyConversionRate { get { return GetCurrencyConversionRate(_regionInfo.ISOCurrencySymbol); } } public static decimal GetCurrencyConversionRate(string isoCurrencySymbol) { throw new Exception("Must override this method if you wish to use it."); } public Money ConvertTo(string cultureName) { // convert to base USD first by dividing current amount by it's exchange rate. Money someMoney = this; decimal conversionRate = this.CurrencyConversionRate; decimal convertedUSDAmount = Money.Divide(someMoney, conversionRate).Amount; // now convert to new currency CultureInfo cultureInfo = new CultureInfo(cultureName); RegionInfo regionInfo = new RegionInfo(cultureInfo.LCID); conversionRate = GetCurrencyConversionRate(regionInfo.ISOCurrencySymbol); decimal convertedAmount = convertedUSDAmount * conversionRate; Money convertedMoney = new Money(convertedAmount, cultureName); return convertedMoney; } } public class SubMoney { public SubMoney(decimal amount, string cultureName) : base(amount, cultureName) {} public static new decimal GetCurrencyConversionRate(string isoCurrencySymbol) { // This would get the conversion rate from some web or database source decimal result = new Decimal(2); return result; } }

    Read the article

  • Can I get a "base URL" in Wordpress within a template file?

    - by alex
    Usually in my PHP apps I have a base URL setup so I can do things like this <a href="<?php echo BASE_URL; ?>tom/jones">Tom</a> Then I can move my site from development to production and swap it easily and have the change go site wide (and it seems more reliable than <base href="" />. I'm doing up a Wordpress theme, and I am wondering, does WordPress have anything like this built in, or do I need to redefine my own? I can see ABSPATH, but that is the absolute file path in the file system, not something from the document root.

    Read the article

  • Convert a time to specified time zone using C#?

    - by Ravi
    I'm working on an application in C# with .Net 3.5. I have time zone value of the User is stored in DB with this format (-05:00,1), where -5.00 represents EST time zone value and the 1 indicates that this time zone follows daylight saving (if 0 not a daylight saving zone). Now I want to convert any date time value into this timezone value considering the daylight saving value. Any help is appreciated. Thanks

    Read the article

  • Converting .wav (CCITT A-Law format) to .mp3 using LAME

    - by iar
    I would like to convert wav files to mp3 using the lame encoder (lame.exe). The wav files are recorded along the following specifications: Bit Rate: 64kbps Audio sample size: 8 bit Channels: 1 (mono) Audio sample rate: 8 kHz Audio format: CCITT A-Law If I try to convert such a wav file using lame, I get the following error message: Unsupported data format: 0x0006 Could anyone provide me with a command line string using lame.exe that will enable me to convert these kind of wav files?

    Read the article

  • Can't install egenix-mx-base on Django production VPS

    - by Shane
    I have been following these instructions for setting up a Django production server with postgres, apache, nginx, and memcache. My problem is that I cannot get egenix-mx-base to install and without this I cannot get psycopg2 to work and therefore no database access :(. I am attempting this on a VPS running a clean install of Ubuntu Hardy (8.04) and have followed all instructions on the site to a T. The error message is as follows: $ easy_install egenix-mx-base Searching for egenix-mx-base Reading http://pypi.python.org/simple/egenix-mx-base/ Reading http://www.egenix.com/products/python/mxBase/ Reading http://www.lemburg.com/python/mxExtensions.html Reading http://www.egenix.com/ Best match: egenix-mx-base 3.1.3 Downloading http://downloads.egenix.com/python/egenix-mx-base-3.1.3.tar.gz Processing egenix-mx-base-3.1.3.tar.gz Running egenix-mx-base-3.1.3/setup.py -q bdist_egg --dist-dir /tmp/easy_install-iF7qzl/egenix-mx-base-3.1.3/egg-dist-tmp-laxvcS Warning: Can't read registry to find the necessary compiler setting Make sure that Python modules _winreg, win32api or win32con are installed. In file included from mx/TextTools/mxTextTools/mxte.c:42: mx/TextTools/mxTextTools/mxte_impl.h: In function ‘mxTextTools_TaggingEngine’: mx/TextTools/mxTextTools/mxte_impl.h:345: warning: pointer targets in initialization differ in signedness mx/TextTools/mxTextTools/mxte_impl.h:364: warning: pointer targets in initialization differ in signedness mx/URL/mxURL/mxURL.c: In function ‘mxURL_SetFromString’: mx/URL/mxURL/mxURL.c:676: warning: pointer targets in initialization differ in signedness mx/UID/mxUID/mxUID.c: In function ‘mxUID_Verify’: mx/UID/mxUID/mxUID.c:333: warning: pointer targets in passing argument 1 of ‘sscanf’ differ in signedness mx/UID/mxUID/mxUID.c: In function ‘mxUID_New’: mx/UID/mxUID/mxUID.c:462: warning: pointer targets in passing argument 1 of ‘mxUID_CRC16’ differ in signedness error: Setup script exited with error: build/bdist.linux-x86_64-py2.5_ucs4/dumb/egenix_mx_base-3.1.3-py2.5.egg-info: Is a directory Thank you to anyone who takes the time to try to help me.

    Read the article

  • Virtual functions - base class pointer

    - by user980411
    I understood why a base class pointer is made to point to a derived class object. But, I fail to understand why we need to assign to it, a base class object, when it is a base class object by itself. Can anyone please explain that? #include <iostream> using namespace std; class base { public: virtual void vfunc() { cout << "This is base's vfunc().\n"; } }; class derived1 : public base { public: void vfunc() { cout << "This is derived1's vfunc().\n"; } }; int main() { base *p, b; derived1 d1; // point to base p = &b; p->vfunc(); // access base's vfunc() // point to derived1 p = &d1; p->vfunc(); // access derived1's vfunc() return 0; }

    Read the article

  • Error: The base type 'System.Web.UI.MasterPage' is not allowed for this page

    - by Patrick Olurotimi Ige
    I came across this error when i was trying to ajaxify my sharepoint site. After adding the AjaxifyMoss from the codeplex  developed by Richard Finn. And tried loading my site i got the error Error: The base type 'System.Web.UI.MasterPage' is not allowed for this page So  i decided to check the web.config and i noticed the SafeControl tag doesn't have the .Net 2.0 assembly included despite the fact i added both vsersios 2.0 and 3.5. Its possible the.Net  3.5 assebply overwrote the 2.0. Anyway after i added the below which is the 2.0 verison       <SafeControl Assembly="System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" Namespace="System.Web.UI" TypeName="*" Safe="True" AllowRemoteDesigner="True" />  And refreshed my page. It worked

    Read the article

  • Fixing a bug while working on a different part of the code base

    - by imgx64
    This happened at least once to me. I'm working on some part of the code base and find a small bug in a different part, and the bug stops me from completing what I'm currently trying to do. Fixing the bug could be as simple as changing a single statement. What do you do in that situation? Fix the bug and commit it together with your current work Save your current work elsewhere, fix the bug in a separate commit, then continue your work [1] Continue what you're supposed to do, commit the code (even if it breaks the build fails some tests), then fix the bug (and the build make tests pass) in a separate commit [1] In practice, this would mean: clone the original repository elsewhere, fix the bug, commit/push the changes, pull the commit to the repository you're working on, merge the changes, and continue your work. Edit: I changed number three to reflect what I really meant.

    Read the article

  • How can I designed multi-threaded application for larger user base

    - by rokonoid
    Here's my scenario, I need to develop a scalable application. My user base may be over 100K, every user has 10 or more small tasks. Tasks check every minute with a third party application through web services, retrieving data which is written in the database, then the data is forwarded to it's original destination. So here's the processing of a small task: while(true){ Boolean isNewInformationAvailable = checkWhetherInformationIsAvailableOrNot(); If(isNewInformationAvailable ==true){ fetchTheData(); writeToDatabase(); findTheDestination(); deliverTheData(); isAvailable =false; } } Here is the question: as the application is large, how should I approach designing this. I'm going to use Java to write it. Should I use concurrency, and how would you manage the concurrency?

    Read the article

  • How can I design multi-threaded application for larger user base

    - by rokonoid
    Here's my scenario, I need to develop a scalable application. My user base may be over 100K, every user has 10 or more small tasks. Tasks check every minute with a third party application through web services, retrieving data which is written in the database, then the data is forwarded to it's original destination. So here's the processing of a small task: while(true){ Boolean isNewInformationAvailable = checkWhetherInformationIsAvailableOrNot(); If(isNewInformationAvailable ==true){ fetchTheData(); writeToDatabase(); findTheDestination(); deliverTheData(); isAvailable =false; } } As the application is large, how should I approach designing this? I'm going to use Java to write it. Should I use concurrency, and how would you manage the concurrency?

    Read the article

  • Can a grails controller extend from a base class? How to make it so grails doesn't blow up?

    - by egervari
    I wrote a base class to help build my controllers more quickly and to remove duplication. It provides some helper methods, default actions and some meta programming to make these things easier to build. One of those methods in the base class is like this: def dynamicList(Class clazz) { def model = new LinkedHashMap() model[getMapString(clazz) + "s"] = list(clazz) model[getMapString(clazz) + "sTotal"] = count(clazz) model } The action that calls it, also in the base class, is this: def list = { dynamicList(clazz) } Unfortunately, when I go to list action in the controller subclass that inherits the base class when my application is deployed, I get this exception: groovy.lang.MissingMethodException: No signature of method: groovy.lang.MissingMethodException.dynamicList() is applicable for argument types: (java.lang.Class) values: [class project .user.User] at project.user.UserController$_closure1.doCall(UserController.groovy:18) at project.user.UserController$_closure1.doCall(UserController.groovy) at java.lang.Thread.run(Thread.java:619) How can I hit grails over the head and just tell it do what I want it to do? My controller unit tests run just fine, so grails' run-time is totally at fault :/ Ken

    Read the article

  • How can I convert .eps files to .jpg in ASP.NET?

    - by Mike C
    I am trying to convert uploaded .eps files to .jpg in my ASP.net application and I am having a hard time finding a .net library that will let me do this. I have tried using the ImageMagick libraries, but I don't have root access to the server in order to install the standard binaries, or run the command line executables. I have also tried the slightly modified project from CodeProject, but it was designed in VS2005 and I have VS2008 and 2010 and I think I run into some compatibility issues while trying to compile and execute the project. Is there a simpler solution available that just works natively in .NET? Thanks, Mike

    Read the article

  • How to convert a Java object (bean) to key-value pairs (and vice versa)?

    - by Shahbaz
    Say I have a very simple java object that only has some getXXX and setXXX properties. This object is used only to handle values, basically a record or a type-safe (and performant) map. I often need to covert this object to key value pairs (either strings or type safe) or convert from key value pairs to this object. Other than reflection or manually writing code to do this conversion, what is the best way to achieve this? An example might be sending this object over jms, without using the ObjectMessage type (or converting an incoming message to the right kind of object).

    Read the article

< Previous Page | 8 9 10 11 12 13 14 15 16 17 18 19  | Next Page >