Using sqlite3 I'm connecting to my SQLite database, and I can get responses just fine, but I need the column headers included in the results. Searching for hours now, I can find the '.headers on' command for the sqlite command line tool, but everything says dot commands are not available to Node in the sqlite3 library. Is this just an impossibility? If not, please!!! tell me how to do this.
Related
I have followed all the steps given in this Tutorial but the search feature for my project is not working. Whereas the example project given by django-machina is working fine with search. So can someone tell me what is the missing thing. I have also rebuild and updated the index. But still my search is not giving any results. It is always 0 results with no error.
When i run the rebuild index command i get the following error
python3 manage.py rebuild_index
/usr/local/lib/python3.8/site-packages/jose/backends/cryptography_backend.py:18: CryptographyDeprecationWarning: int_from_bytes is deprecated, use int.from_bytes instead
from cryptography.utils import int_from_bytes, int_to_bytes
WARNING: This will irreparably remove EVERYTHING from your search index in connection 'default'.
Your choices after this are to restore from backups or rebuild via the `rebuild_index` command.
Are you sure you wish to continue? [y/N] y
Removing all documents from your index because you said so.
/usr/local/lib/python3.8/site-packages/haystack/backends/simple_backend.py:31 UserWarning: clear is not implemented in this backend
All documents removed.
Indexing 13 Posts
/usr/local/lib/python3.8/site-packages/haystack/backends/simple_backend.py:25 UserWarning: update is not implemented in this backend
You can find the solution here. After adding settings please do python3 manage.py update_index
or you can do it by code
from django.core import management
management.call_command('update_index')
I have installed Cassandra 2.2.12 on my window machine locally. I have exported database from live server in a '.sql' file using 'razorsql' GUI tool. I don't have server access for live, only have database access. When i am trying ti import '.sql' file using 'razorsql' to local cassandra setup, its giving me error (Invalid STRING constant '8ca25030-89ab-11e7-addb-70a0656e5127' for "id" of type timeuuid).
Even i tried using COPY FROM command, its returning same error. Please find attached screen-shot for more detail of error.
Could anybody please help?
You should not put any quotes, because then it gets interpreted as a string instead of UUID - hence the error message.
See also: Inserting a hard-coded UUID via CQLsh (Cassandra)
I think you have two solutions:
edit your export file and remove the single quotes from the inserts.
rerun the export and export the data as csv and run the copy command in cqlsh. In this case, the csv file will not have quotes.
I got XHProf working with XHgui. I like to clear or restart fresh profiling for certain site or globally. How do i clear/reset XHprof? I assume i have to delete logs in Mongo DB but I am not familiar with Mongo and I don't know the tables it stores info.
To clear XHProf with XHGui, log into mongo db and clear the collection - results as following:
mongo
db.results.drop()
The first line log into mongo db console. The last command, drops collection results that is is going to be recreated by the XHGui on the next request that is profiled
Some other useful commands:
show collections //shows all collection
use results //the same meaning as mysql i believe
db.results.help() //to find out all commands available for collection results
I hope it helps
I have similar issue in my Drupal setup, using Devel module in Drupal.
After a few check & reading on how xhprof library save the data, i'm able to figure out where the data is being saved.
The library will check is there any defined path in php.ini
xhprof.output_dir
if there's nothing defined in your php.ini, it will get the system temp dir.
sys_get_temp_dir()
In short, print out these value to find the xhprof data:
$xhprof_dir = ini_get("xhprof.output_dir");
$systemp_dir = sys_get_temp_dir();
if $xhprof_dir doesn't return any value, check the $systemp_dir, xhprof data should be there with .xhprof extension.
Setup:I am using Python 3.3 on a Windows 2012 client.
I have a select query running using pyodbc which is not returning any results via fetchall(). I know the query works fine because i can take it out and run it from Microsoft SQL Management Studio without any issues.
I can also remove one column from the select list and the query will return results. For the database row in question, this column contains a large amount of XML data (> 10,000 characters), so it seems as though there is some buffer overflow issue going on causing fetchall() to fail, though it doesn't throw any exceptions. I have tried googling around and i have seen rumors of a config option to raise the buffer size, but i haven't been able to nail down exactly how to do it, or what a workaround would be.
Is there a configuration option that I can use, or any alternative to pyodbc.
Disclaimer: I have only been using python for about 2 weeks now so i
am still quite the noob, though i have made every attempt to research
my problems thoroughly this one has proven to be elusive:
On a side note, i tried using odbc instead of pyodbc but the same query throws this oddball error which google isn't helping me solve either
[ERROR] An exception while executing the Select query: [][Negative size passed to PyBytes_FromStringAndSize]
It seems this issue was resolved by changing my SQL connection string
FROM:
DRIVER={SQL Server Native Client 11.0}
TO:
DRIVER={SQL Server}
My app is built on Kohana 2,at first I built it in windows with php5.4, it worked well, now I move it to fedora I use php 5.5.9 and it always return empty page in browser, but if I run it in command line, it works well.
I noticed that in bootstrap file after the line require Kohana,it return empty page, before this line I can print something in browser
there's no error in serve logs. can anyone help me. I tried many ways but it still return empty page
There are many things changed in php 5.4 >=, and probably many kohana lib files causing an issue, one possible thing is mysql connection type because mysql is replace by mysqli/pdo.
https://wiki.php.net/rfc/mysql_deprecation