w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
git - dual boot ubuntu and windows with separate data partition
I'm guessing there's an issue with line endings. You probably have commited your code with windows line endings and when you checked out the code in ubuntu git converted those to unix style line endings. Take a look at this page Dealing with line endings

Categories : Windows

How to get Windows key from disk that cannot boot?
Just for anyone having the same problem, I found this program http://www.nirsoft.net/utils/product_cd_key_viewer.html , that can find the keys also for external drives, choosing as source the WindowsSystem32configSOFTWARE file.

Categories : Misc

Programmatically determine if Windows 8 secure boot is enabled
MSinfo32.exe read the value UEFISecureBootEnabled from the registry under HKEY_LOCAL_MACHINESYSTEMCurrentControlSetControlSecureBootState. On my system SecureBoot is disabled and return value is 0. So I assume that 1 means enabled.

Categories : C#

Finding Memory Size in Boot without DOS, Windows, Linux
You will need to read the ACPI tables on a PC (or other machines that support ACPI). Note that this will not give you the total size as one number, but give you the memory size of each region of memory - on a simple machine, that may just be two or three regions (there are holes of "not real memory" at the 0xA0000-0xFFFFF and wherever the BIOS decides to put the "PCI-hole"). I suspect it won't be entirely trivial to fit the ACPI reader into a single sector, considering some of the boot sector only has around 400 bytes of space available (although if you completely skip the partition table, I suppose you can use almost all of the 512 bytes). As to "how to call C/C++", you will not be able to fit any meaningful C or C++ program in less than several sectors. You will need to take a look

Categories : C++

All files unstaged in Ubuntu, but not Windows
This sounds like a CRLF issue. Windows uses CRLF to denote end-of-line while Linux uses just LF. Git uses just LF natively. When you switch from Windows to Linux, git sees the files as changed because it doesn't think it has to convert the CRLF that ends every line to LF and thus the files get extra CR characters. See this blog post on the subject for an extensive discussion. This is all controlled by the core.eol config option. Typically, this is set to native, which tells git to use your OSes EOL convention. Your best bet is to create a .gitattributes file as the post specifies, telling get to use LF regardless of the OS.

Categories : GIT

Moving from Qt 4.x (Ubuntu Linux) to Qt 5.1 (Windows 7)
Use this in your .pro file. QT += ... greaterThan(QT_MAJOR_VERSION, 4): QT += widgets The Qt modules have been rearranged somewhat in Qt5. Also this will teach for leaving Linux!

Categories : C++

compiling .py into windows AND mac executables on Ubuntu
From the pyinstaller FAQ: Can I package Windows binaries while running under Linux? No, this is not supported. Please use ​Wine for this, PyInstaller runs fine in Wine. You may also want to have a look at ​this thread in the mailinglist. In version 1.4 we had build in some support for this, but it showed to work only half. It would require some Windows system on another partition and would only work for pure Python programs. As soon as you want a decent GUI (gtk, qt, wx), you would need to install Windows libraries anyhow. So it's much easier to just use Wine. In other words, you cannot simply run a command in Linux to build a Windows executable (or a Mac executable for that matter) like you are trying to do. The workaround they have provided for Windows (and o

Categories : Python

remote accessfrom windows 7 to ubuntu
Why don't you just use "team viewer". It's a program that can be installed in Ubuntu I personally have it... and it's crossed platform between Windows, Mac's and Android/ apple devices... No hassle between connection and all it requires is a password to access from one system to another. http://www.teamviewer.com/en/index.aspx

Categories : Ubuntu

Node.js and Express - different result Windows 7 vs Ubuntu 13.04
Windows command line doesn't like the use of single quotes. I haven't tried this, but I believe this will work: curl -X POST -H "Content-Type:application/json" -d "{"type":"server","name":"SERVER1"}" The single quotes have been replaced with double quotes and the internal double quotes have been escaped. Update I was able to get this working on my local windows 7 (64bit) machine: C:>f:utilcurl.exe -X POST -H "Content-Type:application/json" -d "{"type":"server","name":"SERVER1"}" http://localhost:3000/ { "status": "SUCCESS" } curl version (just downloaded from http://curl.haxx.se/) C:>f:utilcurl.exe --version curl 7.31.0 (x86_64-pc-win32) libcurl/7.31.0 Protocols: dict file ftp gopher http imap ldap pop3 rtsp smtp telnet tftp Features: AsynchDNS GSS-Negotiate Largefile NT

Categories : Node Js

VT-X on windows 7 cannot be recognized by Guest OS(Ubuntu 12.04) with virtualbox
Thanks for answering, I finally installed Ubuntu 12.04 with windows7 on the same hard disk. As for my issue, virtualbox don't support full virtuallization, so I could not see any VMX feature in my Guest OS, but vmware do, which suits me well.

Categories : Linux

