How do I protect Python code from being read by users?
I am developing a piece of software in Python that will be distributed to my employer's customers. My employer wants to limit the usage of the software with a time-restricted license file. If we distr...
- Modified
- 27 Nov at 19:27
Where do I find the bashrc file on Mac?
Hello I am following this [page](http://docs.python-guide.org/en/latest/starting/install/osx/).. I'm installing Python onto my mac so that I can set up a `Django / Eclipse` development environment. Ho...
Freeze the top row for an html table only (Fixed Table Header Scrolling)
I want to make an html table with the top row frozen (so when you scroll down vertically you can always see it). Is there a clever way to make this happen without javascript? Note that I do NOT nee...
How do you open an SDF file (SQL Server Compact Edition)?
I have an SDF file and I would like to retrieve its schema and query it with some UI. How can I do this? I have no Visual Studio installed on the machine and I would like to install as little software...
- Modified
- 3 Oct at 16:25
Order a MySQL table by two columns
How do I sort a MySQL table by two columns? What I want are articles sorted by highest ratings first, then most recent date. As an example, this would be a sample output (left # is the rating, then t...
- Modified
- 15 Apr at 15:58
How do I get the AM/PM value from a DateTime?
The code in question is below: ``` public static string ChangePersianDate(DateTime dateTime) { System.Globalization.GregorianCalendar PC = new System.Globalization.GregorianCalendar(); PC.C...
- Modified
- 29 Aug at 02:45
Tool to Unminify / Decompress JavaScript
Are there any command line scripts and/or online tools that can reverse the effects of minification similar to how Tidy can clean up horrific HTML? (I'm specifically looking to unminify a minified Ja...
- Modified
- 3 Apr at 16:22
How to write a Python module/package?
I've been making Python scripts for simple tasks at work and never really bothered packaging them for others to use. Now I have been assigned to make a Python wrapper for a REST API. I have absolutely...
- Modified
- 24 Mar at 12:29
The type initializer for 'MyClass' threw an exception
The following is my Windows service code. When I am debugging the code, I am getting the error/ exception: > The type initializer for 'CSMessageUtility.CSDetails' threw an exception. ``` using Syste...
- Modified
- 26 Jul at 19:33
How can I run an EXE file from my C# code?
I have an EXE file reference in my C# project. How do I invoke that EXE file from my code?
Convert Unix timestamp into human readable date using MySQL
Is there a MySQL function which can be used to convert a Unix timestamp into a human readable date? I have one field where I save Unix times and now I want to add another field for human readable date...
- Modified
- 27 Jun at 08:6
How to read the last row with SQL Server
What is the most efficient way to read the last row with SQL Server? The table is indexed on a unique key -- the "bottom" key values represent the last row.
- Modified
- 16 Jun at 20:28
How can I send a Firebase Cloud Messaging notification without use the Firebase Console?
I'm starting with the new Google service for the notifications, `Firebase Cloud Messaging`. Thanks to this code [https://github.com/firebase/quickstart-android/tree/master/messaging](https://github....
- Modified
- 17 Jan at 14:15
How to stretch the background image to fill a div
I want to set a background image to different divs, but my problems are: 1. The size of image is fixed(60px). 2. Varying div's size How can I stretch the background-image to fill the whole backgr...
- Modified
- 29 Oct at 21:30
How to run function in AngularJS controller on document ready?
I have a function within my angular controller, I'd like this function to be run on document ready but I noticed that angular runs it as the dom is created. ``` function myController($scope) { ...
- Modified
- 31 May at 01:19
Reset MySQL root password using ALTER USER statement after install on Mac
I recently installed MySQL and it seems I have to reset the password after install. It won't let me do anything else. Now I already reset the password the usual way: ``` update user set password = pas...
How to install ia32-libs in Ubuntu 14.04 LTS (Trusty Tahr)
I installed Ubuntu 14.04 (Trusty Tahr) yesterday. Everything seems OK. But when I tried to compile some C code, I encounter the following error. The error seems to be due to the OS lacking the 32-bit ...
Can I escape a double quote in a verbatim string literal?
In a verbatim string literal (@"foo") in C#, backslashes aren't treated as escapes, so doing \" to get a double quote doesn't work. Is there any way to get a double quote in a verbatim string literal?...
- Modified
- 22 Oct at 20:35
Rendering raw html with reactjs
So is this the only way to render raw html with reactjs? ``` // http://facebook.github.io/react/docs/tutorial.html // tutorial7.js var converter = new Showdown.converter(); var Comment = React.create...
- Modified
- 15 Oct at 16:37
Mongoose: findOneAndUpdate doesn't return updated document
Below is my code ``` var mongoose = require('mongoose'); mongoose.connect('mongodb://localhost/test'); var Cat = mongoose.model('Cat', { name: String, age: {type: Number, default: 20}, c...
How can I read SMS messages from the device programmatically in Android?
I want to retrieve the SMS messages from the device and display them?
Trying to git pull with error: cannot open .git/FETCH_HEAD: Permission denied
Help me please, I am trying to run this in my terminal: ``` asgard@asgard-A7N8X2-0:~/CollegePortal$ git pull error: cannot open .git/FETCH_HEAD: Permission denied ``` Then I try this one ``` asgar...
How can I make text appear on next line instead of overflowing?
I have a fixed width div on my page that contains text. When I enter a long string of letters it overflows. I don't want to hide overflow I want to display the overflow on a new line, see below: ``` ...
How to skip certain database tables with mysqldump?
Is there a way to restrict certain tables from the mysqldump command? For example, I'd use the following syntax to dump `table1` and `table2`: ``` mysqldump -u username -p database table1 table2 > da...
PHP Notice: Undefined offset: 1 with array when reading data
I am getting this PHP error: ``` PHP Notice: Undefined offset: 1 ``` Here is the PHP code that throws it: ``` $file_handle = fopen($path."/Summary/data.txt","r"); //open text file $data = array()...
- Modified
- 15 Feb at 03:38