work

%matplotlib inline doesn't work on iPython and Jupyter console

匿名 (未验证) 提交于 2019-12-03 00:56:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I'm trying out Jupyter console for the first time, but can't get the %matplotlib inline magic to work. Below is a screenshot of an example session: The plot shows in a separate window after I run Line 6, and Line 7 doesn't do anything. When I run %matplotlib --list , inline is given as one of the options: Available matplotlib backends: ['osx', 'qt4', 'qt5', 'gtk3', 'notebook', 'wx', 'qt', 'nbagg', 'agg', 'gtk', 'tk', 'ipympl', 'inline'] When I try to use another backend, say qt5 , it gives an error message because I don't have any Qt

Why does this while loop work?

匿名 (未验证) 提交于 2019-12-03 00:56:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: Why does this work: Scanner keyboard = new Scanner(System.in); int i; int beerBottles = 100; //Asks the user for the number of beer bottles on the wall System.out.println("How many bottles of beer are on the wall?"); while (!keyboard.hasNextInt()) { System.out.println("Make sure you enter an integer."); keyboard.next(); } //Sets beerBottles to the user entered value beerBottles = keyboard.nextInt(); I stumbled on this while trying to make sure that the user input was an integer without using try/catch and I have no idea why it works or if

EF Data Migrations does not work after close project

匿名 (未验证) 提交于 2019-12-03 00:54:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: i'm using entity framework data migrations. if i change something about entites or something else, i try to use " add-migration MyFirstMigration " on Package Manager Console. But it returns an exception : The term 'add-migration' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was inclu ded, verify that the path is correct and try again. At line:1 char:14 + add-migration <<<< + CategoryInfo : ObjectNotFound: (add-migration:String) [], CommandNotFoundException

ThreadPool using ASIO - Threads Exit, Task not performed

匿名 (未验证) 提交于 2019-12-03 00:53:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I am writing a ThreadPool Class in C++ using Boost ASIO. The following is the code that I have written so far: The ThreadPool Class using namespace std; using namespace boost; class ThreadPoolClass { private: /* The limit to the maximum number of threads to be * instantiated within this pool */ int maxThreads; /* Group of threads in the Pool */ thread_group threadPool; asio::io_service asyncIOService; void _Init() { maxThreads = 0; } public: ThreadPoolClass(); ThreadPoolClass(int maxNumThreads); ThreadPoolClass(const ThreadPoolClass& orig);

How does numpy.swapaxes work?

匿名 (未验证) 提交于 2019-12-03 00:53:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I created a sample array: a = np.arange(18).reshape(9,2) On printing, I get this as output: [[ 0 1] [ 2 3] [ 4 5] [ 6 7] [ 8 9] [10 11] [12 13] [14 15] [16 17]] On executing this reshaping: b = a.reshape(2,3,3).swapaxes(0,2) I get: [[[ 0 9] [ 3 12] [ 6 15]] [[ 1 10] [ 4 13] [ 7 16]] [[ 2 11] [ 5 14] [ 8 17]]] I went through this question, but it does not solve my problem. Reshape an array in NumPy The documentation is not useful either. https://docs.scipy.org/doc/numpy/reference/generated/numpy.swapaxes.html I need to know how the swapping

ckeditor getData() doesnt seem to work as it should

匿名 (未验证) 提交于 2019-12-03 00:53:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: First off I'll start off by saying I am new to javascript so hopefully this isn't a complete face palm question. That being said, the following code should alert the value of the editor when the user clicks off of it. <script type = 'text/javascript' > function openEditor (){ html = "Hello World" ; config = { startupFocus : true }; editor = CKEDITOR . appendTo ( 'textBox' , config , html ); if ( editor ) { editor . on ( 'blur' , function ( event ) { var ckvalue = CKEDITOR . instances . editor . getData (); alert ( ckvalue ); }); }

Vim macros don&#039;t work when using viper + vimpulse in Emacs

匿名 (未验证) 提交于 2019-12-03 00:52:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: Any other tweaks for making emacs as vim-like as possible would be appreciated as well. Addendum: The main reason I don't just use vim is that I love how emacs lets you open a file in two different frames [ADDED: sorry, this was confusing: I mean separate windows , which emacs calls "frames"]. It's like making a vertical split but I don't have to have one enormous window. 回答1: You could run VIM in client server mode , then you could have two windows connecting to one instance, hence removing the need for Emacs. 回答2: I don't know how to make

Gated check-in always associates work items with build

匿名 (未验证) 提交于 2019-12-03 00:52:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I am using TFS2010 with gated check-ins, and even though I have set "Associate Chagesets and Work Items" to false, changesets and work items are associated with this build. This happens only on gated builds. If I run build with other check-in triggers (manual, continuous, schedule), changesets and work items are not associated with the build unless "Associate Changesets and Work Items" is set to true. Any ideas why this is happening? I'm using Visual Studio Scrum process template with default workflow definitions. Maybe there is problem in

how to work with “process.stdin.on”?

匿名 (未验证) 提交于 2019-12-03 00:52:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I'm trying to understand process.stdin. For example - I need to show array elements in console. And i should allow user choose which element will be shown. I have code: var arr = ['elem1','elem2','elem3','elem4','elem5'], lastIndx = arr.length-1; showArrElem(); function showArrElem () { console.log('press number from 0 to ' + lastIndx +', or "q" to quit'); process.stdin.on('readable', function (key) { var key = process.stdin.read(); if (!process.stdin.isRaw) { process.stdin.setRawMode( true ); } else { var i = String(key); if (i == 'q') {

Dates comparing not get work in angular js

匿名 (未验证) 提交于 2019-12-03 00:52:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: Can anyone tell me why my date is not get working. Basically when i try to compare date then is is not working in angularJs var dateObj1 = $filter("date")(Date.now(), 'dd-MMM-yyyy'); // output is "04-May-2016" var dateObj2 = $scope.employee.Tue; // output is "03-May-2016" if (dateObj1 < dateObj2) { return true } else { return false; } above is working but for case below is not working if i use date as "26-Apr-2016" i get true in return var dateObj1 = $filter("date")(Date.now(), 'dd-MMM-yyyy'); // output is "04-May-2016" var dateObj2 = $scope