Is there a way I can access my Rails Application of my Ubuntu VM from my Windows 7?
Yes, you can: You need a Bridged adapter for your Virtual Machine You need to know your VM's IP address (ifconfig | grep inet on Ubuntu) Your VM needs to be turned on AND running the server Then in your Windows 7 (or other computer in your local network, your smartphone for instance) you can open a browser and go to your VM's IP address + port (usually 3000). So, the address to put in your browser might look like this: http://192.168.1.5:3000/

Categories : Ruby On Rails

cross compilation application qt from Windows to ubuntu
You cannot cross-compile to "Linux", because that's not an OS. Certain system-level libraries and interfaces differ from distribution to distribution, making it nearly impossible to get a one-binary-covers-all. Setting up a cross-compiler is generally a pain in the... nuts, and for Linux->Windows, there is no free alternative (a Windows license isn't free). For Windows->Linux, you can install the distribution you are targetting and compile it natively (perhaps in a virtual machine). This guarantees compatibility with the OS you're targetting and is much more reliable than cross-compiling.

Categories : Qt

How to harmonize Eclipse projects between Windows and Ubuntu?
Did you add the jar to the library as an external jar? That would be the path it stores, then. Use a variable instead if you have to add it manually: http://help.eclipse.org/juno/topic/org.eclipse.jdt.doc.user/reference/preferences/java/buildpath/ref-preferences-classpath-variables.htm?cp=1_4_2_0_1_0 . It's possible, though, that if this is part of Java 7, you just need the latest version of Eclipse--it supports Java 7 explicitly.

Categories : Windows

X11 Forwarding Error on Ubuntu, Though It Works On Windows
I solved it - it was an authentication issue. Executing the following line on Server resolved the issue: $ xauth add ${client_ip}:0 . ${hex_key} xauth: creating new authority file /homes/${username}/.Xauthority where ${client_ip} is the client with X server running, ${hex_key} is the 32-character hex string. Afterwards upon assinging the $DISPLAY env variable I can now connect successfully.

Categories : Ubuntu

Pyimgur code works on Windows, not on Ubuntu
OK, so I have found a solution. The solution was a change in requests module, which probably came along with updated flask or something, so the old method didn't behave like it used to. I updated the requests as well on my VPS (forgot to do it when upgrading flask), and the issue is now solved.

Categories : Python

Vectors in C++ are behaving differently in Windows and Ubuntu
The problem has to be in: r1->GetSchema().GetAttrTypes(); This function must be mucking about with how it's std::string's are created. Can you show us the code?

Categories : C++

Is it possible to use a virtual machine created for a particualr OS in ubuntu in windows as well?
Yes. Hurry... your question will be frozen soon by the mods here :) All the best buddy. Detailed answer here; http://superuser.com/questions/399105/is-a-vdi-file-for-virtualbox-cross-platform

Categories : Windows

Unable to connect to Mongodb which is on windows server from ubuntu using php
A few comments: Please use new MongoClient instead of new Mongo. This should not output anything at all. You're just selecting a database and assigning it to a variable. Is that your whole code snippet? What did you expect the output to be? To figure out what is actually happening under the hood with connections you can use MongoLog. With this functionality you can track down what the driver is doing internally. You'd use it like: MongoLog::setLevel(MongoLog::ALL); MongoLog::setModule(MongoLog::RS); MongoLog::setCallback( 'printMsgs' ); function printMsgs($a, $b, $msg) { echo $msg, " "; }

Categories : PHP

Printing issue with Hindi Unicode on Windows and Ubuntu both
If I copy and paste 'ज़िन्दगी' into microsoft word, by default, it shows like this: It's actually the exact same string of unicode characters (that is, a िन followed by a virama, followed by a द), but it's just rendered in different ways, depending on the font. Unicode fonts have complex logic for deciding when to substitute a certain string of characters for a different glyph, and the font being used by your PDF doesn't support the particular substitution you want. You just have to find a font that does support that substitution, and make sure that your PDF is using that font. (It might be the case that your current setFont call isn't working correctly, or the font you specify isn't available at the time you set it, so it uses the system's default font for hindi

Categories : PHP

Header location issues while porting Qt code from Windows to Ubuntu
It looks like the original Qt code uses Qt5, QtWidgets/QApplication rings the bell from me [1] and you are pointing to Qt4 in Ubuntu. You should try to install Qt5 in Ubuntu. [1] http://qt-project.org/doc/qt-5.0/qtwidgets/qtwidgets-index.html

Categories : C++

Failure installing meteor on ubuntu 13.04 running from usb on windows machine
You said you tried direct install on Windows, but gave no details - it should work fine. What was the problem? Which version of Windows are you using? You can use either an MSI install or an Exe installer from: https://github.com/sdarnell/meteor/wiki/Windows

Categories : Ubuntu

