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

Windows Driver - How do I determine if Windows is in the process of booting, or has already booted?
I've answered a similar question elsewhere on SO. The short version is that what you're asking is not normal driver behavior, so no API exists to support this. You can add in heuristics to tell you this, but they'll remain heuristics.

Categories : Windows

Cocoa App booting splash screen
maybe you could dispatch your time consuming task to a background thread asynchronously with GCD so that the app delegate can move on: dispatch_queue_t queue = dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_HIGH, 0ul); dispatch_async(queue, ^{ // time consuming task }); UPDATE: you can call dispatch_get_main_queue() to do your onerous tasks on the main thread as opposed to the background thread if they involve changes to the UI.

Categories : Objective C

Dreamweaver change file in dual screen view
What I see from you screen grab is you are using Code Inspector - it displays your HTML in a floating window so you see your working pages in their full glory rather than have them cut in half as in Split View. Have you tried Dreamweaver's Code Split View, please read link

Categories : Javascript

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

Screen recorder in Ubuntu using python
The way you've written the code, you have to wait for each file to save before you grab the next screenshot. That's where your "very small delay" comes from. You could grab all of the snapshots in memory and then write them at the end: snapshots = [] for i in range(20): b = wx.EmptyBitmap(w, h) m.SelectObject(b) m.Blit(0, 0, w, h, s, 0, 0) m.SelectObject(wx.NullBitmap) snapshots.append(b) for snapshot in snapshots: snapshot.SaveFile('{0:05d}.png'.format(i), wx.BITMAP_TYPE_PNG) But this will use up a lot of memory—maybe enough for the malloc calls (or, worse, swap thrash) to slow you down. Another alternative is to push the write off to a background thread. (Since the work is probably I/O bound, normal Python threads should be fine here.) For example: with concurre

Categories : Python

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#

installing ubuntu 13.04 suddenly gives black screen
Check my blog on how to fix the blank screen issue with Ubuntu. It may help you. http://rameshkumarp.weebly.com/1/post/2014/05/ubuntu-1104-fixing-blank-screenissue.html

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

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

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

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

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

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

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

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

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

CI not booting except in the case of 404 responses
Did you move from CI 1.7 to 2.1 by any chance? I so I'd check to make sure that you are extending CI_Controller or CI_Model as that's a fairly large change and if I remember correctly the pages will show blank with no error.

Categories : Codeigniter

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

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

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

Booting a ppc linux kernel in qemu
Dont use nographic use below command , qemu-system-ppc -kernel vmlinux_2 -hda ss1.1.img -append "console=ttyS0 root=/dev/sda1" or qemu-system-ppc -kernel vmlinux_2 -hda ss1.1.img -append "root=/dev/sda1"

Categories : Linux

Memory allocation during linux booting?
Take a look at: http://lwn.net/Kernel/LDD3/ chapter 8 it explains the memory allocation for early booting stages. Further information about booting memory allocation can be found here: https://www.kernel.org/doc/gorman/html/understand/understand022.html This feature is used for allocating large memory chunks during the system boot up and it uses the physical rather than virtual memory. After MMU is up and running there is no possible way of accessing the memory AFAIK If you are looking for a large continues memory allocation you should probably use different allocator take a look at: http://lwn.net/Articles/396702/

Categories : Linux

Booting custom kernel in Grub2
Multiboot 2 uses a different structure than the original multiboot (namely, it uses tag structures). Here's an example header from one of my older projects: # multiboot 2 header (see http://download-mirror.savannah.gnu.org/releases/grub/phcoder/multiboot.pdf) .balign 8 mbhdr: .long 0xe85250d6 # magic .long 0 # architecture (i386, 32-bit) .long .LhdrEnd-mbhdr # header length .long -(.LhdrEnd-mbhdr+0xe85250d6) # checksum # tags # module align .word 6 # type .word 0 # flags .long 8 # size in bytes (spec says 12?) .balign 8 # loader entry .word 3 .word 0 .long 12 .long entry .balign 8 # console flags .word 4 .word 0 .long 12 .long 0x03 # EGA text support, require console .balign 8 # info reque

Categories : Assembly

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 change Android emulator booting animation
That's not part of your application, is emulating an device. Remember that each android device have it's own Start up images and icons that can be related to the carrier or the brand of the phone, etc. You cannot change that image, anyhow for what propose you want to change that?

Categories : Android

vb.net : change windows "top" of the screen
Check out the following project by Arik Poznanski http://www.codeproject.com/Articles/3728/C-does-Shell-Part-3 Take this code, compile, and add it to your project as a reference. Then in the form load Me.Edge = AppBarEdges.Top 'sets the form to dock at the top of the screen This sets it to the top of the screen with everything else below.

Categories : Windows

Windows Get Screen Resolution in C
Use GetSystemMetrics() DWORD dwWidth = GetSystemMetrics(SM_CXSCREEN); DWORD dwHeight = GetSystemMetrics(SM_CYSCREEN);

Categories : C

Windows 7/8 Screen overlay VC++
I solved the problem. I hope it will be helpful for someone: So the only problem was that i didnt bring the window to the foreground after I had drawn on it. You can do it by calling the SetWindowPos. Altough this solution isnt working on Windows 8 metro surface.

Categories : Windows

Keep track of screen change and screen resolution change in Windows Form Application to change form size
Resolution change event Code snippet (untested) public void SubscribeEvents() { SystemEvents.DisplaySettingsChanged += new EventHandler(SystemEvents_DisplaySettingsChanged); } public void SystemEvents_DisplaySettingsChanged(object sender, EventArgs e) { // Get the current resolution // Alter form size accordingly }

Categories : C#

Screen size in inches on Windows
For Windows, first see SetProcessDPIAware() for a discussion on turning off automatic scaling, and then call GetDeviceCaps( LOGPIXELSX ) and GetDeviceCaps( LOGPIXELSY ) on your HDC to determine the monitor's DPI. Divide the screen resolution on your active monitor by those settings and you've got the size. Also see this article for a similar discussion on DPI aware apps.

Categories : Windows

ASP.NET for Windows Mobile Screen Size
Have you tried to set the width and height atributes of the div element? Something like: <div style="width:250px; height: 250px;">Content</div> P.S.: IMO a responsive design would be the best option.

Categories : C#



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