w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
Windows 7 on Virtualbox virtual machine: is it OpenGL 1.x compatible?
Yes, your guest VM will be able to run OpenGL 1.x and newer. Install the VirtualBox Guest Additions via the "Devices" menu in the virtual machine's menu bar VirtualBox has a handy menu item named "Install guest additions", which mounts the Guest Additions ISO file inside your virtual machine This will enable 3D hardware acceleration in your guest machine (OpenGL and Direct3D 8/9). VirtualBox states that because 3D support is still experimental at this time, it is disabled by default and must be manually enabled in the VM settings http://www.virtualbox.org/manual/ch04.html#guestadd-3d

Categories : Windows

Is it possible to address localhost from linux ubuntu to a virtualbox virtual machine
In the default network configuration (NAT) for VirtualBox you can accesss the host machine with the IP 10.0.2.2, so in the browser you would use that instead of localhost. (I can't find this in the official documentation though?)

Categories : Linux

How do I set up multiple virtual Machines for home server?
I've always been a fan of VMWare ESXi for scenarios like this, and would highly recommend it. The setup process is fairly easy if your hardware supports it. You can download ESXi 5.1 for free here: https://my.vmware.com/web/vmware/evalcenter?p=free-esxi5&lp=default. I prefer to go the hypervisor route primarily for its simplicity from a support perspective. I want my time and resources spent working with the virtualized servers, not the physical one. Being able to call up another host 'on demand' is great, especially if you are testing software/etc and don't want to put something together. As far as management, VMWare also provides management tools for ESXi, that give you the ability to manage just about all aspects of VMWare, as well as access the virtual console for those machi

Categories : Linux

Javascript engines and virtual machines similaraties?
Browser interprets and executes the js code directly while for virtual machine executes the byte-code. Java code (a “.java” file) compiled turns into a “.class” file that contains the compiled Java bytecode, which can then be read and understood by the Java Virtual Machine. The JVM, in turn, takes the compiled Java bytecode and then runs, or executes, the code.

Categories : Javascript

Using virtual machines for OS compatibility testing of software
This question is probably better suited for http://sqa.stackexchange.com/ But yes, using VMs is a good way to scale tests out to multiple platforms and configurations. Unfortunately you won't find a library of images you can just grab and use as you will need licenses for any commercial operating systems and applications installed on the image.

Categories : Testing

Hadoop command enables two different virtual machines?
I'm not aware of any such property that allows us to start a job only on some specific nodes. This is decided automatically by the framework based on the location of data you are going to process. Once you submit your job TT will start the maps on the nodes where data blocks are available. It's not like that TTs on all the nodes of your cluster are going to work for one particular job. But the important thing here is, why would you do that?What advantage are you going to get if you do this?

Categories : Hadoop

How to Connect Virtual Machines in a Cloud Service using REST
I believe you need to "add role" to add a new VM to an existing IaaS Cloud service: http://msdn.microsoft.com/en-us/library/windowsazure/jj157186.aspx

Categories : Rest

How to setup virtual machines on cloud for testing environment
Ok. There are different ways to do what you want, using TestNG. I am going to provide a brief overview of each, as there is lots of documentation on how to do them. The first is to use @Factory, and instantiate a new class for each driver. The second is to use @Dataprovider and pass in a driver to your methods. This has the flexibility of being parallel. With the actual task of instantiating each of your drivers...there are plenty of resources on doing that.

Categories : Testing

Ruby On Rails On Azure Ubuntu Virtual Machines
I would not recommend running the built-in rails server in this environment, as it is only meant for your local development environment. Since you're on Windows Azure I would recommend you take a look at this tutorial from the Azure folks. It shows how to setup a nginx web server along with unicorn to host a Rails application. http://www.windowsazure.com/en-us/develop/ruby/tutorials/web-app-with-capistrano/

Categories : Ruby On Rails

Listing Virtual Machines on my Azure account through the Java SDK
In order to list Virtual Machines in your subscription, you would need to perform Service Management REST API Operations. I briefly looked at Azure SDK for Java on Github and I don't think the API is implemented there. I only saw support for Storage, Media Services and Service Bus. What that means is that you would need to write some code yourself which consumes this REST API.

Categories : Java

Managing Large Datasets
The best is to query the db only for your needs. Then you load via ajax and query the other parts that you need when you need it. Rendering 100k rows on the client side will take too much time ;)

