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

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

Windows batch script unable to find the path for library through windows scheduler
You could Replace . in your CLASSPATH with D:CPPschedulerJOB_REPORTS_MAIL if you just ran the compiled code. However, you compile the code each time the script runs, and these lines: javac Constants.java javac DBUtility.java probably depend upon the current working directory being D:CPPschedulerJOB_REPORTS_MAIL, so I don't think you'll be able to get around changing into that directory (unless you modify your build process, e.g. by using ant). Why do you want to avoid changing the directory anyway? If you're concerned about the working directory being different after the script runs, you could use pushd and popd instead of cd: @echo off pushd "D:CPPschedulerJOB_REPORTS_MAIL" javac ... ... java -cp ... popd but that doesn't really matter for a scheduled task. And why do you want a

Categories : Batch File

Windows script seems to be unable to create excel files if run from the windows scheduler
I found out what the problem is. Apparently the scheduled task can only work if the 'run only when the user is logged in' radio button is checked, because Excel hangs at attempts to save the file if the user is not logged in. This is a pain because it means I will need to leave the user logged into the machine for this scheduled task to work.

Categories : Excel

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

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++

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#

Are Windows-GUI calls (creating visible windows, etc.) allowed in a Windows-Service?
GUI elements from a Windows Service are shown on Session 0. On Windows XP & 2003, users were allowed to log in to Session 0 and interact normally with the windows created by a service, but Microsoft put a knife in the heart of interactive services in Vista (and beyond) by isolating Session 0. So, to answer your specific questions: Is a process running in the context of a Service (the Service itself or any process it starts) "allowed" to make Windows API calls that display a visible GUI? Will most Windows API calls (e.g. creating and showing a window, using Shell_NotifyIcon, etc.) behave the same in the invisible session of the service? Yes, GUI calls are allowed and should succeed as normal. The only notable exceptions that I know of are those related to tray icons b

Categories : Windows

Deleting Windows DNS PTR entries with dnscmd
First you have those pages. I don't know what /CreatePTR does but it seems it doesn't exist in the latest windows server version. Anyway, I don't think this should be different than deleting a normal record. Sorry for just using hyperlinks.

Categories : Windows

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

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++

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

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

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++

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

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

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

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

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

ADO application compiled in Windows 7 runs in Windows 7 does not run in Windows XP, msado15.dll
I have found the solution. See the bolded section for my exact solution, although this may also solve others. (Taken from this website) Notes •Consider the scenario where you are a C++ developer, and you include the following line of code in the application: #import msado15.dll Consider the scenario that you are not using MSJRO, and you recompile the application on Windows Vista, on Windows Server 2008, or on later versions of Windows. The compiled application must run in Windows Vista, in Windows Server 2008, or in later versions of Windows. In this scenario, you must change #import msado15.dll to the following: #import msado60.tlb Consider the scenario that you are using MSJRO, and you recompile an application that must run in Windows Vista, in Windows Se

Categories : C++

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

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

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++

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++

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

