小编mrk*_*rks的帖子

Xcode - ld:找不到-lPods的库

我在尝试构建iOS应用程序时遇到这些错误.

ld: library not found for -lPods
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Ld /Users/Markus/Library/Developer/Xcode/DerivedData/Totalbox-clpeqwpfvwuhpleeejnzlavncnvj/Build/Products/Debug-iphonesimulator/Totalbox.app/Totalbox normal x86_64
cd /Users/Markus/Development/xcode/totalbox-ios
export IPHONEOS_DEPLOYMENT_TARGET=7.1
export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -arch x86_64 -isysroot 
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator7.1.sdk -L/Users/Markus/Library/Developer/Xcode/DerivedData/Totalbox-clpeqwpfvwuhpleeejnzlavncnvj/Build/Products/Debug-iphonesimulator -F/Users/Markus/Library/Developer/Xcode/DerivedData/Totalbox-clpeqwpfvwuhpleeejnzlavncnvj/Build/Products/Debug-iphonesimulator -filelist /Users/Markus/Library/Developer/Xcode/DerivedData/Totalbox-clpeqwpfvwuhpleeejnzlavncnvj/Build/Intermediates/Totalbox.build/Debug-iphonesimulator/Totalbox.build/Objects-normal/x86_64/Totalbox.LinkFileList -Xlinker -objc_abi_version -Xlinker 2 -ObjC -framework CoreGraphics -framework Foundation -framework MobileCoreServices -framework QuartzCore -framework Security -framework SystemConfiguration -fobjc-arc -fobjc-link-runtime -Xlinker -no_implicit_dylibs -mios-simulator-version-min=7.1 -framework CoreGraphics -framework UIKit -framework Foundation -lPods -Xlinker -dependency_info -Xlinker /Users/Markus/Library/Developer/Xcode/DerivedData/Totalbox-clpeqwpfvwuhpleeejnzlavncnvj/Build/Intermediates/Totalbox.build/Debug-iphonesimulator/Totalbox.build/Objects-normal/x86_64/Totalbox_dependency_info.dat -o /Users/Markus/Library/Developer/Xcode/DerivedData/Totalbox-clpeqwpfvwuhpleeejnzlavncnvj/Build/Products/Debug-iphonesimulator/Totalbox.app/Totalbox
Run Code Online (Sandbox Code Playgroud)

构建设置中的PODS ROOT:

${SRCROOT}/Pods
Run Code Online (Sandbox Code Playgroud)

我没有创建这个Xcode项目 - …

xcode objective-c clang ios cocoapods

174
推荐指数
13
解决办法
23万
查看次数

如何为指向Heroku应用程序的顶点域(无www)设置DNS?

我已经在我的heroku应用程序中添加了一个自定义域,它可以与www.domain.com一起使用.

我需要知道如何设置没有"www"的域来解析应用程序.

以下是我当前的DNS设置:

$TTL 86400
@   IN SOA ns1.first-ns.de. postmaster.robot.first-ns.de. (
    2013041500   ; serial
    14400        ; refresh
    1800         ; retry
    604800       ; expire
    86400 )      ; minimum

@                        IN NS      robotns3.second-ns.com.
@                        IN NS      robotns2.second-ns.de.
@                        IN NS      ns1.first-ns.de.

@                        IN A       88.198.38.XXX
localhost                IN A       127.0.0.1
mail                     IN A       88.198.38.XXX
ftp                      IN CNAME   www
imap                     IN CNAME   www
loopback                 IN CNAME   localhost
pop                      IN CNAME   www
relay                    IN CNAME   www
smtp                     IN CNAME   www
www                      IN CNAME   appname.herokuapp.com.
@ …
Run Code Online (Sandbox Code Playgroud)

dns heroku

92
推荐指数
2
解决办法
10万
查看次数

Vue.js路由器:历史模式和AWS S3(RoutingRules)

我有一个Vue.js应用程序,并运行Amazon S3和Cloudflare.

当我打开索引并浏览到/ dashboard时,一切正常.但是当我在新选项卡中直接打开仪表板之类的路径或刷新页面时,我从S3收到以下错误:

404 Not Found

Code: NoSuchKey
Message: The specified key does not exist.
Key: unternehmen
RequestId: 6514F8A1F4C29235
HostId: +BVrPLJSGdzSYogzWZ4GMBXkgkdSJWRVJVhcSs4EI/lmMUR422aCtCxpBGU6AMe5VkS1UbEn/Lc=
Run Code Online (Sandbox Code Playgroud)