Categories : PHP

Oracle XML functions with large datasets
I think showing this data in sqlplus + spool completely is going to be a struggle. I have used these functions for > 100Mb of data without problems, but I have written the returned XMLType out to files after converting to CLOB, using either UTL_FILE for server side or in client apps in Java/C#. If you are stuck with sqlplus, have you tried it with "SET TERM OFF" and spool? It might give better results, would certainly be quicker. Note to use SET TERM OFF you have to be careful how you invoke sqlplus; sqlplus @script will work, but "cat <

Categories : SQL

Best way to store large demographic datasets
Although, your question is fairly vague, I guess by 'large', you mean few million rows. If your data-size is limited to such figures, you can simply design a database and dump the data. Since you are also tagging OLAP for the purpose, you may be interested on creating OLAP cube or something similar. You have to collect the data, may be in flat txt file, CSV file, excel file or anything similar. You can also use bcp to export/import bulk data. Please refer to this link. Furthermore, you can dump those data to SQL Sever (or any other that you like). Create table(s) and then if you like to create a OLAP cube, create dimension and fact tables. Create an OLAP Cube. Whenever you need data related to your point of interest, do browse your cube. If you are interested in data retrieval only, then

Categories : Database

How to structure large memcache datasets
Is the question "should I store a few large chunks of data or many small chunks of data?" Without knowing more about your layering scheme, I'd say go with the large chunks. Each memcache request is a network request, and you can minimize traffic by minimizing requests. Another option is to cache the web pages on your server. After you pull the data (every four hours, you say), write the HTML pages from the data and store them in your web folder. Then your static pages will be served in no time and you won't need a memcache server.

Categories : Python

Nested loops for large datasets
Hmm. Well, first of all,this code is probably so heavily I/O bound that optimizing anything but disk access is probably inconsequential. You might try throwing a pointless loop to 1000 before every if-test just to see how much difference that makes. It doesn't appear like indexing would help you here, since you must access all the data when a value isn't specified, but if you are computing aggregates then caching those might help. Intersystem's DeepSee product is designed for that. But it sounds like maybe you are just running a big report printing all the data, and want to optimize what you can. In that case, I think your solution does that. As far as elegance, well, it usually isn't found in conjunction with heavy optimization. The problem with generalizing a solution is that it'

Categories : Misc

Loading large datasets with AngularJS
You can't really $q.all the promises together (which makes them into one big promise that succeeds or fails together) if you want to treat each one individually (display each one individually). I would push the things you get back into the scope as soon as you get them. Below is an example: function MyCtrl($scope, $timeout, $q) { var fetchOne = function() { var deferred = $q.defer(); $timeout(function() { deferred.resolve([random(), random() + 100, random() + 200]); }, random() * 5000); return deferred.promise; }; $scope.scans = []; for (var i = 0; i < 2; i++) { fetchOne().then(function(items) { angular.forEach(items, function(item) { $sc

Categories : Angularjs

binding to large datasets to JQuery controls
Passing a million coordinates to JavaScript will only lead to a lot of pain. Your best option for viewing large datasets on a JavaScript map is to turn it into an image on the server side and overlay it on the map. Take a look at this code project: http://ajaxmapdataconnector.codeplex.com/

Categories : Javascript

How to effectively deal with large datasets in Core Data?
When you set the fetch request for the FRC the batch size should be just a few items bigger than, maybe twice the size as, the number of items that can be seen on screen at any one time. The FRC already does the pagination for you you just need to set the page size better.

Categories : IOS

CoreData and RestKit performance while importing very large datasets
Well, first off, if you want maximum performance, and if you really need that, don't use RestKit, don't use AFNetworking and don't use NSJSONSerialization. They all suffer from design choices which do not play well when dealing with large data sets and if your goal is maintaining a moderately low memory foot print and high performance. You should have a very large single JSON (likely a JSON Array whose elements are JSON Objects) as the body of a single connection to get superior performance. Alternatively, you can have a custom transport format which sends multiple JSONs within one connection (say, a series of JSON Objects, separated by a "white space"). Having a large number of connections is definitely slow. When you strive to achieve the fastest performance, you should simultaneously

Categories : IOS

