windows-10

How to use boost asio library with Cygwin 64 bit

萝らか妹 提交于 2019-12-04 13:35:15
I am running Windows 10 64bit. Cygwin is 64 bit. I installed boost from cygwin package manager. I tried to compile test.cpp: #include <boost/asio.hpp> int main(int argc, char**argv) { return 0; } using command g++ -std=c++11 -Wall -g -D__USE_W32_SOCKETS D_WIN32_WINNT=_WIN32_WINNT_WIN7 test.cpp -o test.exe but compile fails. It looks like posix is being used . Any ideas why this fails? In file included from /usr/include/boost/asio/detail/fd_set_adapter.hpp:22:0, from /usr/include/boost/asio/detail/select_reactor.hpp:27, from /usr/include/boost/asio/detail/reactor.hpp:29, from /usr/include/boost

Windows API to access case-sensitive paths (Bash-on-Ubuntu-on-Windows)

泪湿孤枕 提交于 2019-12-04 13:17:10
Bash-on-Ubuntu-on-Windows supports case-sensitive file paths. This means that I can create two files or directories with names only differing in capitalization. I have issues accessing those files, though. Running bash -c "touch Magic ; mkdir magic ; echo Secret! > magic/secret" Creates a file names Magic , a directory named magic and a file names secret in that directory. bash -c "ls -lR" yields .: total 0 drwxrwxrwx 2 root root 0 Aug 23 10:37 magic -rwxrwxrwx 1 root root 0 Aug 23 10:37 Magic ./magic: total 0 -rwxrwxrwx 1 root root 8 Aug 23 10:37 secret (I am not sure why I get root , as it

Programmatically Change Windows 10 Lock Screen Background (on Desktop)

只谈情不闲聊 提交于 2019-12-04 13:12:40
问题 How can I programmatically change/set the lock screen background image (using VB.NET, C# or Visual C++)? I am using Win 10 Pro and have Visual Studio 2017 Pro. I've had a look online but most solutions don't seem to work. For example: Both Change Win 10 Lockscreen Image Mutiple Times C# WPF and Change Windows Lock Screen background image in C# provide sample code but the imports System.Windows.Media.Imaging , Windows.Storage , Windows.Storage.Streams , Windows.System.UserProfile cannot be

restart via code on windows 10 uwp

烂漫一生 提交于 2019-12-04 13:05:48
We've created a Windows 10 application that runs on tablets in Windows 10 kiosk mode. It works just fine, however, the wifi connection gets lost sometimes since the locations are very remote. We tried fixing the issue from the networking side, but when the devices lose and regain internet access the application will still hang as if it doesn't have internet access displaying a blank page. Where these devices are used, they are bolted into the wall to prevent theft. Which means if we want to reboot its very time consuming as we have to unscrew the cases off the wall and then open the cases to

How does x:Bind compare with the classical Binding, put as concisely as possible?

邮差的信 提交于 2019-12-04 12:34:58
How is the compiled binding, x:Bind, different from the classical Binding, put as concisely as possible? Compared with the classical binding you cannot use the following binding attributes with x:Bind : ElementName , RelativeSource , Source and UpdateSourceTrigger . Well, that almost sums up the limitations of x:Bind but x:Bind is powerful in its own right -- the notable one being compiled binding and hence the performance gain as a result. See last bullet point for another powerful thing in x:Bind 's armory. One important point to always remember: the data context of x:Bind is the code-behind

Dapper type mapping hangs in Windows 10 for large queries

两盒软妹~` 提交于 2019-12-04 12:12:18
I have a very simply query in my projects that returns ~1.3 million rows: var aliases = ctx.Query<sec_entity_alias>(@"select * from sec_entity_alias"); The class that is mapped to is: public partial class sec_entity_alias { public int id { get; set; } public int sec_entity_id { get; set; } public byte sec_entity_alias_type_id { get; set; } public string symbol { get; set; } public virtual sec_entity_alias_type sec_entity_alias_type { get; set; } } When I run the query it hangs indefinitely and pegs the CPU. When I remove the dapper type mapping and instead run the following, the query returns

Flyout or Popup to display addition info

情到浓时终转凉″ 提交于 2019-12-04 12:09:56
I want display popup on top my app with additional information, my info is Listview with ~500 items I've tried both: problem with flyout -> it has probably scrollViewer inside so my listview doesn't Virtualize correctly everything else is ok. There is my code: Flyout myFlyout = new Flyout(); myFlyout.Placement = FlyoutPlacementMode.Full; myFlyout.Content = myListView; myFlyout.ShowAt(this); problem with popup -> it isn't centered, verticalAlignment doesn't work, horizontal neither Popup myPopup = new Popup(); myPopup.Child = myListView; myPopup.IsOpen = true; So which way should I go, try to

Launching windows 10 store apps

此生再无相见时 提交于 2019-12-04 12:07:32
问题 I am looking for a way to launch/run windows store apps on windows 10/8.1 from C#. Examples of the apps I am trying to run are Calculator Photos Settings Note: in Windows 10 these are no longer standard .exe files that can be executed by double clicking or calling Process.Start() as they are now windows store apps. I have tried to use IApplicationActivationManager but I cannot find decent documentation with examples of how to use it. 回答1: There are several ways to do it. The easiest way is to

Jupyter notebook will not open from command prompt

北慕城南 提交于 2019-12-04 11:57:23
I am trying to work with Jupyter notebook on Windows 10 (64-bit). I downloaded Anaconda3 5.0.1. Now I should be able to open the jupyter notebook from the command prompt by typing jupyter notebook. However I get the following error: The only way I am able to open jupyter notebook is from the Anaconda navigator. However, I would like to change the directory from which the notebook opens and none of the solutions here How to change the Jupyter start-up folder work if I cannot open jupyther from the command prompt. I have already tried uninstalling and reinstalling anaconda, but that did not

SerialPort.GetPortNames() returns incorrect port names

限于喜欢 提交于 2019-12-04 11:11:48
问题 While c# is not my primary programming language, I'm maintaining such a program for a couple of years now. This program connects to a device on a serial port and works from Windows XP up to 8.1. One specific "feature" is that it uses .NET Framework 2.0. With some users upgrading to Windows 10 we've got complains that the program cannot detect/open the COM port of the device. We have confirmed this on our own test systems with clean Win10 installation. It turns out that the function SerialPort