I have used sqlite in c++, python and now (perhaps) in C#. In all of these i have no idea how to insert a blob into a table. How do i store and retrieve a blob in sqlite?
How can I find the user's home directory in a cross platform manner in C++? i.e. /home/user in Linux, C:\Users\user\ on Windows Vista, C:\Documents And Settings\user\ on Windows XP, and whatever it is that Macs use. (I think it's /User/user)
Basically, what I'm looking for is a C++ way of doing this (example in python)
os.path.expanduser("~")
I would like to have these commands run as the ss user from root
mkdir bin
cp -r /opt/gitolite .
gitolite/install -ln
gitolite setup -pk ss.pub
mkdir -p .gitolite/hooks/common
ln -s /opt/pre-receive .gitolite/hooks/common/
so everything is executed in /home/ss. The 4th line requires $HOME/bin as you can see from the 3rd line.
The only way I can get it to work is by adding su -c "command" ss to each line, which is not a nice hack.
This is an extension to my previous question, where I wasn't precise enough.
Question
How do I run all these commands as a script in a practical way?
Hi,
Can we convert numbers to their alphabetical equivalents? For example
21 - twenty one
9999 - nine thousand nine hundred ninghty nine
If yes, how to do this?
Thanks and Regards,
EDIT :
Any language will do. C#, C++, Java, python.
we're in the process of installing a brand new Windows Server 2008 Web cluster and we would like to synchronize some files between the servers. The problem is that the DC in the domain is an old Windows Server 2003 Standard (NOT R2) which apparently doesn't contain some extension to the AD schema. Is it possible to upgrade the schema without upgrading the DC servers to R2?
When I try to create a Replication Group on the 2008 Server I get the following message:
---------------------------
Error
---------------------------
srv.XXXXXX.XX: The Active Directory Domain Services schema on domain controller
activedc07.srv.XXXXXX.XX cannot be read. This error might be caused by a schema
that has not been extended, or was extended improperly. See Help and Support
Center for information about extending the Active Directory Domain Services
schema. Schema version 30 is not supported.
---------------------------
OK
---------------------------
I've the CSS file with many entry like
id1, #id2, #id3, #id4 { ... }
id3, #id2 { ... }
id2, #id4 { ... }
I want to extract list of unique IDs using command line tools (msys).
Unique means any entry in list presented only once. How?
PS: I know how doing it using python, but what about awk/sed/cat?
Hi, I first learned C++ then moved to C (I know kind of backwards) and then I found a thing called iTunes U and began watching programming classes to extend my knowledge and noticed that Stanford and MIT both did not teach C or C++ as an introduction to computer programming. Then I began to wonder why they didn't begin teaching C/C++ because I thought C/C++ was more efficient than Java (which Stanford taught) and Python (which MIT taught). Or maybe there is no particular reason?
This question already has an answer here:
Why is my USB mouse disconnecting and reconnecting randomly and often?
7 answers
I have a mid 2010 iMac with a Logitech G500 mouse which works fine on OS X.
I game on Windows 7 in bootcamp, and for a month now I have been getting random mouse disconnects while gaming. Sometimes none, sometimes 2-3 per minute.
The mouse lights go off and I get the disconnect sound from Windows 7 then it connects again after a second or two. I tried changing the port I connect the mouse to, but still the same thing.
The only devices on USB are Apple keyboard with Apple extension cord, the mouse, and a Creative SoundBlaster Tactic 3D Alpha USB Gaming Headset.
Any ideas?
I found in
http://svn.python.org/projects/doctools/trunk/sphinx/locale
support for several languages that can be used in Sphinx but I did not find the instructions on how to install it: which files should be downloaded and installed in which directories?
Any hint would be appreciated.
In other words, how to change my password without going through the "CTRL-ALT-DEL - Change Password" interface.
By programmatically I mean via a command-line tool, C# via a .NET library, COM-invocation via Python, ... whatever doesn't involve any manual steps, really.
The "NET USER" command is ineligible, as it requires me to run with domain administrator privileges.
Now that I've gotten relatively familiar with web2py, I'd like to give Django a go.
What are the main differences?
What would be the most efficient way to get started taking into account web2py knowledge?
(It must help to have some python application framework knowledge,no?)
EDIT
Also, if you've used both, can you offer an opinion on which you prefer and why?
The following Ruby code
def a(b,c) b+c end
is the same as follows with Python
def a(b,c): return b+c
It looks like that ruby has the special stack that stores the final evaluation result and returns the value when a function is called.
If so, what's the name of the stack, and how can I get that stack?
If not, how does the Ruby code work without returning something?
I would like to learn Computer Graphics and be good for
my career but the only thing i know is python programming.
where should i start and go next? Im also studying from home.
I know C and python, and I'm moving toward another language for learning purposes. My problem is that I like to learn things with something to do (for example contributing to some project or do something amazing, not boring plain algebra).
I would like to hear suggestions about the fields in which C++ shines and where I can found interesting programming with C++. (for fields I mean networking/gui programming/algorithms/games ...)
The title pretty much sums up my question, I would like to find all commits I have ever done to the subversion repository. Not just commits in current snapshot. More importantly, I would like to organize the file lists by the SVN comment used while committing.
Thank you
Edit: I am thinking maybe a python or shell script that would parse the output of
svn log | grep username
to extract revisions and then pipes the output to
svn log -r [revision numbers go here]
Maybe some scripting gurus can help me out..
I'm using
{% url facebook_xd_receiver %}
in one of my HTML files. This works just fine when I run my project using the command
python manage.py runserver
But the same project stops running and gives me a "TemplateSyntaxError" at the line
{% url facebook_xd_receiver %}
Can anyone please tell me what could be the difference between the dev server run through the command line and the apache server.
Is there anything I'm missing out on while configuring the Apache server? Or is it a Django problem?
Is it possible to execute raw commands as javascript through the Java driver for MongoDB?
I'm tired of wrapping everything in Java objects using Rhino, and would happily sacrifice performance for the convenience of passing javascript directly through to the DB.
If not, I can always use sleepymongoose or something, but I don't really want to add yet another language (python) to the stack at this point.
Any insights are appreciated.
Hello,
I have a domain www.example.com
In the domain, www.example.com/write directory is chmod to 777. Now, suppose, if I want to create a new directory like www.example.com/write/new from www.some-domain.com, what should I be doing.
I know PHP, Python. Please relate the answers to this.
For the longest time I've been curious to code in Intermediate Language just as an academic endeavour and to gain a better understanding of what's "happening under the hood".
Does anybody provide Visual Studio support for *IL in the form of: project templates, IntelliSense integration, and those kind of RAD features?
Edits: I don't mean restricted to out of the box support. For example, I can download Visual Studio extensions to support Python, COBOL, etc. Want the same for *IL.
There is a stand-alone Intermediate Assembler tool.
I'd like to write small scripts which feature incremental search (find-as-you-type) on the command line.
Use case: I have my mobile phone connected via USB, Using gammu --sendsms TEXT I can write text messages. I have the phonebook as CSV, and want to search-as-i-type on that.
What's the easiest/best way to do it? It might be in bash/zsh/perl/python or any other scripting language.
Thanks!
I feel I should go into more detail. My wife and I share a laptop and browse email. Currently we keep coming back to each others gmail accounts, having to log out and log back in. Are there any good extensions or addons that would allow us to toggle back and forth between these? This does not necessarily need to apply to just gmail but include any cookie, session, etc. I'd be willing to use Firefox if such an extension exists on it as well.
Much appreciated!
Hello,
There is a website (very simple) which will be updated soon and I'd like to receive an alert at the moment it changes (like a sound, a popup,...)
I guess I should send request every x minutes and compare the result with what's now but I don't know how to do that.
I don't really care about the language used, I know java, python, php, a bit of c and bash (I'm on linux)...
Thank you
when i use firepython : http://code.google.com/intl/zh-CN/appengine/articles/firepython.html
to logging the python info.
it waring this log:
but i download the gprof2dot:
why it also show this log ?
thanks