Deleting Grid View Row data wrongly Windows Form My Code Attached?
You need to clear the grid view data source before bind it.Please Refer this link to clear grid view. try this code Datagridview remove all columns public void FillCompanyInfo() { dataGridView1.DataSource = null; dataGridView1.Columns.Clear(); dtCompanyInfo = GetCompanyInfo(); if (dtCompanyInfo.Rows.Count > 0) { dataGridView1.DataSource = dtCompanyInfo; DataGridViewCheckBoxColumn checkColumn = new DataGridViewCheckBoxColumn(); checkColumn.Name = ""; checkColumn.HeaderText = "Select"; checkColumn.Width = 50; checkColumn.ReadOnly = false; checkColumn.FillWeight = 10; //if the datagridview is resized (on form resize) the checkbox won't take up too much; va

Categories : C#

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

How to create Windows Phone 8 app package for windows store using VS Express 2012 for windows phone?
If I understand correctly, you're hoping to publish a Windows Phone 8 app to the Windows Store (on Windows 8)? Publishing to each store (phone/Windows) is a separate process, requiring different projects, and as you've seen, different versions of Visual Studio Express 2012. There's an helpful Windows Phone 8 and Windows 8 App Development Dev Center for guidance on doing this, and a recent article by Doug Holland on "Sharing Code between Windows Phone 8 and Windows 8 Applications" that should help as well.

Categories : Windows Phone 8

System.Windows.Controls.WebBrowser, System.Windows.Threading.Dispatcher, and a windows service
Maybe the Webbrowser Control needs Desktop Interaction for rendering the content: My feeling say that using WPF controls and in particular particulary the Webbrowser-Control (=Wrapper around the IE ActiveX control) isn't the best idea.. There are other rendering engines that might be better suited for this task: Use chrome as browser in C#?

Categories : Wpf

Unable to switch among the windows
One probable solution is to use JavascriptExecutor.executeScript() method to run a javascript code and handle the pop up window without switching into pop up window. For example, from parent window of pop up window, run a javascript code which is something like this. JavascriptExecutor exec = (JavascriptExecutor)driver;exec.executeScript("var popup = <<popupopener function>>; //operate on popup object to manipulate the markup of pop up window");

Categories : Selenium

Windows Workflow Foundation v4.5: Receives within ParallForEach activity causes duplicate bookmark name error
It seems that this is the expected behavior. To resolve this issue, instead of running multiple instances of the same activity within ParallelForEach, the workflow starts multiple instances of anther workflow. Therefore, ParallelForEach is no longer need, since individual workflow instances can run in parallel.

Categories : C#

How to remove duplicate words from a plain text file using unix commands on windows
Put the words on different lines in your file, say, f1.txt. You may refer to How to replace a character for a newline in Vim? for this. Then execute command "sort -u f1.text > f2.txt" Combine the words of f2.txt into a line or lines if required.

Categories : File

Unable to install socket.io on my windows using npm
Tried it with npm 1.3 and works. Try clearing npm cache with npm cache clean Hope that helps. when all else fails, clear you cache

Categories : Node Js

Unable to use fugitive.vim on gVim on Windows 7
I have found it difficult to get fugitive working on Windows. I do have a few things for you to try, found using :h plugin. :echo has("eval") If this returns 0, your build of vim/gvim does not support plugins. :echo g:loaded_fugitive If this returns an error, vim did not spot your plugin during start, check :h plugin for correct directories to install to. If this returns 1, as mine did and it still did not work, try adding set shellslash to your .vimrc file. This got mine working.

Categories : Vim

Unable to connect to windows shares
I'm not sure if this helps in your case, but it works for me: The 3rd parameter to the SmbConnection should be (I think) the client_machine_name, so I pass there what I get from socket.gethostname(). I'm not using the sign_options and is_direct_tcp I just leave the default values. This works for me with both samba and windows shares (I just have to pass a different port number sometimes). Here is the code I use: class Smb(object): def __init__(self, username, password, server, share, port=139): # split username if it contains a domain (domainusername) domain, username = username.split('\') if username.count('\') == 1 else ('', username) # setup data self.domain = str(domain) self.username = str(username) self.password = str(pas

Categories : Python

Unable to deploy SWT WebStart app on windows 64 bit
Can this problem arise from an incorrect/incomplete manifest file? I think it is instead caused by having the SWT jars mentioned in the manifest at all. Anything mentioned in the Class-Path of the manifest will be provided to every application, regardless of 32/64 bit. Being provided with 2 jars is confusing the class loader, which will probably attempt to load the method from the 1st Jar on the class-path that contains it. Instead reference the SWT Jars in resource sections in the JNLP that are delineated by architecture. That way, each architecture will be provided with only the jars it actually needs (they will be added to the run-time class-path).

Categories : Java

Unable to debug Windows Service
You may try to include this in the OnStart method: while(!System.Diagnostics.Debugger.IsAttached) { System.Threading.Thread.Sleep(100); } Then, manually attach to the process from the Visual Studio menu: Debug - > Attach to Process. Also, please note that in the Remarks section of the Debugger.Launch Method topic is stated that: If a debugger is already attached, nothing happens.

Categories : C#



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