You are using pip3 to install flask-script which is associated with python 3.5. However, you are trying to upgrade pip associated with the python 2.7, try running pip3 install --upgrade pip. It might be a good idea to take some time and read about virtual environments in Python. It isn't a best practice to install all of your packages to the base python installation. This would … [Read more...]
Eclipse “Error: Could not find or load main class”
If you create a java class with public static void main(String[] args), Eclipse will run that main method for you by right clicking on the file itself, or on the file in the project explorer, then choosing: "Run As" -> "Java Application." Once you do this, Eclipse stores information about your class, so you can easily run the class again from the Run As menu (Green Play … [Read more...]
JSON parsing error syntax error unexpected end of input
I can't say for sure what the problem is. Could be some bad character, could be the spaces you have left at the beginning and at the end, no idea. Anyway, you shouldn't hardcode your JSON as strings as you have done. Instead the proper way to send JSON data to the server is to use a JSON serializer: data: JSON.stringify({ name : "AA" }), Now on the server also make sure that … [Read more...]
Floating Point Exception C++ Why and what is it?
A "floating point number" is how computers usually represent numbers that are not integers -- basically, a number with a decimal point. In C++ you declare them with float instead of int. A floating point exception is an error that occurs when you try to do something impossible with a floating point number, such as divide by zero. for (i>0; i--;) is probably wrong and should … [Read more...]
Does Python have a string ‘contains’ substring method?
You can use the in operator: if "blah" not in somestring: continue If it's just a substring search you can use string.find("substring"). You do have to be a little careful with find, index, and in though, as they are substring searches. In other words, this: s = "This be a string" if s.find("is") == -1: print("No 'is' here!") else: print("Found 'is' in the … [Read more...]
How to assign multiple classes to an HTML container? [closed]
Just remove the comma like this: From the standard 7.5.2 Element identifiers: the id and class attributes Attribute definitions id = name [CS] This attribute assigns a name to an element. This name must be unique in a document. class = cdata-list [CS] This attribute assigns a class name or set of class names to an element. Any number of elements may be assigned … [Read more...]
filename.whl is not supported wheel on this platform
cp33 means CPython 3.3 you need scipy‑0.15.1‑cp27‑none‑win_amd64.whl instead. This can also be caused by using an out-of-date pip with a recent wheel file. I was very confused, because I was installing numpy-1.10.4+mkl-cp27-cp27m-win_amd64.whl (from here), and it is definitely the correct version for my Python installation (Windows 64-bit Python 2.7.11). I got the "not … [Read more...]
How do I make a placeholder for a ‘select’ box?
A non-CSS - no JavaScript/jQuery answer: Select your option Durr I just stumbled across this question, and here's what works in Firefox and Chrome (at least): Please Choose... Open when powered (most valves do this) Closed when powered, auto-opens when power is cut The Disabled option stops the being selected with both mouse and … [Read more...]
What is an ORM, how does it work, and how should I use one? [closed]
Introduction Object-Relational Mapping (ORM) is a technique that lets you query and manipulate data from a database using an object-oriented paradigm. When talking about ORM, most people are referring to a library that implements the Object-Relational Mapping technique, hence the phrase "an ORM". An ORM library is a completely ordinary library written in your language of choice … [Read more...]
CSS Font Border?
There's an experimental CSS property called text-stroke, supported on some browsers behind a -webkit prefix. h1 { -webkit-text-stroke: 2px black; /* width and color */ font-family: sans; color: yellow; } Hello World Another possible trick would be to use four shadows, one pixel each on all directions, using property text-shadow: h1 { /* 1 pixel black … [Read more...]