The cloud service you have chosen is deployed in a region or affinity group that does not currently support virtual machines
It looks like for PS that you're attempting to create a new cloud service for the second VM that has the same DNS name as the one you've already created. Can you share your exact call to New-AzureVM with us so we can take a look? For the issues you're having deploying the VM through the management portal, if you've confirmed that you've selected the same cloud service in which you deployed the first VM, you'll need to open a support ticket so we an take a closer look at your subscription. The error message you're seeing typically shows up when a user creates an affinity group before the region supported virtual machines. If you've just started following this tutorial and created an affinity group in the past few days, or even weeks, that would not be the culprit.

Categories : Azure

VirtualBox: "A disk read error occurred" after migrating Win XP to Virtualbox
I solved this, and thought i would share my solution: By comparing sectors to a working VM, I found that the following change was needed: Sector 63 offset 0x1A was 0xF0, and this byte needed to be changed to 0xFF. To do this: Attach the non booting drive image as a second drive on a working VM Boot the working VM, and install a low level sector editor (Google!) Run this editor, and look at sector 63 on the non-working drive image. Note that depending on how you select the disk, this is either sector 0, or sector 63 It the same physical sector on the disk Confirm the byte 0xF0 is at offset 0x1A (26), and change it to 0xFF and write the sector Shutdown the VM, and then in settings, detach the drive image from step 1 The disk image was healed - to a degree. It can now boot in recovery co

Categories : Windows

tomcat process hogging all CPU and large amount of virtual memory
Correct command line switch for specifying maximum size of the memory allocation pool is -Xmx Something like this should work for you: -Xmx2g in JAVA_OPTS ** Be careful while allocating very high memory to your JVM as it causes problems sometimes. For your case I would suggest you to enable remote JMX in your Tomcat process And then once process shows unusually high CPU/memory usage connect with a JMX client such as jConsole or VisualVM and see if there is any deadlock or very long running threads.

Categories : Performance

Virtual wrapper of std::queue does not compile when T has no copy constructor
This occurs because the c++11 implementation provided by gcc 4.7 is incomplete. When using c++11 you must always use the most up-to-date compiler versions. clang is usually most complete, followed by gcc and, some distance behind, icpc. Following your edit, the code is not compiling any more (clang 3.2 or gcc 4.8), because it's simply wrong. When the template class myqueue<std::packaged_task<int()>> is instantiated, the non-template member virtual void push(const T&) is instantiated too. However this member calls the deleted copy constructor of T, so is illegal, error. (That it compiles for non-virtual push(const T&) is dangerous, as you will get an error as soon as you try to use that function.) To make you code work, you must avoid that. A virtual member cannot be

Categories : C++

How to copy virtual devices downloaded by Genymotion to another machine?
The files in the VirtualBox folder are likely just the actual machine configurations, not the downloaded image files. On my system (Windows 8 x64) the downloaded images are located here: Users{username}AppDataLocalGenymobile Inside this folder is another folder called LaunchPad. If you copy this folder to the same location on your other machine it should work. I would advise you install and run Genymobile on the other machine, then exit it and copy the folder mentioned above. Re-launching it should then pickup the image files. You will have to re-create the actual devices, but you won't have to download the images again. I have also noticed that you only need to download 4 images - any tablet with/without google apps and any phone with/without google apps. All the different phon

Categories : Android

Why/how does the virtual-ness of a base class change the behaviour of the copy constructor?
Your problem looks similar to the one reported as a bug here in the official bugzilla for the llvm project. As you can see is a recognized bug and it's been patched in the newer versions of Clang, you should switch to newer version of the frontend to fix this issue; in the bug report is also specified the exact revision of clang that is offering a patch for this issue.

Categories : C++

why there are two virtual destructor in the virtual table and where is address of the non-virtual function (gcc4.6.3)
The address of the non-virtual member function, well you said it, it's not virtual which means it doesn't need to be in the virtual table. Why? Well it doesn't depend on the runtime type of the object, only the static type meaning the compiler can figure out at compile time which function to call so the call is resolved then instead of using late binding during execution. The function itself is in the code section somewhere and so at compile time the functions address is inserted at the call site directly. Ok now onto the fun stuff. I did some digging around in the visual studio watch list and here is what I found: |---------------------------| | Derive | |---------------------------| | vtable ptr for Base1 (+0) | | Base1::a (+4) | |------------------------

