If your text input with typeahead.js is not letting you use the enter key, you need to add a submit button (if you don't already have one).
You can hide it if you want:
<input type="submit" value="Submit" style="display: none">
I’ve always used WinSCP to transfer files between my Windows development environment and Ubuntu. It worked pretty well. All you had to do was open the file with your editor by clicking the file in WinSCP, and when you saved the file it would save to the server in the background.
The main negative was the lack of feedback when a file fails to save to the server. WinSCP could be logged out and asking for a password in the background, but you were expecting that save to fix the bug you were working on. It ended up being another thing to debug.
A coworker suggested using Samba instead. I installed it with this simple guide: How to Create a Network Share Via Samba Via CLI Then I mapped the network drive in Windows by going to the “Map Network Drive” option in the tools menu of the file explorer:
The only negative I’ve found with Samba so far is that it makes Notepad++ a little less responsive. But it helps a small amount if you turn off “File Status Auto-Detection”:
This fix was here: http://stackoverflow.com/a/10422444
The following example opens my_file.txt in a path relative to your script:
dir_path = os.path.dirname(os.path.abspath(__file__))
with open (os.path.join(dir_path, 'my_file.txt'), "r") as myfile:
mytext = myfile.read()
Turns out that you can use ELSE after a FOR loop to make it give an output if it didn't have anything to iterate.
When I wanted to start tracking it again, I needed to following these instructions: https://gist.github.com/laszlomiklosik/3833968
Make sure you save a backup of your current version before you check out the file again.
DO NOT use the following line in your odbc.ini file to define your DSN's port:
CommLinks = tcpip(host=localhost;port=9502)
Compress = yes
This improve the performance of my query by about 40%.
[IM004] [unixODBC][Driver Manager]Driver's SQLAllocHandle on SQL_HANDLE_HENV failed (0) (SQLDriverConnect) - UbuntuThe link to download SQLanywhere is here: http://www.sybase.com/detail?id=1087327
To install it, you need to unzip the file and run "./setup" in the top level directory in the unzipped folder.
I also installed:
https://code.google.com/p/pyodbc/ (use the .zip file on the left)
The first error message I received was:
sqlanydb.InterfaceError: Could not load dbcapi. Tried: dbcapi.dll,libdbcapi_r.so,libdbcapi_r.dylib
Exception AttributeError: "'Root' object has no attribute 'api'" in <bound method Root.__del__ of <sqlanydb.Root object at 0x3061150>> ignored
The error message in the title occurred on Ubuntu because unixODBC was unable to find all of the libraries it needed to run.
This helped to find the issue: http://blogs.msdn.com/b/dataaccesstechnologies/archive/2014/01/22/sqlallochandle-on-sql-handle-henv-from-linux-sqlncli-driver.aspx
strace -t -f -o trace_out.txt isql -v <DSN>< USERNAME> <PASSWORD>
It will show there are a bunch of missing files. The issue was resolved when isql was run from the /opt/sqlanywhere12/bin64 directory. This indicated that it's not looking in the right place for the library files. Run the following: export LD_LIBRARY_PATH='/opt/sqlanywhere12/lib64'
Not having the environmental variable above will also cause "sqlanydb.InterfaceError: dbcapi version 1 required." if you're using python's sqlanydb library.
Now you will receive an error saying "Parse error: DSN does not exist". You need to add an ODBC_INI environmental variable to where your DSNs are defined. I ran the following: export ODBC_INI='/etc/odbc.ini'
To make those variables we exported work system-wide and continue to work even after we log out:
- sudo nano /etc/environment
These articles were helpful: