小编xtr*_*3me的帖子

可以在Ubuntu 13.10上的Jenkins中运行msbuild

我正在学习Jenkins,今天我在一个Ubuntu 13.10 AWS实例上安装了Jenkins.总的来说一切都很顺利,除了我没有使用msbuild建立运气.Jenkins很好地安装了MSBuild插件,但是在尝试构建时我一直遇到错误.

我一直在搜索谷歌,并一直在寻找任何显示这个工作ubuntu的时间.所以我想我会在这里发帖并得到最终答案.我的项目在VS中,我将msbuild调用指向sln.任何帮助都会很棒!谢谢!

msbuild ubuntu jenkins jenkins-plugins

5
推荐指数
1
解决办法
8731
查看次数

如何使用Node.js gm graphicsMagick包装器获取

我目前正试图弄清楚如何使用Node.js gm graphicsMagic包装获取单个像素.我的总体目标是在图像中获得前10种颜色的百分比.我正在尝试编写一些函数来获取我的结果,但对于我的生活,我无法弄清楚hwo使用gm包装器获取像素本身.似乎GraphicsMagick有一个GetPixels方法,但我没有运气能够调用它.任何帮助将不胜感激.

谢谢!

node.js graphicsmagick

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

如何动态填充 tailwindcss grid-cols-x 属性?

我目前正在使用 NextJs 和 TailwindCss 开发一个页面。用户能够在本地加载图像并设置他们希望将图像分割成的水平/垂直(行/列)的数量。为了正确显示它,我需要将网格设置为正确的数量父元素中的列。

我有一个在本地调用的 API,它使用 Sharp 来执行分割并计算宽度和高度,并且我对数组中的图像进行排序,以便它们按顺序排列,因为它是异步的。然后,我还生成一个动态类字符串,该字符串仅填充适当数量的列,以便稍后分配给我的父网格元素类。

类串种群

const gridClass = `grid grid-cols-${numCols} gap-2 pt-2`;

//*** At this point, the value of gridClass, if columns were set to 3, using template literals is :

'grid grid-cols-3 gap-2 pt-2'

//The proper string is now populated and passed back in the API response via classCss key

res.status(200).json({ msg: 'Success splitting', tileData: tiles, classCss: gridClass})
Run Code Online (Sandbox Code Playgroud)

页面片段:

<div id="final">
  <div className={tileCss} > //<--This is where I pull in the generated class string …
Run Code Online (Sandbox Code Playgroud)

reactjs next.js tailwind-css nextjs-image

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

如何在 Tensorflow String Tensor 上执行字符串查找和替换?

我目前正在使用 Tensorflow 数据集 api 对指定路径上的图像执行一些增强。文件名本身包含说明是否扩充文件的信息。所以我想要做的是从数据集中读取文件,对于每个文件,在文件名中执行查找,如果找到特定的子字符串,则设置一个 bool 标志并将子字符串替换为“”。

我得到的错误是:

AttributeError: 'Tensor' 对象没有属性 'find'

我无法使用 dtype 字符串条目对张量执行“查找”,因为 find 不是张量的一部分,所以我试图弄清楚如何执行上述操作。我在下面分享了一些代码,我认为这些代码展示了我正在尝试做的事情。性能很重要,因此如果有人发现我将通过 Dataset API 错误地执行此操作,我更愿意以正确的方式执行此操作。

def preproc_img(filenames):
  def parse_fn(filename):
    augment_inst = False
    if cfg.SPLIT_INTO_INST:
      #*****************************************************
      #*** THIS IS WHERE THE LOGIC IS CURRENTLY BREAKING ***
      #*****************************************************
      if filename.find('_data_augmentation') != -1:
        augment_inst = True
        filename = filename.replace('_data_augmentation', '')

    image_string = tf.read_file(filename)
    img = tf.image.decode_image(image_string, channels=3)
    return dict(zip([filename], [img]))   

  dataset = tf.data.Dataset.from_tensor_slices(filenames)
  dataset = dataset.map(parse_fn)
  iterator = dataset.make_one_shot_iterator()
  return iterator.get_next()


def perform_train():
  if __name__ == '__main__':
    filenames …
Run Code Online (Sandbox Code Playgroud)

tensorflow tensorflow-datasets

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