qid
int64
1
74.7M
question
stringlengths
15
58.3k
date
stringlengths
10
10
metadata
list
response_j
stringlengths
4
30.2k
response_k
stringlengths
11
36.5k
71,436
I have installed "ProTeX" with "TeXstudio 2.3" & "Miktex 2.9". I get an error ``` ! The fontspec package requires either XeTeX or LuaTeX to function ``` when I attempt to run ``` \documentclass{article} \usepackage{fontspec} \begin{document} Hello world! \end{document} ``` MikTeX is said to come with some of t...
2012/09/13
[ "https://tex.stackexchange.com/questions/71436", "https://tex.stackexchange.com", "https://tex.stackexchange.com/users/18597/" ]
You have to reconfig TeXstudio to use `lualatex` or `xelatex` instead of `pdflatex` which is preconfigured in TeXstudio. You can change it under `options`, then `commands`. You can also use the command line to test whether for example `lualatex` is running. `lualatex test` will compile `test.tex` with `lualatex`.
Also in the MiKTeX Settings (Options window) under the “Formats” tab one must activate the creation of format files (needed for fonts!) for lualatex, luatex, xelatex and xetex: ![window screenshot](https://i.stack.imgur.com/X8UvK.png) Select every single of them, click on ‘Change…’ and in the dialogue window “Format ...
71,436
I have installed "ProTeX" with "TeXstudio 2.3" & "Miktex 2.9". I get an error ``` ! The fontspec package requires either XeTeX or LuaTeX to function ``` when I attempt to run ``` \documentclass{article} \usepackage{fontspec} \begin{document} Hello world! \end{document} ``` MikTeX is said to come with some of t...
2012/09/13
[ "https://tex.stackexchange.com/questions/71436", "https://tex.stackexchange.com", "https://tex.stackexchange.com/users/18597/" ]
If you insist on TeXStudio you may now download [TeXStudio 2.4](http://texstudio.sourceforge.net/). You can now set up your `xelatex` and `lualatex` commands with this version. I am using Ubuntu 12.04 but TeXStudio 2.4 must have the same features as the Windows version. See in the picture below that there is already...
Also in the MiKTeX Settings (Options window) under the “Formats” tab one must activate the creation of format files (needed for fonts!) for lualatex, luatex, xelatex and xetex: ![window screenshot](https://i.stack.imgur.com/X8UvK.png) Select every single of them, click on ‘Change…’ and in the dialogue window “Format ...
17,131,818
Is there any way of accessing canvas 2D context under C++ when using emscripten? I'd like to be able to draw simple shapes/paths using canvas' api functions like `lineTo`, `fillRect`1d done, etc. (so basically use any of the functions listed [here](http://www.w3schools.com/tags/ref_canvas.asp). I will point out tha...
2013/06/16
[ "https://Stackoverflow.com/questions/17131818", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2370280/" ]
According to the [Emscripten documentation](http://kripken.github.io/emscripten-site/docs/getting_started/Tutorial.html#generating-html) you can use SDL with C++ to get at the canvas when you generate Javascript. The SDL conversion is implemented in native canvas calls.
From my understanding, SDL initialized with `SDL_SWSURFACE` will created a "2d" context rather than a "webgl"/"experimental-webgl" one. Functionality can be seen in the sdl\_rotozoom test or on GitHub: <https://github.com/kripken/emscripten/blob/master/tests/sdl_rotozoom.c>
17,131,818
Is there any way of accessing canvas 2D context under C++ when using emscripten? I'd like to be able to draw simple shapes/paths using canvas' api functions like `lineTo`, `fillRect`1d done, etc. (so basically use any of the functions listed [here](http://www.w3schools.com/tags/ref_canvas.asp). I will point out tha...
2013/06/16
[ "https://Stackoverflow.com/questions/17131818", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2370280/" ]
According to the [Emscripten documentation](http://kripken.github.io/emscripten-site/docs/getting_started/Tutorial.html#generating-html) you can use SDL with C++ to get at the canvas when you generate Javascript. The SDL conversion is implemented in native canvas calls.
I've used dynamic binding throught [embind / `emscripten::val`](https://emscripten.org/docs/porting/connecting_cpp_and_javascript/embind.html#embind-val-guide) Example (emscripten v3.0.0): ```cpp #include <emscripten/val.h> auto main() -> int { const auto document = emscripten::val::global("document"); const aut...
17,131,818
Is there any way of accessing canvas 2D context under C++ when using emscripten? I'd like to be able to draw simple shapes/paths using canvas' api functions like `lineTo`, `fillRect`1d done, etc. (so basically use any of the functions listed [here](http://www.w3schools.com/tags/ref_canvas.asp). I will point out tha...
2013/06/16
[ "https://Stackoverflow.com/questions/17131818", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2370280/" ]
From my understanding, SDL initialized with `SDL_SWSURFACE` will created a "2d" context rather than a "webgl"/"experimental-webgl" one. Functionality can be seen in the sdl\_rotozoom test or on GitHub: <https://github.com/kripken/emscripten/blob/master/tests/sdl_rotozoom.c>
I've used dynamic binding throught [embind / `emscripten::val`](https://emscripten.org/docs/porting/connecting_cpp_and_javascript/embind.html#embind-val-guide) Example (emscripten v3.0.0): ```cpp #include <emscripten/val.h> auto main() -> int { const auto document = emscripten::val::global("document"); const aut...
43,793,881
I am trying to change the native 404 response that Tornado web Application instance gives when it fails to route (or acknowledge Content-Type json). I could not find documentation to do this, so am right now just adding a final regex that matches everything: ``` import tornado.web class BaseHandler(tornado.web.Requ...
2017/05/04
[ "https://Stackoverflow.com/questions/43793881", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1168244/" ]
According to the [documentation](http://www.tornadoweb.org/en/stable/guide/structure.html) you can use `default_handler_class` to do this. > > For 404 errors, use the `default_handler_class` Application setting. > This handler should override `prepare` instead of a more specific > method like `get()` so it works wi...
A adapted version of your code worked for me: ``` ... class NotFoundHandler(tornado.web.RequestHandler): def get(self): self.render("404.html") app = tornado.web.Application([ (r"/ping", PingHandler), # ... (r"/.*", NotFoundHandler), ]) ```
49,571,217
I have made a system where I have multiple CheckBoxes and storing the checked value in **MySQL** database using **volley**, however, no value is shown in the database below is my code for checkbox: ``` if(checkBoxBus.isChecked()){ checkbus = checkBoxBus.getText().toString(); } if(checkBoxTrain.isChecked()){ ...
2018/03/30
[ "https://Stackoverflow.com/questions/49571217", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
***1.*** You need to use [str\_replace()](http://php.net/manual/en/function.str-replace.php) along with [call by reference](http://php.net/manual/en/language.references.pass.php) ``` foreach ($array as &$value) { $value = str_replace('s/','l/',$value); } print_r($array); ``` Output:- <https://eval.in/981246> ***...
You can try like this way, ``` $array = array ("romeo/echo/julion/1991s/1992.jpg", "romeo/echo/julion/1257s/1258.jpg", "romeo/echo/julion/1996s/1965.jpg", ); $array = preg_replace("/(s)(?=\/)/", "l", $array); print '<pre>'; print_r($array); print '</pre>'; ``` **Output:** ``` Array ...
49,571,217
I have made a system where I have multiple CheckBoxes and storing the checked value in **MySQL** database using **volley**, however, no value is shown in the database below is my code for checkbox: ``` if(checkBoxBus.isChecked()){ checkbus = checkBoxBus.getText().toString(); } if(checkBoxTrain.isChecked()){ ...
2018/03/30
[ "https://Stackoverflow.com/questions/49571217", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
***1.*** You need to use [str\_replace()](http://php.net/manual/en/function.str-replace.php) along with [call by reference](http://php.net/manual/en/language.references.pass.php) ``` foreach ($array as &$value) { $value = str_replace('s/','l/',$value); } print_r($array); ``` Output:- <https://eval.in/981246> ***...
``` $array = [ "romeo/echo/julion/1991s/1992.jpg", "romeo/echo/julion/1257s/1258.jpg", "romeo/echo/julion/1996s/1965.jpg", ]; $array = preg_replace('/(\d{4})(s)/', '$1l', $array); ``` Result: ``` array(3) { [0] => string(32) "romeo/echo/julion/1991l/1992.jpg" [1] => string(32) "romeo/ech...
2,226,048
How would one prove that: $$ \lim\_{k\rightarrow \infty}\frac{n^{2k}-1}{n^{2k-1}}=n?$$ I basically have no idea. L'Hospital seems not to work here. Any hints?
2017/04/09
[ "https://math.stackexchange.com/questions/2226048", "https://math.stackexchange.com", "https://math.stackexchange.com/users/428038/" ]
Multiply numerator and denominator by $n^{-(2k-1)}$, this gives $$ \frac{n-n^{-(2k-1)}}{1} $$ whose limit is easliy seen to be $\frac n1$, assuming that $n>1$.
Using L'Hospitals you get $$\lim\_{k\to\infty}\frac{n^{2k}-1}{n^{2k-1}}=\lim\_{k\to\infty}\frac{n^{2k}\log n}{n^{2k-1}\log n}=n$$ This works if $n>1$
2,226,048
How would one prove that: $$ \lim\_{k\rightarrow \infty}\frac{n^{2k}-1}{n^{2k-1}}=n?$$ I basically have no idea. L'Hospital seems not to work here. Any hints?
2017/04/09
[ "https://math.stackexchange.com/questions/2226048", "https://math.stackexchange.com", "https://math.stackexchange.com/users/428038/" ]
Multiply numerator and denominator by $n^{-(2k-1)}$, this gives $$ \frac{n-n^{-(2k-1)}}{1} $$ whose limit is easliy seen to be $\frac n1$, assuming that $n>1$.
With *equivalents*: $n^{2k}-1\sim\_{k\to\infty}n^{2k},\;$ hence $\enspace\dfrac{n^{2k}-1}{n^{2k-1}}\sim\_{k\to\infty}\dfrac{n^{2k}}{n^{2k-1}}=n$.
42,512,449
Do you know if I can do a `findAll` where the month of `Date` is December? I try this request but it's not good: ``` db.myCollection.aggregate({}, { "Date": { $month: 12 } }); ``` it's similar to a `SELECT * FROM table WHERE Months(date)=december`?
2017/02/28
[ "https://Stackoverflow.com/questions/42512449", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7131917/" ]
Consider running an aggregation pipeline that uses the **[`$redact`](https://docs.mongodb.com/manual/reference/operator/aggregation/redact/#pipe._S_redact)** operator as it allows you to incorporate with a single pipeline, a functionality with **[`$project`](https://docs.mongodb.com/manual/reference/operator/aggregatio...
This should work for finding records in December for a given year, if that is enough to suit your purposes. ``` db.myCollection.find({ "Date":{ $gte:new Date("2016-12-01T00:00:00Z"), $lt:new Date("2017-01-01T00:00:00Z") }}) ```
42,512,449
Do you know if I can do a `findAll` where the month of `Date` is December? I try this request but it's not good: ``` db.myCollection.aggregate({}, { "Date": { $month: 12 } }); ``` it's similar to a `SELECT * FROM table WHERE Months(date)=december`?
2017/02/28
[ "https://Stackoverflow.com/questions/42512449", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7131917/" ]
Consider running an aggregation pipeline that uses the **[`$redact`](https://docs.mongodb.com/manual/reference/operator/aggregation/redact/#pipe._S_redact)** operator as it allows you to incorporate with a single pipeline, a functionality with **[`$project`](https://docs.mongodb.com/manual/reference/operator/aggregatio...
db.collection('mycollection').find({"Date": {$month: 12}}) <https://docs.mongodb.com/manual/reference/method/db.collection.find/>
42,512,449
Do you know if I can do a `findAll` where the month of `Date` is December? I try this request but it's not good: ``` db.myCollection.aggregate({}, { "Date": { $month: 12 } }); ``` it's similar to a `SELECT * FROM table WHERE Months(date)=december`?
2017/02/28
[ "https://Stackoverflow.com/questions/42512449", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7131917/" ]
db.collection('mycollection').find({"Date": {$month: 12}}) <https://docs.mongodb.com/manual/reference/method/db.collection.find/>
This should work for finding records in December for a given year, if that is enough to suit your purposes. ``` db.myCollection.find({ "Date":{ $gte:new Date("2016-12-01T00:00:00Z"), $lt:new Date("2017-01-01T00:00:00Z") }}) ```
182,602
Is it normal/acceptable to ask researchers/supervisors you're familiar with (in this case, a professor who supervised me some number of years ago) about other researchers who they've likely to have met? Specifically, I'm having to decide on a researcher to supervise me on a short project, but other than a few emails, I...
2022/02/21
[ "https://academia.stackexchange.com/questions/182602", "https://academia.stackexchange.com", "https://academia.stackexchange.com/users/145403/" ]
As long as you are sending the letter to someone you know and who will remember something about you, this should be fine. It may actually be necessary to obtain some such information about potential supervisors in a system in which you need to choose a supervisor as part of the application process. Other places there i...
Answering the titular question - yes, this kind of information harvesting is completely normal and acceptable. However, I would exercise caution and opt for a direct contact with the potential supervisor instead if you do not maintain or have maintained a close enough professional relationship with the person you are ...
57,209,808
So I am trying to scrape a website with multiple pages. Each page has multiple `</table>` tags with ids ranging from 19 to 29. the number of tables on each page is random Here is an example: **page 1 HTML** ``` <table id='table20'>...</table> <table id='table25'>...</table> ``` **page 2 HTML** ``` <table id='tabl...
2019/07/25
[ "https://Stackoverflow.com/questions/57209808", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3902739/" ]
You can use regex expression `'table[12]\d'` ([regex101](https://regex101.com/r/9TIr0U/1)): ``` data = '''<table id='table19'><tr></tr></table> <table id='table20'><tr></tr></table> <table id='table21'><tr></tr></table> <table id='table40'><tr></tr></table>''' from bs4 import BeautifulSoup import re soup = Beautifu...
If that id start string is unique to the tables of interest could you not use attribute = value css selector and starts with operator? ``` for table in soup.select('table[id^=table]'): #do something with table ```
22,833,370
The 'Sales and Trends' section in iTunes Connect was heavily redesigned. The info popup for **Units** says > > "By default, updates and previous purchase downloads are excluded." > > > But how can I switch from 'sales' to 'updates' as from now ?
2014/04/03
[ "https://Stackoverflow.com/questions/22833370", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2270880/" ]
1. Choose Filter and select "Transaction Type" and then select "Updates" ![Transaction Type for iTunes Connect Reports](https://i.stack.imgur.com/97kyK.png) This is what is look like when you are done: ![Update filter for iTunes Connect report](https://i.stack.imgur.com/ocjOp.png) You can also download the report a...
In the latest incarnation of iTunesConnect (as of 2016), you need to click on the "Sales & Trends" section and then add a filter for "Transaction Type". One of the choices will be "Updates". And your results may look like the below screenshot (well, hopefully with even more updated installs :-) [![I only have less ...
669,524
I recently purchased Rayman 2 from GOG.com. The game is old and thus does not give the option to remap keys, and I'd like to make them a little closer to what we're used to today. [![Here's a screenshot from the manual with the key bindings.](https://i.stack.imgur.com/GkLGL.png)](https://i.stack.imgur.com/GkLGL.png) ...
2013/11/04
[ "https://superuser.com/questions/669524", "https://superuser.com", "https://superuser.com/users/171565/" ]
1. First, you're using the wrong command. Use `#IfWinActive`. This is for the whole script. The command you chose checks if a window is active within a script. 2. Then, check with WindowSpy what the ahk\_class of the window is (which is useful if the window title changes). WindowSpy is included in the AutoHotkey instal...
It looks like you have keys mapped to each other which can cause circular calling. Try putting a `$` in front of each of your keys. That will prevent that problem. Example: ``` $w::up ``` [Source](http://www.autohotkey.com/docs/Hotkeys.htm) Regarding your `IfWinActive` issue, I would suggest using `ahk_exe` instea...
127,687
I recently bought a Raspberry Pico to increase the capacities of my oldest Pi3B + tenfold in terms of sensors, buttons, LEDs, GPIO, etc. But I can not find for the moment any protocol or Bus allowing the two controllers to communicate in both directions ... Is this possible in MicroPython? Or in C?
2021/06/24
[ "https://raspberrypi.stackexchange.com/questions/127687", "https://raspberrypi.stackexchange.com", "https://raspberrypi.stackexchange.com/users/135023/" ]
It is unrealistic to expect a "tenfold" increase. There are many ways of communicating with the Pico (all the usual suspects in fact). You may be interested in [Pico as a computer peripheral](https://www.raspberrypi.org/forums/viewtopic.php?f=144&t=309323).
I developed an Instrument which combines the RPI B+ with the PICO to control many circuits and features and capture analog data and process it from the PICO. This is all done with my GUI developed using Python's Tkinter and Matplotlib. This has provided greatly increased capabilities for both. Adafruit has an excellent...
52,702,610
I saw this line of code in a correction in a coding game ``` const tC = readline().split(' ').map(x => +x); ``` I wonder what it does because when I log this function it render the same thing that this one ``` const tC = readline().split(' ').map(x => x); ``` but the rest of the code didn't work Context : ``` ...
2018/10/08
[ "https://Stackoverflow.com/questions/52702610", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10364675/" ]
The `.map(x => +x)` converts all items in the array to a number. And returns a new array with those converted values. If you change it to `.map(x => x)` then the values are left untouched und you just create a copy of the original array. So the strings remain strings which will break the code if numbers are expected. ...
```js function readLine(){ return "123456" } var result = readLine().split("").map(x => +x) console.log(result) ``` `readLine().split("")` // **splits the string into an array as follows ["1", "2", "3", "4", "5", "6"]** `.map(x => +x)` // **[map](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Referen...
52,702,610
I saw this line of code in a correction in a coding game ``` const tC = readline().split(' ').map(x => +x); ``` I wonder what it does because when I log this function it render the same thing that this one ``` const tC = readline().split(' ').map(x => x); ``` but the rest of the code didn't work Context : ``` ...
2018/10/08
[ "https://Stackoverflow.com/questions/52702610", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10364675/" ]
According to this [site](https://www.codingame.com/training/easy/temperatures) below are the inputs the program should receive Line 1: N, the number of temperatures to analyze Line 2: A string with the N temperatures expressed as integers ranging from -273 to 5526 Let me provide line by line comments with respect to...
```js function readLine(){ return "123456" } var result = readLine().split("").map(x => +x) console.log(result) ``` `readLine().split("")` // **splits the string into an array as follows ["1", "2", "3", "4", "5", "6"]** `.map(x => +x)` // **[map](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Referen...
65,292,448
I am sure this question has been asked already but I couldn't find the answer. If I have a function, let's say: ```cpp int Power(int number, int degree){ if(degree==0){ return 1; } return number*Power(number, degree-1); } ``` It works only when the `degree` is a non-negative `int`. How can I pre...
2020/12/14
[ "https://Stackoverflow.com/questions/65292448", "https://Stackoverflow.com", "https://Stackoverflow.com/users/12645782/" ]
There is an alternative to returning a value: Throw a value. A typical example: ``` if(degree<0){ throw std::invalid_argument("degree may not be negative!"); } ``` > > I want the compiler to refuse to compilate the code > > > In general, arguments are unknown until runtime, so this is not typically possible...
The mere fact, that C++ does implicit type conversions, leaves you no way out of the predicament, that if you write `unsigned int x = -1;`, no matter which warnings you turn on with your compiler, you won't see any problem with that. The only rule coming to mind, which might help you with that, is the notorious ["max ...
7,865,510
I have a set of images that I want to present in a JFrame. They are all the same size - each image fills the JFrame. I swap between which is visible, layer style: ``` f = new JFrame("xx"); f.setSize(480, 854); contentPane = f.getContentPane(); ip1 = new ImagePanel(new File("assets/1.jpg")); ip2 = n...
2011/10/23
[ "https://Stackoverflow.com/questions/7865510", "https://Stackoverflow.com", "https://Stackoverflow.com/users/294973/" ]
When you closed your form it's disposed (and can't show again), you should create new instance (in your button handler event): ``` Form f = new Form(); f.Show(); ```
where do you create `Form2` ? you could have a local field of your current form to hold a reference to it, something like: ``` private Form2 myForm2; ``` then when you want to show it you can do this: ``` if(myForm2 == null) { myForm2 = new Form2(); } myForm2.Show(); ``` put the second snippet in the Button\_...
7,865,510
I have a set of images that I want to present in a JFrame. They are all the same size - each image fills the JFrame. I swap between which is visible, layer style: ``` f = new JFrame("xx"); f.setSize(480, 854); contentPane = f.getContentPane(); ip1 = new ImagePanel(new File("assets/1.jpg")); ip2 = n...
2011/10/23
[ "https://Stackoverflow.com/questions/7865510", "https://Stackoverflow.com", "https://Stackoverflow.com/users/294973/" ]
You can also override `Form2` [`Closing`](http://msdn.microsoft.com/en-us/library/system.windows.forms.form.closing.aspx) event, interrupt it and call `Hide()` method instead. This way, you don't have to create new instance everytime you want to show your window. **Edit:** [Here's](https://stackoverflow.com/questi...
where do you create `Form2` ? you could have a local field of your current form to hold a reference to it, something like: ``` private Form2 myForm2; ``` then when you want to show it you can do this: ``` if(myForm2 == null) { myForm2 = new Form2(); } myForm2.Show(); ``` put the second snippet in the Button\_...
7,865,510
I have a set of images that I want to present in a JFrame. They are all the same size - each image fills the JFrame. I swap between which is visible, layer style: ``` f = new JFrame("xx"); f.setSize(480, 854); contentPane = f.getContentPane(); ip1 = new ImagePanel(new File("assets/1.jpg")); ip2 = n...
2011/10/23
[ "https://Stackoverflow.com/questions/7865510", "https://Stackoverflow.com", "https://Stackoverflow.com/users/294973/" ]
You can also override `Form2` [`Closing`](http://msdn.microsoft.com/en-us/library/system.windows.forms.form.closing.aspx) event, interrupt it and call `Hide()` method instead. This way, you don't have to create new instance everytime you want to show your window. **Edit:** [Here's](https://stackoverflow.com/questi...
When you closed your form it's disposed (and can't show again), you should create new instance (in your button handler event): ``` Form f = new Form(); f.Show(); ```
1,395
I have a page that lists programs people can donate to for a non-profit. This list is updated from a separate database. The current flow takes the entries offline via using Solspace Import to mark them closed, then a second import will edit or add new entries. Those that are still active are then marked open and the li...
2012/12/10
[ "https://expressionengine.stackexchange.com/questions/1395", "https://expressionengine.stackexchange.com", "https://expressionengine.stackexchange.com/users/80/" ]
Take a look at **[Email-from-Template](http://devot-ee.com/add-ons/email-from-template)**. > > This plugin sends its tag contents in an email (with or without > echoing that content back to the template). > > > By placing it in a template, and inside a conditional if necessary, you can trigger an email to be sen...
There's an addon [Encaf 404 Email](http://devot-ee.com/add-ons/encaf-404-email) which is pretty close to what you need. It is triggered on a 404 error. If you know php perhaps you could use that add-on as a guide on creating your own plugin to achieve what you need. Another possibility is [Postmaster](http://devot-ee....
48,586
What is the meaning of "all" in Isaiah 45:25 > > In the LORD all the descendants of Israel Shall be justified, and shall glory. > > > Is this an example of Isaiah hyperbole?
2020/06/19
[ "https://hermeneutics.stackexchange.com/questions/48586", "https://hermeneutics.stackexchange.com", "https://hermeneutics.stackexchange.com/users/35953/" ]
The Puzzle implied in this question about "descendants of Israel will be justified" (Isa 45:25) is only such if one makes the assumption that "descendants of Israel" means biological descendants. This is untrue now and always was in the Biblical sense. Note the following examples of people who were NOT biological desce...
The apostle Paul wrote, “Not all those who are of Israel are Israel.”1 Meaning, not all those who are physically descended from the patriarch Israel, those who are “Israel according to the flesh,”2 are “the Israel of God,”3 those who are Israel according to the spirit.4 Indeed, he also wrote, “Although the number of th...
48,586
What is the meaning of "all" in Isaiah 45:25 > > In the LORD all the descendants of Israel Shall be justified, and shall glory. > > > Is this an example of Isaiah hyperbole?
2020/06/19
[ "https://hermeneutics.stackexchange.com/questions/48586", "https://hermeneutics.stackexchange.com", "https://hermeneutics.stackexchange.com/users/35953/" ]
The Puzzle implied in this question about "descendants of Israel will be justified" (Isa 45:25) is only such if one makes the assumption that "descendants of Israel" means biological descendants. This is untrue now and always was in the Biblical sense. Note the following examples of people who were NOT biological desce...
There's a couple God called and justified, Abram (and Sarai) who became Abraham and Sara, to reproduce a nation for God to have a family and the best setting (Israel) to join the human race. Why? So that God Himself then could have a kingdom and family, forever, composed of all who take Him in. He was in the world, an...
23,593
I'm looking to find writings on military thought. Not in the sense of tactics or history of war, but in the sense of being in or running a military force in the abstract. Ideally, possible topics would include questions of organization, discipline, military ethics, and so on. In theory, this could also work with someth...
2015/05/07
[ "https://philosophy.stackexchange.com/questions/23593", "https://philosophy.stackexchange.com", "https://philosophy.stackexchange.com/users/8851/" ]
The most famous philosophical work on military matters is [Sun Tzu's *The Art of War.*](http://en.wikipedia.org/wiki/The_Art_of_War) Although thousands of years old, it outlines general principles still applicable today, and although largely about tactics, it also is centrally concerned with "running a military force i...
For the psychological/philosophical side of military thought, D. Grossman's book [On Killing](http://en.wikipedia.org/wiki/On_Killing) could be relevant - while it covers a rather narrower topic compared to the whole military life as such, it is probably the main distinction between the mentality of military and other ...
23,593
I'm looking to find writings on military thought. Not in the sense of tactics or history of war, but in the sense of being in or running a military force in the abstract. Ideally, possible topics would include questions of organization, discipline, military ethics, and so on. In theory, this could also work with someth...
2015/05/07
[ "https://philosophy.stackexchange.com/questions/23593", "https://philosophy.stackexchange.com", "https://philosophy.stackexchange.com/users/8851/" ]
The classical reference for ground warfare in the European style has been the texts of Clausewitz (q.v. <http://www.clausewitz.com/>) for a few generations. He made logical sense of most of Napoleon's actions for the next generation, and since Napoleon was too busy running things to try to explain himself, he is taken ...
For the psychological/philosophical side of military thought, D. Grossman's book [On Killing](http://en.wikipedia.org/wiki/On_Killing) could be relevant - while it covers a rather narrower topic compared to the whole military life as such, it is probably the main distinction between the mentality of military and other ...
42,994,617
i'm using FSCalendar and want to remove days (Sun, mon, Tue, Wed, Thu, Fri, and Sat) from calendar [![enter image description here](https://i.stack.imgur.com/a8Vwv.png)](https://i.stack.imgur.com/a8Vwv.png) for now i only change the color to clear ``` calendarView.appearance.weekdayTextColor = UIColor.clear ```
2017/03/24
[ "https://Stackoverflow.com/questions/42994617", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6154083/" ]
You can hide/remvove days from calendar using `calendarWeekdayView`. **Hide** ``` calendarView.calendarWeekdayView.isHidden = true ``` **Remove** ``` calendarView.calendarWeekdayView.removeFromSuperview() ```
This library contains the property to handle this condition self.calendar.weekdayHeight = 0 and this will remove the days header.
4,831
It occurred to me that when we edit questions for punctuation or use of capitals or lower-case letters, and also make minor usage corrections (prepositions or verb tense), it might be useful to put the latter (usage corrections) in bold so the OP sees the correction. **Of course, I am not referring to completely chang...
2018/10/20
[ "https://ell.meta.stackexchange.com/questions/4831", "https://ell.meta.stackexchange.com", "https://ell.meta.stackexchange.com/users/33113/" ]
While this *might* help the OP, I don't think it would make sense to anyone else who reads the question. Bolding carries meaning in itself, so some people would be trying to figure out what it meant. Others would realize it's meaningless (at least to them) and be annoyed. (Using some other symbol instead of bold doesn'...
I agree with Laurel's post. I wanted to provide an example to make some of Laurel and Andrew T.'s points clearer and add a little bit of my own commentary. In the comments, you also said, "There could be any number of ways for that to happen such as editing triggering an bottom-of-the-post asterisk with an explanatory...
4,831
It occurred to me that when we edit questions for punctuation or use of capitals or lower-case letters, and also make minor usage corrections (prepositions or verb tense), it might be useful to put the latter (usage corrections) in bold so the OP sees the correction. **Of course, I am not referring to completely chang...
2018/10/20
[ "https://ell.meta.stackexchange.com/questions/4831", "https://ell.meta.stackexchange.com", "https://ell.meta.stackexchange.com/users/33113/" ]
While this *might* help the OP, I don't think it would make sense to anyone else who reads the question. Bolding carries meaning in itself, so some people would be trying to figure out what it meant. Others would realize it's meaningless (at least to them) and be annoyed. (Using some other symbol instead of bold doesn'...
[In the past, we've concluded that edits to *questions* need to avoid covering up relatively minor mistakes that can serve as clues to the OP's skill level](https://ell.meta.stackexchange.com/questions/2769/is-it-really-pointless-to-edit-questions-to-use-correct-english-on-ell). This is a well-established policy, and I...
73,406,555
I have a tree of data representing a mathematical function, like this: [![enter image description here](https://i.stack.imgur.com/ZsUpG.jpg)](https://i.stack.imgur.com/ZsUpG.jpg) It is stored in arrays, so 2+3^2 would be represented as: ``` ["+", 2, ["^2", 3] ] ``` To actually evaluate the tree, I have a recursive ...
2022/08/18
[ "https://Stackoverflow.com/questions/73406555", "https://Stackoverflow.com", "https://Stackoverflow.com/users/14073246/" ]
The tree representation is directly supported by the language so you can just write something like: ``` +(^(*(5,10),2),+(30,25)) ``` This will be the fastest However if you want a parser you could leverage the power of language and to this as a one liner. I propose you the following representation of math tree hav...
I think you can get better performance if you make use of Julia's multiple dispatch, using tuples as your main type instead of heterogenous arrays. ``` julia> using BenchmarkTools julia> evaluate(x::Number) = x evaluate (generic function with 1 method) julia> function evaluate(ex::Tuple{Symbol,Union{Tuple,Number}}) ...
73,406,555
I have a tree of data representing a mathematical function, like this: [![enter image description here](https://i.stack.imgur.com/ZsUpG.jpg)](https://i.stack.imgur.com/ZsUpG.jpg) It is stored in arrays, so 2+3^2 would be represented as: ``` ["+", 2, ["^2", 3] ] ``` To actually evaluate the tree, I have a recursive ...
2022/08/18
[ "https://Stackoverflow.com/questions/73406555", "https://Stackoverflow.com", "https://Stackoverflow.com/users/14073246/" ]
I think you can get better performance if you make use of Julia's multiple dispatch, using tuples as your main type instead of heterogenous arrays. ``` julia> using BenchmarkTools julia> evaluate(x::Number) = x evaluate (generic function with 1 method) julia> function evaluate(ex::Tuple{Symbol,Union{Tuple,Number}}) ...
A bit of a frame challenge, but depending on your high-level goals you could consider not inventing your own expression system, but reuse something like [Symbolics.jl](https://github.com/JuliaSymbolics/Symbolics.jl). Symbolic algebra packages usually have built-in support for expression simplification and "compilation...
73,406,555
I have a tree of data representing a mathematical function, like this: [![enter image description here](https://i.stack.imgur.com/ZsUpG.jpg)](https://i.stack.imgur.com/ZsUpG.jpg) It is stored in arrays, so 2+3^2 would be represented as: ``` ["+", 2, ["^2", 3] ] ``` To actually evaluate the tree, I have a recursive ...
2022/08/18
[ "https://Stackoverflow.com/questions/73406555", "https://Stackoverflow.com", "https://Stackoverflow.com/users/14073246/" ]
The tree representation is directly supported by the language so you can just write something like: ``` +(^(*(5,10),2),+(30,25)) ``` This will be the fastest However if you want a parser you could leverage the power of language and to this as a one liner. I propose you the following representation of math tree hav...
A bit of a frame challenge, but depending on your high-level goals you could consider not inventing your own expression system, but reuse something like [Symbolics.jl](https://github.com/JuliaSymbolics/Symbolics.jl). Symbolic algebra packages usually have built-in support for expression simplification and "compilation...
6,834,355
The GNU version of `rm` has a cool -I flag. From the manpage: ``` -I prompt once before removing more than three files, or when removing recursively. Less intrusive than -i, while still giving protection against most mistakes ``` Macs don't: ``` $ rm -I scratch rm: illegal option -- I usage: rm [-f ...
2011/07/26
[ "https://Stackoverflow.com/questions/6834355", "https://Stackoverflow.com", "https://Stackoverflow.com/users/329700/" ]
I'd say test the output of `rm -I` on a temp file, if it passes then use the alias ``` touch /tmp/my_core_util_check if rm -I /tmp/my_core_util_check > /dev/null 2>&1 ; then alias rm="rm -I" else rm /tmp/my_core_util_check; fi ```
You could always ask rm its version with `--version` and check to see if it says *gnu* or *coreutils* like this: ``` rm --version 2>&1 | grep -i gnu &> /dev/null [ $? -eq 0 ] && alias rm="rm -I" ```
6,834,355
The GNU version of `rm` has a cool -I flag. From the manpage: ``` -I prompt once before removing more than three files, or when removing recursively. Less intrusive than -i, while still giving protection against most mistakes ``` Macs don't: ``` $ rm -I scratch rm: illegal option -- I usage: rm [-f ...
2011/07/26
[ "https://Stackoverflow.com/questions/6834355", "https://Stackoverflow.com", "https://Stackoverflow.com/users/329700/" ]
I'd say test the output of `rm -I` on a temp file, if it passes then use the alias ``` touch /tmp/my_core_util_check if rm -I /tmp/my_core_util_check > /dev/null 2>&1 ; then alias rm="rm -I" else rm /tmp/my_core_util_check; fi ```
how about something like this? ``` #!/bin/bash rm -I &> /dev/null if [ "$?" == "0" ]; then echo coreutils detected else echo bsd version detected fi ```
6,834,355
The GNU version of `rm` has a cool -I flag. From the manpage: ``` -I prompt once before removing more than three files, or when removing recursively. Less intrusive than -i, while still giving protection against most mistakes ``` Macs don't: ``` $ rm -I scratch rm: illegal option -- I usage: rm [-f ...
2011/07/26
[ "https://Stackoverflow.com/questions/6834355", "https://Stackoverflow.com", "https://Stackoverflow.com/users/329700/" ]
`strings /bin/rm | grep -q 'GNU coreutils'` if $? is 0, it is coreutils
I'd say test the output of `rm -I` on a temp file, if it passes then use the alias ``` touch /tmp/my_core_util_check if rm -I /tmp/my_core_util_check > /dev/null 2>&1 ; then alias rm="rm -I" else rm /tmp/my_core_util_check; fi ```
6,834,355
The GNU version of `rm` has a cool -I flag. From the manpage: ``` -I prompt once before removing more than three files, or when removing recursively. Less intrusive than -i, while still giving protection against most mistakes ``` Macs don't: ``` $ rm -I scratch rm: illegal option -- I usage: rm [-f ...
2011/07/26
[ "https://Stackoverflow.com/questions/6834355", "https://Stackoverflow.com", "https://Stackoverflow.com/users/329700/" ]
You could always ask rm its version with `--version` and check to see if it says *gnu* or *coreutils* like this: ``` rm --version 2>&1 | grep -i gnu &> /dev/null [ $? -eq 0 ] && alias rm="rm -I" ```
how about something like this? ``` #!/bin/bash rm -I &> /dev/null if [ "$?" == "0" ]; then echo coreutils detected else echo bsd version detected fi ```
6,834,355
The GNU version of `rm` has a cool -I flag. From the manpage: ``` -I prompt once before removing more than three files, or when removing recursively. Less intrusive than -i, while still giving protection against most mistakes ``` Macs don't: ``` $ rm -I scratch rm: illegal option -- I usage: rm [-f ...
2011/07/26
[ "https://Stackoverflow.com/questions/6834355", "https://Stackoverflow.com", "https://Stackoverflow.com/users/329700/" ]
I would recommend not starting down this road at all. Target your scripts to be as portable as possible, and only rely on flags/options/behaviors you can count on. Shell scripting is hard enough - why add more room for error? To get a sense of the kind of thing I have in mind, check out [Ryan Tomayko's *Shell Haters* ...
You could always ask rm its version with `--version` and check to see if it says *gnu* or *coreutils* like this: ``` rm --version 2>&1 | grep -i gnu &> /dev/null [ $? -eq 0 ] && alias rm="rm -I" ```
6,834,355
The GNU version of `rm` has a cool -I flag. From the manpage: ``` -I prompt once before removing more than three files, or when removing recursively. Less intrusive than -i, while still giving protection against most mistakes ``` Macs don't: ``` $ rm -I scratch rm: illegal option -- I usage: rm [-f ...
2011/07/26
[ "https://Stackoverflow.com/questions/6834355", "https://Stackoverflow.com", "https://Stackoverflow.com/users/329700/" ]
`strings /bin/rm | grep -q 'GNU coreutils'` if $? is 0, it is coreutils
You could always ask rm its version with `--version` and check to see if it says *gnu* or *coreutils* like this: ``` rm --version 2>&1 | grep -i gnu &> /dev/null [ $? -eq 0 ] && alias rm="rm -I" ```
6,834,355
The GNU version of `rm` has a cool -I flag. From the manpage: ``` -I prompt once before removing more than three files, or when removing recursively. Less intrusive than -i, while still giving protection against most mistakes ``` Macs don't: ``` $ rm -I scratch rm: illegal option -- I usage: rm [-f ...
2011/07/26
[ "https://Stackoverflow.com/questions/6834355", "https://Stackoverflow.com", "https://Stackoverflow.com/users/329700/" ]
I would recommend not starting down this road at all. Target your scripts to be as portable as possible, and only rely on flags/options/behaviors you can count on. Shell scripting is hard enough - why add more room for error? To get a sense of the kind of thing I have in mind, check out [Ryan Tomayko's *Shell Haters* ...
how about something like this? ``` #!/bin/bash rm -I &> /dev/null if [ "$?" == "0" ]; then echo coreutils detected else echo bsd version detected fi ```
6,834,355
The GNU version of `rm` has a cool -I flag. From the manpage: ``` -I prompt once before removing more than three files, or when removing recursively. Less intrusive than -i, while still giving protection against most mistakes ``` Macs don't: ``` $ rm -I scratch rm: illegal option -- I usage: rm [-f ...
2011/07/26
[ "https://Stackoverflow.com/questions/6834355", "https://Stackoverflow.com", "https://Stackoverflow.com/users/329700/" ]
`strings /bin/rm | grep -q 'GNU coreutils'` if $? is 0, it is coreutils
how about something like this? ``` #!/bin/bash rm -I &> /dev/null if [ "$?" == "0" ]; then echo coreutils detected else echo bsd version detected fi ```
6,834,355
The GNU version of `rm` has a cool -I flag. From the manpage: ``` -I prompt once before removing more than three files, or when removing recursively. Less intrusive than -i, while still giving protection against most mistakes ``` Macs don't: ``` $ rm -I scratch rm: illegal option -- I usage: rm [-f ...
2011/07/26
[ "https://Stackoverflow.com/questions/6834355", "https://Stackoverflow.com", "https://Stackoverflow.com/users/329700/" ]
`strings /bin/rm | grep -q 'GNU coreutils'` if $? is 0, it is coreutils
I would recommend not starting down this road at all. Target your scripts to be as portable as possible, and only rely on flags/options/behaviors you can count on. Shell scripting is hard enough - why add more room for error? To get a sense of the kind of thing I have in mind, check out [Ryan Tomayko's *Shell Haters* ...
1,223,766
Given the class Foo with an old-style constructor ``` class Foo { public function Foo() { //does constructing stuff } } ``` Is there any functional difference between calling the parent constructor with a new style constructor or the old style constructor? ``` class Bar extends Foo { public ...
2009/08/03
[ "https://Stackoverflow.com/questions/1223766", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4668/" ]
I would say both syntax do exactly the same thing... Edit : after writting the rest of the answer, actually, this is not entirely true ^^ It depends on what you declare ; see the two examples : If you define `Foo` as constructor, and call it with `__construct`, it seems it's working ; the following code : ``` class ...
As of PHP 5.3.3 the old style ctor will not work when you are using namespaces. See <http://www.php.net/archive/2010.php#id2010-07-22-2>
50,534,738
In my case, I have a table which stores a collection of records with similar information but each with unique type column, used in various parts of my application. I know, I know this is "micro-optimisation" but it it an integral part of my application (it will store many records), and I would like it to be optimised, ...
2018/05/25
[ "https://Stackoverflow.com/questions/50534738", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8137103/" ]
I think best way of doing this is using query job first. 1. You got your table to extract from somewhere and run query job 2. Run extract as CSV without headers There is code that doing this ``` job_config = bigquery.QueryJobConfig() gcs_filename = 'file_with_nulls*.json.gzip' table_ref = client.dataset(dataset_id)...
This argument has been raised before in SO. I suggest you to review [this post](https://stackoverflow.com/questions/36233807/null-values-behaviour-in-bigquery-queries-results) including explanations and workarounds for your issue. There are some good answers, as for example this one, from Mosha (Google Software Engin...
146,689
I am working on two simple recommender systems - Collaborative (item-item a user-user) and Content Based. I would like to evaluate prediction accuracy of these systems. I am used to divide dataset into two parts - training set and evaluation dataset. Is it needed to do in Recommender systems? I have no idea how to do ...
2015/04/16
[ "https://stats.stackexchange.com/questions/146689", "https://stats.stackexchange.com", "https://stats.stackexchange.com/users/21216/" ]
Typically, it is the events that are split, either based on time or on the users. That is, given a set of users $U$, you have a set of events $E = \{ (t,u,i) \}$ that the user $u$ viewed/rated/bought item $i$ at time $t$. On option is to pick $t\_1$ and $t\_2$ such that $t\_1<t\_2$ and define $E\_{\mathrm{training}} = ...
Assuming users' interest profile is static, you can do a normal cross-folding process for evaluation, partitioning over the rating logs. If you assume dynamic user interest, then your model needs to be re-evaluated every now and then to capture the changes (which is what real world systems do). Therefore within a time...
34,094,792
I am trying to create a service on my Debian Wheezy system. When trying to use start-stop-daemon to run autossh, the pid contained into the pidfile does not match with the autossh process. ``` $ AUTOSSH_PIDFILE=/var/run/padstunnel.pid $ sudo start-stop-daemon --make-pidfile --background --name mytunnel --start --pidf...
2015/12/04
[ "https://Stackoverflow.com/questions/34094792", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1011366/" ]
The solution I found is inspired by [this answer](https://serverfault.com/a/285739/139286 "this answer"). Actually, the `AUTOSSH_PIDFILE` variable could not be used by `autossh` (because start-stop-daemon runs in a different environment). So the workaround is to use : ``` $ sudo start-stop-daemon --background --name...
Just an update for a working solution from 7 years into the future as I recently came across this exact same issue. The `AUTOSSH_PIDFILE` variable for some reason will make the program fail without any output, including when using `-v`. What I found would work is simply foregoing `-f` on autossh and using `--backgroun...
14,730,693
I have a strange issue when attempting to use navigator.notification.alert() in Xcode 4.6 using Phonegap 2.3.0. I have two files, index.html and other.html. Clicking 'Test the alert' from index.html triggers the alert as expected, however after dismissing the alert and then navigating to other.html, clicking 'Test the...
2013/02/06
[ "https://Stackoverflow.com/questions/14730693", "https://Stackoverflow.com", "https://Stackoverflow.com/users/833303/" ]
This problem exists since Phonegap 2.2 also see: [Notification in PhoneGap for iOS](https://stackoverflow.com/questions/14437061/notification-in-phonegap-for-ios) Same problem on WindowsMobile on Phonegap 2.3. I didn't update from 2.1 ... seems to be the last version where it worked properly. Don't forget to add `doc...
Update to latest version of phonegap (2.4.0). Seems to resolve the problem. At least for me everything works normally now.
53,188,657
I am working on terraform script to automate aws resource creation. As part of that I am creating a vpc and trying to enable vpc flow logs for that. I have created an s3 bucket and also created an iam role as mentioned in the terraform docs <https://www.terraform.io/docs/providers/aws/r/flow_log.html> My terraform cod...
2018/11/07
[ "https://Stackoverflow.com/questions/53188657", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6826319/" ]
I have updated my terraform version from **0.11.8** to **0.11.10**. I am now able to configure the vpc flow logs to s3 without any errors using the below resource block. ``` resource "aws_flow_log" "vpc_flow_log" { log_destination = "${var.s3_bucket_arn}" log_destination_type = "s3" traffic_type ...
I got this error as well because I was using `1.41` of the AWS provider. Looking through the code I discovered [that support for these properties](https://github.com/terraform-providers/terraform-provider-aws/commit/f38bf13157f20bc650a6a3dce7fd3c329180a919) was only released in `1.42`. Upgrading to `1.49` did the trick...
53,188,657
I am working on terraform script to automate aws resource creation. As part of that I am creating a vpc and trying to enable vpc flow logs for that. I have created an s3 bucket and also created an iam role as mentioned in the terraform docs <https://www.terraform.io/docs/providers/aws/r/flow_log.html> My terraform cod...
2018/11/07
[ "https://Stackoverflow.com/questions/53188657", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6826319/" ]
I got this error as well because I was using `1.41` of the AWS provider. Looking through the code I discovered [that support for these properties](https://github.com/terraform-providers/terraform-provider-aws/commit/f38bf13157f20bc650a6a3dce7fd3c329180a919) was only released in `1.42`. Upgrading to `1.49` did the trick...
While sending logs of VPC to s3 you can not set a log\_group\_name but you can append group name to the arn of s3 , it will automatically create a folder for you. ``` resource "aws_flow_log" "vpc_flow_log" { log_destination = "${var.s3_bucket_arn}/group_name" log_destination_type = "s3" traffic_type = "AL...
53,188,657
I am working on terraform script to automate aws resource creation. As part of that I am creating a vpc and trying to enable vpc flow logs for that. I have created an s3 bucket and also created an iam role as mentioned in the terraform docs <https://www.terraform.io/docs/providers/aws/r/flow_log.html> My terraform cod...
2018/11/07
[ "https://Stackoverflow.com/questions/53188657", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6826319/" ]
I have updated my terraform version from **0.11.8** to **0.11.10**. I am now able to configure the vpc flow logs to s3 without any errors using the below resource block. ``` resource "aws_flow_log" "vpc_flow_log" { log_destination = "${var.s3_bucket_arn}" log_destination_type = "s3" traffic_type ...
While sending logs of VPC to s3 you can not set a log\_group\_name but you can append group name to the arn of s3 , it will automatically create a folder for you. ``` resource "aws_flow_log" "vpc_flow_log" { log_destination = "${var.s3_bucket_arn}/group_name" log_destination_type = "s3" traffic_type = "AL...
33,285,417
I'm building a form which will be used to register users. Actually I'm having troubles with the css, I'd like to center a child div inside the parent div but without success. I've tried different methods and I read a lot here but seems that the other solutions don't fit for me. I don't want to use `text-align: cent...
2015/10/22
[ "https://Stackoverflow.com/questions/33285417", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3693864/" ]
Set a `max-width`, and `margin-left` and `margin-right` to `auto` for the child div. When the viewport goes beyond the `max-width`, the child div will center inside the parent div. (This is assuming you only want horizontal centering) Add the following CSS declarations to `.registerPage2`: ``` .registerPage2 { ma...
By default the second div was taking 100%. It was centered but still no place for margin because 100% width. ```css /* ---===### REGISTER PAGE ###===--- */ .registerPage1{ width:800px; height: auto; background-color : red; } .registerPage2{ width:600px; margin:auto; background-color : pink; ...
33,285,417
I'm building a form which will be used to register users. Actually I'm having troubles with the css, I'd like to center a child div inside the parent div but without success. I've tried different methods and I read a lot here but seems that the other solutions don't fit for me. I don't want to use `text-align: cent...
2015/10/22
[ "https://Stackoverflow.com/questions/33285417", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3693864/" ]
Set a `max-width`, and `margin-left` and `margin-right` to `auto` for the child div. When the viewport goes beyond the `max-width`, the child div will center inside the parent div. (This is assuming you only want horizontal centering) Add the following CSS declarations to `.registerPage2`: ``` .registerPage2 { ma...
What about: .child-div{ margin:0 auto; } .parent-div{ line-height: EQUAL TO DIV HEIGHT } You will get vertical and horitzontal alignment.
51,170,125
``` subarray = [] for dic in dics: if "TargetKey" in dic: subarray.append(dic) ``` This is the only thing I can think of now, how to combine them to one line ? eg. I like this style: `[dics["TargetKey"] for dic in dics]` Trying to avoid create a new array variable, since I only need use once. Appreci...
2018/07/04
[ "https://Stackoverflow.com/questions/51170125", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5347470/" ]
``` subarray = list(filter(lambda x: 'TargetKey' in x,dics)) ```
If you insist on a one liner: ``` subarray = [dic for dic in dics if "TargetKey" in dic] ``` You can inline conditionals in list comprehensions. If you intend to use this once and iterate it use a generator: ``` subarray = (dic for dic in dics if "TargetKey" in dic) ```
67,680,030
Below is a snippet with a minimum repro case of what I thought, after reading the docs, should work, but doesn't. The snippet contains a grid with three rows: top, middle, and bottom. The height of the middle row of the grid is defined as `minmax(50px, auto)`, which I took to mean "no smaller than 50px, but grow up to ...
2021/05/24
[ "https://Stackoverflow.com/questions/67680030", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3925302/" ]
Your `minmax()` is working but you defined fixed heights for the grid items `.middle` and `.bottom` and for the grid container `.outer-grid`. If you omit these for the two grid items and define the height for the grid container as `min-height` it's working as expected. **Working example:** ```css html, body { heigh...
After playing with my code some more, I think this gets me closer to what I was after: if I change the height of the third row from `1fr` to `minmax(0, 1fr)`, then the middle row will both grow to the full height of its content, and will never be smaller than the minimum value in its minmax function: ```css html, body...
3,722,528
$$P\left(Z\le z\right)=P\left(\left|X-Y\right|\le z\right)=P\left(-z\le X-Y\le z\right)=P\left(Y-z\le X\le Y+z\right)$$ This means that, because $\space f(x,y)=f(x)f(y) \space$ as they are independent, we get to calculate this integral: $$\int \_0^{\infty }\:\int \_{y-z}^{y+z}\:\left(\lambda e^{-\lambda x}\right)^2dx...
2020/06/16
[ "https://math.stackexchange.com/questions/3722528", "https://math.stackexchange.com", "https://math.stackexchange.com/users/790760/" ]
The main error arises from not considering when the interval $[y-z, y+z]$ is not a subset of $[0,\infty)$. That is to say, when $y < z$, then $y-z < 0$. So you need to take this into account when integrating over $x$. The second error is in writing the integrand as the square of the marginal density $f\_X(x)$, when the...
As mentioned in another answer, you get problems with negative values (you cannot consider $y-z \le 0$ in yur duble integral, for example). We can solve the problem as follows. Consider \begin{align} P(X\le Y\text{ and }Y-X\le z)={}&P(X\le Y\text{ and }Y\le X + z)\\ ={}&\int\_0^\infty dx\,\lambda e^{-\lambda x}\int\_x^...
3,722,528
$$P\left(Z\le z\right)=P\left(\left|X-Y\right|\le z\right)=P\left(-z\le X-Y\le z\right)=P\left(Y-z\le X\le Y+z\right)$$ This means that, because $\space f(x,y)=f(x)f(y) \space$ as they are independent, we get to calculate this integral: $$\int \_0^{\infty }\:\int \_{y-z}^{y+z}\:\left(\lambda e^{-\lambda x}\right)^2dx...
2020/06/16
[ "https://math.stackexchange.com/questions/3722528", "https://math.stackexchange.com", "https://math.stackexchange.com/users/790760/" ]
The main error arises from not considering when the interval $[y-z, y+z]$ is not a subset of $[0,\infty)$. That is to say, when $y < z$, then $y-z < 0$. So you need to take this into account when integrating over $x$. The second error is in writing the integrand as the square of the marginal density $f\_X(x)$, when the...
Since @heropup has found the mistake, I'll join @DanielRobertNicoud in finding the distribution another way. Since $X$ has characteristic function $\frac{1}{1-it/\lambda}$, $W:=X-Y$ has characteristic function$$\frac{1}{1+t^2/\lambda^2}=\frac12\left(\frac{1}{1-it/\lambda}+\frac{1}{1+it/\lambda}\right)$$and PDF$$\frac12...
24,722
I'm not a morning person. I got into the habit of working from 10 to 7/8, sometimes 9. Nevertheless, many of the places I've worked for have asked for something more like 8 to 6 or 9 to 6. Honestly, I have a real tough time getting my brain going in the morning and getting into the code. Once I do, I can concentrate ...
2010/12/08
[ "https://softwareengineering.stackexchange.com/questions/24722", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/5057/" ]
This is how I warmup my brain every morning: * **(!)** breakfast * not coffee (dangerous for the heart), but green tea or milk * take a shower * **(!)** ride to the office by bike (I have about 8 km of the way I can pass in 30 mins). Even if the weather is rainy or snowy - I have full set of bike-clothes that prevents...
I think it's mostly about sleeping habits. These didn't really exist so much before electronics came along. Lighting and sound affect your [circadian rhythm](http://en.wikipedia.org/wiki/Circadian_rhythm) Don't listen to music and stare into a bright screen all night like me, it makes going to sleep hard because these...
24,722
I'm not a morning person. I got into the habit of working from 10 to 7/8, sometimes 9. Nevertheless, many of the places I've worked for have asked for something more like 8 to 6 or 9 to 6. Honestly, I have a real tough time getting my brain going in the morning and getting into the code. Once I do, I can concentrate ...
2010/12/08
[ "https://softwareengineering.stackexchange.com/questions/24722", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/5057/" ]
Something that has helped people is: in the evening, prepare a list of maximum 3 things to do the next morning, that way you don't have to wonder "so what should I do now ?" in the morning while you're only half-awake.
Two things work for me to get the code flowing in the morning. 1. Set a few (2 or 3) clear objectives. 2. Set (short) deadlines for those objectives. I write down this objectives. For example: * Fix reload crash * Setup ssl on apache Tasks that work are those for which you have a clear idea on how to proceed and yo...
24,722
I'm not a morning person. I got into the habit of working from 10 to 7/8, sometimes 9. Nevertheless, many of the places I've worked for have asked for something more like 8 to 6 or 9 to 6. Honestly, I have a real tough time getting my brain going in the morning and getting into the code. Once I do, I can concentrate ...
2010/12/08
[ "https://softwareengineering.stackexchange.com/questions/24722", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/5057/" ]
My advice would be 1. don't feel bad and 2. don't fight it. As much as most companies would like to think of programming as similar exercise to flipping burgers all day, it's not. When I was a developer, I spent a ton of time not developing mostly thinking and letting my active mind or my sub-conscious dwell on problem...
I'd be tempted to suggest seeing if you have any sleep problems as if does take you a while to get going in the morning this may be a symptom of sleep apnea which can be treated. This is just a suggestion as I do have it and what I do to treat it has worked well for me. The other suggestion I'd make is to consider get...
24,722
I'm not a morning person. I got into the habit of working from 10 to 7/8, sometimes 9. Nevertheless, many of the places I've worked for have asked for something more like 8 to 6 or 9 to 6. Honestly, I have a real tough time getting my brain going in the morning and getting into the code. Once I do, I can concentrate ...
2010/12/08
[ "https://softwareengineering.stackexchange.com/questions/24722", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/5057/" ]
* Leave work at the end of a day with a specific problem. * Create some sort of prompt so you see it first thing when you get to the office the next morning. * Go to bed early (I know easier said than done.). * Wake up with plenty of time to get ready for work. * Eat breakfast * Shower it helps wake you up, so don't do...
A little bit of sexual activity can freshen you. Not the full flesh tired sex but a little of mingling-wingling in the bed.
24,722
I'm not a morning person. I got into the habit of working from 10 to 7/8, sometimes 9. Nevertheless, many of the places I've worked for have asked for something more like 8 to 6 or 9 to 6. Honestly, I have a real tough time getting my brain going in the morning and getting into the code. Once I do, I can concentrate ...
2010/12/08
[ "https://softwareengineering.stackexchange.com/questions/24722", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/5057/" ]
When I find myself procrastinating I start with an easy or trivial task that needs doing. Starting off with something simple eases in the brain ready for the deeper stuff that requires more thought and flow. Whenever I took college exams I always started with the easiest questions to get into a rhythm.
I'd be tempted to suggest seeing if you have any sleep problems as if does take you a while to get going in the morning this may be a symptom of sleep apnea which can be treated. This is just a suggestion as I do have it and what I do to treat it has worked well for me. The other suggestion I'd make is to consider get...
24,722
I'm not a morning person. I got into the habit of working from 10 to 7/8, sometimes 9. Nevertheless, many of the places I've worked for have asked for something more like 8 to 6 or 9 to 6. Honestly, I have a real tough time getting my brain going in the morning and getting into the code. Once I do, I can concentrate ...
2010/12/08
[ "https://softwareengineering.stackexchange.com/questions/24722", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/5057/" ]
My advice would be 1. don't feel bad and 2. don't fight it. As much as most companies would like to think of programming as similar exercise to flipping burgers all day, it's not. When I was a developer, I spent a ton of time not developing mostly thinking and letting my active mind or my sub-conscious dwell on problem...
Something that has helped people is: in the evening, prepare a list of maximum 3 things to do the next morning, that way you don't have to wonder "so what should I do now ?" in the morning while you're only half-awake.
24,722
I'm not a morning person. I got into the habit of working from 10 to 7/8, sometimes 9. Nevertheless, many of the places I've worked for have asked for something more like 8 to 6 or 9 to 6. Honestly, I have a real tough time getting my brain going in the morning and getting into the code. Once I do, I can concentrate ...
2010/12/08
[ "https://softwareengineering.stackexchange.com/questions/24722", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/5057/" ]
Coffee. No, seriously; I know it is bitter, but some of the espresso mixed drinks are actually really good. Coffee in the morning helped me adjust from the late-night/sleeping in patterns of college to the 9-5 schedule of the real world.
**GYM** Although not the first choice for a stereotypical programmer, I find going to the gym before work very good for waking you up in the mornings. Not only is it good for you, but the exercise actually increases your energy levels, making you feel more awake and alert early in the morning plus with the added endor...
24,722
I'm not a morning person. I got into the habit of working from 10 to 7/8, sometimes 9. Nevertheless, many of the places I've worked for have asked for something more like 8 to 6 or 9 to 6. Honestly, I have a real tough time getting my brain going in the morning and getting into the code. Once I do, I can concentrate ...
2010/12/08
[ "https://softwareengineering.stackexchange.com/questions/24722", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/5057/" ]
**GYM** Although not the first choice for a stereotypical programmer, I find going to the gym before work very good for waking you up in the mornings. Not only is it good for you, but the exercise actually increases your energy levels, making you feel more awake and alert early in the morning plus with the added endor...
There are many possible solutions: You may depends on your family, co-workers, may try some time-managing tools like [Workrave](http://www.workrave.org/). But above all, you must know that what's your benefit in starting early in the morning; what you will get and what you will lose. If you think getting start early is...
24,722
I'm not a morning person. I got into the habit of working from 10 to 7/8, sometimes 9. Nevertheless, many of the places I've worked for have asked for something more like 8 to 6 or 9 to 6. Honestly, I have a real tough time getting my brain going in the morning and getting into the code. Once I do, I can concentrate ...
2010/12/08
[ "https://softwareengineering.stackexchange.com/questions/24722", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/5057/" ]
**GYM** Although not the first choice for a stereotypical programmer, I find going to the gym before work very good for waking you up in the mornings. Not only is it good for you, but the exercise actually increases your energy levels, making you feel more awake and alert early in the morning plus with the added endor...
Something that has helped people is: in the evening, prepare a list of maximum 3 things to do the next morning, that way you don't have to wonder "so what should I do now ?" in the morning while you're only half-awake.
24,722
I'm not a morning person. I got into the habit of working from 10 to 7/8, sometimes 9. Nevertheless, many of the places I've worked for have asked for something more like 8 to 6 or 9 to 6. Honestly, I have a real tough time getting my brain going in the morning and getting into the code. Once I do, I can concentrate ...
2010/12/08
[ "https://softwareengineering.stackexchange.com/questions/24722", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/5057/" ]
* Leave work at the end of a day with a specific problem. * Create some sort of prompt so you see it first thing when you get to the office the next morning. * Go to bed early (I know easier said than done.). * Wake up with plenty of time to get ready for work. * Eat breakfast * Shower it helps wake you up, so don't do...
My advice would be 1. don't feel bad and 2. don't fight it. As much as most companies would like to think of programming as similar exercise to flipping burgers all day, it's not. When I was a developer, I spent a ton of time not developing mostly thinking and letting my active mind or my sub-conscious dwell on problem...
2,565,832
I have gone through with the tutorial documents for blackberry development. At every place they have showed the features with eclipse plugins. So, I would like to know that which are the tools I need to download If I want to start development using NetBeans 6.8 (or 6.5) ? And what is the procedure to do so ? Thanks ...
2010/04/02
[ "https://Stackoverflow.com/questions/2565832", "https://Stackoverflow.com", "https://Stackoverflow.com/users/87942/" ]
There are no plugins that are available for BlackBerry development on Netbeans. But, you can do so, if 1. you are willing to give up the on device debugging that you can get with Eclipse plugin. 2. And are willing and know how to install BlackBerry JDE in Netbeans. The advantage here is Netbeans has a lot more sophis...
I would highly recommend using the Eclipse plugin. Its supported from RIM and it has a large enough community base for troubleshooting.
2,565,832
I have gone through with the tutorial documents for blackberry development. At every place they have showed the features with eclipse plugins. So, I would like to know that which are the tools I need to download If I want to start development using NetBeans 6.8 (or 6.5) ? And what is the procedure to do so ? Thanks ...
2010/04/02
[ "https://Stackoverflow.com/questions/2565832", "https://Stackoverflow.com", "https://Stackoverflow.com/users/87942/" ]
One guy called Jonathan Fisher did come up with a solution, but his page disappeared off the web a while ago. But I managed to find it using the Wayback machine to get the [archived webpage](http://web.archive.org/web/20080326234549/http://jonathanhfisher.co.uk/newsitems/blackberrynetbeansdev/index.htm). Basically you...
I would highly recommend using the Eclipse plugin. Its supported from RIM and it has a large enough community base for troubleshooting.
2,565,832
I have gone through with the tutorial documents for blackberry development. At every place they have showed the features with eclipse plugins. So, I would like to know that which are the tools I need to download If I want to start development using NetBeans 6.8 (or 6.5) ? And what is the procedure to do so ? Thanks ...
2010/04/02
[ "https://Stackoverflow.com/questions/2565832", "https://Stackoverflow.com", "https://Stackoverflow.com/users/87942/" ]
I have wrote a short article on this on my blog [link text](http://m-shaheen.blogspot.com/2010/01/how-to-configure-netbeans-for.html) , it tells you how to confguire Netbeans for BB development. this is only supporting J2ME not cldc .
I would highly recommend using the Eclipse plugin. Its supported from RIM and it has a large enough community base for troubleshooting.
2,565,832
I have gone through with the tutorial documents for blackberry development. At every place they have showed the features with eclipse plugins. So, I would like to know that which are the tools I need to download If I want to start development using NetBeans 6.8 (or 6.5) ? And what is the procedure to do so ? Thanks ...
2010/04/02
[ "https://Stackoverflow.com/questions/2565832", "https://Stackoverflow.com", "https://Stackoverflow.com/users/87942/" ]
One guy called Jonathan Fisher did come up with a solution, but his page disappeared off the web a while ago. But I managed to find it using the Wayback machine to get the [archived webpage](http://web.archive.org/web/20080326234549/http://jonathanhfisher.co.uk/newsitems/blackberrynetbeansdev/index.htm). Basically you...
There are no plugins that are available for BlackBerry development on Netbeans. But, you can do so, if 1. you are willing to give up the on device debugging that you can get with Eclipse plugin. 2. And are willing and know how to install BlackBerry JDE in Netbeans. The advantage here is Netbeans has a lot more sophis...
2,565,832
I have gone through with the tutorial documents for blackberry development. At every place they have showed the features with eclipse plugins. So, I would like to know that which are the tools I need to download If I want to start development using NetBeans 6.8 (or 6.5) ? And what is the procedure to do so ? Thanks ...
2010/04/02
[ "https://Stackoverflow.com/questions/2565832", "https://Stackoverflow.com", "https://Stackoverflow.com/users/87942/" ]
One guy called Jonathan Fisher did come up with a solution, but his page disappeared off the web a while ago. But I managed to find it using the Wayback machine to get the [archived webpage](http://web.archive.org/web/20080326234549/http://jonathanhfisher.co.uk/newsitems/blackberrynetbeansdev/index.htm). Basically you...
I have wrote a short article on this on my blog [link text](http://m-shaheen.blogspot.com/2010/01/how-to-configure-netbeans-for.html) , it tells you how to confguire Netbeans for BB development. this is only supporting J2ME not cldc .
6,448,325
So the producer table schema is like this: ``` producer_id = int PK producer_name = varchar is_restaurant = boolean is_farm = boolean is_distributor = boolean ``` and I want a query that does this: > > select all producers whose producer\_id > are in (11895, 11976, 11457) which is > either a farm, a restaurant o...
2011/06/23
[ "https://Stackoverflow.com/questions/6448325", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1737290/" ]
Your problem is that in SQL, `AND` takes precedence over `OR`, so you just need brackets: ``` SELECT `pd`.`producer_id` AS producer_id, `pd`.`producer` AS producer, `pd`.`is_restaurant`, `pd`.`is_restaurant_chain`, `pd`.`is_farm`, `pd`.`is_farmers_market`, `pd`.`is_distributor`, `pd`.`is_manufacture`, `ad`.`address_id...
This should do the trick: ``` SELECT `pd`.`producer_id` AS producer_id, `pd`.`producer` AS producer, `pd`.`is_restaurant`, `pd`.`is_restaurant_chain`, `pd`.`is_farm`, `pd`.`is_farmers_market`, `pd`.`is_distributor`, `pd`.`is_manufacture`, `ad`.`address_id`, `ad`.`address`, `ad`.`state_id`, `ad`.`city`, `ad`.`city_id`,...
21,013,946
I have some old .NET codes that searching for parameter in a sql string ``` System.Text.RegularExpressions.MatchCollection collection = System.Text.RegularExpressions.Regex.Matches(icmd.CommandText, "(#,?,:)[a-zA-Z0-9]*_*"); ``` I don't know how it matches. Can anyone explain me?
2014/01/09
[ "https://Stackoverflow.com/questions/21013946", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2320830/" ]
See below diagram explaining it. ![enter image description here](https://i.stack.imgur.com/Xby8Y.png) UPDATE: In below code `#,,:abc12_` is a match. ``` System.Text.RegularExpressions.MatchCollection collection = System.Text.RegularExpressions.Regex.Matches("#,,:abc12_", "(#,?,:)[a-zA-Z0-9]*_*"); ```
Refer **[this](http://regex101.com/)** for any doubt in regex . In `(#,?,:)[a-zA-Z0-9]*_*` ``` 1st Capturing group (#,?,:) # matches the character # literally ,? matches the character , literally Quantifier: Between zero and one time, as many times as possible, giving back as needed [greedy] ,: matches the character...
29,350,663
I have been trying to use a named range and variable to define a range that I want to autofill and I can only get one of the named ranges to work and not the variable in my code. The `ColLetter` variable is what is giving me trouble. If the I omit that variable and just put `"AR"` in the range the code works it is just...
2015/03/30
[ "https://Stackoverflow.com/questions/29350663", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4729937/" ]
A couple of problems, `Dim ColLetter As Range` should really be `Dim ColLetter As String`, your string concatenation is wrong, change `Range("Notes_Start:ColLetter" & lastRow)` to `Range("Notes_Start:" & ColLetter & lastRow)`
Be very careful using letters to define columns in your code. * If your active cell is `A1`, `Mid(ActiveCell.Address, 2, 2)` + yields `A$`, which is what you want. * If your active cell is `AA1`, `Mid(ActiveCell.Address, 2, 2)` + yields `AA`. You lose the `$` and your reference is broken. You would probably be bet...
27,545,114
Having trouble in the following code. The output is `dateStr: 11-Jan-11`. Can anyone tell me why the date is modified? ``` String dateStr=""; String actionCompletionDueDate = "16/11/2011"; DateFormat srcDf = new SimpleDateFormat("mm/dd/yyyy"); DateFormat destDf = new SimpleDateFormat("dd-MMM-yy"); if(act...
2014/12/18
[ "https://Stackoverflow.com/questions/27545114", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1151908/" ]
Change ``` DateFormat srcDf = new SimpleDateFormat("mm/dd/yyyy"); ``` to ``` DateFormat srcDf = new SimpleDateFormat("dd/MM/yyyy"); ``` OR pass a correct string (which respects your format) to your code ``` String actionCompletionDueDate = "11/16/2011"; ``` and correct the format to `DateFormat srcDf = new ...
``` String actionCompletionDueDate = "16/11/2011"; ``` Should be ``` String actionCompletionDueDate = "11/16/2011"; ```
27,545,114
Having trouble in the following code. The output is `dateStr: 11-Jan-11`. Can anyone tell me why the date is modified? ``` String dateStr=""; String actionCompletionDueDate = "16/11/2011"; DateFormat srcDf = new SimpleDateFormat("mm/dd/yyyy"); DateFormat destDf = new SimpleDateFormat("dd-MMM-yy"); if(act...
2014/12/18
[ "https://Stackoverflow.com/questions/27545114", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1151908/" ]
Change ``` DateFormat srcDf = new SimpleDateFormat("mm/dd/yyyy"); ``` to ``` DateFormat srcDf = new SimpleDateFormat("dd/MM/yyyy"); ``` OR pass a correct string (which respects your format) to your code ``` String actionCompletionDueDate = "11/16/2011"; ``` and correct the format to `DateFormat srcDf = new ...
Change ``` DateFormat srcDf = new SimpleDateFormat("mm/dd/yyyy"); ``` to ``` DateFormat srcDf = new SimpleDateFormat("MM/dd/yyyy"); ``` small `mm` here corresponds to **minute**. But if you print source date using, ``` System.out.println(actionCompletionDate.toString()); ``` Output is : ``` Sun Jan 16 00:1...
25,315,217
My current understanding is that, when one writes `from foo import bar`, `foo` which is a package and has `__init__.py`, will have its `__init__.py` automatically processed after which its resource `bar` will be imported. If from the command prompt, I write `python manage.py`, and in that module call `from foo import b...
2014/08/14
[ "https://Stackoverflow.com/questions/25315217", "https://Stackoverflow.com", "https://Stackoverflow.com/users/485870/" ]
In the `__init__` module of a package, `__name__` is set to the name of the package; e.g. what the module is stored under in `sys.modules`. For a package `foo`, `__name__` is set to `'foo'`: ``` >>> import os >>> os.mkdir('foo') >>> open('foo/__init__.py', 'w').write('print "__name__:", __name__') >>> open('foo/bar.p...
`__name__` belongs to the local scope (attribute) of the module that you call with python, ie: in this case `manage.py`.
64,992,397
I don't know why I get this error every time in ASP.NET Core MVC 3.1. I have a view and it's in its place. I only get this error in areas. ``` InvalidOperationException: The view 'Dashboard' was not found. The following locations were searched: /Areas/Admin/Views/Home/Dashboard.cshtml /Areas/Admin/Views/Share...
2020/11/24
[ "https://Stackoverflow.com/questions/64992397", "https://Stackoverflow.com", "https://Stackoverflow.com/users/14568817/" ]
Nine times out of ten, this error on a view is because you forgot to put the `[Area("Admin")]` attribute at the top of your area controller(s). > > *Note:* As you noted in your answer, this should not include the suffix `Area`. > > > While your area views are, by convention, searched for in `/Areas/{Area}/Views/`...
I resolved this problem by changing the area name from "AdminArea" to "Admin"
64,992,397
I don't know why I get this error every time in ASP.NET Core MVC 3.1. I have a view and it's in its place. I only get this error in areas. ``` InvalidOperationException: The view 'Dashboard' was not found. The following locations were searched: /Areas/Admin/Views/Home/Dashboard.cshtml /Areas/Admin/Views/Share...
2020/11/24
[ "https://Stackoverflow.com/questions/64992397", "https://Stackoverflow.com", "https://Stackoverflow.com/users/14568817/" ]
Nine times out of ten, this error on a view is because you forgot to put the `[Area("Admin")]` attribute at the top of your area controller(s). > > *Note:* As you noted in your answer, this should not include the suffix `Area`. > > > While your area views are, by convention, searched for in `/Areas/{Area}/Views/`...
I had this problem recently (after upgrading a project from .NET 5.0 to .NET 6.0) and found when I built the project locally and then deployed manually everything worked but when building and deploying via Azure Devops it failed. After much head scratching, it turned out to be that the build definition was still set t...
12,133,268
I have a list of objects retrieved as JSON String as described [here](https://developers.google.com/web-toolkit/doc/2.1/tutorial/JSON) In the DataGrid I do the sorting like this (I illustrate one colomn for simplicity) ``` nameColomn.setSortable(true); final ListHandler<SomeObject> nameColomnSortHandler = new Li...
2012/08/26
[ "https://Stackoverflow.com/questions/12133268", "https://Stackoverflow.com", "https://Stackoverflow.com/users/604109/" ]
Use the [`shutdown`](http://support.microsoft.com/kb/317371) command: ``` shutdown /s /m \\computername shutdown /r /m \\computername ``` The `/s` switch is used for shutdown, `/r` for restart. The full usage for shutdown on my Windows 7 box: ``` >shutdown /? Usage: shutdown [/i | /l | /s | /r | /g | /a | /p | /h ...
For Remote PC with in network run cmd is shutdown -m \192.***.***.\*\* -r -f -t 0 Where -m denotes for remote 1. "-r" denotes restart the remote computer. 2. "-f" flags tell the remote computer to restart and safely close all open programs. 3. "-t" flag denote time after -t i.e here 0 sec.
52,444,562
I use Visual Studio MVC 5 with the Account template that handles Login etc. I want to Login as a user without a password. I tried this: ``` var user = new ApplicationUser { UserName = model.Email, Email = model.Email }; await SignInManager.SignInAsync(user, isPersistent: false, rememberBrowser: false); ``` but then ...
2018/09/21
[ "https://Stackoverflow.com/questions/52444562", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10318818/" ]
Your object ApplicationUser has no id that's why you are getting this error. try this: ``` var user = await _userManager.FindByNameAsync(model.Email); await _signInManager.SignInAsync(user, isPersistent: false); ``` You could use too: ``` var user = await _userManager.FindByEmailAsync(model.Email); ``` Hope this...
After some try and error. You need to have the user as ApplicationUser with the right data like it is saved on your database. To get your user you need to do this: ``` ApplicationUser user = UserManager.FindByEmailAsync(model.Email).Result; ``` and this need to be passed to the SignInAsync function.
1,403
Why is voting activity so low? I am surprised by the low number of votes my questions and answers get. Is this a reflection of the quality of my content or an artifact of this forum?
2012/09/27
[ "https://stats.meta.stackexchange.com/questions/1403", "https://stats.meta.stackexchange.com", "https://stats.meta.stackexchange.com/users/11030/" ]
I think that except for the minority of the people who really answer questions (and have a fabulous rep of 100+), most users think of themselves as statistically illiterate, and not being able to distinguish a good question from a bad question. Or simply don't look beyond the question they just asked and got answered. ...
One explaining factor might be that many question here are either long or complicated for those unfamilliar with the field. Thus many questions are read in details only by a few and mostly skimmed by the majority of users. For my part, I am always reluctant to vote for a question or answer I feel I have not really unde...
103,820
Physically familiarizing with which two orchestral instruments would be a good compromise between having to buy all the instruments and gaining leverage in orchestral writing? My own opinion is French horn and cello; because these two are among the most challenging instruments to write for. I am a composer and have alr...
2020/08/12
[ "https://music.stackexchange.com/questions/103820", "https://music.stackexchange.com", "https://music.stackexchange.com/users/12435/" ]
I would strongly advise you NOT to buy any instruments. You don't need to. Do you imagine composers play lots of instruments? They don't. The only instrument Berlioz played was a guitar - tolerably - yet he wrote a book on orchestration! What possible use would it have been to Ravel if he had learnt to play the harp?!!...
I believe you should satisfy your curiosity, but you might stop short of purchasing the instruments. Perhaps you could borrow or rent a larger variety, so that you have some familiarity, and then as composers do (and [@OldBrixtonian wrote](https://music.stackexchange.com/a/103827/70803)), you can consult with genuine e...
103,820
Physically familiarizing with which two orchestral instruments would be a good compromise between having to buy all the instruments and gaining leverage in orchestral writing? My own opinion is French horn and cello; because these two are among the most challenging instruments to write for. I am a composer and have alr...
2020/08/12
[ "https://music.stackexchange.com/questions/103820", "https://music.stackexchange.com", "https://music.stackexchange.com/users/12435/" ]
I would strongly advise you NOT to buy any instruments. You don't need to. Do you imagine composers play lots of instruments? They don't. The only instrument Berlioz played was a guitar - tolerably - yet he wrote a book on orchestration! What possible use would it have been to Ravel if he had learnt to play the harp?!!...
I believe that the instrument you are best served by getting is a professional notation program with good orchestral sounds. The two that I personally have experience of is Dorico and Sibelius. The notation program will allow you, to a certain externt, hear the instruments and orchestration. Next, get a lot of musicia...
103,820
Physically familiarizing with which two orchestral instruments would be a good compromise between having to buy all the instruments and gaining leverage in orchestral writing? My own opinion is French horn and cello; because these two are among the most challenging instruments to write for. I am a composer and have alr...
2020/08/12
[ "https://music.stackexchange.com/questions/103820", "https://music.stackexchange.com", "https://music.stackexchange.com/users/12435/" ]
I would strongly advise you NOT to buy any instruments. You don't need to. Do you imagine composers play lots of instruments? They don't. The only instrument Berlioz played was a guitar - tolerably - yet he wrote a book on orchestration! What possible use would it have been to Ravel if he had learnt to play the harp?!!...
A French horn and a double bass - that's the answer. But it's a moot point, because the presupposition of the question is wrong. No one in the history of music became a musician, or a "better musician" by "acquiring an instrument". (since this answer got got both upvoted and downvoted, let me justify the selection: t...
103,820
Physically familiarizing with which two orchestral instruments would be a good compromise between having to buy all the instruments and gaining leverage in orchestral writing? My own opinion is French horn and cello; because these two are among the most challenging instruments to write for. I am a composer and have alr...
2020/08/12
[ "https://music.stackexchange.com/questions/103820", "https://music.stackexchange.com", "https://music.stackexchange.com/users/12435/" ]
I would strongly advise you NOT to buy any instruments. You don't need to. Do you imagine composers play lots of instruments? They don't. The only instrument Berlioz played was a guitar - tolerably - yet he wrote a book on orchestration! What possible use would it have been to Ravel if he had learnt to play the harp?!!...
Piano. It has all notes, in spite of not being able to produce Legato and Tremolo perfectly.
103,820
Physically familiarizing with which two orchestral instruments would be a good compromise between having to buy all the instruments and gaining leverage in orchestral writing? My own opinion is French horn and cello; because these two are among the most challenging instruments to write for. I am a composer and have alr...
2020/08/12
[ "https://music.stackexchange.com/questions/103820", "https://music.stackexchange.com", "https://music.stackexchange.com/users/12435/" ]
I believe that the instrument you are best served by getting is a professional notation program with good orchestral sounds. The two that I personally have experience of is Dorico and Sibelius. The notation program will allow you, to a certain externt, hear the instruments and orchestration. Next, get a lot of musicia...
I believe you should satisfy your curiosity, but you might stop short of purchasing the instruments. Perhaps you could borrow or rent a larger variety, so that you have some familiarity, and then as composers do (and [@OldBrixtonian wrote](https://music.stackexchange.com/a/103827/70803)), you can consult with genuine e...
103,820
Physically familiarizing with which two orchestral instruments would be a good compromise between having to buy all the instruments and gaining leverage in orchestral writing? My own opinion is French horn and cello; because these two are among the most challenging instruments to write for. I am a composer and have alr...
2020/08/12
[ "https://music.stackexchange.com/questions/103820", "https://music.stackexchange.com", "https://music.stackexchange.com/users/12435/" ]
A French horn and a double bass - that's the answer. But it's a moot point, because the presupposition of the question is wrong. No one in the history of music became a musician, or a "better musician" by "acquiring an instrument". (since this answer got got both upvoted and downvoted, let me justify the selection: t...
I believe you should satisfy your curiosity, but you might stop short of purchasing the instruments. Perhaps you could borrow or rent a larger variety, so that you have some familiarity, and then as composers do (and [@OldBrixtonian wrote](https://music.stackexchange.com/a/103827/70803)), you can consult with genuine e...
103,820
Physically familiarizing with which two orchestral instruments would be a good compromise between having to buy all the instruments and gaining leverage in orchestral writing? My own opinion is French horn and cello; because these two are among the most challenging instruments to write for. I am a composer and have alr...
2020/08/12
[ "https://music.stackexchange.com/questions/103820", "https://music.stackexchange.com", "https://music.stackexchange.com/users/12435/" ]
I believe that the instrument you are best served by getting is a professional notation program with good orchestral sounds. The two that I personally have experience of is Dorico and Sibelius. The notation program will allow you, to a certain externt, hear the instruments and orchestration. Next, get a lot of musicia...
A French horn and a double bass - that's the answer. But it's a moot point, because the presupposition of the question is wrong. No one in the history of music became a musician, or a "better musician" by "acquiring an instrument". (since this answer got got both upvoted and downvoted, let me justify the selection: t...
103,820
Physically familiarizing with which two orchestral instruments would be a good compromise between having to buy all the instruments and gaining leverage in orchestral writing? My own opinion is French horn and cello; because these two are among the most challenging instruments to write for. I am a composer and have alr...
2020/08/12
[ "https://music.stackexchange.com/questions/103820", "https://music.stackexchange.com", "https://music.stackexchange.com/users/12435/" ]
I believe that the instrument you are best served by getting is a professional notation program with good orchestral sounds. The two that I personally have experience of is Dorico and Sibelius. The notation program will allow you, to a certain externt, hear the instruments and orchestration. Next, get a lot of musicia...
Piano. It has all notes, in spite of not being able to produce Legato and Tremolo perfectly.
103,820
Physically familiarizing with which two orchestral instruments would be a good compromise between having to buy all the instruments and gaining leverage in orchestral writing? My own opinion is French horn and cello; because these two are among the most challenging instruments to write for. I am a composer and have alr...
2020/08/12
[ "https://music.stackexchange.com/questions/103820", "https://music.stackexchange.com", "https://music.stackexchange.com/users/12435/" ]
A French horn and a double bass - that's the answer. But it's a moot point, because the presupposition of the question is wrong. No one in the history of music became a musician, or a "better musician" by "acquiring an instrument". (since this answer got got both upvoted and downvoted, let me justify the selection: t...
Piano. It has all notes, in spite of not being able to produce Legato and Tremolo perfectly.
766,395
I am trying to understand how the linux syscall sched\_setaffinity() works. This is a follow-on from my question [here](https://stackoverflow.com/questions/663958/how-to-control-which-core-a-process-runs-on). I have [this guide](http://www.ibm.com/developerworks/linux/library/l-affinity.html), which explains how to us...
2009/04/19
[ "https://Stackoverflow.com/questions/766395", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3788/" ]
`sched_setaffinity()` simply tells the scheduler which CPUs is that process/thread allowed to run on, then calls for a re-schedule. The scheduler actually runs on each one of the CPUs, so it gets a chance to decide what task to execute next on that particular CPU. If you're interested in how you can actually call som...
> > Where, in the assembly code, are we specifying which core performs that operation? > > > There is no assembly involved here. Every task (thread) is assigned to a single CPU (or core in your terms) at a time. To stop running on a given CPU and resume on another, the task has to "[migrate](http://lxr.linux.no/li...
766,395
I am trying to understand how the linux syscall sched\_setaffinity() works. This is a follow-on from my question [here](https://stackoverflow.com/questions/663958/how-to-control-which-core-a-process-runs-on). I have [this guide](http://www.ibm.com/developerworks/linux/library/l-affinity.html), which explains how to us...
2009/04/19
[ "https://Stackoverflow.com/questions/766395", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3788/" ]
`sched_setaffinity()` simply tells the scheduler which CPUs is that process/thread allowed to run on, then calls for a re-schedule. The scheduler actually runs on each one of the CPUs, so it gets a chance to decide what task to execute next on that particular CPU. If you're interested in how you can actually call som...
I think the thing you are not understanding is that the kernel is running on *all* the CPU cores. At every timer interrupt (~1000 per second), the scheduler runs on each CPU and chooses a process to run. There is no one CPU that somehow tells the others to start running a process. `sched_setaffinity()` works by just se...
766,395
I am trying to understand how the linux syscall sched\_setaffinity() works. This is a follow-on from my question [here](https://stackoverflow.com/questions/663958/how-to-control-which-core-a-process-runs-on). I have [this guide](http://www.ibm.com/developerworks/linux/library/l-affinity.html), which explains how to us...
2009/04/19
[ "https://Stackoverflow.com/questions/766395", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3788/" ]
`sched_setaffinity()` simply tells the scheduler which CPUs is that process/thread allowed to run on, then calls for a re-schedule. The scheduler actually runs on each one of the CPUs, so it gets a chance to decide what task to execute next on that particular CPU. If you're interested in how you can actually call som...
Check this out: [B Operating System Programming Guidelines](http://developer.intel.com/design/pentium/datashts/24201606.pdf)
766,395
I am trying to understand how the linux syscall sched\_setaffinity() works. This is a follow-on from my question [here](https://stackoverflow.com/questions/663958/how-to-control-which-core-a-process-runs-on). I have [this guide](http://www.ibm.com/developerworks/linux/library/l-affinity.html), which explains how to us...
2009/04/19
[ "https://Stackoverflow.com/questions/766395", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3788/" ]
I think the thing you are not understanding is that the kernel is running on *all* the CPU cores. At every timer interrupt (~1000 per second), the scheduler runs on each CPU and chooses a process to run. There is no one CPU that somehow tells the others to start running a process. `sched_setaffinity()` works by just se...
> > Where, in the assembly code, are we specifying which core performs that operation? > > > There is no assembly involved here. Every task (thread) is assigned to a single CPU (or core in your terms) at a time. To stop running on a given CPU and resume on another, the task has to "[migrate](http://lxr.linux.no/li...
766,395
I am trying to understand how the linux syscall sched\_setaffinity() works. This is a follow-on from my question [here](https://stackoverflow.com/questions/663958/how-to-control-which-core-a-process-runs-on). I have [this guide](http://www.ibm.com/developerworks/linux/library/l-affinity.html), which explains how to us...
2009/04/19
[ "https://Stackoverflow.com/questions/766395", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3788/" ]
> > Where, in the assembly code, are we specifying which core performs that operation? > > > There is no assembly involved here. Every task (thread) is assigned to a single CPU (or core in your terms) at a time. To stop running on a given CPU and resume on another, the task has to "[migrate](http://lxr.linux.no/li...
Check this out: [B Operating System Programming Guidelines](http://developer.intel.com/design/pentium/datashts/24201606.pdf)
766,395
I am trying to understand how the linux syscall sched\_setaffinity() works. This is a follow-on from my question [here](https://stackoverflow.com/questions/663958/how-to-control-which-core-a-process-runs-on). I have [this guide](http://www.ibm.com/developerworks/linux/library/l-affinity.html), which explains how to us...
2009/04/19
[ "https://Stackoverflow.com/questions/766395", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3788/" ]
I think the thing you are not understanding is that the kernel is running on *all* the CPU cores. At every timer interrupt (~1000 per second), the scheduler runs on each CPU and chooses a process to run. There is no one CPU that somehow tells the others to start running a process. `sched_setaffinity()` works by just se...
Check this out: [B Operating System Programming Guidelines](http://developer.intel.com/design/pentium/datashts/24201606.pdf)
21,658,163
I'm developing a highly dynamic website that needs to handle a lot of URI that do not actually have a file behind them. So I used .htaccess to redirect all non-existing URI to a php file that displays what I need based on the URI by looking into various tables in a database and including the correct web-pages. ``` Rew...
2014/02/09
[ "https://Stackoverflow.com/questions/21658163", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3223980/" ]
Using IntelliJ WebStorm these errors are fixed by using the latest version of JSHint in WS - v2.5.1. I've just moved to using IntilliJ IDEA instead but the max version is 2.4.4 which shows the same errors you describe. Unfortunately I can't find any way to upgrade the version used. <http://www.jetbrains.com/idea/webh...
**Verified with version 2022.2.1** go to: MacOs : `~/Library/Caches/JetBrains/<product><version>/javascript/jshint` Linux : `~/.cache/JetBrains/<product><version>/javascript/jshint` Windows : `%LOCALAPPDATA%\JetBrains\<product><version>\javascript\jshint` *[source](https://www.jetbrains.com/help/idea/directories-use...