Rectangle 27 2

The reason which cause the problem is that Windows can not locate R.dll.

R_HOME
R_HOME = D:\R\R-3.2.5\bin;
R.dll
path
path = %R_HOME%\x64;%OTHER_DEPENDENCIES%;

rserve - R.dll file missing - Stack Overflow

r rserve
Rectangle 27 46

Instead of using

Console.Readline()
Console.Read()
Console.ReadKey()

you can run your program using Ctrl+F5 (if you are in Visual Studio). Then Visual Studio will keep the console window open, until you press a key.

Note: You cannot debug your code in this approach.

Hi user. I am a new user to VS and C# in general as well. What does Ctrl + F5 do differently that simply pretty Start do differently?

unfortunately, sometimes it stops to work as expected.

The cause of the problem is that windows automatically closes the terminal window when the program stops. Other systems will keep the Window open automatically. This is the far better way to run the program. Don't use ReadKey, Read or ReadLine for this stuff since this prevents your program of being used in combination with other console applications and piping.

c# - Why is the console window closing immediately without displaying ...

c# .net console-application
Rectangle 27 46

Instead of using

Console.Readline()
Console.Read()
Console.ReadKey()

you can run your program using Ctrl+F5 (if you are in Visual Studio). Then Visual Studio will keep the console window open, until you press a key.

Note: You cannot debug your code in this approach.

Hi user. I am a new user to VS and C# in general as well. What does Ctrl + F5 do differently that simply pretty Start do differently?

unfortunately, sometimes it stops to work as expected.

The cause of the problem is that windows automatically closes the terminal window when the program stops. Other systems will keep the Window open automatically. This is the far better way to run the program. Don't use ReadKey, Read or ReadLine for this stuff since this prevents your program of being used in combination with other console applications and piping.

c# - Why is the console window closing immediately without displaying ...

c# .net console-application
Rectangle 27 9

I had a similar issue a while back.

Did the capitalization on this file, or the directory it was in change at any point?

