小编Joh*_*ohn的帖子

从命令提示符Windows打开Microsoft Visual Studio代码

有没有办法从Windows命令行启动Microsoft Visual Studio代码?我甚至无法在我的计算机上找到代码目录.它甚至没有问我在哪里下载它.

text-editor visual-studio-code

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

让角度砌体工作它说没有方法'imagesLoaded'

我试图通过passy使用无限滚动指令来进行角度砌体,但我遇到了一些问题.我在这里用plnkr做这件事.它在控制台中表示错误,TypeError:Object [object Object]没有方法'imagesLoaded'.

这是我的HTML

<!DOCTYPE html>
<html>

  <head>
    <script data-require="angular.js@*" data-semver="1.2.13" src="http://code.angularjs.org/1.2.13/angular.js"></script>
    <script data-require="jquery@*" data-semver="2.0.3" src="http://code.jquery.com/jquery-2.0.3.min.js"></script>
    <script data-require="masonry@*" data-semver="2.1.0-7" src="//cdnjs.cloudflare.com/ajax/libs/masonry/2.1.07/jquery.masonry.min.js"></script>
    <script data-require="imagesloaded@*" data-semver="v3.0.2" src="http://desandro.github.io/imagesloaded/imagesloaded.pkgd.min.js"></script>
    <link rel="stylesheet" href="style.css" />
    <script src="angular-masonry.js"></script>
    <script src="myApp.js"></script>
  </head>

  <body ng-app="myApp" ng-controller="DemoController">
    <div masonry="">
      <img class="repeated-img masonry-brick" ng-repeat="image in images" ng-src="http://placehold.it/225x{{image.height}}/{{image.color.bg}}/{{image.color.text}}&text={{image.num}}" />
    </div>
    <div scroll-trigger="loadMore()" threshold="100">Trigger element</div>
  </body>

</html>
Run Code Online (Sandbox Code Playgroud)

和我的无限滚动指令和应用程序模块

var myApp = angular.module('myApp', ['wu.masonry']);
myApp.controller('DemoController', function($scope) {
  $scope.images = [
    {num: 1, height:400}, {num: 2, height:250}, 
    {num: 3, height:225}, {num: 4, …
Run Code Online (Sandbox Code Playgroud)

javascript jquery-masonry angularjs angularjs-directive

8
推荐指数
1
解决办法
8622
查看次数

设置Visual Studio Code以在cygwin上使用gdb进行调试

编辑:我正在使用Microsoft的C / C ++插件进行vscode,您可能会很幸运,可以按照json设置指南进行操作。我还没有尝试过,但是它可能能够帮助您在Windows上正常工作。如果我想出答案并有时间,我会尝试发布答案,但是如果有其他答案,请随时提出答案,如果您的工作正常,我会接受并支持。也可以尝试将这"key": "value""miDebuggerPath": "C:\\rhcygwin64\\bin\\gdb.exe"货币对的值更改为Cygwin输出的窗口路径which gdb


我一直在尝试在Windows的Visual Studio代码中进行C ++的构建和调试。也许我正在以错误的方式进行操作。我已经通过cygwin下载了g ++,并将其添加到了我的路径中。我的tasks.json文件看起来像这样。

{
    // See https://go.microsoft.com/fwlink/?LinkId=733558
    // for the documentation about the tasks.json format
    "version": "0.1.0",
    "command": "g++",
    "isShellCommand": true,
    "args": ["-g", "main.cpp"],
    "showOutput": "always"
}
Run Code Online (Sandbox Code Playgroud)

我运行此任务,它似乎可以毫无问题地生成可执行文件。问题在于下一步让它启动调试器。我launch.json看起来像这样:

{
    "version": "0.2.0",
    "configurations": [
        {
            "name": "C++ Launch",
            "type": "cppdbg",
            "request": "launch",
            "program": "${workspaceRoot}/a.exe",
            "args": [],
            "stopAtEntry": false,
            "cwd": "${workspaceRoot}",
            "environment": [
                {"name":"PYTHONHOME", "value": "/usr/"},
                {"name":"PYTHONPATH", "value": …
Run Code Online (Sandbox Code Playgroud)

c++ windows cygwin gdb visual-studio-code

6
推荐指数
0
解决办法
2163
查看次数

Android在菜单项中使用font-awesome字体作为图标

我只是在学习android,对于我对这个主题缺乏了解而感到抱歉.我主要是作为Web开发人员工作,我们一直使用Font Awesome,所以我试图让它与Android一起工作.我第一次发现我可以在这里使用字体真棒.随着一些深层次的搜索,我发现了如何把字体真棒图标操作菜单栏中的标题这里.通过设置标题而不是图标和标题,我错过了有空间时备份文本的能力.

我想知道我是否可以在字体中设置图标而不是标题,并且只有标题的正常描述性文本.当我在菜单项上执行setIcon方法时,它需要可绘制或可绘制的资源ID.我可以将它转换为drawable吗?什么是最好的方法来保持图标的字体真棒和同时具有图标和标题?任何帮助或方向表示赞赏.

所以我的主要活动中有以下代码:

public class MainActivity extends AppCompatActivity {

   @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

        // https://stackoverflow.com/a/32780748/2066736
        getSupportActionBar().setDisplayShowHomeEnabled(true);
        getSupportActionBar().setLogo(R.drawable.redbird_webkit_onwht);
        getSupportActionBar().setDisplayUseLogoEnabled(true);

        setContentView(R.layout.activity_main);
    }

    @Override
    public boolean onCreateOptionsMenu(Menu menu) {
        // Inflate the menu; this adds items to the action bar if it is present.
        getMenuInflater().inflate(R.menu.main_menu, menu);

        setFontAwesomeMenuItem(menu, R.string.icon_calendar, R.id.action_calendar);
        setFontAwesomeMenuItem(menu, R.string.icon_search, R.id.action_search);
        setFontAwesomeMenuItem(menu, R.string.icon_plus, R.id.action_new_post);

        // menu.add(0, MENU_ITEM_LOGOUT, 102, R.string.logout);

        return true;
    }

    private void setFontAwesomeMenuItem (Menu menu, int rIdString, int rIdIdOfElement) {
        SpannableString s …
Run Code Online (Sandbox Code Playgroud)

android font-awesome

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

我应该在构建步骤中使用`git push --force`

我有一个bitbucket repo,它使用bitbucket-pipelines部署到azure上的本地存储库(对于我们的开发服务器).我正在研究管道在部署到azure之前将使用的构建步骤.我的构建步骤现在唯一能做的就是将构建的文件输出到给定的目录中,该目录是gitignored.然后强制添加gitignored构建文件夹.然后它修改了触发管道的提交,最后强制将提交推送到master.

所以我的文件看起来像这样

# bitbucket decided to make the repository shallow this line
# makes the repo unshallow so we can push later
- git fetch  https://<bitbucket-repo> --unshallow
# doing some setup so we can run the build scripts
- npm install
- npm install -g gulp
# just building files for now we can add tests in later
- npm run build:single
# forcing the build files to be included in the commit
# so that azure has access …
Run Code Online (Sandbox Code Playgroud)

git continuous-integration build azure bitbucket-pipelines

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