atoi conversion segmentation fault working on windows but not in ubuntu
From the code you've shown, vector[i+1].c_str() will read beyond the end of vector for the last iteration of the loop. Should you exit your loop one iteration sooner? for(int i=0; i<vector.size()-1;i++) If this doesn't help, can you post a fuller example that demonstrates the problem? It isn't currently possible to say whether e.g. vector2 has sufficient capacity or vector's contents will always be convertible into suitable indexes.

Categories : C++

No incomming connection from XDebug on Ubuntu VirtualMachine to PhpStorm on Windows host
Briefly, the fix for my problem was this: enable xdebug.remote_log (where I could check for connection attempts and identify the exact IP to which xdebug was trying to connect) - [this was the key] removed/set to 0 xdebug.remote_connect_back (because it overwrites remote_host with $_SERVER['REMOTE_ADDR']) set the proper xdebug.remote_host removed extension=xdebug.so an loaded xdebug using only zend_extension So, every time, do not forget to check the logs if exists! :) Thanks to LazyOne for very helpful hints!

Categories : PHP

D3.js rendered page crashes on all major browsers on Mac but doesn't crash on Windows or Ubuntu
**Here's more of the crash report** Process: WebProcess [239] Path: /System/Library/PrivateFrameworks/WebKit2.framework/WebProcess.app/Contents/MacOS/WebProcess Identifier: com.apple.WebProcess Version: 8536 (8536.30.1) Build Info: WebKit2-7536030001000000~9 Code Type: X86-64 (Native) Parent Process: ??? [237] User ID: 501 Date/Time: 2013-07-23 09:47:09.948 -0700 OS Version: Mac OS X 10.8.4 (12E55) Report Version: 10 Interval Since Last Report: 15004 sec Crashes Since Last Report: 5 Per-App Interval Since Last Report: 3920 sec Per-App Crashes Since Last Report: 1 Anonymous UUID: B207ABFE-2713-74A6-B3B1-725AF872DA13 Crashed Thread: 0 Dispatch queue: com.apple.main-thread Ex

Categories : Osx

Dual divs on the same place
When I click on About me the "slide down div" will slide down and show the about me section. And when I click on contact the contact section will be showed...) How can I make this, and I'm a beginner when it comes to coding and hopefully this can be solved with a simple line of code... Actually, this can be done with a simple line of code! Change your "About me" link to this: <a href="#AboutMe">About Me</a> And, create a div like this: <div id="AboutMe">This is about me!</div> When you click the link, your browser will scroll to the AboutMe div. JsFiddle: http://jsfiddle.net/NmrbP/11/

Categories : Javascript

three.js dual viewports only one displays
Needed the following statement (in the javascript init function) to prevent renderer clearing its buffer after rendering the first viewport:- renderer.autoClear = false

Categories : Javascript

Function dual to std::move?
If you can manipulate T you could template the constructor. #include <iostream> using namespace std; class B { int x; public: B (int i) : x(i) { } B (B && b) : x(b.x) { cout << "B moved (" << x << ")" << endl; } B (B const & b) : x(b.x) { cout << "B copied (" << x << ")" << endl; } }; class A { B b; public: template<typename TB> A (TB && init_b) : b(std::forward<TB &&>(init_b)) { } }; B foo (void) { B x(3); return x; } int main (void) { A a1(foo()); B b1(4); A a2(b1); return 0; } Prints B moved (3) B copied (4) As far as I understand reference collapsing you should come out with a constructor A(B&) forwarding to the copy constructor of B and a A(B&&a

Categories : C++

Dual authentication mode
It is possible technically. The classic Mode doesn't requires much effort and can be implemented more or less easily. However when in integrated mode , some careful work is required to achieve the same. Check one post here which may be of help to you for getting started.

Categories : Asp Net

column pk dual varchars or int?
If you add a surrogate autoincrement integer column, you still need a unique index on the JobID, SubJobID columns. This is the natural primary key. It may not add much value except using more disk and memory to store the extra column. Saying that, if the composite (JobID, SubJobID) index is used in child tables as a foreign key, it can make more sense to use one. 10000 rows here could have 10 million child rows: then the varchar overhead matters. However, there is no truth in anything you read that says Thou shalt always have an identity/autoincrement primary key It is an implementation decision for performance depending on the design.

Categories : SQL

Has anyone had success with ADT on a (dual-booted) Chromebook?
Are you sure you installed the driver correctly? If so, try switching Nexus 7's usb mode from storage mode to pics transfer??/view?? mode(forgot the exact name here). Hopefully it does help.

Categories : Android

