Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 3 years ago.
Improve this question
Recently I have been involved in code porting from Windows to a Linux. I came across so many windows functions which retrieve registry keys and edit it. I am not sure what can be the equivalent approach for Linux. I know registry is just a windows database which stores data in "Key=value" format. I am thinking about INI file. Other than this is there anything that is more efficient?
I am not asking from a storage perspective. My question is related to registry equivalent in Linux. How can we achieve registry structure in Linux?
A typical way to store configuration in Linux per user is to store it in /home/username/.someapp, where someapp is the name of your program. I love this in Linux actually because when I move to another computer, all I have to do is save/move my home directory, and that will save all my configuration.
On Windows, the registry has a user part HKEY_CURRENT_USER, and others that represent any user, such as HKEY_LOCAL_MACHINE, being global for the whole system. For the user part, you should put the configuration in the user directory like I explained before, because it shouldn't require any super-user privileges. The local machine part you can choose either to also put in the user directory, where then every user will have separate configuration, or put it in something like /var/lib/someapp, but keep in mind that it'll be read-only then.
With all this, keep in mind that you should create your own configuration format, or use some library, such as libconfig, XML or JSON.
Linux has XDG Base Directory specification. If you want to use config file(s) for your app (doesn't matter which format you prefer - INI, JSON, YAML, SQLite database, etc), please store it in directory $XDG_CONFIG_HOME/your_app_name
Usually many software take the config files in the /etc, but it's a static configuration as I think. If you have something changed configuration from the software (by user or after something external) it's good idea to put it into /var/lib/(your_project_short_name)/(your_project_config_files) I suppose, as it do Mysql, Postgresql for the database files and the Postgresql's config files etc.
Related
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 3 years ago.
Improve this question
can somebody explain to me please:
1) Can a py file just by its mere "existence" on your hard drive (if not opening it), cause any kind of malicious harm for your computer system? And if your goal is only to see the content (text of code) of the file, how could you open it to be 100% sure it could not harm your system (for example by the standard text editor tool?)? Or can you only get to the content with Python specific programs?
2) If someone asks you to look at her python code, and wants to send you for this reason several py files - could opening such file harm your computer system/perform "malicious" actions (how?)?
Please take into account for your answer, these three different ways of how you would open the files:
a) you open with the program from python.org
b) you open with a IDE
And a third question:
3) What about the official program from python.org itself - does this program somehow open up your system to additional internet attack types, just by having it installed?
Finally,
4) Is it more secure in terms of online security, to interact with python programs on a separate computer and not the one you do everyday business?
Thanks community!
Q1: No, it's just a text file. So you can view it with any text editor
Q2. If you mean by "opening", viewing in text edit, see answer to Q1. If by opening, you mean executing the script, then the answer depends on what the script does
web services don't run on your local computer, so they can't harm it.
Q3. The answer is no, because python installed on your computer is dormant.
Q4: There are lots of thing you can do on your computer which can do damage. For instance, you could delete all your files in your file explorer. Surely you already have backups?
Python scripts are human readable which makes them a very ineffective place to put secret code which does nasty things.
I've never heard anyone put python anywhere in a list of security risks, but if you are worried, use virtual box and run it in a virtual machine. I do a lot of my python development in a virtual machine, but not to minimise security risks ... there are other advantages to VMs (such as ease of backup, ease of moving to another computer). The other advantage, if you are using Windows, is that you can use a Linux VM, such as Ubuntu, which is a better experience for modern development. I think because of this, Microsoft has actually made it easy to install Ubuntu directly into Windows, if you have a recent version on Windows 10, so that's another option (e.g. https://tutorials.ubuntu.com/tutorial/tutorial-ubuntu-on-windows#0)
I haven't look at web IDEs for a while. As long as they have interactive python debugging, they could be a good option. I had the impression that cloud 9, now an amazon offer, was the best one, last time I checked them out.
Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
I store my school programming work on google drive. From home I just access the google drive file on my computer, but I can't do that from school.
Can anybody recommend an app for editing cpp files in google drive? Preferably free, poor college student and all that.
I found drivecode, but it doesn't seem to work with cpp files and on header files it's not doing any markup.
Neutron Drive seems like exactly what I need, but it's not free.
Alternatively, any suggestions on another cloud-based development platform that I could use would work too.
screw Google driver, for single files use
https://gist.github.com/
http://collabedit.com/
for large project as said above, start learning mercurial. later you will need it professionally.
In light of the comments under the question, I think the best option is actually to use a service like gitHub, mercurial, bazaar, or svn, because of the availability of version control in those platforms.
You might also want to try out Google Code, it's not quite as advanced as GIT and hopefully it's not blocked either. Also, you already have a Google account, so you won't have to make a new account for anything.
Google Code allows full editing capabilities online, but you can also create a repository using it and download your code when you're ready to compile. You may need to learn a little bit about it before you can start, but once you upload your code you can edit it all right there, and it also formats automatically, making it better than Drive.
If Google Code is in fact blocked, I would also suggest trying GIT or some other service, but they're a little more advanced. Google Code has served me well for simple projects in the past.
Go to http://code.google.com
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 8 years ago.
Improve this question
I have created an app (some kind of "client" app) that will have a "bug report" feature. The feature consists with pure text area from which the text should be sent and saved to a text file on the free host. Is it possible? If so, which c++ library could give me such ability?
EDIT:
In my intentions it had to be a simple application that a user has on his own computer. After finding some bug in my app there should be the "bug report" feature that will allow him to send the data (pure text) to some place that only I could reach. I was just thinking about free hosting (because it's... free), and save the data into a text file there. I'm sorry if my question wasn't appropriate.
If your free hosting permits it (and you should check that) you might code a CGI program, or a fastCGI application. There are several C++ libraries which might help, like libcgicc etc.
If you can afford a web server, there exist C++ libraries providing HTTP service, in particular Wt or (in C) Onion etc.
You could also consider other technologies, like OpaLang or Ocsigen (but I would not recommend PHP, even if it is a lot used).
MAybe your hosting enable ssh so you could use scp ....
And if your application is free software (e.g. GPL licensed), several free software hosting (freecode, sourceforge, github, gitorious ...) may offer also a bug database facility.
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 5 years ago.
Improve this question
I maintain a small library project written in C++.
I'd like to use Sphinx to maintain the library website + user documentation per release version. I have found [similar question asked How to manage many versions? on the sphinx-dev mailing list which I have bumped but without extensive follow-up.
How to manage many versions?
I think of basic structure like this:
mylib/ <- website root
mylib/...
mylib/tutorial/...
mylib/doc <- list of documentation per release version
mylib/doc/1.0.0
mylib/doc/2.0.0
mylib/doc/X.Y.Z
I'm trying to figure out best practical configuration for this structure.
I have root configuration mylib/conf.py where I control the website structure and content.
I could put .rst files into mylib/doc/1.0.0 and mylib/doc/2.0.0 build them using the root conf.py. But then it seems tricky to control toctree for website and for docs.
So, I think it may be more practical to separate website config/build from per release documentation config/builds:
mylib/conf.py
mylib/doc/1.0.0/conf.py
mylib/doc/2.0.0/conf.py
mylib/doc/X.Y.Z/conf.py
but I'd like the main documents in mylib/doc/X.Y.Z/conf.py to use the same layout is the root documents in mylib/, so I can have consistent look, e.g. links in page header, etc.
This way I can easily achieve consistent toctree per documentation release.
It should be easy to walk the directories and perform builds for website and for each doc version separately.
Regarding searching the documentation, I don't mind the search engine to scan all versions of documentation per single query as well as I don't mind to have search engine specific to particular version (search box is displayed in the same place, but depending what is being read, it scans index of current version only).
Is there any better way to achieve that?
I've found similar question asked in sphinx for multiple, separate documents and I'm wondering if the Intersphinx plugin is a good idea here.
UPDATE:
2017-04-10: SO answer pointing to an interesting Sphinx extension: sphinxcobtrib-versioning
2011-10-21: Following olt's question in comments, mylib/ is not how I mean to structure project in VCS. So, I don't want to maintain multiple versions of documentation in VCS. The mylib/ is just structure for easier visualisation. It can be also working directory where I put Sphinx sources together (e.g. pull from version branches, etc.) and where I launch Sphinx to build the output.
In my opinion, the documentation should stay with the code in the same repository. Otherwise you would need to manage the documentation source manually, for example when you backport a feature from version B to A. With a single repository, you just check out that version and re-build the documentation.
You should look at SQLAlchemy project, they have multiple versions of their documentation available on the same site. The documentation is in the same repository and they copy the output of each version into their static homepage folders.
Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
I have an unfinished MathML rendering library written in C++. I ceased development a few months ago due to lack of time. The library [still] uses the TrueType version (unsupported) of the STIX fonts beta [version 1.0 of the STIX fonts (OpenType Postscript format) has since been released].
Development of this kind of library is a HUGE undertaking and, in fact, requires a number of programmers/developers. In my case, I am doing it alone, and here's my question:
Does anyone of you know of any foundations/philanthropists who may be interested to fund my project in return for open sourcing the code?
The funding will serve as an incentive for me to finish the library - perhaps by taking a sabbatical :p - and, of course, as 'payment' for the intellectual property involved.
I've searched the web, contacted some [e.g., foundations, VCs, angels, etc.], but I either did not get a response (from VCs and angels) or was rejected (one reason is geography since these foundations support only US-based projects).
As an aside, when I search the web for MathML, the results are often outdated. I guess there's not much activity concerning MathML. Yet, I believe this library will be very useful not only to developers but also to anyone who uses math, especially students and teachers. It is useful for e-learning, can be used with desktop apps and web servers (Windows), makes it easy to insert images of formulas in PowerPoint documents, etc.
Any suggestions are most welcome. Thank you.
EDITS: I have finished this library finally without funding, although I don't rule out seeking one.
You can find my new site below with lots of sample formulas; click on the download link to download the SDK.
http://reformath.webnode.com/ (preferred for statistical reason)
http://reformath.weebly.com/ (please use the above link instead)
DON'T forget to provide some feedback - or donations. Thanks!!!!!
Since we've already got open source MathML (Firefox has had it for years) that mean you'd have to do something better than the existing OSS solutions. And at that point, why not work on an existing open source project?
So that leaves commercial apps that may want a closed library for MathML rendering. I would go after companies like the makers of MathCad, Matlab, or any other engineering software that may want to display equations neatly. You should have something that already works for some subset of the things you/they will want it to do. You should also turn yourself into a company before going to those places so they take you seriously and you can license it to multiple customers. Otherwise the most you're likely to get is a job offer where they'd like you to hand over what you've got (for free if they can get you to) and then work on it as an employee - which may be all you want if you love it and hate your day job ;-)
You should probably ask on www-math list, also if you ask there, we can list your application in the software implementations page
http://www.w3.org/Math/Software/