刚看到问题是Vue.js历史模式:https://router.vuejs.org/de/essentials/history-mode.html

我想在我的Amazon S3 Bucket中使用路由规则解决问题.Apache RewriteRule如何寻找S3?

<IfModule mod_rewrite.c>
  RewriteEngine On
  RewriteBase /
  RewriteRule ^index\.html$ - [L]
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteRule . /index.html [L]
</IfModule>
Run Code Online (Sandbox Code Playgroud)

尝试以下但它不起作用:

<RoutingRules>
  <RoutingRule>
    <Condition>
      <HttpErrorCodeReturnedEquals>404</HttpErrorCodeReturnedEquals>
    </Condition>
    <Redirect>
      <HostName>domain.com</HostName>
      <ReplaceKeyWith>index.html</ReplaceKeyWith>
    </Redirect>
  </RoutingRule>
</RoutingRules>
Run Code Online (Sandbox Code Playgroud)

如果我这样做,我只是让我的页眉和页脚呈现,但仅此而已.

谢谢!

amazon-s3 vue.js s3-rewrite-rules vue-router

14
推荐指数
3
解决办法
5468
查看次数

React + Formik:为嵌套对象使用值

我的 React (TypeScript) 应用程序具有以下模型:

interface IProjectInput {
    id?: string;
    name: string | i18n;
    description: string | i18n;
}
Run Code Online (Sandbox Code Playgroud)
export interface i18n {
    [key: string]: string;
}

Run Code Online (Sandbox Code Playgroud)

我正在使用Formikreact-bootstrap从以下创建一个新ProjectInputForm

import { i18n as I18n, ... } from 'my-models';

interface State {
    validated: boolean;
    project: IProjectInput;
}

/**
 * A Form that can can edit a project
 */
