Computing

gitignore is very important in many aspects, we also put in some local config files which pointed to some needed data files for the application (linux vs windows have different path seperators for example) to avoid rewriting after every pull the gitignore can be very helpful as long as you remember to forcefully commit a real change

Taggings:

Technology:

It might be considered a hack, but it has its place. Even !important is just another tool in the toolbox. As long as it does its job consistently everything is fine

The solution is to turn the link sharing on, by allowing all link owners to see & edit. Out of some reason, this sharing possibility does not request a paid account.

Taggings:

The solution was to connect an actual android device, or to use a laptop or pc with more calculation capacities.

Technology:

Window.event does not exist in Firefox. Different browsers have different event models. Firefox handles the events slightly different IE and Chrome and for that reason it has not worked. A work-around is to pass the event as an argument to the function:
<a onclick="testfunction(event);">
 //...
</a>

testfunction(e){
 evt = e || window.event;
 //...
}

or use a library like jQuery to avoid dealing with all the differences between the browsers.

Apparently in Rails you need to manually set the MIME-Type of attachments, otherwise their filesize, filetype and other Metadata are not properly recognized by the E-Mail client and images will not be displayed within the html e-mail.
In this case using the hash :mime_type and the corresponding value 'image/png' in the rails controller solved this problem:

attachments.inline["img.png"] = {:data => File.read('img.png'), :mime_type => 'image/png'}

Technology:

You can use the following http headers:
Content-Type: application/pdf
Content-Disposition: inline; filename="filename.pdf"
This ensures that the browser will always display it on the browser window.

Taggings:

Technology:

Joins are more expensive than a pure concatenation. In your case maybe UNION or UNION ALL might be a good solution because it parses the first SELECT statement and moves on to the next SELECT statement and adds the results to the end of an output table. The finding of the different connections of the joined tables is a huge cost factor.

In this case the error code 401 Unauthorized will be the right HTTP error code, because the existing session token doesn't authorize you any more. Sending the error code 404 is incorrect, because the resource still exists but you aren't currently authorized to see it. Actually a session token is only a shortcut to avoid providing credentials for every request.

Can also backup your Gdocs by:
1. Connecting to your Gdrive account
2. Selecting the files to backup
3. Download them
4. zip them and store them.

Taggings:

Pages

Subscribe to Computing