I had a directory with a capital letter that was changed to all lowercase (let's say it went fromt /Foo to /foo). It gave me all the same problems you've described.

#       modified: bar.txt
#       modified: ../Foo/bar.txt

I also had the same problem where committing or resetting wasn't producing any results.

I think the cause of the problem is that Windows file paths are not case-sensitive, but Unix ones are. Since a lot of these command-line tools like Git are developed on Unix-y systems, they sometimes don't handle this difference well, and can get confused when a file is added as Foo/bar.txt and foo/bar.txt. I think this makes Git think there are two different files, where there's actually only one.

My eventual fix was the same as yours, remove the entire directory from history, then re-adding it (and never changing the capitalization ever again). This also caused the same weirdness you described where I had to remove it twice before it took.

Anyway, I know this isn't a definitive answer, but I've since been able to recreate the problem, so I'm pretty sure that's what caused it (at least for me).

That's exactly what I've experienced. I'm not sure where it happened but I'm sure that git figured out that it was the same file through the SHA1 checksum but was confused since the directory was different... Either way, yours is the only answer that gets close to what I've had. I'm happy to accept it as an answer though, especially if you can reproduce it.

windows - Git won't revert or commit a file that it thinks is modified...

windows git png mingw msysgit
Rectangle 27 1

I also encountered the same error message:

Unable to launch Visual Studio development server because port [xxxx] is in use.

However, I do not have ESET installed. Instead, I had recently installed GlassFish server on my machine and that was causing the problem. Therefore, in Windows Task Manager, I killed the process it runs under which is java.exe and it fixed the problem.

asp.net - Visual Studio Development Server using wrong port - Stack Ov...

asp.net visual-studio visual-studio-2008 vs-devserver
Rectangle 27 10

One way to solve the problem in SourceTree

as I'm on Windows I don't have a command line tool nor do I know how to use one :( Is it the only way to get that sorted out? The GUI doesn't cover all the git's functions? Original Poster

Regarding Git GUIs, no, they don't cover all of Git's functions. They don't even come close. I suggest you check out one of the answers in How do I edit an incorrect commit message in Git?, Git is flexible enough that there are multiple solutions...from the command line.

SourceTree might actually come with the msysgit bash shell already, or it might be able to use the standard Windows command shell. Either way, you open it up form SourceTree by clicking the Terminal button:

That being said, here's one way you can do it in SourceTree. Since you mentioned in the comments that you don't mind "reverting back to the faulty commit" (by which I assume you actually mean resetting, which is a different operation in Git), then here are the steps:

  • Do a hard reset in SourceTree to the bad commit by right-clicking on it and selecting Reset current branch to this commit, and selecting the hard reset option from the drop down.
  • Click the Commit button, then
  • Click on the checkbox at the bottom that says "Amend latest commit".
  • Make the changes you want to the message, then click Commit again. Voila!

if it's not possible because it's already pushed to Bitbucket, I would not mind creating a new repository and starting over.

Does this mean that you're the only person working on the repo? This is important because it's not trivial to change the history of a repo (like by amending a commit) without causing problems for your collaborators. However, assuming that you're the only person working on the repo, then the next thing you would want to do is force push your changed history to the remote.

Be aware, though, that because you did a hard reset to the faulty commit, then force pushing causes you to lose all work that come after it previously. If that's okay, then you might need to use the following command at the command line to do the force push, because I couldn't find an option to do it in SourceTree:

git push remote-repo head -f

You should really learn how to use Git from the command line anyways though, it'll make you more proficient in Git. #ProTip, use msysgit and turn on Quick Edit mode on in the terminal properties, so that you can double click to highlight a line of text, right click to copy, and right click again to paste. It's pretty quick.

git - Edit a commit message in SourceTree Windows (already pushed to r...

git atlassian-sourcetree
Rectangle 27 7

Setting direct i/o mode in Windows:

#pragma once
//----------------------------------------------------------------------------------------
//    PROBLEM DESCRIPTION.
//
//    Output of wchar_t const* is only supported via an operator<< template. User-defined
//    conversions are not considered for template matching. This results in actual argument
//    with user conversion to wchar_t const*, for a wide stream, being presented as the
//    pointer value instead of the string.

#include <iostream>

#ifndef CPPX_NO_IOSTREAM_CONVERSION_FIX
    namespace std{
        template< class Char_traits >
        inline auto operator<<(
            basic_ostream<wchar_t, Char_traits>&    stream,
            wchar_t const                           ch
            )
            -> basic_ostream<wchar_t, Char_traits>&
        { return operator<< <wchar_t, Char_traits>( stream, ch ); }

        template< class Char_traits >
        inline auto operator<<(
            basic_ostream<wchar_t, Char_traits>&    stream,
            wchar_t const* const                    s
            )
            -> basic_ostream<wchar_t, Char_traits>&
        { return operator<< <wchar_t, Char_traits>( stream, s ); }
    }  // namespace std
#endif

This is a standard library extension that's supported by both Visual C++ and MinGW g++.

First, just because it's used in the code, definition of the Ptr type builder (the main drawback of library-provided type builders is that ordinary type inference doesn't kick in, i.e. it's necessary in some cases to still use the raw operator notation):

template< class T >         using Ptr           = T*;
#pragma once
// Mode for a possibly console-attached iostream, such as std::wcout.

namespace cppx {
    enum Iostream_mode: int { unknown, utf_8, direct_io };
}  // namespace cppx
#pragma once
#include <stdio.h>      // FILE, stdin, stdout, stderr, etc.
#include <cppx/core_language/type_builders.hpp>     // cppx::Ptr

namespace cppx {

    inline
    auto set_utf8_mode( const Ptr< FILE > )
        -> Iostream_mode
    { return Iostream_mode::unknown; }

}  // namespace cppx
#pragma once
// UTF-8 mode for a stream. For Unix-land this is a no-op & the locale must be UTF-8.

#include <cppx/core_language/type_builders.hpp>     // cppx::Ptr
#include <cppx/stdlib/Iostream_mode.hpp>

namespace cppx {
    inline
    auto set_utf8_mode( const Ptr< FILE > ) -> Iostream_mode;
}  // namespace cppx

#ifdef _WIN32   // This also covers 64-bit Windows.
#   include "impl/utf8_mode.for_windows.hpp"    // Using Windows-specific _setmode.
#else
#   include "impl/utf8_mode.generic.hpp"        // A do-nothing implementation.
#endif

In addition to setting direct console i/o mode or UTF-8 as appropriate in Windows, this fixes the implicit conversion defect; (indirectly) calls setlocale so that wide streams work in Unix-land; sets boolalpha just for good measure, as a more reasonable default; and includes all standard library headers to do with iostreams (I don't show the separate header file that does that, and it is to a degree a personal preference how much to include or whether to do such inclusion at all):

#pragma once
// Standard iostreams but configured to work, plus, as utility, with boolalpha set.

#include <raw_stdlib/iostreams.hpp>         // <iostream>, <sstream>, <fstream> etc. for convenience.

#include <cppx/core_language/type_builders.hpp>     // cppx::Ptr
#include <cppx/stdlib/utf8_mode.hpp>        // stdin etc., stdlib::set_utf8_mode
#include <locale>                           // std::locale
#include <string>                           // std::string

#include <cppx/stdlib/impl/iostreams_conversion_defect.fix.hpp> // Support arg conv.

inline auto operator<< ( std::wostream& stream, const std::string& s )
    -> std::wostream&
{ return (stream << s.c_str()); }

// The following code's sole purpose is to automatically initialize the streams.
namespace cppx { namespace utf8_iostreams {
    using std::locale;
    using std::ostream;
    using std::cin; using std::cout; using std::cerr; using std::clog;
    using std::wostream;
    using std::wcin; using std::wcout; using std::wcerr; using std::wclog;
    using std::boolalpha;

    namespace detail {
        using std::wstreambuf;

        // Based on "Filtering streambufs" code by James Kanze published at
        // <url: http://gabisoft.free.fr/articles/fltrsbf1.html>.
        class Correcting_input_buffer
            : public wstreambuf
        {
        private:
            wstreambuf*     provider_;
            wchar_t         buffer_;

        protected:
            auto underflow()
                -> int_type override
            {
                if( gptr() < egptr() )  { return *gptr(); }

                const int_type result = provider_->sbumpc();
                if( result == L'\n' )
                {
                    // Ad hoc workaround for g++ extra newline undesirable behavior:
                    provider_->pubsync();
                }

                if( traits_type::not_eof( result ) )
                {
                    buffer_ = result;
                    setg( &buffer_, &buffer_, &buffer_ + 1 );
                }
                return result ;
            }

        public:
            Correcting_input_buffer( wstreambuf* a_provider )
                : provider_( a_provider )
            {}
        };
    }  // namespace detail

    class Usage
    {
    private:
        static
        void init_once()
        {
            // In Windows there is no UTF-8 encoding spec for the locale, in Unix-land
            // it's the default. From Microsoft's documentation: "If you provide a code
            // page like UTF-7 or UTF-8, setlocale will fail, returning NULL". Still
            // this call is essential for making the wide streams work correctly in
            // Unix-land.
            locale::global( locale( "" ) ); // Effects a `setlocale( LC_ALL, "" )`.

            for( const Ptr<FILE> c_stream : {stdin, stdout, stderr} )
            {
                const auto new_mode = set_utf8_mode( c_stream );
                if( c_stream == stdin && new_mode == Iostream_mode::direct_io )
                {
                    static detail::Correcting_input_buffer  correcting_buffer( wcin.rdbuf() );
                    wcin.rdbuf( &correcting_buffer );
                }
            }

            for( const Ptr<ostream> stream_ptr : {&cout, &cerr, &clog} )
            {
                *stream_ptr << boolalpha;
            }

            for( const Ptr<wostream> stream_ptr : {&wcout, &wcerr, &wclog} )
            {
                *stream_ptr << boolalpha;
            }
        }

    public:
        Usage()
        { static const bool dummy = (init_once(), true); (void) dummy; }
    };

    namespace detail {
        const Usage usage;
    }  // namespace detail

}}  // namespace cppx::utf8_iostreams

The two example programs in the question are fixed simply by including the above header instead of or in addition to <iostream>. When it's in addition to it can be in a separate translation unit (except for the implicit conversion defect fix, if that's desired the header for it must be included somehow). Or e.g. as a forced include in the build command.

c++ - How can I make Unicode iostream i/o work in both Windows and Uni...

c++ windows unicode console iostream
Rectangle 27 373

I have found the cause of problem. It is CSS

We don't make any modifications to the default HTML behavior.

ol ol,ul ol{list-style-type:lower-roman}

I don't know CSS but my understanding is that this is the cause of problem. I can get expected result by disabling CSS. (I am from my mobile so I can't use browser inspector)

And as Tommi Kaikkonen mentioned in his answer, the ordered list is because of the dot following 666. See GFM Spec section 5.2.

- 666\. ha.

(as explicitly shown in ForNeVeR's answer)

That is why that 666 number is changed to roman numerals in a GitHub README markdown.

the 1st element in that list so it should show as i not dclxvi. Markdown ordered lists ignore the actual number used and number sequentially, and I haven't seen a way to change that.

However, no: it shows dclxvi, because the generated html code is <ol start="666">, which is consistent with the GFM specs:

If the list item is ordered, then it is also assigned a start number, based on the ordered list marker"

(here, '666' is the ordered list marker)

"The start number of an ordered list is determined by the list number of its initial list item. The numbers of subsequent list items are disregarded."

You get an ordered list <ol> within an un-ordered list item <li>:

<ul>
  <li>
    <ol start="666">
      <li>ha.</li>
    </ol>
  </li>
</ul>
.markdown-body ol {
    padding-left: 2em;
}

If you put 3em, you would get instead of

@MDXF I suspect because the number followed by a dot is transformed into an ordered list on the same line as an un-ordered list item (the '-'). Normally, <li> and <ol> are not supposed to be rendered on the same line...

@MDXF I have edited the answer with the exact CSS rule which cause the incorrect spacing.

Actually I think the output is either a markdown enhancement I haven't heard of, or a bug. Yes - .666 is an ordered sublist, HOWEVER, it is the 1st element in that list so it should show as i not dclxvi . Markdown ordered lists ignore the actual number used and number sequentially, and I haven't seen a way to change that.

@MikeLippert no, it shows at dclxvi, because the generated html code is <ol start="666">, which is consistent with github.github.com/gfm/#list-items: "If the list item is ordered, then it is also assigned a start number, based on the ordered list marker" (here, '666' is the ordered list marker)

GitHub satanically messing with Markdown - changes 666 to DCLXVI - Sta...

github markdown
Rectangle 27 373

I have found the cause of problem. It is CSS

We don't make any modifications to the default HTML behavior.

ol ol,ul ol{list-style-type:lower-roman}

I don't know CSS but my understanding is that this is the cause of problem. I can get expected result by disabling CSS. (I am from my mobile so I can't use browser inspector)

And as Tommi Kaikkonen mentioned in his answer, the ordered list is because of the dot following 666. See GFM Spec section 5.2.

- 666\. ha.

(as explicitly shown in ForNeVeR's answer)

That is why that 666 number is changed to roman numerals in a GitHub README markdown.

the 1st element in that list so it should show as i not dclxvi. Markdown ordered lists ignore the actual number used and number sequentially, and I haven't seen a way to change that.

However, no: it shows dclxvi, because the generated html code is <ol start="666">, which is consistent with the GFM specs:

If the list item is ordered, then it is also assigned a start number, based on the ordered list marker"

(here, '666' is the ordered list marker)

"The start number of an ordered list is determined by the list number of its initial list item. The numbers of subsequent list items are disregarded."

You get an ordered list <ol> within an un-ordered list item <li>:

<ul>
  <li>
    <ol start="666">
      <li>ha.</li>
    </ol>
  </li>
</ul>
.markdown-body ol {
    padding-left: 2em;
}

If you put 3em, you would get instead of

@MDXF I suspect because the number followed by a dot is transformed into an ordered list on the same line as an un-ordered list item (the '-'). Normally, <li> and <ol> are not supposed to be rendered on the same line...

@MDXF I have edited the answer with the exact CSS rule which cause the incorrect spacing.

Actually I think the output is either a markdown enhancement I haven't heard of, or a bug. Yes - .666 is an ordered sublist, HOWEVER, it is the 1st element in that list so it should show as i not dclxvi . Markdown ordered lists ignore the actual number used and number sequentially, and I haven't seen a way to change that.

@MikeLippert no, it shows at dclxvi, because the generated html code is <ol start="666">, which is consistent with github.github.com/gfm/#list-items: "If the list item is ordered, then it is also assigned a start number, based on the ordered list marker" (here, '666' is the ordered list marker)

GitHub satanically messing with Markdown - changes 666 to DCLXVI - Sta...

github markdown
Rectangle 27 13

An interesting side effect of this causes a problem when starting runnable jar files in the command prompt.

If you try (in a command prompt)

No joy, because this is being translated to the following (that doesn't work):

however the following command does work:

If you change the association in file manager as described above to:

in the command prompt and it will now work! EDIT:(However you then get a black console window when you run a form based (non console) Java app, so this is not an ideal solution)

If you run these jar files by double clicking them in windows, no parameters will be passed so your Java code needs to handle the stack overflow exception and include a "press a key" function at the end or the window will just disappear.

In order to pass a parameter in windows you have to create a shortcut to the jar file, which includes the parameter in the target line (right click on the shortcut and select properties) you can not add parameters to the jar file icon itself in this way.

There isn't a single, consistent solution here, but you would have the same problem with any other console application.

There is a windows freeware application called "bat to exe" which you can use to create an exe file from a .bat file with the apropriate command line in it. you can also embed the jar file in the exe with this application, and make it clean it up when it has finished running, so this may be a more elegant solution.

java - Running JAR file on Windows - Stack Overflow

java jar executable-jar
Rectangle 27 2

Apparently there is a bug with psych that is causing the problem.

Wow this one has been a real pain and everyone seems to have a different solution. For me this solution worked on multiple machines/environments on a few occasions:

sudo gem uninstall psych
sudo gem install psych -v 2.0.0

There's a lengthy conversation over on the CococaPods repo about the issue and this fix.

cocoapods - Error on pod install - Stack Overflow

cocoapods
Rectangle 27 2

Apparently there is a bug with psych that is causing the problem.

Wow this one has been a real pain and everyone seems to have a different solution. For me this solution worked on multiple machines/environments on a few occasions:

sudo gem uninstall psych
sudo gem install psych -v 2.0.0

There's a lengthy conversation over on the CococaPods repo about the issue and this fix.

cocoapods - Error on pod install - Stack Overflow

cocoapods
Rectangle 27 32

replace https:// with git://

I've had this problem on Windows with TortoiseGit and this solved it.

@danijar the reason why this works is because it doesn't even use SSL at all. The git:// protocol uses SSH, which uses SSH public and private key pairs for authentication and encryption, instead of an SSL certificate.

git://

Just saved me a lot of hours of googling...

git - SSL certificate rejected trying to access GitHub over HTTPS behi...

git ssl github cygwin ssl-certificate
Rectangle 27 31

replace https:// with git://

I've had this problem on Windows with TortoiseGit and this solved it.

@danijar the reason why this works is because it doesn't even use SSL at all. The git:// protocol uses SSH, which uses SSH public and private key pairs for authentication and encryption, instead of an SSL certificate.

git://

Just saved me a lot of hours of googling...

git - SSL certificate rejected trying to access GitHub over HTTPS behi...

git ssl github cygwin ssl-certificate
Rectangle 27 31

replace https:// with git://

I've had this problem on Windows with TortoiseGit and this solved it.

@danijar the reason why this works is because it doesn't even use SSL at all. The git:// protocol uses SSH, which uses SSH public and private key pairs for authentication and encryption, instead of an SSL certificate.

git://

Just saved me a lot of hours of googling...

git@github.com:user/project.git

git - SSL certificate rejected trying to access GitHub over HTTPS behi...

git ssl github cygwin ssl-certificate
Rectangle 27 31

replace https:// with git://

I've had this problem on Windows with TortoiseGit and this solved it.

@danijar the reason why this works is because it doesn't even use SSL at all. The git:// protocol uses SSH, which uses SSH public and private key pairs for authentication and encryption, instead of an SSL certificate.

git://

Just saved me a lot of hours of googling...

git@github.com:user/project.git

git - SSL certificate rejected trying to access GitHub over HTTPS behi...

git ssl github cygwin ssl-certificate
Rectangle 27 31

replace https:// with git://

I've had this problem on Windows with TortoiseGit and this solved it.

@danijar the reason why this works is because it doesn't even use SSL at all. The git:// protocol uses SSH, which uses SSH public and private key pairs for authentication and encryption, instead of an SSL certificate.

git://

Just saved me a lot of hours of googling...

git - SSL certificate rejected trying to access GitHub over HTTPS behi...

git ssl github cygwin ssl-certificate
Rectangle 27 31

replace https:// with git://

I've had this problem on Windows with TortoiseGit and this solved it.

@danijar the reason why this works is because it doesn't even use SSL at all. The git:// protocol uses SSH, which uses SSH public and private key pairs for authentication and encryption, instead of an SSL certificate.

git://

Just saved me a lot of hours of googling...

git - SSL certificate rejected trying to access GitHub over HTTPS behi...

git ssl github cygwin ssl-certificate
Rectangle 27 66

EDIT: There were a couple of problems in this old, old answer.

So, I'm updating this answer. Hopefully it didn't cause anyone too much trouble.

Here's a new plunker with those issues fixed ... there are likely other things that individual application developers will run into. This is just an example of how to handle this problem.

app.factory('clickAnywhereButHereService', function($document){
  var tracker = [];

  return function($scope, expr) {
    var i, t, len;
    for(i = 0, len = tracker.length; i < len; i++) {
      t = tracker[i];
      if(t.expr === expr && t.scope === $scope) {
        return t;    
      }
    }
    var handler = function() {
      $scope.$apply(expr);
    };

    $document.on('click', handler);

    // IMPORTANT! Tear down this event handler when the scope is destroyed.
    $scope.$on('$destroy', function(){
      $document.off('click', handler);
    });

    t = { scope: $scope, expr: expr };
    tracker.push(t);
    return t;
  };
});

app.directive('clickAnywhereButHere', function($document, clickAnywhereButHereService){
  return {
    restrict: 'A',
    link: function(scope, elem, attr, ctrl) {
      var handler = function(e) {
        e.stopPropagation();
      };
      elem.on('click', handler);

      scope.$on('$destroy', function(){
        elem.off('click', handler);
      });

      clickAnywhereButHereService(scope, attr.clickAnywhereButHere);
    }
  };
});

You were close with the one answer you've found, but I've put together a plunk for you to show you what it was missing.

app.directive('clickAnywhereButHere', function($document){
  return {
    restrict: 'A',
    link: function(scope, elem, attr, ctrl) {
      var elemClickHandler = function(e) {
        e.stopPropagation();
      };

      var docClickHandler = function() {
        scope.$apply(attr.clickAnywhereButHere);
      };

      elem.on('click', elemClickHandler);
      $document.on('click', docClickHandler);

      // teardown the event handlers when the scope is destroyed.
      scope.$on('$destroy', function() {
        elem.off('click', elemClickHandler);
        $document.off('click', docClickHandler);
      });
    }
  }
})
<a click-anywhere-but-here="clickedSomewhereElse()" 
  ng-click="clickedHere()">Don't Click Me!</a>

That's actually a neat solution, thanks!

scope.$apply(attr.clickAnywhereButHere);

Very true. (In my defense, I answered this months ago. :P) I'll make the edit.

If you want to make a 'hide when click outside' function using this directive, like I did, remember to bind the click function to the $document on show and undbind it again on hide.

Please @mlunoe can you make an example of your point? I don't know how to detect when show happens. Thanks!

javascript - Click everywhere but here event - Stack Overflow

javascript angularjs
Rectangle 27 112

The following link should solve all problems with Windows and SciPy; just choose the appropriate download. I was able to pip install the package with no problems. Every other solution I have tried gave me big headaches.

pip install [Local File Location]\[Your specific file such as scipy-0.16.0-cp27-none-win_amd64.whl]

This assumes you have installed the following already:

@Nozdrum and those who want to use that method, you simply need to install numpy+mkl before scipy to have access to blas.

Also, you may want to use the SciPy install from the same site pointed to by @Holt. I had to use the Numpy+MKL and the SciPy supplied in the WHL files to get it working.

I take it that this solution only works with Python 2.7? Looks like there's no compiler for Python 3 as of Aug 2016

This works like a charm. You may want to note that the cp27 in the filenames points to the version of python the .whl is for so download cp35 if you are running python 3.5, cp27 for 2.7 etc.

Just wanted to highlight what @AlexanderMicklewright wrote. It wasn't obvious to me that the cpXX refers to the version X.X of (C)Python. I just implicitly chose the highest version cp36, although I'm running Python 3.5.

python - Windows Scipy Install: No Lapack/Blas Resources Found - Stack...

python windows python-3.x numpy pip