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
20,511,182
In a command prompt window, I have a running process. While the process is still executing, I click the (red) 'X' in the corner of the command prompt window. The command prompt window closes, and the running process is terminated. On Linux, closing the parent terminal of a running process will send that process `SIGHU...
2013/12/11
[ "https://Stackoverflow.com/questions/20511182", "https://Stackoverflow.com", "https://Stackoverflow.com/users/149482/" ]
The equivalent of SIGHUP is provided through the callback you register with [SetConsoleCtrlHandler](http://msdn.microsoft.com/en-us/library/windows/desktop/ms686016%28v=vs.85%29.aspx). Your callback function will be called on an arbitrary threadpool thread with dwCtrlType = CTRL\_CLOSE\_EVENT. You've got 5 seconds to c...
This cannot be done directly from command prompt. You would need a secondary anything (vbs, powershell or custom MyApp.exe) to catch cmd.exe when it is closed and react accordingly. For instance, a VBS WMI monitor. ``` strComputer = "." Set objSWbemServices = GetObject("winmgmts:" & "{impersonationLevel=impersonate}...
20,511,182
In a command prompt window, I have a running process. While the process is still executing, I click the (red) 'X' in the corner of the command prompt window. The command prompt window closes, and the running process is terminated. On Linux, closing the parent terminal of a running process will send that process `SIGHU...
2013/12/11
[ "https://Stackoverflow.com/questions/20511182", "https://Stackoverflow.com", "https://Stackoverflow.com/users/149482/" ]
The equivalent of SIGHUP is provided through the callback you register with [SetConsoleCtrlHandler](http://msdn.microsoft.com/en-us/library/windows/desktop/ms686016%28v=vs.85%29.aspx). Your callback function will be called on an arbitrary threadpool thread with dwCtrlType = CTRL\_CLOSE\_EVENT. You've got 5 seconds to c...
"SIGHUP"... tested on Windows 8.1 pro + Node.js 0.10.24 works fine.. ``` process.on('SIGHUP', function(){ //Your code goes here. }); ```
59,150,328
I’m trying to transpose columns to rows using SQL case statement. ``` SELECT CASE WHEN a.known = true THEN ‘value1’ WHEN a.known = true AND b.known = true THEN ‘value2’ WHEN a.known = true AND b.known = false THEN ‘value3’ WHEN a.known = true AND b.known = false AND b.aca=true THEN ‘val...
2019/12/03
[ "https://Stackoverflow.com/questions/59150328", "https://Stackoverflow.com", "https://Stackoverflow.com/users/12471793/" ]
I think you want: ``` SELECT COUNT(DISTINCT CASE WHEN a.known = true THEN a.abc END) as value1 COUNT(DISTINCT CASE WHEN a.known = true AND b.known = true THEN a.abc END) as value2, COUNT(DISTINCT CASE WHEN a.known = true AND b.known = false THEN a.abc END) as value3, COUNT(DISTINCT CASE WHEN a.kno...
I think it is important that we understand what a group by is typically used for. A COUNT() is an aggregate function that requires a GROUP BY. Think of it this way Lets count how many "Steves" are in the a database. We would have something like this: ``` `SELECT Name, COUNT(Name) AS Name FROM Customers` This will ...
1,285,865
$(4, 1)$ is a point on one end of the diameter of a circle and the tangent through the other end of the diameter has equation $3x- y=1$. Determine the coordinates of the center of circle. What got me about this question was that it didn't give me the circle center and ask me to find the equation of the tangent but in...
2015/05/17
[ "https://math.stackexchange.com/questions/1285865", "https://math.stackexchange.com", "https://math.stackexchange.com/users/241188/" ]
There is a general expression derived in [HCR's Web Papers](https://www.academia.edu/12372301/Reflection_of_a_point_about_a_line_and_a_plane_in_3-D_space_reflection_of_a_point_in_2-D_and_3-D_co-ordinate_systems_by_HCR_) for directly calculating the co-ordinates of foot of perpendicular say $(x', y')$ drawn from any poi...
![enter image description here](https://i.stack.imgur.com/PdFTA.jpg) Refer to the given image. One as you can see, a diameter is always normal to a tangent! So , we just need to find a equation of normal passing through $(4,1)$ Which is, $x+3y=k$ where $k$ is an indetermined constant. Now since the line pass throug...
1,285,865
$(4, 1)$ is a point on one end of the diameter of a circle and the tangent through the other end of the diameter has equation $3x- y=1$. Determine the coordinates of the center of circle. What got me about this question was that it didn't give me the circle center and ask me to find the equation of the tangent but in...
2015/05/17
[ "https://math.stackexchange.com/questions/1285865", "https://math.stackexchange.com", "https://math.stackexchange.com/users/241188/" ]
There is a general expression derived in [HCR's Web Papers](https://www.academia.edu/12372301/Reflection_of_a_point_about_a_line_and_a_plane_in_3-D_space_reflection_of_a_point_in_2-D_and_3-D_co-ordinate_systems_by_HCR_) for directly calculating the co-ordinates of foot of perpendicular say $(x', y')$ drawn from any poi...
Quite easy! Since the point $(4,1)$ is tangent to $3x-y=1$; You find the equation of the tangent which is: $3y+x=3(1)+4=7$ So; $$ 3x-y=1 \tag{1}$$ $$ 3y+x=7 \tag{2} $$ solve simultaneously you have $x=1$, $y=2$ so point $(1,2)$ is the other end of the diameter so you have $(4,1)$ and $(1,2)$ as the two end of the di...
23,812,372
I have the following jquery: ``` $(".order_submit").click(function() { alert( "Alert" ); console.log("TEST") }); ``` When I put that function in to console I get the following: ``` $(".order_submit").click(function() { alert( "Alert" ); console.log("TEST") }); [ <input id=​"order_button" type=​"button" clas...
2014/05/22
[ "https://Stackoverflow.com/questions/23812372", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1887261/" ]
As the button is added to the page after DOMReady you need to use a delegated event: ``` $(document).on('click', '.order_submit', function() { alert('Alert'); console.log('TEST') }); ``` Note that for best performance you should change `document` in my example to the nearest element in the DOM which is prese...
Event handlers are bound only to the currently selected elements; they must exist on the page at the time your code makes the event binding call. You need to use [**Event delegation**](http://learn.jquery.com/events/event-delegation/) for dynamically generated elements > > Delegated events have the advantage that th...
23,812,372
I have the following jquery: ``` $(".order_submit").click(function() { alert( "Alert" ); console.log("TEST") }); ``` When I put that function in to console I get the following: ``` $(".order_submit").click(function() { alert( "Alert" ); console.log("TEST") }); [ <input id=​"order_button" type=​"button" clas...
2014/05/22
[ "https://Stackoverflow.com/questions/23812372", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1887261/" ]
As the button is added to the page after DOMReady you need to use a delegated event: ``` $(document).on('click', '.order_submit', function() { alert('Alert'); console.log('TEST') }); ``` Note that for best performance you should change `document` in my example to the nearest element in the DOM which is prese...
all you need is delegate coz button is created dynamically $(document).on('click', ".order\_submit", function() { alert( "Alert" ); console.log("TEST") }); for more information :- <http://learn.jquery.com/events/event-delegation/>
23,812,372
I have the following jquery: ``` $(".order_submit").click(function() { alert( "Alert" ); console.log("TEST") }); ``` When I put that function in to console I get the following: ``` $(".order_submit").click(function() { alert( "Alert" ); console.log("TEST") }); [ <input id=​"order_button" type=​"button" clas...
2014/05/22
[ "https://Stackoverflow.com/questions/23812372", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1887261/" ]
As the button is added to the page after DOMReady you need to use a delegated event: ``` $(document).on('click', '.order_submit', function() { alert('Alert'); console.log('TEST') }); ``` Note that for best performance you should change `document` in my example to the nearest element in the DOM which is prese...
As @A. Wolff said you should delegate event, and you can use for that one of the functions **.on()** or **.delegate()** of jquery, **.on()** for jQuery 1.7+ and **.delegate()** for older versions, take a look at this code: ``` $("table").on("click", ".order_submit", function() { alert( "Alert" ); console.log("TEST...
23,812,372
I have the following jquery: ``` $(".order_submit").click(function() { alert( "Alert" ); console.log("TEST") }); ``` When I put that function in to console I get the following: ``` $(".order_submit").click(function() { alert( "Alert" ); console.log("TEST") }); [ <input id=​"order_button" type=​"button" clas...
2014/05/22
[ "https://Stackoverflow.com/questions/23812372", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1887261/" ]
Event handlers are bound only to the currently selected elements; they must exist on the page at the time your code makes the event binding call. You need to use [**Event delegation**](http://learn.jquery.com/events/event-delegation/) for dynamically generated elements > > Delegated events have the advantage that th...
all you need is delegate coz button is created dynamically $(document).on('click', ".order\_submit", function() { alert( "Alert" ); console.log("TEST") }); for more information :- <http://learn.jquery.com/events/event-delegation/>
23,812,372
I have the following jquery: ``` $(".order_submit").click(function() { alert( "Alert" ); console.log("TEST") }); ``` When I put that function in to console I get the following: ``` $(".order_submit").click(function() { alert( "Alert" ); console.log("TEST") }); [ <input id=​"order_button" type=​"button" clas...
2014/05/22
[ "https://Stackoverflow.com/questions/23812372", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1887261/" ]
Event handlers are bound only to the currently selected elements; they must exist on the page at the time your code makes the event binding call. You need to use [**Event delegation**](http://learn.jquery.com/events/event-delegation/) for dynamically generated elements > > Delegated events have the advantage that th...
As @A. Wolff said you should delegate event, and you can use for that one of the functions **.on()** or **.delegate()** of jquery, **.on()** for jQuery 1.7+ and **.delegate()** for older versions, take a look at this code: ``` $("table").on("click", ".order_submit", function() { alert( "Alert" ); console.log("TEST...
36,048,664
I've been searching high and low for this to no avail. I'd like to be able to extract the byte offset at which each progressive JPEG layer/scan occurs. For example, let's say a 100 kB image has 5 layers used to render the final image; layer 1 ends at kB 5, layer 2 at kB 20, layer 3 at kB 60, etc (for example). Is it ...
2016/03/16
[ "https://Stackoverflow.com/questions/36048664", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1126192/" ]
You can make a progressive JPEG like this with **ImageMagick** for testing: ``` magick -interlace plane -size 400x200 gradient: progressive.jpg ``` `exiftool` will tell you quite a lot about it like this: ``` exiftool -v3 progressive.jpg ``` **Sample Output** ``` ExifToolVersion = 12.00 FileName = progress...
All you'd have to do is scan the image stream and look for the SOS (Start of Scan) markers.
36,048,664
I've been searching high and low for this to no avail. I'd like to be able to extract the byte offset at which each progressive JPEG layer/scan occurs. For example, let's say a 100 kB image has 5 layers used to render the final image; layer 1 ends at kB 5, layer 2 at kB 20, layer 3 at kB 60, etc (for example). Is it ...
2016/03/16
[ "https://Stackoverflow.com/questions/36048664", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1126192/" ]
You can make a progressive JPEG like this with **ImageMagick** for testing: ``` magick -interlace plane -size 400x200 gradient: progressive.jpg ``` `exiftool` will tell you quite a lot about it like this: ``` exiftool -v3 progressive.jpg ``` **Sample Output** ``` ExifToolVersion = 12.00 FileName = progress...
There is some php example code in this article by Christoph Erdmann: <https://www.smashingmagazine.com/2019/08/faster-image-loading-embedded-previews/#creating-frontend-javascript-code> ```php $img = "progressive.jpg"; $jpgdata = file_get_contents($img); $positions = []; $offset = 0; while ($pos = strpos($jpgdata, "\...
32,835,484
I'm learning Java and I have no idea what this outputs, if someone could explain how this works and what it outputs. Thank you in advance. ``` Label displayLabel = new Label(); String str1 = "As dead as a doornail"; String str2 = str1.substring(3, 9); displayLabel.setText(str2 + str1.substring(str2.len...
2015/09/29
[ "https://Stackoverflow.com/questions/32835484", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5387106/" ]
Label is a class object. Substring is used to snip parts of the String the first substring, str1.substring(3, 9); goes by the string class which haves 2 parameters, substring(int begin, int end) which will give you the letters starting at begin till it reaches the desired ending letter. that substring will give you "...
The first line creates and initializes a Label object. The second line creates a new String the value of which is "As dead as a doornail". Very straitforward so far. The third line takes characters from the first string starting from the *fourth* character (at index 3) to the 9th character which in this case are "dead...
32,835,484
I'm learning Java and I have no idea what this outputs, if someone could explain how this works and what it outputs. Thank you in advance. ``` Label displayLabel = new Label(); String str1 = "As dead as a doornail"; String str2 = str1.substring(3, 9); displayLabel.setText(str2 + str1.substring(str2.len...
2015/09/29
[ "https://Stackoverflow.com/questions/32835484", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5387106/" ]
Actually, your code doesn't output anything. You are creating a `Label` object. It doesn't create any visual or text outputs. It only adds some new objects to memory. Let's look at it line by line. ``` Label displayLabel = new Label(); ``` This line creates a new `Label` object called `displayLabel`. ``` String str...
The first line creates and initializes a Label object. The second line creates a new String the value of which is "As dead as a doornail". Very straitforward so far. The third line takes characters from the first string starting from the *fourth* character (at index 3) to the 9th character which in this case are "dead...
25,963,769
I have a list where I put in some values to different class properties, and then I am use a linq query to sort out specific value. ``` List<Artikel> Minlista = new List<Artikel>(); Minlista.Add(new Artikel { Varonamn = "Mjölk", Pris = 14.90, kategori = new Kategori {Namn = "Mejeri"}, }); M...
2014/09/21
[ "https://Stackoverflow.com/questions/25963769", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3572826/" ]
You are selecting bunch of `Artikel` type objects, that's why you are getting the default `ToString()` value. You can either: ``` 1. select item.Varonamn 2. Console.WriteLine("{0}", item.Varonamn); 3 override ToString in Artikel object ```
In your example, `item` in the loop is of type `Artikel`. If you need to print its name, print the attribute that has the name: ``` Console.WriteLine("{0}", item.Varonamn); ``` You can reference other attributes, too: ``` Console.WriteLine("{0} : {1}", item.Varonamn, item.Pris); ```
39,140,652
Hello I have working `uicollectionview` custom layout and i have `issues`for `bottom padding` and `scrolling sizes`. Under below `picture` you can see; > > Also top side first cell always stays on top when scrolling ( Left side cell must be always stay right now no problem there , but top side cell must be scroll whe...
2016/08/25
[ "https://Stackoverflow.com/questions/39140652", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5393528/" ]
I know this is too late to answer, but this could be useful to other users. ``` override func viewDidLayoutSubviews() { super.viewDidLayoutSubviews() collectionView.contentInset = UIEdgeInsets(top: 0, left: 0, bottom: 50, right: 0) } ```
This what worked for me: ``` messagesCollectionView.contentInset.top = 100 messagesCollectionView.contentInset.bottom = 80 ```
39,140,652
Hello I have working `uicollectionview` custom layout and i have `issues`for `bottom padding` and `scrolling sizes`. Under below `picture` you can see; > > Also top side first cell always stays on top when scrolling ( Left side cell must be always stay right now no problem there , but top side cell must be scroll whe...
2016/08/25
[ "https://Stackoverflow.com/questions/39140652", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5393528/" ]
I know this is too late to answer, but this could be useful to other users. ``` override func viewDidLayoutSubviews() { super.viewDidLayoutSubviews() collectionView.contentInset = UIEdgeInsets(top: 0, left: 0, bottom: 50, right: 0) } ```
This can be also done on IB under section insets... [![enter image description here](https://i.stack.imgur.com/Iy1we.png)](https://i.stack.imgur.com/Iy1we.png)
39,140,652
Hello I have working `uicollectionview` custom layout and i have `issues`for `bottom padding` and `scrolling sizes`. Under below `picture` you can see; > > Also top side first cell always stays on top when scrolling ( Left side cell must be always stay right now no problem there , but top side cell must be scroll whe...
2016/08/25
[ "https://Stackoverflow.com/questions/39140652", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5393528/" ]
This what worked for me: ``` messagesCollectionView.contentInset.top = 100 messagesCollectionView.contentInset.bottom = 80 ```
This can be also done on IB under section insets... [![enter image description here](https://i.stack.imgur.com/Iy1we.png)](https://i.stack.imgur.com/Iy1we.png)
37,105,824
So, here is a sample solution to solve the problem of flattening an array. My question is not 'how' to flatten the array. Rather, I am trying to understand some underlying functionality occurring in this recursion. This solution goes through each element of the original array, breaking down any elements that are array...
2016/05/08
[ "https://Stackoverflow.com/questions/37105824", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5437827/" ]
It doesn't actually put elements 'back' through the function that only happens one time. It checks if an element is an array and then loops through that array. If its not an array it pushes it to `flatArray`. The recursion here is that if any element is an array it goes through the flatten function. Then if that array...
I have a simpler solution which works with any level of nesting in array. ``` function flattenArray(arr){ for(var i=0;i<arr.length;i++){ if(arr[i] instanceof Array){ Array.prototype.splice.apply(arr,[i,1].concat(arr[i])) i--; } } return arr; } ```
37,105,824
So, here is a sample solution to solve the problem of flattening an array. My question is not 'how' to flatten the array. Rather, I am trying to understand some underlying functionality occurring in this recursion. This solution goes through each element of the original array, breaking down any elements that are array...
2016/05/08
[ "https://Stackoverflow.com/questions/37105824", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5437827/" ]
It doesn't actually put elements 'back' through the function that only happens one time. It checks if an element is an array and then loops through that array. If its not an array it pushes it to `flatArray`. The recursion here is that if any element is an array it goes through the flatten function. Then if that array...
```js let array = [1, [2], [3, [[4]]]]; const final = []; const stack = []; for (let i = 0; i < array.length; i++) { const ele = array[i]; stack.push(ele); while (stack.length) { const first = stack.shift(); if (Array.isArray(first)) { first.forEach(ele => stack.push(ele)) } else { fin...
37,105,824
So, here is a sample solution to solve the problem of flattening an array. My question is not 'how' to flatten the array. Rather, I am trying to understand some underlying functionality occurring in this recursion. This solution goes through each element of the original array, breaking down any elements that are array...
2016/05/08
[ "https://Stackoverflow.com/questions/37105824", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5437827/" ]
The 'keeping track' of each recursion step happens in the same way any other method call works; the javascript engine keeps track of the variables and scopes any time a new method is called in the [call stack](https://egghead.io/lessons/javascript-call-stack). For your specific example, perhaps it will be easier to se...
I have a simpler solution which works with any level of nesting in array. ``` function flattenArray(arr){ for(var i=0;i<arr.length;i++){ if(arr[i] instanceof Array){ Array.prototype.splice.apply(arr,[i,1].concat(arr[i])) i--; } } return arr; } ```
37,105,824
So, here is a sample solution to solve the problem of flattening an array. My question is not 'how' to flatten the array. Rather, I am trying to understand some underlying functionality occurring in this recursion. This solution goes through each element of the original array, breaking down any elements that are array...
2016/05/08
[ "https://Stackoverflow.com/questions/37105824", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5437827/" ]
The result array `flatArray` is in the lexical closure of the helper function and thus the element that are not themselves arrays are pushed to this and the order of which they are put on the result is in the order they are iterated. When one of the elements is an array it calls `flatten(array[i])` which flattens the ...
It doesn't actually put elements 'back' through the function that only happens one time. It checks if an element is an array and then loops through that array. If its not an array it pushes it to `flatArray`. The recursion here is that if any element is an array it goes through the flatten function. Then if that array...
37,105,824
So, here is a sample solution to solve the problem of flattening an array. My question is not 'how' to flatten the array. Rather, I am trying to understand some underlying functionality occurring in this recursion. This solution goes through each element of the original array, breaking down any elements that are array...
2016/05/08
[ "https://Stackoverflow.com/questions/37105824", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5437827/" ]
The result array `flatArray` is in the lexical closure of the helper function and thus the element that are not themselves arrays are pushed to this and the order of which they are put on the result is in the order they are iterated. When one of the elements is an array it calls `flatten(array[i])` which flattens the ...
The solution of flattening array using the **`for-of`** loop along with 2 other way Using **for-of** loop ```js let array = [1, [2], [3, [[4]]]]; let output = []; let flattenArray = (arr) => { for(let a of arr) { Array.isArray(a) ? flattenArray(a) : output.push(a); } return output; } console.log(flattenArray...
37,105,824
So, here is a sample solution to solve the problem of flattening an array. My question is not 'how' to flatten the array. Rather, I am trying to understand some underlying functionality occurring in this recursion. This solution goes through each element of the original array, breaking down any elements that are array...
2016/05/08
[ "https://Stackoverflow.com/questions/37105824", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5437827/" ]
I think there will be better answers, but here goes... At minimum, don't think of it as "breaking" the loop, think of it as continuing to execute code in a procedural order. So from inside the context of the loop, it calls itself as a function, when that function has completed, it continues in the loop. Example ``` v...
The 'keeping track' of each recursion step happens in the same way any other method call works; the javascript engine keeps track of the variables and scopes any time a new method is called in the [call stack](https://egghead.io/lessons/javascript-call-stack). For your specific example, perhaps it will be easier to se...
37,105,824
So, here is a sample solution to solve the problem of flattening an array. My question is not 'how' to flatten the array. Rather, I am trying to understand some underlying functionality occurring in this recursion. This solution goes through each element of the original array, breaking down any elements that are array...
2016/05/08
[ "https://Stackoverflow.com/questions/37105824", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5437827/" ]
I think there will be better answers, but here goes... At minimum, don't think of it as "breaking" the loop, think of it as continuing to execute code in a procedural order. So from inside the context of the loop, it calls itself as a function, when that function has completed, it continues in the loop. Example ``` v...
```js let array = [1, [2], [3, [[4]]]]; const final = []; const stack = []; for (let i = 0; i < array.length; i++) { const ele = array[i]; stack.push(ele); while (stack.length) { const first = stack.shift(); if (Array.isArray(first)) { first.forEach(ele => stack.push(ele)) } else { fin...
37,105,824
So, here is a sample solution to solve the problem of flattening an array. My question is not 'how' to flatten the array. Rather, I am trying to understand some underlying functionality occurring in this recursion. This solution goes through each element of the original array, breaking down any elements that are array...
2016/05/08
[ "https://Stackoverflow.com/questions/37105824", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5437827/" ]
I think there will be better answers, but here goes... At minimum, don't think of it as "breaking" the loop, think of it as continuing to execute code in a procedural order. So from inside the context of the loop, it calls itself as a function, when that function has completed, it continues in the loop. Example ``` v...
The solution of flattening array using the **`for-of`** loop along with 2 other way Using **for-of** loop ```js let array = [1, [2], [3, [[4]]]]; let output = []; let flattenArray = (arr) => { for(let a of arr) { Array.isArray(a) ? flattenArray(a) : output.push(a); } return output; } console.log(flattenArray...
37,105,824
So, here is a sample solution to solve the problem of flattening an array. My question is not 'how' to flatten the array. Rather, I am trying to understand some underlying functionality occurring in this recursion. This solution goes through each element of the original array, breaking down any elements that are array...
2016/05/08
[ "https://Stackoverflow.com/questions/37105824", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5437827/" ]
The result array `flatArray` is in the lexical closure of the helper function and thus the element that are not themselves arrays are pushed to this and the order of which they are put on the result is in the order they are iterated. When one of the elements is an array it calls `flatten(array[i])` which flattens the ...
```js let array = [1, [2], [3, [[4]]]]; const final = []; const stack = []; for (let i = 0; i < array.length; i++) { const ele = array[i]; stack.push(ele); while (stack.length) { const first = stack.shift(); if (Array.isArray(first)) { first.forEach(ele => stack.push(ele)) } else { fin...
37,105,824
So, here is a sample solution to solve the problem of flattening an array. My question is not 'how' to flatten the array. Rather, I am trying to understand some underlying functionality occurring in this recursion. This solution goes through each element of the original array, breaking down any elements that are array...
2016/05/08
[ "https://Stackoverflow.com/questions/37105824", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5437827/" ]
The result array `flatArray` is in the lexical closure of the helper function and thus the element that are not themselves arrays are pushed to this and the order of which they are put on the result is in the order they are iterated. When one of the elements is an array it calls `flatten(array[i])` which flattens the ...
The 'keeping track' of each recursion step happens in the same way any other method call works; the javascript engine keeps track of the variables and scopes any time a new method is called in the [call stack](https://egghead.io/lessons/javascript-call-stack). For your specific example, perhaps it will be easier to se...
60,946,924
I'm working on building an application that displays one of three images in a list `images` on a picture box every 3 seconds, and the way I did this is by loading one of the images directly into the picture box using `drawing.Image = Image.FromFile(images[1]);` Then I used the Graphics class to draw the other 2 image...
2020/03/31
[ "https://Stackoverflow.com/questions/60946924", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9595143/" ]
You have an `images` array (or something very like it) that is currently storing file names. Instead of doing that, load the images *once* and have an array of *those* instead of file names. That way you're not constantly reloading the images from file. That also means you don't keep creating very (resource) expensive...
You can use GC.Collect(); to use Garbage Collector. Also if you have declared objects, you can use DeleteObject() to delete it after use. This link might be useful: [Deleting & Releasing GDI objects](https://www.codeproject.com/Questions/204260/How-to-delete-or-release-the-GDI-objects-in-VC)
71,612,216
So, I'm trying to add a product to cart, which is the object, specified by quantity which is passed in url parameters. It will look like this: ``` http://localhost:3000/cart/622d6150a1d5f82535d4b66c?qty=3 ``` I managed to split the quantity (qty) parameter by using useLocation, but I somehow cannot console log the c...
2022/03/25
[ "https://Stackoverflow.com/questions/71612216", "https://Stackoverflow.com", "https://Stackoverflow.com/users/15471776/" ]
How about using streams instead? ``` Map<String, Map<String, String>> map = list.stream() .map(line -> line.split("\\|")) .sorted(Comparator.comparingInt(line -> Integer.parseInt(line[2]))) .collect(Collectors.toMap( line -> line[1], line -> Map.of(line[0], line[...
For each new key that you insert in your `Map` variable in the `else` condition of your code you need to create new `HashMap` to insert it along with the new key. What you are doing is using the same `newhas` variable for all the keys in your `Map` variable. So change this ``` else { newhas.put(val...
1,604,557
I'm using [NetBeans for PHP](http://bits.netbeans.org/netbeans/6.8/m2/). When I edit a .js file, it gives me **javascript** code completion. **How can I get it to also give me jQuery code completion?** [![alt text](https://i.stack.imgur.com/LWlI1.png)](https://i.stack.imgur.com/LWlI1.png)
2009/10/22
[ "https://Stackoverflow.com/questions/1604557", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4639/" ]
The basic rule is that your jQuery (or for that matter any js lib) should be found in the same project you need auto complete to work. So just place jquery-1.x.y.js somewhere in your project (that can be reached by NetBeans as it reaches your js file) and you should be good to go. To test you can put the jQuery file i...
Make sure your Internet connection is working, because NetBeans downloads documentation when is needed. I think that NetBeans downloads it from [there](http://api.jquery.com/api/), but this is only my assumption. This is parsing friendly XML document with whole and recent jQuery documentation.
1,604,557
I'm using [NetBeans for PHP](http://bits.netbeans.org/netbeans/6.8/m2/). When I edit a .js file, it gives me **javascript** code completion. **How can I get it to also give me jQuery code completion?** [![alt text](https://i.stack.imgur.com/LWlI1.png)](https://i.stack.imgur.com/LWlI1.png)
2009/10/22
[ "https://Stackoverflow.com/questions/1604557", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4639/" ]
These answers are misleading because jQuery no longer self-documents using "scriptdoc." Version 1.1.4 was the last to have this. Anything newer than that (>=1.2 ~mid-2007) is gutted. amending that: VSdocs actually work: <http://code.jquery.com/jquery-1.4.1-vsdoc.js> or <http://www.asp.net/ajaxlibrary/cdn.ashx> for ve...
I use netbians 7.x for development on drupal 6.x. Autocomplete works after adding non-minified version jquery-1.2.6.js file to the root folder of the project *(so it will be with any version).* It is important to specify the version of the file name, without **-1.2.6** will not work!
1,604,557
I'm using [NetBeans for PHP](http://bits.netbeans.org/netbeans/6.8/m2/). When I edit a .js file, it gives me **javascript** code completion. **How can I get it to also give me jQuery code completion?** [![alt text](https://i.stack.imgur.com/LWlI1.png)](https://i.stack.imgur.com/LWlI1.png)
2009/10/22
[ "https://Stackoverflow.com/questions/1604557", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4639/" ]
i suspect using a non-minified version of jquery would help.
The basic rule is that your jQuery (or for that matter any js lib) should be found in the same project you need auto complete to work. So just place jquery-1.x.y.js somewhere in your project (that can be reached by NetBeans as it reaches your js file) and you should be good to go. To test you can put the jQuery file i...
1,604,557
I'm using [NetBeans for PHP](http://bits.netbeans.org/netbeans/6.8/m2/). When I edit a .js file, it gives me **javascript** code completion. **How can I get it to also give me jQuery code completion?** [![alt text](https://i.stack.imgur.com/LWlI1.png)](https://i.stack.imgur.com/LWlI1.png)
2009/10/22
[ "https://Stackoverflow.com/questions/1604557", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4639/" ]
For Netbeans 6.7 / 6.8 / 6.9, just follow the guide here: [Using jQuery to Enhance the Appearance and Usability of a Web Page](http://netbeans.org/kb/docs/web/js-toolkits-jquery.html) There's a section about half way down called "NetBeans Code Completion and API Support". Worked no problem for me. **Note:** "Choose...
Make sure your Internet connection is working, because NetBeans downloads documentation when is needed. I think that NetBeans downloads it from [there](http://api.jquery.com/api/), but this is only my assumption. This is parsing friendly XML document with whole and recent jQuery documentation.
1,604,557
I'm using [NetBeans for PHP](http://bits.netbeans.org/netbeans/6.8/m2/). When I edit a .js file, it gives me **javascript** code completion. **How can I get it to also give me jQuery code completion?** [![alt text](https://i.stack.imgur.com/LWlI1.png)](https://i.stack.imgur.com/LWlI1.png)
2009/10/22
[ "https://Stackoverflow.com/questions/1604557", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4639/" ]
First go to Tools -> Options -> Miscellaneous and click on the Javascript tab, make sure the targeted browsers are configured properly, code completion changes by the minimal version of the targeted browsers to make sure that the functionality is supported. You also need to add the jquery js file to your project so ne...
The basic rule is that your jQuery (or for that matter any js lib) should be found in the same project you need auto complete to work. So just place jquery-1.x.y.js somewhere in your project (that can be reached by NetBeans as it reaches your js file) and you should be good to go. To test you can put the jQuery file i...
1,604,557
I'm using [NetBeans for PHP](http://bits.netbeans.org/netbeans/6.8/m2/). When I edit a .js file, it gives me **javascript** code completion. **How can I get it to also give me jQuery code completion?** [![alt text](https://i.stack.imgur.com/LWlI1.png)](https://i.stack.imgur.com/LWlI1.png)
2009/10/22
[ "https://Stackoverflow.com/questions/1604557", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4639/" ]
First go to Tools -> Options -> Miscellaneous and click on the Javascript tab, make sure the targeted browsers are configured properly, code completion changes by the minimal version of the targeted browsers to make sure that the functionality is supported. You also need to add the jquery js file to your project so ne...
For Netbeans 6.7 / 6.8 / 6.9, just follow the guide here: [Using jQuery to Enhance the Appearance and Usability of a Web Page](http://netbeans.org/kb/docs/web/js-toolkits-jquery.html) There's a section about half way down called "NetBeans Code Completion and API Support". Worked no problem for me. **Note:** "Choose...
1,604,557
I'm using [NetBeans for PHP](http://bits.netbeans.org/netbeans/6.8/m2/). When I edit a .js file, it gives me **javascript** code completion. **How can I get it to also give me jQuery code completion?** [![alt text](https://i.stack.imgur.com/LWlI1.png)](https://i.stack.imgur.com/LWlI1.png)
2009/10/22
[ "https://Stackoverflow.com/questions/1604557", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4639/" ]
These answers are misleading because jQuery no longer self-documents using "scriptdoc." Version 1.1.4 was the last to have this. Anything newer than that (>=1.2 ~mid-2007) is gutted. amending that: VSdocs actually work: <http://code.jquery.com/jquery-1.4.1-vsdoc.js> or <http://www.asp.net/ajaxlibrary/cdn.ashx> for ve...
The basic rule is that your jQuery (or for that matter any js lib) should be found in the same project you need auto complete to work. So just place jquery-1.x.y.js somewhere in your project (that can be reached by NetBeans as it reaches your js file) and you should be good to go. To test you can put the jQuery file i...
1,604,557
I'm using [NetBeans for PHP](http://bits.netbeans.org/netbeans/6.8/m2/). When I edit a .js file, it gives me **javascript** code completion. **How can I get it to also give me jQuery code completion?** [![alt text](https://i.stack.imgur.com/LWlI1.png)](https://i.stack.imgur.com/LWlI1.png)
2009/10/22
[ "https://Stackoverflow.com/questions/1604557", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4639/" ]
These answers are misleading because jQuery no longer self-documents using "scriptdoc." Version 1.1.4 was the last to have this. Anything newer than that (>=1.2 ~mid-2007) is gutted. amending that: VSdocs actually work: <http://code.jquery.com/jquery-1.4.1-vsdoc.js> or <http://www.asp.net/ajaxlibrary/cdn.ashx> for ve...
For Netbeans 6.7 / 6.8 / 6.9, just follow the guide here: [Using jQuery to Enhance the Appearance and Usability of a Web Page](http://netbeans.org/kb/docs/web/js-toolkits-jquery.html) There's a section about half way down called "NetBeans Code Completion and API Support". Worked no problem for me. **Note:** "Choose...
1,604,557
I'm using [NetBeans for PHP](http://bits.netbeans.org/netbeans/6.8/m2/). When I edit a .js file, it gives me **javascript** code completion. **How can I get it to also give me jQuery code completion?** [![alt text](https://i.stack.imgur.com/LWlI1.png)](https://i.stack.imgur.com/LWlI1.png)
2009/10/22
[ "https://Stackoverflow.com/questions/1604557", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4639/" ]
First go to Tools -> Options -> Miscellaneous and click on the Javascript tab, make sure the targeted browsers are configured properly, code completion changes by the minimal version of the targeted browsers to make sure that the functionality is supported. You also need to add the jquery js file to your project so ne...
These answers are misleading because jQuery no longer self-documents using "scriptdoc." Version 1.1.4 was the last to have this. Anything newer than that (>=1.2 ~mid-2007) is gutted. amending that: VSdocs actually work: <http://code.jquery.com/jquery-1.4.1-vsdoc.js> or <http://www.asp.net/ajaxlibrary/cdn.ashx> for ve...
1,604,557
I'm using [NetBeans for PHP](http://bits.netbeans.org/netbeans/6.8/m2/). When I edit a .js file, it gives me **javascript** code completion. **How can I get it to also give me jQuery code completion?** [![alt text](https://i.stack.imgur.com/LWlI1.png)](https://i.stack.imgur.com/LWlI1.png)
2009/10/22
[ "https://Stackoverflow.com/questions/1604557", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4639/" ]
First go to Tools -> Options -> Miscellaneous and click on the Javascript tab, make sure the targeted browsers are configured properly, code completion changes by the minimal version of the targeted browsers to make sure that the functionality is supported. You also need to add the jquery js file to your project so ne...
i suspect using a non-minified version of jquery would help.
116,146
The less-than-critical thinking free energy types are pointing to the "Super Joule Ringer" demonstrations online, where a quick touch with a 9 V battery illuminates an LED for hours. <http://laserhacker.com/?p=406> I see an oscillating tank circuit, with the inductor and cap trading energy back and forth. If I'm not ...
2014/06/21
[ "https://electronics.stackexchange.com/questions/116146", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/45246/" ]
Added at top #2: This is beginning to look more like fraud with a small chance of ignorance. [**This video**](http://www.magistrala.cz/freeenergy/2011/08/26/super-joule-ringer-lights-my-workshop-247/) allegedly shows a version of his device driving a significant bank of light bulbs. It appears he is getting 10's of ...
You've done the right thing coming to EE.SE! Here are my ramblings on the subject. These sites and videos are kept going by a mix of credulous somewhat-technical tinkerers who can't quite replicate over-unity but will get there soon, and outright fraudsters who fake things to get attention. The tinkerer often gets dr...
11,237,540
I have an ASP.NET MVC 4 Web API app using EntityFramework for ORM. In the JSON I return, there are some cases where the same child node is present for multiple parent nodes. In these cases, the first occurrence of the child node is fully visible with all it's members. Any subsequent occurrence shows up as a $ref to th...
2012/06/28
[ "https://Stackoverflow.com/questions/11237540", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1459275/" ]
An easy way is to edit the generated entity classes code. For each of the entity classes, there will be a `[DataContract(IsReference=true)]` attribute assigned. Something like the following: ``` [EdmEntityTypeAttribute(NamespaceName="YourNamespace", Name="YourEntity")] [Serializable()] [DataContractAttribute(IsRefere...
In my case, I'm using the Entity model, I simply set an entity key for a unique field in my .edmx diagram table.
59,567,138
RabbitMQ Version 3.7.21 Erlang Version Erlang 21.3.8.10 My team had 2 nodes hit the memory watermark last night and so I rebuilt the bad nodes but it left some queues in a bad state. I want to clear them out so that we can recreate them. The stats show NaN for Ready, Unacked, and Total and the stats in queue look lik...
2020/01/02
[ "https://Stackoverflow.com/questions/59567138", "https://Stackoverflow.com", "https://Stackoverflow.com/users/836342/" ]
Looks like there are 3 options: 1. Comb through the Mnesia tables and delete the corrupted ones 2. Fully rebuild the cluster and migrate to a new cluster 3. Rename your queues and ignore corrupted ones We're going to go with Option 3 for now but I'm sure eventually there will be a breaking change in RabbitMQ that wil...
According to <https://groups.google.com/g/rabbitmq-users/c/VSjzvOUfS3s/m/q8OmFTqACAAJ>, the `internal_delete` function in 3.7.x takes two arguments: > > In 3.7.x `rabbit_amqqueue:internal_delete` takes two arguments (acting user name is the second one). > > > Therefore, the next time you need to delete a queue in...
33,089,962
I have a requirement for a user to have a either a static pdf or static image to be uploaded to the database. That needs to be appended to the end of an SSRS report. The report has a header and footer, which cannot be displayed on the last page and no body can be displayed either. The report must basically generate its...
2015/10/12
[ "https://Stackoverflow.com/questions/33089962", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2566689/" ]
You could try this: * create a new report * add a Rectangle region, size it to the whole page * set the Page Break > BreakLocation property of the rectangle to "End" * add a Subreport inside the Rectangle and set it to your original report The new report should then generate the original report plus an extra page.
As the additional page is static you could simply create a new PDF and merge it at the end of the report when exporting to PDF. Both [`PDFSharp`](http://www.pdfsharp.com/PDFsharp/index.php?option=com_content&task=view&id=27&Itemid=1) and [`iTextSharp`](https://www.nuget.org/packages/itextsharp/) are possible libraries...
6,170,559
Im interesting in how bookmarks work for social networks sites like facebook for example, when you look at someone's profile its ``` www.facebook.com/customname ``` or if they didnt make one yet its ``` www.facebook.com/generatedname ``` Is there a get request somewhere im missing??? Is the ``` www.facebook.co...
2011/05/29
[ "https://Stackoverflow.com/questions/6170559", "https://Stackoverflow.com", "https://Stackoverflow.com/users/774740/" ]
Yes, the request is usually hidden using [rewrite engines](http://en.wikipedia.org/wiki/Rewrite_engine) such as [`mod_rewrite`](http://httpd.apache.org/docs/current/mod/mod_rewrite.html). As such something like `facebook.com/customname` is rewritten to `facebook.com/profile.php?key=customname`, which then internally l...
They probably use `.htaccess` or a similar mechanism to redirect all requests to a single entry file. That file starts processing the request and can also check to see if there is an account for `customname` that was specified on the url.
6,170,559
Im interesting in how bookmarks work for social networks sites like facebook for example, when you look at someone's profile its ``` www.facebook.com/customname ``` or if they didnt make one yet its ``` www.facebook.com/generatedname ``` Is there a get request somewhere im missing??? Is the ``` www.facebook.co...
2011/05/29
[ "https://Stackoverflow.com/questions/6170559", "https://Stackoverflow.com", "https://Stackoverflow.com/users/774740/" ]
Yes, the request is usually hidden using [rewrite engines](http://en.wikipedia.org/wiki/Rewrite_engine) such as [`mod_rewrite`](http://httpd.apache.org/docs/current/mod/mod_rewrite.html). As such something like `facebook.com/customname` is rewritten to `facebook.com/profile.php?key=customname`, which then internally l...
There is some solution called **`mod_rewrite`**, which actually *translates* the URL visited by the user (and visible *to* the user) into the path of the script (along with all the parameters). **Example:** when you visit eg. `http://www.facebook.com/ben`, server may actually translate it into `www.facebook.com/profil...
6,170,559
Im interesting in how bookmarks work for social networks sites like facebook for example, when you look at someone's profile its ``` www.facebook.com/customname ``` or if they didnt make one yet its ``` www.facebook.com/generatedname ``` Is there a get request somewhere im missing??? Is the ``` www.facebook.co...
2011/05/29
[ "https://Stackoverflow.com/questions/6170559", "https://Stackoverflow.com", "https://Stackoverflow.com/users/774740/" ]
There is some solution called **`mod_rewrite`**, which actually *translates* the URL visited by the user (and visible *to* the user) into the path of the script (along with all the parameters). **Example:** when you visit eg. `http://www.facebook.com/ben`, server may actually translate it into `www.facebook.com/profil...
They probably use `.htaccess` or a similar mechanism to redirect all requests to a single entry file. That file starts processing the request and can also check to see if there is an account for `customname` that was specified on the url.
19,307,198
I am trying to use require.js with Main.js and getting following error: Uncaught Error: [$injector:modulerr] <http://errors.angularjs.org/1.2.0rc1/>$injector/modulerr?p0=MyApp&p1=Error%3…3A8080%2FResults%2Fresources%2Fjs%2Fvendor%2Fangular.min.js%3A31%3A252) My Main.js ``` require.config({ // alias libraries ...
2013/10/10
[ "https://Stackoverflow.com/questions/19307198", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1647708/" ]
Here is my require config, at `require_config.js`: ``` var require = { baseUrl: '/js', paths: { 'angular': 'lib/angular.min', 'angular.route': 'lib/angular-route.min', 'angular.resource': 'lib/angular-resource.min', 'angular.animate': 'lib/angular-animate.min', 'angular....
Your setup looks fine, except you need to add `angularroute` as a dependency in the `define` portion of the *app.js* file. You mentioned this, but didn't reflect this in your sample code. ``` define(['angular', 'angularroute'], function(angular){ return angular.module('MyApp',['ngRoute']); }); ```
19,307,198
I am trying to use require.js with Main.js and getting following error: Uncaught Error: [$injector:modulerr] <http://errors.angularjs.org/1.2.0rc1/>$injector/modulerr?p0=MyApp&p1=Error%3…3A8080%2FResults%2Fresources%2Fjs%2Fvendor%2Fangular.min.js%3A31%3A252) My Main.js ``` require.config({ // alias libraries ...
2013/10/10
[ "https://Stackoverflow.com/questions/19307198", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1647708/" ]
`angular` is defined as a global variable and your declaration is overriding it. The file `angular.js` does not return anything so there is nothing to inject at the RequireJS level. Try the following: ``` define(['angular'], function(){ return angular.module('MyApp',['ngRoute']); }); ``` I was struggling with Re...
Your setup looks fine, except you need to add `angularroute` as a dependency in the `define` portion of the *app.js* file. You mentioned this, but didn't reflect this in your sample code. ``` define(['angular', 'angularroute'], function(angular){ return angular.module('MyApp',['ngRoute']); }); ```
19,307,198
I am trying to use require.js with Main.js and getting following error: Uncaught Error: [$injector:modulerr] <http://errors.angularjs.org/1.2.0rc1/>$injector/modulerr?p0=MyApp&p1=Error%3…3A8080%2FResults%2Fresources%2Fjs%2Fvendor%2Fangular.min.js%3A31%3A252) My Main.js ``` require.config({ // alias libraries ...
2013/10/10
[ "https://Stackoverflow.com/questions/19307198", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1647708/" ]
I found a solution here: <https://github.com/tnajdek/angular-requirejs-seed/blob/master/app/js/main.js> from the docs: <http://code.angularjs.org/1.2.1/docs/guide/bootstrap#overview_deferred-bootstrap> ``` window.name = "NG_DEFER_BOOTSTRAP!"; require(['angular', 'angularroute', 'app'], function(angular, angularroute,...
Your setup looks fine, except you need to add `angularroute` as a dependency in the `define` portion of the *app.js* file. You mentioned this, but didn't reflect this in your sample code. ``` define(['angular', 'angularroute'], function(angular){ return angular.module('MyApp',['ngRoute']); }); ```
19,307,198
I am trying to use require.js with Main.js and getting following error: Uncaught Error: [$injector:modulerr] <http://errors.angularjs.org/1.2.0rc1/>$injector/modulerr?p0=MyApp&p1=Error%3…3A8080%2FResults%2Fresources%2Fjs%2Fvendor%2Fangular.min.js%3A31%3A252) My Main.js ``` require.config({ // alias libraries ...
2013/10/10
[ "https://Stackoverflow.com/questions/19307198", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1647708/" ]
Here is my require config, at `require_config.js`: ``` var require = { baseUrl: '/js', paths: { 'angular': 'lib/angular.min', 'angular.route': 'lib/angular-route.min', 'angular.resource': 'lib/angular-resource.min', 'angular.animate': 'lib/angular-animate.min', 'angular....
`angular` is defined as a global variable and your declaration is overriding it. The file `angular.js` does not return anything so there is nothing to inject at the RequireJS level. Try the following: ``` define(['angular'], function(){ return angular.module('MyApp',['ngRoute']); }); ``` I was struggling with Re...
19,307,198
I am trying to use require.js with Main.js and getting following error: Uncaught Error: [$injector:modulerr] <http://errors.angularjs.org/1.2.0rc1/>$injector/modulerr?p0=MyApp&p1=Error%3…3A8080%2FResults%2Fresources%2Fjs%2Fvendor%2Fangular.min.js%3A31%3A252) My Main.js ``` require.config({ // alias libraries ...
2013/10/10
[ "https://Stackoverflow.com/questions/19307198", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1647708/" ]
I found a solution here: <https://github.com/tnajdek/angular-requirejs-seed/blob/master/app/js/main.js> from the docs: <http://code.angularjs.org/1.2.1/docs/guide/bootstrap#overview_deferred-bootstrap> ``` window.name = "NG_DEFER_BOOTSTRAP!"; require(['angular', 'angularroute', 'app'], function(angular, angularroute,...
`angular` is defined as a global variable and your declaration is overriding it. The file `angular.js` does not return anything so there is nothing to inject at the RequireJS level. Try the following: ``` define(['angular'], function(){ return angular.module('MyApp',['ngRoute']); }); ``` I was struggling with Re...
3,170,868
I have vectors Y and W. I know constrain that Y should be sorted by W. So if Wi < Wn than Yi < Yn. And I need some function Z(preferably differentiated, maybe not everywhere) that returns how good the Y is sorted by W. If all elements are sorted Z is max if all are in incorrect order min, the more are sorted the more s...
2019/04/01
[ "https://math.stackexchange.com/questions/3170868", "https://math.stackexchange.com", "https://math.stackexchange.com/users/133007/" ]
A function that does what you want that can be computed in quadratic time is to loop over all unordered pairs of elements and add $1$ to a sum if they're not inverted and add $0$ if they are. There is a way to also compute this in $O(n\log n) $ time similar to merge sort. This is simply the complement of the number of...
[It is quite easy to make such a function. A pair $(x, y)$ is 'sorted' if $x \leq y$. A function that measures how 'sorted' it is can be defined by $\max(0, x-y)$. If $x \leq y$ its value is $0$, and otherwise its value is $x-y$. You can, for example, use $[\max(0, x-y)]^2$ instead, which is differentiable. For an ent...
2,585
Sé que me voy a meter en el mayor [berenjenal](http://dle.rae.es/?id=5NIOz0T) del mundo haciendo esta pregunta, pero allá voy. Todo comienza con la pregunta [Catalan word for the Spanish language](https://spanish.stackexchange.com/q/19788/12637), que ha sido cerrada (y con razón) por no ser una pregunta sobre el idioma...
2017/02/20
[ "https://spanish.meta.stackexchange.com/questions/2585", "https://spanish.meta.stackexchange.com", "https://spanish.meta.stackexchange.com/users/12637/" ]
Otros Stacks ============ A mi me gustaría mucho que este stack se abriera a [los otros idiomas de España](https://es.wikipedia.org/wiki/Idiomas_de_Espa%C3%B1a). Hay precedentes: * **SE Chinese** incluye [**tibetano**](https://chinese.stackexchange.com/questions/tagged/tibetan) y [**todas las lenguas chinas**](https:...
Mi muy personal opinion es q en este caso, la union no necesariamente hace la fuerza. El tráfico es relativamente modesto, y afortunadamente la mayoria aqui somos bilingües, sin embargo; las [estadísticas de area51](https://area51.stackexchange.com/proposals/14456/spanish-language) hablan de varias areas en las que hay...
17,310
I am making a program to set those attributes with C++. With IDA, I find that `lxcore.sys` driver uses `ZwSetEaFile()` and `LxssManager.dll` uses `NtSetEaFile()` function to set NTFS extended attributes. Here are the functions mentioned in ntdl.dll (using IDA v7): [![SetEaFile_ntdll](https://i.stack.imgur.com/MA8sy.pn...
2018/01/27
[ "https://reverseengineering.stackexchange.com/questions/17310", "https://reverseengineering.stackexchange.com", "https://reverseengineering.stackexchange.com/users/23069/" ]
There is no difference at the user mode level. The difference only exists when called from kernel mode in how the function arguments are passed in whether the parameters are guaranteed valid (Zw) or whether they should be verified (Nt). This [documentation](https://docs.microsoft.com/en-us/windows-hardware/drivers/kern...
the op appears to have deleted some questions he posed as comments and accepted an answer so this answer might appear to be not relevant to the present context op commented if one could call the api in user\_mode without loading ntdll.dll or calling either of the two variants of the api viz NtSetEaFile or ZwSet...
18,527
Judaism and Bani Israel have concept of Gentile to represent the pagans and Idolaters with a corpus of rules dealing with them, So does Christianity inherit this concept? If yes where ? and Are Jews considered to Be gentiles by Christians as its known that Jews consider the Christians to be Gentiles and Avodah Zarah?
2013/08/20
[ "https://christianity.stackexchange.com/questions/18527", "https://christianity.stackexchange.com", "https://christianity.stackexchange.com/users/3812/" ]
Most branches of Christianity see Jesus, the Son of God, as the Jewish Messiah in fulfillment of Jewish prophecies and foreshadowing in the Jewish Scriptures. God foretold, though, that the Seed of Abraham would be a blessing to all people--every tribe, tongue and nation. The apostle Paul specifies that the gospel is...
**No.** In Christianity, there are two sets of people, but one group is not excluded or held to different standards than the other. There are: 1. God's chosen covenant people. 2. Everybody else. God's people are identified solely by their faith in Jesus Christ as savior/redeemer. By faith we become part of the same ...
18,527
Judaism and Bani Israel have concept of Gentile to represent the pagans and Idolaters with a corpus of rules dealing with them, So does Christianity inherit this concept? If yes where ? and Are Jews considered to Be gentiles by Christians as its known that Jews consider the Christians to be Gentiles and Avodah Zarah?
2013/08/20
[ "https://christianity.stackexchange.com/questions/18527", "https://christianity.stackexchange.com", "https://christianity.stackexchange.com/users/3812/" ]
The term [Gentile](http://en.wikipedia.org/wiki/Gentile) in the Bible simply means **non-Jew or non-Hebrew**. In Old Testament times, the Hebrews called the other non-Hebrews as Gentiles and in the New Testament, non-Jews are Gentiles. In the New Testament, **Paul** was famous for preaching to the Gentiles. Because P...
Most branches of Christianity see Jesus, the Son of God, as the Jewish Messiah in fulfillment of Jewish prophecies and foreshadowing in the Jewish Scriptures. God foretold, though, that the Seed of Abraham would be a blessing to all people--every tribe, tongue and nation. The apostle Paul specifies that the gospel is...
18,527
Judaism and Bani Israel have concept of Gentile to represent the pagans and Idolaters with a corpus of rules dealing with them, So does Christianity inherit this concept? If yes where ? and Are Jews considered to Be gentiles by Christians as its known that Jews consider the Christians to be Gentiles and Avodah Zarah?
2013/08/20
[ "https://christianity.stackexchange.com/questions/18527", "https://christianity.stackexchange.com", "https://christianity.stackexchange.com/users/3812/" ]
Most branches of Christianity see Jesus, the Son of God, as the Jewish Messiah in fulfillment of Jewish prophecies and foreshadowing in the Jewish Scriptures. God foretold, though, that the Seed of Abraham would be a blessing to all people--every tribe, tongue and nation. The apostle Paul specifies that the gospel is...
In the Teachings of Jesus and the writings of the Apostles, there is a common theme of the *world* that represents an established system that is separate from and foreign to Messiah. > > **John 14:16-18** > And I will ask the Father, and he will give you another co-minister, that he should abide with you into the age...
18,527
Judaism and Bani Israel have concept of Gentile to represent the pagans and Idolaters with a corpus of rules dealing with them, So does Christianity inherit this concept? If yes where ? and Are Jews considered to Be gentiles by Christians as its known that Jews consider the Christians to be Gentiles and Avodah Zarah?
2013/08/20
[ "https://christianity.stackexchange.com/questions/18527", "https://christianity.stackexchange.com", "https://christianity.stackexchange.com/users/3812/" ]
The term [Gentile](http://en.wikipedia.org/wiki/Gentile) in the Bible simply means **non-Jew or non-Hebrew**. In Old Testament times, the Hebrews called the other non-Hebrews as Gentiles and in the New Testament, non-Jews are Gentiles. In the New Testament, **Paul** was famous for preaching to the Gentiles. Because P...
**No.** In Christianity, there are two sets of people, but one group is not excluded or held to different standards than the other. There are: 1. God's chosen covenant people. 2. Everybody else. God's people are identified solely by their faith in Jesus Christ as savior/redeemer. By faith we become part of the same ...
18,527
Judaism and Bani Israel have concept of Gentile to represent the pagans and Idolaters with a corpus of rules dealing with them, So does Christianity inherit this concept? If yes where ? and Are Jews considered to Be gentiles by Christians as its known that Jews consider the Christians to be Gentiles and Avodah Zarah?
2013/08/20
[ "https://christianity.stackexchange.com/questions/18527", "https://christianity.stackexchange.com", "https://christianity.stackexchange.com/users/3812/" ]
The term [Gentile](http://en.wikipedia.org/wiki/Gentile) in the Bible simply means **non-Jew or non-Hebrew**. In Old Testament times, the Hebrews called the other non-Hebrews as Gentiles and in the New Testament, non-Jews are Gentiles. In the New Testament, **Paul** was famous for preaching to the Gentiles. Because P...
In the Teachings of Jesus and the writings of the Apostles, there is a common theme of the *world* that represents an established system that is separate from and foreign to Messiah. > > **John 14:16-18** > And I will ask the Father, and he will give you another co-minister, that he should abide with you into the age...
67,735,721
I tried the solution from this question already [Remove other peoples' commits on my branch after rebase gone wrong](https://stackoverflow.com/questions/51681175/remove-other-peoples-commits-on-my-branch-after-rebase-gone-wrong) , but didn't work for me. My commit log looks like this: ``` commit somehash123 (HEAD -> ...
2021/05/28
[ "https://Stackoverflow.com/questions/67735721", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8376627/" ]
To answer the question (rather than question if the question should be a question): [This MDN page](https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/key#keyboardevent_sequence) describes how keyboard events work. * one keydown, with repeat = false * multiple keydown, with repeat = true * one keyup So y...
Use the following to identify is tabbed ``` tabbed = (e.keyCode === 9 && e.type === 'keydown')?true:false; ```
13,951,676
Is there any shortcut for `Go to Previous line visited` in the editor . Thank you , Kannan
2012/12/19
[ "https://Stackoverflow.com/questions/13951676", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1449101/" ]
I think what you are looking for is `Alt`+`Left` and `Alt`+`Right`
Ctrl+Q goes to your Last Edit Location (at least in OS X). See the "Navigate" menu.
39,894,236
I am not sure whether this question is asked before or not but I have searched and didnt find the same I have a dataset: ``` X24_TT X35_FTT X55_FTT X80_FTT 0.09 0.87 0.89 0.15 0.94 0.12 0.09 0.92 0.89 0.11 0.86 0.08 0.12 0.8 0.15 0.18 0.08 0.09 0.15 0.88 ``` I want to ...
2016/10/06
[ "https://Stackoverflow.com/questions/39894236", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6821284/" ]
I am not aware if there is any direct conversion tool. However, you can try to use following trick: 1. Concatenate decent amount of C++ files from your project into single one (for instance `cat *.cpp > single.cpp`) 2. Apply clang-format to that `single.cpp` 3. Open `single.cpp` within Emacs 4. Use [guess](https://www...
I'm a bit late on this, but hopefully someone will still find this useful. I've posted the relevant portion of my clang-format config below, which provides the functionality you want. ```lisp (use-package clang-format :after (s) :init (defun get-clang-format-option (config-str field is-num) "Retrieve a confi...
566,267
We have some route path in our project like this line: ``` "start": "set NODE_ENV=local&&node_modules\\.bin\\webpack --config webpack.dev.config.js" ``` How is the equivalent in Linux? We are using Debian but we have problems using this alternatives: ``` "start": "set NODE_ENV=local&&node_modules//.bin//webpack --c...
2020/02/07
[ "https://unix.stackexchange.com/questions/566267", "https://unix.stackexchange.com", "https://unix.stackexchange.com/users/394199/" ]
This is nothing to do with Linux or with path separators, which you have already adjusted. > > > ``` > set NODE_ENV=local > ``` > > This is not how to set an environment variable in a POSIX shell. > > > ``` > && > ``` > > This is not how to run a command with a nonce environment variable setting in a POSIX ...
To answer your main question: Since backslash is the scape character, when you are going to put it in a string you need to scape it by another backslash. So double backslash simply means a single backslash. In linux you use forward slash to separate path, so there is no need to double it. So to convert a path from ...
566,267
We have some route path in our project like this line: ``` "start": "set NODE_ENV=local&&node_modules\\.bin\\webpack --config webpack.dev.config.js" ``` How is the equivalent in Linux? We are using Debian but we have problems using this alternatives: ``` "start": "set NODE_ENV=local&&node_modules//.bin//webpack --c...
2020/02/07
[ "https://unix.stackexchange.com/questions/566267", "https://unix.stackexchange.com", "https://unix.stackexchange.com/users/394199/" ]
This is nothing to do with Linux or with path separators, which you have already adjusted. > > > ``` > set NODE_ENV=local > ``` > > This is not how to set an environment variable in a POSIX shell. > > > ``` > && > ``` > > This is not how to run a command with a nonce environment variable setting in a POSIX ...
The Linux equivalant of Windows double-<reverse solidus> is "//". Section 4.13 Pathname Resolution of the Base Definitions volume says: > > ... If a pathname begins with two successive characters, the first component following the leading characters may be interpreted in an implementation-defined manner, although ...
1,428,471
I am trying to find $\delta$ of $f(x)=4-x^2$ for $c=-1, L=3, \epsilon=\frac{1}{4}$. Here is what I did: $$|f(x)-L|<\epsilon$$ $$|4-x^2-3|<\frac{1}{4}$$ $$-\frac{1}{4}<1-x^2<\frac{1}{4}$$ $$-\frac{5}{4}<-x^2<-\frac{3}{4}$$ $$\frac{5}{4}>x^2>\frac{3}{4}$$ $$\frac{\sqrt{5}}{2}>x>\frac{\sqrt{3}}{2}$$ $$\frac{\sqrt{3}}{2}<...
2015/09/09
[ "https://math.stackexchange.com/questions/1428471", "https://math.stackexchange.com", "https://math.stackexchange.com/users/9499/" ]
Like the commenters have pointed out, this question is somewhat ill-defined unless you pose a probability measure on the family of functions from $[0, 1]$ to $\mathbb{R}$. However, your discussion of cardinality suggests that maybe you instead want to show that the cardinality of functions in $\mathcal{F}$ that are con...
As mentioned in the comments, this question is ill-defined unless you describe more precisely what you mean by "random" and "probability". Here is one reasonable such definition (for a slightly different version of the question) for which it is true that a random function is discontinuous everywhere with probability $1...
70,338,830
Using the `fs` module. I am trying to append an array to a json file. At this point I am trying to avoid databases. Will JSON do what I need it to do or should I try a different way of handeling data? What I have tried: ``` let homeFile_JsData = { id: id, title: title, author: user } let homeFile_data = JSON.stringif...
2021/12/13
[ "https://Stackoverflow.com/questions/70338830", "https://Stackoverflow.com", "https://Stackoverflow.com/users/15263184/" ]
If you just want to add a new row of data, then JSON isn't really the right format. It is not design for incremental updates and thus you generally have to read the entire JSON, parse it into a Javascript object, modify the Javascript object, convert back to JSON, then write the entire file of JSON. If you are just ad...
I have decided to go with your solution... CSV worked well. I did decide to do some playing around in a sandbox and this also worked for me: ``` let datares = fs.readFileSync('user-mgm/users.json'); let data = JSON.parse(datares); var arr = data.array const new_thing = {id: id_string, data: data_string} arr.push(ne...
54,236
How can we explain the benefits of a SE 2.0 site to people who have never heard of StackOverflow, and only use forums (if that)? For instance, when I posted on a Blender forum about a proposal, the response was, "we already have a Forum".
2010/06/18
[ "https://meta.stackexchange.com/questions/54236", "https://meta.stackexchange.com", "https://meta.stackexchange.com/users/146438/" ]
I would give Simon Brown's comment a +1 if I could. If I put myself into the shoes of, say, the owner of a blender forum, that's exactly what I would think. I wouldn't want two online communities (a forum and a SE site) - that could lead to quite a bit of user confusion. And the hurdles of transferring my existing comm...
Point out the main benefits of the SE software. 1. The best answers rise to the top of the page. 2. Answers can be edited so they remain relevant. We programmers were already familiar with existing forums that didn't have these features. Remember how frustrating it was to search and find only outdated information, or...
54,236
How can we explain the benefits of a SE 2.0 site to people who have never heard of StackOverflow, and only use forums (if that)? For instance, when I posted on a Blender forum about a proposal, the response was, "we already have a Forum".
2010/06/18
[ "https://meta.stackexchange.com/questions/54236", "https://meta.stackexchange.com", "https://meta.stackexchange.com/users/146438/" ]
Point out the main benefits of the SE software. 1. The best answers rise to the top of the page. 2. Answers can be edited so they remain relevant. We programmers were already familiar with existing forums that didn't have these features. Remember how frustrating it was to search and find only outdated information, or...
A good slogan can go a long way. What about this: > > **S-Ex. It *can* be better.** > > > (I'll delete if flagged, since 9% of [SE visitors](https://meta.stackexchange.com/questions/61413/demographics-of-stack-overflow) are minors!)
54,236
How can we explain the benefits of a SE 2.0 site to people who have never heard of StackOverflow, and only use forums (if that)? For instance, when I posted on a Blender forum about a proposal, the response was, "we already have a Forum".
2010/06/18
[ "https://meta.stackexchange.com/questions/54236", "https://meta.stackexchange.com", "https://meta.stackexchange.com/users/146438/" ]
I would give Simon Brown's comment a +1 if I could. If I put myself into the shoes of, say, the owner of a blender forum, that's exactly what I would think. I wouldn't want two online communities (a forum and a SE site) - that could lead to quite a bit of user confusion. And the hurdles of transferring my existing comm...
A good slogan can go a long way. What about this: > > **S-Ex. It *can* be better.** > > > (I'll delete if flagged, since 9% of [SE visitors](https://meta.stackexchange.com/questions/61413/demographics-of-stack-overflow) are minors!)
182,165
I've heard many people say > > He/she has attitude > > > What they really mean is that the person has ego or something like that. I googled and find [this Yahoo answer](https://in.answers.yahoo.com/question/index?qid=20090429040201AAHDfJ5), which also suggest the same. Are they correct in saying that?
2014/07/04
[ "https://english.stackexchange.com/questions/182165", "https://english.stackexchange.com", "https://english.stackexchange.com/users/27109/" ]
[Attitude](http://www.thefreedictionary.com/attitude): > > * a complex mental state involving beliefs and feelings and values and dispositions to act in certain ways; "he had the attitude that work was fun" > > > **To have an attitude** is a little difficult to define. It is generally used to mean that you behave...
Generally, it means the person is always rude and disrespectful. I think someone who has an attitude problem should be treated as an outcast unless the person has bipolar disorder. That, I can understand.
182,165
I've heard many people say > > He/she has attitude > > > What they really mean is that the person has ego or something like that. I googled and find [this Yahoo answer](https://in.answers.yahoo.com/question/index?qid=20090429040201AAHDfJ5), which also suggest the same. Are they correct in saying that?
2014/07/04
[ "https://english.stackexchange.com/questions/182165", "https://english.stackexchange.com", "https://english.stackexchange.com/users/27109/" ]
Have a look at sense 6 of *attitude* in the OED, with a few quotations from there. > > a. Aggressive or uncooperative behaviour; a resentful or antagonistic manner. In phrs. to cop an attitude , to give attitude , > etc., to assume such a manner. slang (orig. U.S.). > > > 1985 N.Y. Times 26 Oct. 31/4 If I'm out the...
Generally, it means the person is always rude and disrespectful. I think someone who has an attitude problem should be treated as an outcast unless the person has bipolar disorder. That, I can understand.
182,165
I've heard many people say > > He/she has attitude > > > What they really mean is that the person has ego or something like that. I googled and find [this Yahoo answer](https://in.answers.yahoo.com/question/index?qid=20090429040201AAHDfJ5), which also suggest the same. Are they correct in saying that?
2014/07/04
[ "https://english.stackexchange.com/questions/182165", "https://english.stackexchange.com", "https://english.stackexchange.com/users/27109/" ]
[Attitude](http://www.thefreedictionary.com/attitude): > > * a complex mental state involving beliefs and feelings and values and dispositions to act in certain ways; "he had the attitude that work was fun" > > > **To have an attitude** is a little difficult to define. It is generally used to mean that you behave...
It seems to me that to accuse someone of "having an attitude" is making a person look bad without giving specifics.
182,165
I've heard many people say > > He/she has attitude > > > What they really mean is that the person has ego or something like that. I googled and find [this Yahoo answer](https://in.answers.yahoo.com/question/index?qid=20090429040201AAHDfJ5), which also suggest the same. Are they correct in saying that?
2014/07/04
[ "https://english.stackexchange.com/questions/182165", "https://english.stackexchange.com", "https://english.stackexchange.com/users/27109/" ]
The following dictionary definitions are clear: > > [**Cambridge Dictionary**](https://dictionary.cambridge.org/dictionary/english/attitude) > > > **Attitude** noun (CONFIDENCE) > > If you say that someone has attitude, you mean that they are very > confident and want people to notice them. > > > **[Collins...
Generally, it means the person is always rude and disrespectful. I think someone who has an attitude problem should be treated as an outcast unless the person has bipolar disorder. That, I can understand.
182,165
I've heard many people say > > He/she has attitude > > > What they really mean is that the person has ego or something like that. I googled and find [this Yahoo answer](https://in.answers.yahoo.com/question/index?qid=20090429040201AAHDfJ5), which also suggest the same. Are they correct in saying that?
2014/07/04
[ "https://english.stackexchange.com/questions/182165", "https://english.stackexchange.com", "https://english.stackexchange.com/users/27109/" ]
Have a look at sense 6 of *attitude* in the OED, with a few quotations from there. > > a. Aggressive or uncooperative behaviour; a resentful or antagonistic manner. In phrs. to cop an attitude , to give attitude , > etc., to assume such a manner. slang (orig. U.S.). > > > 1985 N.Y. Times 26 Oct. 31/4 If I'm out the...
It seems to me that to accuse someone of "having an attitude" is making a person look bad without giving specifics.
182,165
I've heard many people say > > He/she has attitude > > > What they really mean is that the person has ego or something like that. I googled and find [this Yahoo answer](https://in.answers.yahoo.com/question/index?qid=20090429040201AAHDfJ5), which also suggest the same. Are they correct in saying that?
2014/07/04
[ "https://english.stackexchange.com/questions/182165", "https://english.stackexchange.com", "https://english.stackexchange.com/users/27109/" ]
Having "attitude" the way I've heard it used, is usually a sort of compliment from a boss/superior/mentor (generally an older authority figure) to describe the sort of outlook and behavior someone working with them should have. It usually describes confidence and assertiveness without crossing the line into arrogance o...
Generally, it means the person is always rude and disrespectful. I think someone who has an attitude problem should be treated as an outcast unless the person has bipolar disorder. That, I can understand.
182,165
I've heard many people say > > He/she has attitude > > > What they really mean is that the person has ego or something like that. I googled and find [this Yahoo answer](https://in.answers.yahoo.com/question/index?qid=20090429040201AAHDfJ5), which also suggest the same. Are they correct in saying that?
2014/07/04
[ "https://english.stackexchange.com/questions/182165", "https://english.stackexchange.com", "https://english.stackexchange.com/users/27109/" ]
Have a look at sense 6 of *attitude* in the OED, with a few quotations from there. > > a. Aggressive or uncooperative behaviour; a resentful or antagonistic manner. In phrs. to cop an attitude , to give attitude , > etc., to assume such a manner. slang (orig. U.S.). > > > 1985 N.Y. Times 26 Oct. 31/4 If I'm out the...
Having "attitude" the way I've heard it used, is usually a sort of compliment from a boss/superior/mentor (generally an older authority figure) to describe the sort of outlook and behavior someone working with them should have. It usually describes confidence and assertiveness without crossing the line into arrogance o...
182,165
I've heard many people say > > He/she has attitude > > > What they really mean is that the person has ego or something like that. I googled and find [this Yahoo answer](https://in.answers.yahoo.com/question/index?qid=20090429040201AAHDfJ5), which also suggest the same. Are they correct in saying that?
2014/07/04
[ "https://english.stackexchange.com/questions/182165", "https://english.stackexchange.com", "https://english.stackexchange.com/users/27109/" ]
Have a look at sense 6 of *attitude* in the OED, with a few quotations from there. > > a. Aggressive or uncooperative behaviour; a resentful or antagonistic manner. In phrs. to cop an attitude , to give attitude , > etc., to assume such a manner. slang (orig. U.S.). > > > 1985 N.Y. Times 26 Oct. 31/4 If I'm out the...
[Attitude](http://www.thefreedictionary.com/attitude): > > * a complex mental state involving beliefs and feelings and values and dispositions to act in certain ways; "he had the attitude that work was fun" > > > **To have an attitude** is a little difficult to define. It is generally used to mean that you behave...
182,165
I've heard many people say > > He/she has attitude > > > What they really mean is that the person has ego or something like that. I googled and find [this Yahoo answer](https://in.answers.yahoo.com/question/index?qid=20090429040201AAHDfJ5), which also suggest the same. Are they correct in saying that?
2014/07/04
[ "https://english.stackexchange.com/questions/182165", "https://english.stackexchange.com", "https://english.stackexchange.com/users/27109/" ]
Have a look at sense 6 of *attitude* in the OED, with a few quotations from there. > > a. Aggressive or uncooperative behaviour; a resentful or antagonistic manner. In phrs. to cop an attitude , to give attitude , > etc., to assume such a manner. slang (orig. U.S.). > > > 1985 N.Y. Times 26 Oct. 31/4 If I'm out the...
The following dictionary definitions are clear: > > [**Cambridge Dictionary**](https://dictionary.cambridge.org/dictionary/english/attitude) > > > **Attitude** noun (CONFIDENCE) > > If you say that someone has attitude, you mean that they are very > confident and want people to notice them. > > > **[Collins...
182,165
I've heard many people say > > He/she has attitude > > > What they really mean is that the person has ego or something like that. I googled and find [this Yahoo answer](https://in.answers.yahoo.com/question/index?qid=20090429040201AAHDfJ5), which also suggest the same. Are they correct in saying that?
2014/07/04
[ "https://english.stackexchange.com/questions/182165", "https://english.stackexchange.com", "https://english.stackexchange.com/users/27109/" ]
The following dictionary definitions are clear: > > [**Cambridge Dictionary**](https://dictionary.cambridge.org/dictionary/english/attitude) > > > **Attitude** noun (CONFIDENCE) > > If you say that someone has attitude, you mean that they are very > confident and want people to notice them. > > > **[Collins...
It seems to me that to accuse someone of "having an attitude" is making a person look bad without giving specifics.
58,558,932
I have 2 files that are reports of size of the Databases (1 file is from yesterday, 1 from today). I want to see how the size of each database changed, so I want to calculate the difference. File looks like this: ``` "DATABASE","Alloc MB","Use MB","Free MB","Temp MB","Hostname" "EUROPE","9133508","8336089","797419",...
2019/10/25
[ "https://Stackoverflow.com/questions/58558932", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7167600/" ]
There are multiple ways you can approach this. One, you can create an id for that HTML tag that you want add'l/different style and create a `#<id_name>` in your css to handle that style or add another classname in front of `container` for the one you want to style. Or you can use CSS specificity for the nth child rende...
If I understand, you want to have a different styling for one of the elements with the class `container`. A good practice would be to create another class with the special styling: `container new-class`
58,558,932
I have 2 files that are reports of size of the Databases (1 file is from yesterday, 1 from today). I want to see how the size of each database changed, so I want to calculate the difference. File looks like this: ``` "DATABASE","Alloc MB","Use MB","Free MB","Temp MB","Hostname" "EUROPE","9133508","8336089","797419",...
2019/10/25
[ "https://Stackoverflow.com/questions/58558932", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7167600/" ]
There are multiple ways you can approach this. One, you can create an id for that HTML tag that you want add'l/different style and create a `#<id_name>` in your css to handle that style or add another classname in front of `container` for the one you want to style. Or you can use CSS specificity for the nth child rende...
Just add another class beside `container` class and define/write your desired css code inside the new class.
58,558,932
I have 2 files that are reports of size of the Databases (1 file is from yesterday, 1 from today). I want to see how the size of each database changed, so I want to calculate the difference. File looks like this: ``` "DATABASE","Alloc MB","Use MB","Free MB","Temp MB","Hostname" "EUROPE","9133508","8336089","797419",...
2019/10/25
[ "https://Stackoverflow.com/questions/58558932", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7167600/" ]
There are multiple ways you can approach this. One, you can create an id for that HTML tag that you want add'l/different style and create a `#<id_name>` in your css to handle that style or add another classname in front of `container` for the one you want to style. Or you can use CSS specificity for the nth child rende...
Dear I think you want to override the default class name `container` of bootstrap which is a bad approach and make hurdles in future for you. So better to use some `div` with class name inside `container` and do what ever you want to... An if you are bound to not update html then try to use `.container:nth-child(5)`...
43,041,839
I have this code. It gives me an error : > > Destination array is not long enough to copy all the items in the > collection. Check array index and length. > > > I thought that it was because of using a dictionary, so I switched it to `ConcurrentDictionary`, but the error is still here. ``` private void SaverCal...
2017/03/27
[ "https://Stackoverflow.com/questions/43041839", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6130563/" ]
As far as I can see, you're taking a snapshot for your queues once an hour, but the main problem with your code is that you're trying to serialize your queue (which is a `ConcurrentQueue<T>`, I guess) itself without any cloning or synchronization logic. Another problem with your code is a `goto` usage, which is not nec...
To avoid this error I use lock before a try to serialize a file. Now it works correctly.
37,457,836
I have `php7` installed on `ubuntu 14.04` I have problems with `curl` I tried to run `composer install` and it gives me error Your requirements could not be resolved to an installable set of packages. Problem 1 - `stripe/stripe-php v2.3.0 requires ext-curl *`-> the requested PHP extension curl is missing from your s...
2016/05/26
[ "https://Stackoverflow.com/questions/37457836", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5192370/" ]
Try using: ``` sudo apt-get install php7.0-curl ```
Installing `php 7 curl` in `kali linux` If you installed your `php7` manually, Open your terminal and simply type `sudo apt-get install php-curl` without quotes and you are done. I experienced the same problem when installing `stripe payment` system but that solved my problem.
37,457,836
I have `php7` installed on `ubuntu 14.04` I have problems with `curl` I tried to run `composer install` and it gives me error Your requirements could not be resolved to an installable set of packages. Problem 1 - `stripe/stripe-php v2.3.0 requires ext-curl *`-> the requested PHP extension curl is missing from your s...
2016/05/26
[ "https://Stackoverflow.com/questions/37457836", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5192370/" ]
Try using: ``` sudo apt-get install php7.0-curl ```
Follow these steps: 1. Install cURL: `sudo apt-get install php-curl` OR `sudo apt-get install php7.0-curl` 2. Enable cURL extension in `php.ini` file. `;extension=php_curl.dll` Uncomment this. All done, Cheers!
37,457,836
I have `php7` installed on `ubuntu 14.04` I have problems with `curl` I tried to run `composer install` and it gives me error Your requirements could not be resolved to an installable set of packages. Problem 1 - `stripe/stripe-php v2.3.0 requires ext-curl *`-> the requested PHP extension curl is missing from your s...
2016/05/26
[ "https://Stackoverflow.com/questions/37457836", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5192370/" ]
Follow these steps: 1. Install cURL: `sudo apt-get install php-curl` OR `sudo apt-get install php7.0-curl` 2. Enable cURL extension in `php.ini` file. `;extension=php_curl.dll` Uncomment this. All done, Cheers!
Installing `php 7 curl` in `kali linux` If you installed your `php7` manually, Open your terminal and simply type `sudo apt-get install php-curl` without quotes and you are done. I experienced the same problem when installing `stripe payment` system but that solved my problem.
13,697,354
Let's say i have a 2 D array int m[3][4] If the typedef is defined as ``` typedef int array[4]; array *ptr = m; ``` What does this mean? Is it pointer to array of 4 elements. Or array of 4 pointers? When we `cout << ptr or cout << *ptr`, It prints the same address. How is that possible?
2012/12/04
[ "https://Stackoverflow.com/questions/13697354", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1177586/" ]
``` try this <div id="content-form"> <%= form_for @passion, url: passion_path do |f| %> <%= render :partial => "form", :locals=>{:f => f } %> <% end %> </div> ```
You are using the `:partial` option, which means you have to pass local variables in with `:locals`: ``` <%= render :partial => "form", :locals => { :f => f } %> ``` The less verbose option is: ``` <%= render "form", :f => f %> ```
77,175
I have a practice network set up with the relevant topography shown in the below image: [![network topology](https://i.stack.imgur.com/Pt53R.png)](https://i.stack.imgur.com/Pt53R.png) I have TACACS+ running on HQ-AAA-Server (192.168.10.10) and AAA working using it on HQ (IOS) and HQ-FW1 (ASA). I also have a working V...
2021/12/01
[ "https://networkengineering.stackexchange.com/questions/77175", "https://networkengineering.stackexchange.com", "https://networkengineering.stackexchange.com/users/80874/" ]
The `me0` interface is for **management traffic** and it can't be used to forward/route packets from the **data-plane**. Think of `me0` as an interface you should use only for things like SSH, SNMP, or connecting to an out-of-band management network. I don't think you actually intended to create that segmentation betw...
Routing towards 6.6.6.0/24 from WAN needs to be done by your ISP. Either they set up a static route or you use BGP to advertise the subnet (or any other method you agree upon). Routing from 6.6.6.0/24 towards WAN simply requires a default route on the hosts pointing to the Juniper's VLAN 200 interface 6.6.6.1/24. The ...
12,960
I'm attempting to override a mode-specific key binding, but my attempt so far hasn't been able to reassign it. I use the `M-j,k,i,l` to navigate instead of the regular `C-n`, `C-p` etc. I find it to be a lot faster. However, `M-j` is bound automatically to `c-indent-new-comment-line` when editing in any C-like langua...
2015/06/07
[ "https://emacs.stackexchange.com/questions/12960", "https://emacs.stackexchange.com", "https://emacs.stackexchange.com/users/2804/" ]
There are two cases I can think of: reactivating the region, and adjusting the size of the region. I most often use this binding to reactivate the region after performing some command that deactivates it, or doing something that sets mark and moves point without activating the region. For example, do a C-s and sear...
I use this when I've lost a selection due to some operation that removed it, and I want to restore selection. One such scenario would be: 1. Select rectangle. 2. Kill it. 3. Undo killing rectangle. 4. `C-x C-x` to restore selection to rectangle. This happens when I want to make an ad hoc backup of a selected area and...
12,960
I'm attempting to override a mode-specific key binding, but my attempt so far hasn't been able to reassign it. I use the `M-j,k,i,l` to navigate instead of the regular `C-n`, `C-p` etc. I find it to be a lot faster. However, `M-j` is bound automatically to `c-indent-new-comment-line` when editing in any C-like langua...
2015/06/07
[ "https://emacs.stackexchange.com/questions/12960", "https://emacs.stackexchange.com", "https://emacs.stackexchange.com/users/2804/" ]
Ask Emacs: `C-h r i exchange-point-and-mark RET` or, better, `C-h r i C-x C-x RET`. This takes you to the information shown below. This is what the Emacs manual, node [Setting Mark](http://www.gnu.org/software/emacs/manual/html_node/emacs/Setting-Mark.html) says in answer to your question: > > `C-x C-x` is useful wh...
I use this when I've lost a selection due to some operation that removed it, and I want to restore selection. One such scenario would be: 1. Select rectangle. 2. Kill it. 3. Undo killing rectangle. 4. `C-x C-x` to restore selection to rectangle. This happens when I want to make an ad hoc backup of a selected area and...
12,960
I'm attempting to override a mode-specific key binding, but my attempt so far hasn't been able to reassign it. I use the `M-j,k,i,l` to navigate instead of the regular `C-n`, `C-p` etc. I find it to be a lot faster. However, `M-j` is bound automatically to `c-indent-new-comment-line` when editing in any C-like langua...
2015/06/07
[ "https://emacs.stackexchange.com/questions/12960", "https://emacs.stackexchange.com", "https://emacs.stackexchange.com/users/2804/" ]
There are two cases I can think of: reactivating the region, and adjusting the size of the region. I most often use this binding to reactivate the region after performing some command that deactivates it, or doing something that sets mark and moves point without activating the region. For example, do a C-s and sear...
Ask Emacs: `C-h r i exchange-point-and-mark RET` or, better, `C-h r i C-x C-x RET`. This takes you to the information shown below. This is what the Emacs manual, node [Setting Mark](http://www.gnu.org/software/emacs/manual/html_node/emacs/Setting-Mark.html) says in answer to your question: > > `C-x C-x` is useful wh...
12,960
I'm attempting to override a mode-specific key binding, but my attempt so far hasn't been able to reassign it. I use the `M-j,k,i,l` to navigate instead of the regular `C-n`, `C-p` etc. I find it to be a lot faster. However, `M-j` is bound automatically to `c-indent-new-comment-line` when editing in any C-like langua...
2015/06/07
[ "https://emacs.stackexchange.com/questions/12960", "https://emacs.stackexchange.com", "https://emacs.stackexchange.com/users/2804/" ]
There are two cases I can think of: reactivating the region, and adjusting the size of the region. I most often use this binding to reactivate the region after performing some command that deactivates it, or doing something that sets mark and moves point without activating the region. For example, do a C-s and sear...
The other answers focus on the usefulness of `C-x C-x` when `transient-mark-mode` is active. But `C-x C-x` predates `transient-mark-mode`, and is useful independently of it. The main role of `C-x C-x` is to swap point and mark. This useful when you are editing two points in a single buffer and for some reason don't wa...
12,960
I'm attempting to override a mode-specific key binding, but my attempt so far hasn't been able to reassign it. I use the `M-j,k,i,l` to navigate instead of the regular `C-n`, `C-p` etc. I find it to be a lot faster. However, `M-j` is bound automatically to `c-indent-new-comment-line` when editing in any C-like langua...
2015/06/07
[ "https://emacs.stackexchange.com/questions/12960", "https://emacs.stackexchange.com", "https://emacs.stackexchange.com/users/2804/" ]
Ask Emacs: `C-h r i exchange-point-and-mark RET` or, better, `C-h r i C-x C-x RET`. This takes you to the information shown below. This is what the Emacs manual, node [Setting Mark](http://www.gnu.org/software/emacs/manual/html_node/emacs/Setting-Mark.html) says in answer to your question: > > `C-x C-x` is useful wh...
The other answers focus on the usefulness of `C-x C-x` when `transient-mark-mode` is active. But `C-x C-x` predates `transient-mark-mode`, and is useful independently of it. The main role of `C-x C-x` is to swap point and mark. This useful when you are editing two points in a single buffer and for some reason don't wa...
38,718,407
Can i get data that i got from controller, and then send it to another controller (in the same folder) in Yii2? this is my SiteController: ``` public function actionIndex() { ... $data = Yii::$app->request->post(); $reg_res = $data['ColoringForm']['region']; ... ``` i want to send $reg\_res to my DataController: ...
2016/08/02
[ "https://Stackoverflow.com/questions/38718407", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6578627/" ]
Post array data is not possible to send from on controller to another controller but you can send it through parameters. Try below code ``` $this->redirect(array('controller/action', 'param1'=>'value1', 'param2'=>'value2',...) ```
You can use the following to run a separate action within the same request: `Yii::$app->runAction('controller/show-data', ['param1'=>'value1', 'param2'=>'value2']);`
10,142,235
If you have a read-only table that will be updated via ajax, is it better to have the markup generated on the server or just return the JSON and render the table on the client? They're both fairly simple to do, so I'm wondering which is preferable assuming the table markup is relatively simple. At 1st I thought retur...
2012/04/13
[ "https://Stackoverflow.com/questions/10142235", "https://Stackoverflow.com", "https://Stackoverflow.com/users/869412/" ]
The API does not support zooming, dragging, or scrolling.
I had the same problem, and GeoChart proved to be too limited in that regard. One option is to use Google Maps and Data Layers. If you need markers with colors and sizes, for example, you could do something like the example on the following page (see 'advanced style'): <https://developers.google.com/maps/documentation...
10,142,235
If you have a read-only table that will be updated via ajax, is it better to have the markup generated on the server or just return the JSON and render the table on the client? They're both fairly simple to do, so I'm wondering which is preferable assuming the table markup is relatively simple. At 1st I thought retur...
2012/04/13
[ "https://Stackoverflow.com/questions/10142235", "https://Stackoverflow.com", "https://Stackoverflow.com/users/869412/" ]
The API does not support zooming, dragging, or scrolling.
It looks like Google Charts now has an expiremental option called 'explorer' that works for some chart types. See: <https://developers.google.com/chart/interactive/docs/gallery/linechart#Configuration_Options>
10,142,235
If you have a read-only table that will be updated via ajax, is it better to have the markup generated on the server or just return the JSON and render the table on the client? They're both fairly simple to do, so I'm wondering which is preferable assuming the table markup is relatively simple. At 1st I thought retur...
2012/04/13
[ "https://Stackoverflow.com/questions/10142235", "https://Stackoverflow.com", "https://Stackoverflow.com/users/869412/" ]
The API does not support zooming, dragging, or scrolling.
As a trick, I used css zoom property with overflow:hidden on container. But it should be executed after chart.draw(), on google chart ready event. And if you need to redraw (I'm redrawing on window resize to guarantee responsiveness), you should force zoom to 1 or 100% again before draw it again. HTML: ``` <div id=...
10,142,235
If you have a read-only table that will be updated via ajax, is it better to have the markup generated on the server or just return the JSON and render the table on the client? They're both fairly simple to do, so I'm wondering which is preferable assuming the table markup is relatively simple. At 1st I thought retur...
2012/04/13
[ "https://Stackoverflow.com/questions/10142235", "https://Stackoverflow.com", "https://Stackoverflow.com/users/869412/" ]
The API does not support zooming, dragging, or scrolling.
You could try to generate a select event on marker click and in the event function you could change the region of the chart by changing chartOptions as follows: ``` google.visualization.events.addListener(chart, 'select', () => { // console.log(this.continents); if (continents.includes( continentData.getValue(cha...
10,142,235
If you have a read-only table that will be updated via ajax, is it better to have the markup generated on the server or just return the JSON and render the table on the client? They're both fairly simple to do, so I'm wondering which is preferable assuming the table markup is relatively simple. At 1st I thought retur...
2012/04/13
[ "https://Stackoverflow.com/questions/10142235", "https://Stackoverflow.com", "https://Stackoverflow.com/users/869412/" ]
As a trick, I used css zoom property with overflow:hidden on container. But it should be executed after chart.draw(), on google chart ready event. And if you need to redraw (I'm redrawing on window resize to guarantee responsiveness), you should force zoom to 1 or 100% again before draw it again. HTML: ``` <div id=...
I had the same problem, and GeoChart proved to be too limited in that regard. One option is to use Google Maps and Data Layers. If you need markers with colors and sizes, for example, you could do something like the example on the following page (see 'advanced style'): <https://developers.google.com/maps/documentation...