How to fix: “UnicodeDecodeError: ‘ascii’ codec can’t decode byte”
How to fix it? In some other python-based static blog apps, Chinese post can be published successfully. Such as this app: http://github.com/vrypan/bucket3. In my site http://bc3.brite.biz/, Chinese post can be published successfully.
In CSS what is the difference between “.” and “#” when declaring a set of styles? [duplicate]
Yes, they are different… # is an id selector, used to target a single specific element with a unique id, but . is a class selector used to target multiple elements with a particular class. To put it another way: #foo {} will style the single element declared with an attribute id=”foo” .foo {} will style all elements with an attribute class=”foo” (you can have multiple classes assigned to an element too, … Read more
How do I get countifs to select all non-blank cells in Excel?
Use a criteria of “<>”. It will count anything which isn’t an empty cell, including #NAME? or #DIV/0!. As to why it works, damned if I know, but Excel seems to understand it. Note: works nicely in Google Spreadsheet too
How do I stop Notepad++ from showing autocomplete for all words in the file
I’m trying to use Notepad++ with the Progress programming language. I have installed the language definition in %APPDATA%\Roaming\Notepad++ as userDefineLang.xml and syntax highlighting is working correctly. I’ve put a file in the notepad++ Plugins\APIs directory named progress.xml, but the contents are not recognized by Notepad++. I’ve also removed all the other language files from that directory and Notepad++ still shows the exact … Read more
How to turn on line numbers in IDLE?
Version 3.8 or newer: To show line numbers in the current window, go to Options and click Show Line Numbers. To show them automatically, go to Options > Configure IDLE > General and check the Show line numbers in new windows box. Version 3.7 or older: Unfortunately there is not an option to display line numbers in IDLE although there is an enhancement request open for this. However, … Read more
What does the host name “ww8” stand for in URLs
This is a subdomain system to identify subdomains. ww8 means that is the 8th subdomain. This system is used to balance load on the server side
Sorting Linked List C++ with pointers
I have been struggling for hours on end with this problem. My goal is to sort a linked list using only pointers (I cannot place linked list into vec or array and then sort). I am given the pointer to the head node of the list. The only methods i can call on the pointers … Read more
I have a string with “\u00a0”, and I need to replace it with “” str_replace fails
Works for me, when I copy/paste your code. Try replacing the double quotes in your str_replace() with single quotes, or escaping the backslash (“\\u00a0”).
How to shuffle a std::vector?
From C++11 onwards, you should prefer: Live example on Coliru Make sure to reuse the same instance of rng throughout multiple calls to std::shuffle if you intend to generate different permutations every time! Moreover, if you want your program to create different sequences of shuffles each time it is run, you can seed the constructor of the random engine … Read more