Dual use of composite foreign keys
Here's what you started with. CREATE TABLE medication ( "id" INTEGER NOT NULL, -- You don't need this. "therapy_id" INTEGER NOT NULL, "day" INTEGER NOT NULL, "revision" INTEGER NOT NULL, "substance" VARCHAR(100), "dosage" VARCHAR(50), PRIMARY KEY (id), -- Drop this. FOREIGN KEY(therapy_id, day, revision) REFERENCES day (therapy_id, day, revision), -- Ok, but should be PK. FOREIGN KEY(therapy_id) REFERENCES therapy (id) -- You don't need this. ); The column "id" serves no useful purpose, and has instead convinced you that you don't need a unique constraint on the real key: {therapy_id, day, revision}. Replace the useless primary key constraint on "id" with a primary key constraint on {therapy_id, day, revision

Categories : SQL

Highcharts - Dual yAxis not displaying
You've got two problems I can see right off the top: 1.) You haven't assigned any series to plot against the 2nd y axis. yAxis: 1 2.) You have a right margin of -4, which is suppressing the drawing of the right y axis. marginRight: -4, // where's the axis going to draw if it doesn't have space? Updated fiddle.

Categories : Javascript

Formatting column name in dual table
Try this SELECT 'HELLO WORLD' as HELLOWORLD FROM dual; or SELECT 'HELLO WORLD' as "HELLO WORLD" FROM dual; See SQL Fiddle

Categories : SQL

Best Practice for Dual Layouts in Rails 3
It seems to me an admin might be doing different things with a user than an end user would be doing so different controllers may not be completely unDRY. However, if they are completely the same and you just want to have a different layout, then you can just set your layout based on the current user. Something like this would work: layout :determine_layout def determine_layout return 'admin' if current_user && current_user.admin? 'application' end

Categories : Ruby On Rails

Dual play frameworks on the same system
There is answer for similar problem dedicated for mac/unix. In Win you can create symlinks pointing to the proper version of Play directly in the instance folder

Categories : Java

Get selected values in a dual listbox PHP
This is the weird code: function listbox_selectall(listID,isSelect) { var listbox=document.getElementById(listID); for(var count=0;count<listbox.options.length;count++) { istbox.options[count].selected=isSelect;//<-- ? } } Maybe, you wanted to say: listbox.options[count].selected=isSelect; You said, that only 1 value from "destination" is submitted to PHP. To allow multiple values to be submitted, add [] to the names of the <select>-s: <SELECT id="s" size="10" name="source[]" multiple> <SELECT id="d" size="10" name="destination[]" multiple> Also, there is no need to use name attribute for options. You don't use it anywhere.

Categories : PHP

qt dual-stack ipv4 & ipv6 application
Definitely create a local IPv6 network environment. A lot of things work the same in IPv6 as in IPv4, but a lot of other things are different. When developing applications that use IPv6 you should have some hands-on experience. You wouldn't expect someone who has never used IP to develop an application that uses IPv4, would you? Some key differences: IPv6 addresses are written in hexadecimal IPv6 hosts will probably have multiple addresses An IPv6 address that starts with fe80:This is the link-local address. Every IPv6 hosts has one for every interface it has. Link-local addresses exist on every link (ethernet segment, LAN) and they use the same address range on each LAN. It is therefore impossible to route them, but they are very useful when communicating only within the LAN. One or m

Categories : Qt

Duplicate a pop window display on dual monitors
My guess is the only way to do it is to use JavaScript to generate two popups and then use CSS to push the popups to the correct locations. The problem I would think you are going to run into is knowing whether or not you have two displays to manage or not.

Categories : Javascript

Dual-parent nested resources or is polymorphism right for me?
I would use polymorphic: routes.rb resources :students do resources :evaluations end resources :goals do resources :evaluations end models/evaluation.rb class Evaluation < ActiveRecord::Base attr_accessible :some_attribute belongs_to :evaluable, polymorphic: true end models/student.rb class Student < ActiveRecord::Base attr_accessible :some_attribute has_many :evaluations, as: :evaluable end models/goal.rb class Goal < ActiveRecord::Base attr_accessible :some_attribute has_many :evaluations, as: :evaluable end your relation between goal and student will look like: id evaluable_id evaluable_type other_field 1 4 'Goal' 'other goal content 1' 2 1 'Student' 'other student content 1' 3

Categories : Ruby On Rails

how to evaulate 2 queries output data into one with dual
When you union two result sets the column names in the combined set are taken from the first branch of the union. You've effectively got: select statusA from test union select statusB as statusA from test1 So there is no statusB to work with in the result set. You maybe want to do something like: select case when (select nvl(max(statusA), 'N') from test) = 'N' and (select nvl(max(statusB), 'N') from test1) = 'N' then 'N' else 'Y' end from dual Though I'm not quite sure if you expect a single value from each table, and quite what you're trying to do. OK then, with an ID value linking the two tables, and with a given ID being in one or both of the tables, you can use a full outer join: select coalesce(t.id, t1.id) as id, t.statusa, t1.statusb, case when nvl(statusa, 'N') = 'N

Categories : SQL



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