class ProjectForm extends Component<Props, State> {
    constructor(props: any) {
        super(props);
        this.state = {
            project: props.project || { …
Run Code Online (Sandbox Code Playgroud)

javascript typescript reactjs formik

7
推荐指数
1
解决办法
8251
查看次数

EChart系列具有不同的工具提示

我的 Angular 应用程序中有以下 EChart:

var option = {
  xAxis: {
    type: 'category',
    data: ["A", "B", "C", "D", "E"]
  },
  yAxis: {
    type: 'value',
  },
  tooltip: {
      trigger: 'axis',
         axisPointer: {
           type: 'shadow',
         },
        formatter: (params) => {
          return (
            "Text One" +
            '<br/>' +
        
            params[0].name
          );
        },
      },
  series: [
    {
      data: [1, 2, 3, 4, 5],
      name: 'value',
      stack: 'one',
      type: 'bar',
      tooltip: {
        formatter: (params) => {
          return (
            "Text One" +
            '<br/>' +
        
            params[0].name
          );
        },
      }, …
Run Code Online (Sandbox Code Playgroud)

javascript echarts ngx-echarts apache-echarts

7
推荐指数
2
解决办法
2万
查看次数

如果正则表达式模式匹配,则字符串中的粗体单词

主意:

我想突出显示字符串中的单词,如果它们是用大括号输入的(例如“Lorem {Ipsum} Sit Dolor”)。如果它们匹配,则应应用 font-weight:bold 。

到目前为止的方法:

var final = [];
var regExp = /([^{]*?)(?=\})/;
var string = document.getElementById("myParagraph").innerHTML;
wordArray = string.split(/\s+/);

for (var i = 0; i < wordArray.length; i++) {
    if (regExp.exec(wordArray[i])) {
        final.push(wordArray[i]);
    }
}
console.log(final);
Run Code Online (Sandbox Code Playgroud)
<body>
  <p id="myParagraph">This is a test string with a {bold} text. Lets {see} if this works</p>
</body>
Run Code Online (Sandbox Code Playgroud)

现在我明白了,我需要用 CSS 突出显示,并使用 jQuery.css() 执行 jQuery.each,但我现在不确定如何应用样式并自动“刷新”DOM。

html javascript css regex dom

4
推荐指数
1
解决办法
2906
查看次数

Vue.js:如果语句为true,则选中复选框

我的旧车把视图中有以下复选框:

<div class="form-group">
    <input type='checkbox' name='xmlOnline[]' value="stepstone" class='' {{#if (ifIn 'stepstone' job.xmlOnline)}} checked="checked" {{/if}}> Stepstone
    <input type='checkbox' name='xmlOnline[]' value="karriere" class='' {{#if (ifIn 'karriere' job.xmlOnline)}} checked="checked" {{/if}}> Karriere
</div>
Run Code Online (Sandbox Code Playgroud)

因此,如果job.xmlOnline具有“ stepstone”作为值,则应将其标记为已选中。“ karriere”也是如此。

现在,我正在尝试以POST形式在Vue.js中实现相同的目的。这就是对象“作业”的样子:http : //t2w-api.herokuapp.com/jobs/590c20d42b1c4300046bb1b9

因此它可以包含“ karriere”,“ stepstone”,两者或“ null”。

到目前为止,我在组件中得到了什么:

<div v-for="(xml, index) in job.xmlOnline">
    <input type="checkbox" :checked="xml == 'stepstone'"> Stepstone {{ index }}
    <input type="checkbox" :checked="xml == 'karriere'"> Karriere {{ index }}
</div>
Run Code Online (Sandbox Code Playgroud)

复选框被选中,但是我重复了它们。我也不知道如何添加v模型。

这是我组件的来源。做了一些与“资格” /“责任”类似的事情:https : //github.com/markusdanek/t2w-vue/blob/mdanek/2-auth-system/src/components/backend/JobEdit.vue

checkbox model vue.js vuejs2

4
推荐指数
1
解决办法
8517
查看次数

SheetJS:将行值从数组转置为对象

我正在尝试创建一个数组,其中每个“工作日”都是一个带有索引和开始/结束日期的对象,但我不知道如何操作 JSON 以获得特定的结构。

我正在使用以下包: https: //github.com/SheetJS/sheetjs

当前代码:

const workbook = XLSX.read(file.buffer, { type: 'buffer' });
const worksheet = workbook.Sheets['Calendar Config'];
const parsed = XLSX.utils.sheet_to_json(worksheet);
Run Code Online (Sandbox Code Playgroud)

电流输出:

[
  {
    'Calendar Name': 'Standard',
    'Valid From': 44197,
    'Valid To': 44561,
    'Use Holidays': 'yes',
    'Working Day': 'Monday',
    Start: 0.3333333333333333,
    End: 0.8333333333333334
  },
  {
    'Working Day': 'Tuesday',
    Start: 0.3333333333333333,
    End: 0.8333333333333334
  },
  {
    'Working Day': 'Wednesday',
    Start: 0.3333333333333333,
    End: 0.8333333333333334
  },
  {
    'Working Day': 'Thursday',
    Start: 0.3333333333333333,
    End: 0.8333333333333334
  },
  {
    'Working Day': 'Friday',
    Start: 0.3333333333333333, …
Run Code Online (Sandbox Code Playgroud)

javascript excel typescript exceljs sheetjs

3
推荐指数
1
解决办法
3348
查看次数

将网格添加到D3.js折线图

我在这里有这个折线图:

jsfiddle.net/yfqQ4/

我现在的问题是,我在背景中没有得到一个合适的网格,使用这样的图例(y和x-Axis):http://lab.creativebrains.net/linechart.png

任何人都可以发给我一个代码片段,我应该如何实现它或类似的东西?

谢谢!

grid linechart d3.js

2
推荐指数
2
解决办法
8382
查看次数

带有 yup 验证的对象或字符串类型有条件

我在我的 React 应用程序yup中结合使用Formik来验证 TypeScript 模型/接口。我们之前有一个用于以下架构的 yup.object:

export const InputSchema = yup.object({
  id: yup.string(),

  name: yup.string().required().min(MIN_DESC_LENGTH).max(_MAX_NAME_LENGTH),

  description: yup.string().required().matches(/(?!^\d+$)^[\s\S]+$/, 'Please enter a valid description').min(MIN_DESC_LENGTH).max(_MAX_DESC_LENGTH),

  contact: yup.string().required()
});
Run Code Online (Sandbox Code Playgroud)

由于我们现在更改了界面,name因此description字段可以是 astringobject

我仍然想用 验证我的表单yup,所以我尝试使用name: yup.mixed()description: yup.mixed()但现在我明显遇到了min.().matches()函数的问题。

是否可能有stringORobject条件?所以如果是yup.string()then,min/max将被使用,否则只是yup.object().

validation typescript reactjs yup formik

2
推荐指数
1
解决办法
8571
查看次数