我试图找出最好的方法来做到这一点,我不知道如何Import-Csv通过同一个管道使用2个不同的文件并导出找到的值...
所以,让我们开始与CSV文件1:我只想为价值观LoginNumber哪里Type = H and (ContractorDomain -ne $null -or ContractorDomain -ne "").例如,这应该只是拉值0031482和2167312从下面.
注意:我只添加了空格和箭头,以便在此处更容易阅读.csv文件的列值或箭头之间没有空格.
"LoginNumber","Type","ContractorDomain"
"0031482" ,"H" ,"P12345" <<
"1251632" ,"P" ,"A52671"
"2167312" ,"H" ,"425126" <<
"0598217" ,"L" ,""
"1405735" ,"H" ,""
"2058194" ,"A" ,"L21514"
Run Code Online (Sandbox Code Playgroud)
当找到LoginNumber(基于上述条件)的值编号时,在CSV文件2中搜索它.然后获取AccountStatus和SamAccountName的相应值的值UserIDNumber.
"SamAccountName","UserIDNumber","AccountDescriptionDetails","AccountStatus"
"jd12395" ,"0052142" ,"Company CEO" ,"Enabled"
"jwet" ,"2167312" ,"Software Developer" ,"Disabled" <<
"1b3gas5" ,"1385293" ,"Project Manager" ,"Disabled"
"632g1fsa" ,"0031482" ,"QA Tester" ,"Enabled" <<
"4126hs" ,"0000418" ,"Program Manager" …Run Code Online (Sandbox Code Playgroud) 我在这里关注了这篇文章:https://dev.to/adrai/how-to-properly-internationalize-a-react-application-using-i18next-3hdb。
现在我想知道是否有办法将参数传递到从 .json 文件中提取的字符串中。
{
"GREETING": "Hello ${name}, nice to see you."
}
Run Code Online (Sandbox Code Playgroud)
import i18n from 'i18next';
import {initReactI18next} from 'react-i18next';
import LanguageDetector from 'i18next-browser-languagedetector';
import Backend from 'i18next-http-backend';
i18n
// i18next-http-backend
// loads translations from your server
// https://github.com/i18next/i18next-http-backend
.use(Backend)
// detect user language
// learn more: https://github.com/i18next/i18next-browser-languageDetector
.use(LanguageDetector)
// pass the i18n instance to react-i18next.
.use(initReactI18next)
// init i18next
// for all options read: https://www.i18next.com/overview/configuration-options
.init({
debug: false,
fallbackLng: 'en',
interpolation: {
escapeValue: false …Run Code Online (Sandbox Code Playgroud) 给出以下目录结构...
- /src/__mocks__
- X.spec.tsx <-- mock test
- Y.spec.tsx <-- mock test
- Z.spec.tsx <-- mock test
- /src/e2e_tests <-------------- only run the tests inside this directory
- X.spec.tsx <-- end-to-end test
- Y.spec.tsx <-- end-to-end test
- Z.spec.tsx <-- end-to-end test
- /src/components
- A.tsx
- A.spec.tsx <-- unit test
- B.tsx
- B.spec.tsx <-- unit test
- C.tsx
- C.spec.tsx <-- unit test
- /src/views
- X.tsx
- X.spec.tsx <-- unit test
- Y.tsx
- Y.spec.tsx <-- …Run Code Online (Sandbox Code Playgroud) 谁知道如何添加int[] array到2d ArrayList<ArrayList<Integer>>?
代码...
import java.util.ArrayList;
import java.util.Arrays;
public class Test2 {
public static void main(String[] args) {
int[] intArray = {1,1,1,1};
ArrayList<ArrayList<Integer>> list = new ArrayList<>();
list.add(new ArrayList<Integer>(Arrays.asList(intArray))); // <- compile error
}
}
Run Code Online (Sandbox Code Playgroud)