This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Component, OnInit, OnChanges, ViewChild, ElementRef, Input } from '@angular/core'; | |
import {D3Service, D3, Selection} from 'd3-ng2-service'; | |
@Component({ | |
selector: 'app-chart', | |
templateUrl: '.chart.component.html', | |
styleUrls: ['./chart.component.scss'] | |
}) | |
export class ChartComponent implements OnInit, OnChanges { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function flatten() { | |
var flat = []; | |
for (var i = 0; i < arguments.length; i++) { | |
if (arguments[i] instanceof Array) { | |
flat.push.apply(flat, flatten.apply(this, arguments[i])); | |
} else { | |
flat.push(arguments[i]); | |
} | |
} | |
return flat; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
If you encounter errors like, "unable to find vcvarsall.bat" when installing Python dependencies, | |
you are probably missing C++ compilers needed to compile python libraries. To fix this issue, | |
install Micsrosoft Visual C++ 2008 redistributable 64 bit. | |
Building on the solution provided here: http://stackoverflow.com/a/18045219/888278 | |
Download specifically the Windows SDK for Windows 7 and .NET Framework 3.5 SP1 which gives you a x64 compiler for VC++ 2008 (VC++ 9.0) if you need it. | |
Note: If you have both a 32- and 64-bit Python installation, you may also want to use virtualenv to create separate Python environments to use one or the other at a time without messing with your path to choose which Python version to use. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Setting up PHP extensions php_curl and php_apc on windows 7. | |
If you're using windows 64-bit OS, download the 64-bit TS VC9 compiled DLL files i.e. php_apc.dll | |
and php_curl.dll, and store them in the PHP extensions directory. Now, enable these extensions | |
in the PHP config file i.e. php.ini and you're good to go. | |
If you're using WAMP, the extension directory can be found in the C:\wamp\bin\php\php<version>\ext. | |
If all went well, you can see the APC and CURL extensions in the phpinfo page. | |
To check PHP configuration settings on the server, create the following file, name | |
it phpinfo.php and save it in c:\wamp\www folder. |