Categories : C++

Cannot access ubuntu server from other machines other than the machine which is hosting the virtual machine which is my ubuntu server
First of all make sure in the setting of the virtual machine that it is in Bridged Adaptor type connectivity. Give a static ip to the virtual machine using sudo ifconfig eth0 10.0.0.100 netmask 255.255.255.0 the above is an example. You got what I mean. 3.Third, Try pinging the virtual machine with the base machine running the vbox to make sure they are connected. ping ipaddress-basemachine 4 . Now if everything is working fine from there then connect with this virtual machine with other base machine using Remote Desktop Viewer or any other similar application. Specify, the ip-address of the vbox and username, password. It will be able to connect with it now. 5 . If it still is not able to then try to check the firewall rules on both the virtual box machine and the base machine

Categories : Linux

More Efficient Way to Copy Large Data from One Table to Another
300,000 records is a small amount of data in database terms. But it is too large to be using cursors which really should not be used for more than a couple of hundred records and frankly once you learn to write set-based code, it is generally shorter and takes less time to write than a cursor anyway. So I would never use a cursor as a first choice, it is a technique of last resort. You should not be thinking about inserting/updating or deleting one record at a time in a cursor. You use set-based operations. Now with 300,000 records you might want to consider a combination of set-based and cursoring where you process a group of recorss at a time (say 10,000) rather than cursor one a time. Checke out the following for details on how to change a cursor to set-based code. http://wiki.lesst

Categories : SQL

Azure VM pricing - Is it better to have 80 single core machines or 10 8-core machines?
Billing According to Windows Azure Virtual Machines Pricing Details, Virtual Machines are charged by the minute (of wall clock time). Prices are listed as hourly rates (60 minutes) and are billed based on total number of minutes when the VMs run for a partial hour. In July 2013, 1 Small VM (1 virtual core) costs $0.09/hr; 8 Small VMs (8 virtual cores) cost $0.72/hr; 1 Extra Large VM (8 virtual cores) cost $0.72/hr (same as 8 Small VMs). VM Sizes and Performance The VMs sizes differ not only in number of cores and RAM, but also on network I/O performance, ranging from 100 Mbps for Small to 800 Mbps for Extra Large. Extra Small VMs are rather limited in CPU and I/O power and are inadequate for workloads such as you described. For single-threaded, I/O bound applications such as describe

Categories : Azure

Search large tar.gz file for keywords,copy and delete
If the file is really 20GB it will take very long to grep in any case. The only advice I can give is to use zgrep. This will save you from having to explicitly uncompress the archive. zgrep PATTERN your.tgz

Categories : Python

Oracle PL/SQL - How do i copy a large amount of data from one table to another using oracle collections
/* package header */ CREATE OR REPLACE PACKAGE perfrormance_test AS PROCEDURE nested_table; PROCEDURE associative_array; END perfrormance_test; /* package body */ CREATE OR REPLACE PACKAGE BODY perfrormance_test AS PROCEDURE nested_table AS /* select all records from source table */ CURSOR big_table_cur IS SELECT col1 , col2 , col3 FROM big_table; /* create nested table type and variable that will hold BIG_TABLE's records */ TYPE big_table_ntt IS TABLE OF big_table_cur%ROWTYPE; l_big_table big_table_ntt; BEGIN /* open pointer to SELECT statement */ OPEN big_table_cur; /* collect data in the collection */ FETCH big_table_cur BULK

Categories : SQL

If a virtual function is called from a constructor/destructor without qualification, does virtual dispatch occur?
Yes. Any unqualified reference to a member from within its class is entirely equivalent to this->member or this->member(...) as appropriate, and therefore despatched virtually if it's a virtual function. The standard doesn't make any exceptions about calls from constructors or destructors. It does make an exception about which function is called, but not about how that is accomplished. EDIT The actual VFT mechanism used to implement this exception is described in [1]. As Lippman points out, simply erasing virtual despath is not an acceptable technique, as any indirect virtual function call called by the called virtual function is also subject to the same exception ('directly or indirectly' clause). [1] Lippman, Stanley B., *Inside the C++ Object Model,* Addison Wesley 1996,

Categories : C++

