import - Angular2 Tutorial (Tour of Heroes): Cannot find module 'angular2-in-memory-web-api'

I have followed the Tutorial. After changing app/maint.ts in the Http chapter I get the error when starting the app via command line: app/main.ts(5,51): error TS2307: Cannot find module 'angular2-in-memory-web-api'.(Visual Studio Code gives me the same error within main.ts - red wavy underlining.)Here is my systemjs.config.js:/** * System configuration for Angular 2 samples * Adjust as necessary for your application needs. */(function(global) { // map tells the System loader where to look for things var map = { 'app': ...Read more

import - How to export imported object in ES6?

The use case is simple: I just want to export an object with the name just as it was imported.for example:import React from 'react';export React;but this does not work. I have to write:import React from 'react';export const React = React;But this is odd. What is the right way to do this?UPDATED:Thanks for helps and references. I have solved out my problem with many clues. I'd like to share some common cases for me and the solutions.export importsimport d, {obj} from '...';export {obj, d};export {obj as name1, d as name2};re-export all named imp...Read more

import - IMPORTXML Google Sheets

My date source is: the website they have three main numbers that I am trying to import to my google spreadsheet (Current Price, 1-Year Forecast, 5-Year Forecast).In cell C3 I have: cell D3 I have: =ImportXML(C3, "//div[@class='col-md-4 col-xs-12 np']//div[contains(@class, 'Current Price')]/@href")I get an error of "Imported content is empty."My D column is going to be used to import "Current Price" number, my E column is going to be u...Read more

sqoop - Hive import is not compatible with importing into AVRO format

I have the following codes: sqoop import --connect jdbc:mysql://localhost/export \ --username root \ --password cloudera \ --table cust \ --hive-import \ --create-hive-table \ --fields-terminated-by ' ' \ --hive-table default.cust \ --target-dir /user/hive/warehouse/cust \ --compression-codec \ --as-avrodatafile \ -m 1got the following error, please help.Hive import is not compatible with importing into AVRO format....Read more

module - require vs load vs include vs import in Racket

The Racket docs indicate that Racket has separate forms for: require, load, include, and import. Many other languages only contain one of these and are generally used synonymously (although obviously with language specific differences such as #include in C, and import in Java).Since Racket has all four of these, what is the difference between each one and which should I be using in general? Also if each has a specific use, when should I use an alternative type? Also, this question seems to indicate that require (paired with provide) is preferre...Read more

Akeneo 2.1 : Import / export best practices to set it all up

I'm currently setting up an Akeneo (2.1) instance that needs to communicate with an e-commerce solution. I was wondering what the best practices are when it comes to importing and exporting data. The documentation kind of lacks in this; it tells how you can set it up, but I'm missing practical use cases here.Here's what I'm thinking of: I want our customer to be able to upload their images / CSV files using an FTP connection. Akeneo should ideally only start importing when a mutation in this (FTP) destination folder is detected. ...Read more

import - ES6 modules - why can I use a const before it is declared?

I've tried searching for an explanation on this exact scenario but couldn't find anything. I have a module that looks like the following (simplified):export default function(name) { return map[name];}const map = { 'a': 'b', 'b': 'c'};Clearly the const definition above is hoisted but it should be undefined when being used in the function. I'm trying to find an exact explanation for why this function works when imported and used. Shouldn't a reference error be thrown? The only thing I can think of is that the entire module is loaded prior to w...Read more

import - Octave packages unload themselves

I'm using the Octave io package but it keeps unloading itself before I run the script. I'm using the xlsread function provided by io but I keep getting the following error:warning: Functions for spreadsheet style I/O (.xls .xlsx .sxc .ods .dbf .wk1 etc.) are provided in the io package. See <>. Please read <> to learn how you can contribute missing functionality. error: 'xlsread' undefined near line 25 column 23The package shows up when I type pkg list and there is an asterisk...Read more

import - SingleOutputEcospold1Importer returns "NameError: name 'filename' is not defined"

I'm trying to import ecoinvent 3.4 cutoff database so I wrote:import brightway2 as bw[...]fpei34 = r'C:\Users\Me\Anaconda3\ecoinvent 3.4_cutoff_ecoSpold02\MasterData'if 'ecoinvent 3.4 cutoff' in bw.databases: print("Database has already been imported")else: ei34 = bw.SingleOutputEcospold1Importer(fpei34, 'ecoinvent 3.4 cutoff') ei34.apply_strategies() ei34.statistics()I get the answer: NameError: name 'filename' is not defined. It also indicates the problem occurs at the line where SingleOutputEcospold1Importer is used.Do you know ...Read more

SAS proc import column name has dollar sign $

I am importing a file with column headers include a $ sign (e.g. "Sales $") with proc import. The result of the import seems to rename that column something like "VAR11".proc import out = raw datafile="example.xlsx" dbms=xlsx replace; range = "Sheet1$A1:B50"; getnames = yes;run;Is there a way to still read in the name of the column, but just drop the $ sign so it is a meaningful header?...Read more

import - Read specific data from multiple text files in one directory in SAS

*** Resolved. The answer will be attached in the end. Thank you all for your help!Thanks for reading this. I am working on a piece of code that was left by my former colleague, and trying to make some sense out of it. The purpose is to read specific data (ex: value from row 1 & column 17, and row 12 & column 33) from multiple text files in one directory and put the data in a SAS table. %macro cycle_through_server_records;%local i next_file;%do i=1 %to %sysfunc(countw(&SERVER_FILE)) ;%let next_file = %scan(&SERVER_FILE, &i);%...Read more

SAS 9.4 64-bit XLSX 32-bit import: Columns with date and text read in as text, with unformatted dates

I am using 64-bit SAS 9.4 to import a file from 32-bit Excel. Many of my Excel columns contain both dates and lists of dates, like this:SeptemberDatesCol9/13 & 9/279/13 & 9/269/01 & 9/10 & 9/219/239/309/309/28I'm not the owner of the file and it is updated regularly, so all major manipulation and formatting needs to occur in SAS. After import, I'm able to change it into a normal list of one date per row, but the import itself is not importing the dates correctly. My import code:PROC IMPORT OUT=Raw_Import DATAFILE= "J:\filename....Read more