Moq a virtual ICollection<> property that has a private set : "Invalid setup on a non-virtual"
Try using either of these: mockModel.Setup(m => m.Items).Returns(listItem); mockModel.SetupGet(m => m.Items).Returns(listItem); The method SetupProperty is used when you want to track its value, see moq wiki. Although I am not enterily sure why SetupProperty fails, as its intention is to be able to assing and retrieve the property value, it seems likely to be caused by the private get. To be clear, let's assume your property has a public set. In that case when using Setup or SetupGet, doing something like mockModel.Object.Items = new List<ItemList>(); would have no effect and you would still see the list with a single item. However with SetupProperty the same statement would have changed the value returned by the property. Basically SetupProperty allows to get AND SET the

Categories : C#

sizeof derived class with virtual base and virtual function
Pointer denotes the virtual function table of Base class--4 bytes Pointer denotes the virtual function Func2() which only belongs to class Derived--4 bytes (as far as I'm concerned, derived class which has no non-virtual base classes and gets its unique virtual functions should has its own virtual table) Ah, I see the problem now. That's not quite how virtual function tables work. When Base is defined, the compiler notices it requires a virtual table, and generates a virtual table for Base, with one pointer (Func), which points to the Base::Func implementation. When Derived is defined, the compiler notices it inherits from Base, and generates a function table for Base that has two pointers, Func points to Derived::Func, and Func2 points to Derived::Func2. Then, if an insta

Categories : C++

Is it safe to call other virtual methods in virtual destructor?
It is safe if you know the rules, and the rules say that within a destructor, the dynamic type of the object is the class whose destructor is executing. While B::~B() is executing, the type of the object is B (and if you call f() then, you'll get dispatched to B::f() While A::~A() is executing, the type of the object is A, and if you call f() then, you get undefined behavior per §10.4[class.abstract]/6 Member functions can be called from a constructor (or destructor) of an abstract class; the effect of making a virtual call to a pure virtual function directly or indirectly for the object being created (or destroyed) from such a constructor (or destructor) is undefined Or, as clang++ reports it, test.cc:5:20: warning: call to pure virtual member function 'f'; overrides of 'f' in

Categories : C++

C++11 class lattice with mixed virtual and non-virtual bases?
Which of the following is the class lattice? 2 Demonstration: #include <iostream> struct B {}; struct BV : virtual B {}; struct BN : B {}; struct C1 : BV, BN {}; struct C2 : BV, BN {}; struct D : C1, C2 {}; int main() { D d; C1* c1 = static_cast<C1*>(&d); BV* bv1 = static_cast<BV*>(c1); BN* bn1 = static_cast<BN*>(c1); B* b1 = static_cast<B*>(bv1); B* b2 = static_cast<B*>(bn1); C2* c2 = static_cast<C2*>(&d); BV* bv2 = static_cast<BV*>(c2); BN* bn2 = static_cast<BN*>(c2); B* b3 = static_cast<B*>(bv2); B* b4 = static_cast<B*>(bn2); std::cout << "d = " << &d << ' '; std::cout << "c1 = " << c1 << ' '; std::cout <

Categories : C++

How virtual mechanism works in the case of virtual destructor
Just because you can't get a pointer to the destructor, doesn't mean the compiler can't for its own internal, nefarious purposes. (As a side note, the compiler often generates more than one version of the destructor, with more than one entry in the vtable, which makes it incompatible with normal function pointers.)

Categories : C++

Why doesn't compiler make a virtual function non virtual when it is possible?
Because you may create a derived class in a separate translation module. In theory this could be resolved at link time, but this would involve a lot of work, so in practice that doesn't happen (AFAIK).

Categories : C++

To create a copy of object in java w/o clone,copy constructor and copy factory
You can just create a new object for NewDog using OldDog Have you considered something like this? NewDog dog = new NewDog(someOldDogObject); While constructor of NewDog can be. public NewDog(OldDog oldDog){ this.dogWeight = oldDog.dogWeight; // keeping the same weight this.dogName = "newDog" + oldDog.dogName; // changing your dog name as per rquirement. }

Categories : Java

Virtual address space vs virtual memory
From Wikipedia articles for virtual memory and virtual address space: Virtual memory is a memory management technique developed for multitasking kernels. Virtual address space is a memory mapping mechanism available in modern operating systems. So the answer is: yes, these are quite different terms. Although they are related.

Categories : Linux



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