qid
int64
1
74.7M
question
stringlengths
0
58.3k
date
stringlengths
10
10
metadata
list
response_j
stringlengths
2
48.3k
response_k
stringlengths
2
40.5k
67,790,001
I am making a browser extension and I want to modify some things on the page but I run into this problem. Then event listener gets triggered 'plug-stats' is not yet created by script on the page I can't control and gives me undefined so I tried to read it a little bit later but then I run into a problem. First consol...
2021/06/01
[ "https://Stackoverflow.com/questions/67790001", "https://Stackoverflow.com", "https://Stackoverflow.com/users/14749693/" ]
This is expected behaviour, the documentation for `Event.currentTarget` actually mentions this: > > The value of event.currentTarget is only available while the event is > being handled. If you console.log() the event object, storing it in a > variable, and then look for the currentTarget key in the console, its > va...
try this code pass the event as parameter to settimeout- ``` function add_perk_description(e){ console.log(e.target) setTimeout(function(event) { console.log(event.target) },500, e); } ```
67,790,001
I am making a browser extension and I want to modify some things on the page but I run into this problem. Then event listener gets triggered 'plug-stats' is not yet created by script on the page I can't control and gives me undefined so I tried to read it a little bit later but then I run into a problem. First consol...
2021/06/01
[ "https://Stackoverflow.com/questions/67790001", "https://Stackoverflow.com", "https://Stackoverflow.com/users/14749693/" ]
This is expected behaviour, the documentation for `Event.currentTarget` actually mentions this: > > The value of event.currentTarget is only available while the event is > being handled. If you console.log() the event object, storing it in a > variable, and then look for the currentTarget key in the console, its > va...
Second Console gives you a **NULL** because event.currentTarget return a valid value at the time of being handled but callback runs after a 1 milliSeconds that's the reason it shows Null. **Try out this** ``` let perk = document.querySelectorAll('.ItemPerksList-m_plug-O8be3') perk.forEach(element => { ele...
7,228,372
I am not sure how to do ask this... Is it possible to have mysql scan a whole column in a whole table and finds an identical match or matches. So it would be something like... ``` $q = $pdo("SELECT ip FROM accounts"); $q -> execute(); $results = $q -> fetch(PDO::FETCH_ASSOC); if (there is 2 of same ip) { } ``` T...
2011/08/29
[ "https://Stackoverflow.com/questions/7228372", "https://Stackoverflow.com", "https://Stackoverflow.com/users/905152/" ]
If you're looking for duplicates, the following SQL should give you any IPs listed two or more times in your accounts table. ``` $q= $pdo("SELECT ip FROM accounts GROUP BY ip HAVING COUNT(ip) > 1"); $q->execute(); $duplicateIPs = $q->fetch(PDO::FETCH_ASSOC); ```
``` SELECT column,column2 FROM table WHERE last_login_ip = 'IPHERE'; ```
7,228,372
I am not sure how to do ask this... Is it possible to have mysql scan a whole column in a whole table and finds an identical match or matches. So it would be something like... ``` $q = $pdo("SELECT ip FROM accounts"); $q -> execute(); $results = $q -> fetch(PDO::FETCH_ASSOC); if (there is 2 of same ip) { } ``` T...
2011/08/29
[ "https://Stackoverflow.com/questions/7228372", "https://Stackoverflow.com", "https://Stackoverflow.com/users/905152/" ]
If you're looking for duplicates, the following SQL should give you any IPs listed two or more times in your accounts table. ``` $q= $pdo("SELECT ip FROM accounts GROUP BY ip HAVING COUNT(ip) > 1"); $q->execute(); $duplicateIPs = $q->fetch(PDO::FETCH_ASSOC); ```
You should try something along the lines of ``` SELECT `a`, `b`, COUNT(`a`) AS cnt FROM `table` AS t GROUP BY t.`a` ORDER BY cnt DESC; ```
16,114,091
So I have this function to prevent the body scrolling when the sidebar is hovered. The problem is, I can't get the mouseout function to work properly. ``` var currentScroll=0; function lockscroll(){ $(window).scrollTop(currentScroll); } $(document).ready(function (){ $(".sidebarholder, .commentswrapper")...
2013/04/19
[ "https://Stackoverflow.com/questions/16114091", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1201447/" ]
jQuery's `hover()` has built in "hover off", which might be helpful: ``` $(".sidebarholder, .commentswrapper").hover( function (){ // hover over currentScroll=$(window).scrollTop(); $(window).bind('scroll',lockscroll); }, function (){ // hover off currentScroll=$(window).scrollTo...
Have you tried ``` $(document).ready(function () { $(".sidebarholder, .commentswrapper").hover(function () { currentScroll = $(window).scrollTop(); $(window).bind('scroll', lockscroll); }, function () { currentScroll = $(window).scrollTop(); $(window)....
39,598,875
I have a remote `origin/master` and a remote branch `remote_branch`. I also have local `master` and a local branch `local_branch`. When I try to pull the local `master` into the `local_branch` with `git pull master local_branch` I get this. ``` fatal: 'master' does not appear to be a git repository fatal: Could not r...
2016/09/20
[ "https://Stackoverflow.com/questions/39598875", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3935035/" ]
merge changes from local\_branch **TO** master ``` git checkout master git merge local_branch ``` merge changes from master **TO** local\_branch ``` git checkout local_branch git merge master ``` Pull is when you have an 'origin' repo :)
`git pull` is an alias for `git fetch && git merge` you cannot fetch from local branches (only from remotes) - actually you don't need to, if your intention is to merge `master` into `local_branch`, just use `git merge master` when you are on `local_branch`.
39,598,875
I have a remote `origin/master` and a remote branch `remote_branch`. I also have local `master` and a local branch `local_branch`. When I try to pull the local `master` into the `local_branch` with `git pull master local_branch` I get this. ``` fatal: 'master' does not appear to be a git repository fatal: Could not r...
2016/09/20
[ "https://Stackoverflow.com/questions/39598875", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3935035/" ]
merge changes from local\_branch **TO** master ``` git checkout master git merge local_branch ``` merge changes from master **TO** local\_branch ``` git checkout local_branch git merge master ``` Pull is when you have an 'origin' repo :)
As the error message says, `master` is not a repository it knows of. This is because with `git pull master local_branch` you say "Fetch the branch `local_branch` from remote repository `master` and merge it into my currently checked-out branch". But that is not what you are after. You want to say "Merge my local branc...
39,598,875
I have a remote `origin/master` and a remote branch `remote_branch`. I also have local `master` and a local branch `local_branch`. When I try to pull the local `master` into the `local_branch` with `git pull master local_branch` I get this. ``` fatal: 'master' does not appear to be a git repository fatal: Could not r...
2016/09/20
[ "https://Stackoverflow.com/questions/39598875", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3935035/" ]
`git pull` is an alias for `git fetch && git merge` you cannot fetch from local branches (only from remotes) - actually you don't need to, if your intention is to merge `master` into `local_branch`, just use `git merge master` when you are on `local_branch`.
As the error message says, `master` is not a repository it knows of. This is because with `git pull master local_branch` you say "Fetch the branch `local_branch` from remote repository `master` and merge it into my currently checked-out branch". But that is not what you are after. You want to say "Merge my local branc...
548,434
Is Big Bang Theory the only one to explain the creation of the Universe? I have read about Big-Bang Theory explaining the creation of Universe. Is there no other theory to explain the creation of Universe? If there is another theory please explain it to me. I will appreciate your help
2020/05/01
[ "https://physics.stackexchange.com/questions/548434", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/-1/" ]
The big bang **model**$^{1}$ is an attempt to explain a host of observations that tell us how the universe evolved from its first fraction of a second onwards. It started off by being grounded in fundamental and rather well understood physics (General Relativity, particle physics and nuclear physics at *relatively* lo...
"Multiverse" theories provide for universes (including our own) to be "local": There is no way to escape whichever one that all of us occupy, because such "local universes" are "causally separated" from each other, with the scales of space and time differing so greatly between them that we cannot travel from one to ano...
548,434
Is Big Bang Theory the only one to explain the creation of the Universe? I have read about Big-Bang Theory explaining the creation of Universe. Is there no other theory to explain the creation of Universe? If there is another theory please explain it to me. I will appreciate your help
2020/05/01
[ "https://physics.stackexchange.com/questions/548434", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/-1/" ]
The big bang **model**$^{1}$ is an attempt to explain a host of observations that tell us how the universe evolved from its first fraction of a second onwards. It started off by being grounded in fundamental and rather well understood physics (General Relativity, particle physics and nuclear physics at *relatively* lo...
I am no expert in cosmology, but I do know about shockwaves and the Big Bang is just a shockwave in a compressible medium. It is fundamental that shockwaves lose information, and so observations made after a shock has passed allow only a limited reconstruction of what went before. There are apparently solutions to the ...
548,434
Is Big Bang Theory the only one to explain the creation of the Universe? I have read about Big-Bang Theory explaining the creation of Universe. Is there no other theory to explain the creation of Universe? If there is another theory please explain it to me. I will appreciate your help
2020/05/01
[ "https://physics.stackexchange.com/questions/548434", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/-1/" ]
The big bang **model**$^{1}$ is an attempt to explain a host of observations that tell us how the universe evolved from its first fraction of a second onwards. It started off by being grounded in fundamental and rather well understood physics (General Relativity, particle physics and nuclear physics at *relatively* lo...
The Big Bang model doesn't actually explain the creation of the universe. It only explains what happened afterwards. In Alan Guth's words, it did not say "what 'banged', how it 'banged', or what caused it to 'bang'". Explaining the moment of creation itself is a separate question that, to my knowledge, is very specula...
548,434
Is Big Bang Theory the only one to explain the creation of the Universe? I have read about Big-Bang Theory explaining the creation of Universe. Is there no other theory to explain the creation of Universe? If there is another theory please explain it to me. I will appreciate your help
2020/05/01
[ "https://physics.stackexchange.com/questions/548434", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/-1/" ]
"Multiverse" theories provide for universes (including our own) to be "local": There is no way to escape whichever one that all of us occupy, because such "local universes" are "causally separated" from each other, with the scales of space and time differing so greatly between them that we cannot travel from one to ano...
I am no expert in cosmology, but I do know about shockwaves and the Big Bang is just a shockwave in a compressible medium. It is fundamental that shockwaves lose information, and so observations made after a shock has passed allow only a limited reconstruction of what went before. There are apparently solutions to the ...
548,434
Is Big Bang Theory the only one to explain the creation of the Universe? I have read about Big-Bang Theory explaining the creation of Universe. Is there no other theory to explain the creation of Universe? If there is another theory please explain it to me. I will appreciate your help
2020/05/01
[ "https://physics.stackexchange.com/questions/548434", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/-1/" ]
"Multiverse" theories provide for universes (including our own) to be "local": There is no way to escape whichever one that all of us occupy, because such "local universes" are "causally separated" from each other, with the scales of space and time differing so greatly between them that we cannot travel from one to ano...
The Big Bang model doesn't actually explain the creation of the universe. It only explains what happened afterwards. In Alan Guth's words, it did not say "what 'banged', how it 'banged', or what caused it to 'bang'". Explaining the moment of creation itself is a separate question that, to my knowledge, is very specula...
224,607
I'd like to modify my `.vimrc` to read the value of a variable from an external file. How can I do this? Specifically, a friend and I share a git repo with our `.vim` files, but there are a few small differences in what we want in our configs. So most of the file is common, but we use if statements to determine whethe...
2010/12/21
[ "https://superuser.com/questions/224607", "https://superuser.com", "https://superuser.com/users/1457/" ]
You can have your ~/.vimrc load another file using the `:source` command. For example, you could each put your unique commands in ~/.myvimrc and load those commands with ``` source ~/.myvimrc ``` Or, as you were thinking, you could each put your name in that file like this: ``` let user = "user1" ``` and then put...
I'm not sure what your vimrc looks like so this may not be feasible, but if there are large parts that you and your friend share, you might want to break them up into separate plugins. You can add files to the `~/.vim/plugin` directory to have them loaded on startup. (They're loaded in alphabetical order -- use `:scrip...
224,607
I'd like to modify my `.vimrc` to read the value of a variable from an external file. How can I do this? Specifically, a friend and I share a git repo with our `.vim` files, but there are a few small differences in what we want in our configs. So most of the file is common, but we use if statements to determine whethe...
2010/12/21
[ "https://superuser.com/questions/224607", "https://superuser.com", "https://superuser.com/users/1457/" ]
the name of the logged-in user is available in the $USER environment variable. you can access that variable easily: ``` :echo $USER ``` so, just use ``` execute "silent! source vimrc." . $USER ``` in your vimrc and put your user specific settings into ``` vimrc.joe ``` or whatever your login-name is
I'm not sure what your vimrc looks like so this may not be feasible, but if there are large parts that you and your friend share, you might want to break them up into separate plugins. You can add files to the `~/.vim/plugin` directory to have them loaded on startup. (They're loaded in alphabetical order -- use `:scrip...
224,607
I'd like to modify my `.vimrc` to read the value of a variable from an external file. How can I do this? Specifically, a friend and I share a git repo with our `.vim` files, but there are a few small differences in what we want in our configs. So most of the file is common, but we use if statements to determine whethe...
2010/12/21
[ "https://superuser.com/questions/224607", "https://superuser.com", "https://superuser.com/users/1457/" ]
Using a try/catch ----------------- Since asking this question, I've come up with another use case for loading an external file: machine-specific tweaks. Since I may or may not need to make tweaks on a given machine, I'm using a `try/catch` to load the external file; if there's no such file, I let it fail silently. ...
I'm not sure what your vimrc looks like so this may not be feasible, but if there are large parts that you and your friend share, you might want to break them up into separate plugins. You can add files to the `~/.vim/plugin` directory to have them loaded on startup. (They're loaded in alphabetical order -- use `:scrip...
224,607
I'd like to modify my `.vimrc` to read the value of a variable from an external file. How can I do this? Specifically, a friend and I share a git repo with our `.vim` files, but there are a few small differences in what we want in our configs. So most of the file is common, but we use if statements to determine whethe...
2010/12/21
[ "https://superuser.com/questions/224607", "https://superuser.com", "https://superuser.com/users/1457/" ]
You can have your ~/.vimrc load another file using the `:source` command. For example, you could each put your unique commands in ~/.myvimrc and load those commands with ``` source ~/.myvimrc ``` Or, as you were thinking, you could each put your name in that file like this: ``` let user = "user1" ``` and then put...
the name of the logged-in user is available in the $USER environment variable. you can access that variable easily: ``` :echo $USER ``` so, just use ``` execute "silent! source vimrc." . $USER ``` in your vimrc and put your user specific settings into ``` vimrc.joe ``` or whatever your login-name is
224,607
I'd like to modify my `.vimrc` to read the value of a variable from an external file. How can I do this? Specifically, a friend and I share a git repo with our `.vim` files, but there are a few small differences in what we want in our configs. So most of the file is common, but we use if statements to determine whethe...
2010/12/21
[ "https://superuser.com/questions/224607", "https://superuser.com", "https://superuser.com/users/1457/" ]
in your main .vimrc file: ``` source otherVimScriptFilePath.vim ``` then just put your variable statement in that file: ``` " otherVimScriptFilePath.vim let whoami = "user1" ```
the name of the logged-in user is available in the $USER environment variable. you can access that variable easily: ``` :echo $USER ``` so, just use ``` execute "silent! source vimrc." . $USER ``` in your vimrc and put your user specific settings into ``` vimrc.joe ``` or whatever your login-name is
224,607
I'd like to modify my `.vimrc` to read the value of a variable from an external file. How can I do this? Specifically, a friend and I share a git repo with our `.vim` files, but there are a few small differences in what we want in our configs. So most of the file is common, but we use if statements to determine whethe...
2010/12/21
[ "https://superuser.com/questions/224607", "https://superuser.com", "https://superuser.com/users/1457/" ]
in your main .vimrc file: ``` source otherVimScriptFilePath.vim ``` then just put your variable statement in that file: ``` " otherVimScriptFilePath.vim let whoami = "user1" ```
You can have your ~/.vimrc load another file using the `:source` command. For example, you could each put your unique commands in ~/.myvimrc and load those commands with ``` source ~/.myvimrc ``` Or, as you were thinking, you could each put your name in that file like this: ``` let user = "user1" ``` and then put...
224,607
I'd like to modify my `.vimrc` to read the value of a variable from an external file. How can I do this? Specifically, a friend and I share a git repo with our `.vim` files, but there are a few small differences in what we want in our configs. So most of the file is common, but we use if statements to determine whethe...
2010/12/21
[ "https://superuser.com/questions/224607", "https://superuser.com", "https://superuser.com/users/1457/" ]
Using a try/catch ----------------- Since asking this question, I've come up with another use case for loading an external file: machine-specific tweaks. Since I may or may not need to make tweaks on a given machine, I'm using a `try/catch` to load the external file; if there's no such file, I let it fail silently. ...
the name of the logged-in user is available in the $USER environment variable. you can access that variable easily: ``` :echo $USER ``` so, just use ``` execute "silent! source vimrc." . $USER ``` in your vimrc and put your user specific settings into ``` vimrc.joe ``` or whatever your login-name is
224,607
I'd like to modify my `.vimrc` to read the value of a variable from an external file. How can I do this? Specifically, a friend and I share a git repo with our `.vim` files, but there are a few small differences in what we want in our configs. So most of the file is common, but we use if statements to determine whethe...
2010/12/21
[ "https://superuser.com/questions/224607", "https://superuser.com", "https://superuser.com/users/1457/" ]
in your main .vimrc file: ``` source otherVimScriptFilePath.vim ``` then just put your variable statement in that file: ``` " otherVimScriptFilePath.vim let whoami = "user1" ```
To answer the last question, files in `~/.vim` are not automatically loaded, but all files in `~/.vim/plugin` are.
224,607
I'd like to modify my `.vimrc` to read the value of a variable from an external file. How can I do this? Specifically, a friend and I share a git repo with our `.vim` files, but there are a few small differences in what we want in our configs. So most of the file is common, but we use if statements to determine whethe...
2010/12/21
[ "https://superuser.com/questions/224607", "https://superuser.com", "https://superuser.com/users/1457/" ]
To answer the last question, files in `~/.vim` are not automatically loaded, but all files in `~/.vim/plugin` are.
I'm not sure what your vimrc looks like so this may not be feasible, but if there are large parts that you and your friend share, you might want to break them up into separate plugins. You can add files to the `~/.vim/plugin` directory to have them loaded on startup. (They're loaded in alphabetical order -- use `:scrip...
224,607
I'd like to modify my `.vimrc` to read the value of a variable from an external file. How can I do this? Specifically, a friend and I share a git repo with our `.vim` files, but there are a few small differences in what we want in our configs. So most of the file is common, but we use if statements to determine whethe...
2010/12/21
[ "https://superuser.com/questions/224607", "https://superuser.com", "https://superuser.com/users/1457/" ]
in your main .vimrc file: ``` source otherVimScriptFilePath.vim ``` then just put your variable statement in that file: ``` " otherVimScriptFilePath.vim let whoami = "user1" ```
I'm not sure what your vimrc looks like so this may not be feasible, but if there are large parts that you and your friend share, you might want to break them up into separate plugins. You can add files to the `~/.vim/plugin` directory to have them loaded on startup. (They're loaded in alphabetical order -- use `:scrip...
141,238
Take a look at my original: [![Original](https://i.stack.imgur.com/wnvE3.jpg)](https://i.stack.imgur.com/wnvE3.jpg) My goal here is to get rid of the curb at the bottom right corner. I tried doing a doing a transform -> warp but the results aren't great. Even though the image itself is not very clear, the transformed...
2020/10/04
[ "https://graphicdesign.stackexchange.com/questions/141238", "https://graphicdesign.stackexchange.com", "https://graphicdesign.stackexchange.com/users/52839/" ]
You could use the Content Aware fill in Photoshop. Make a selection around the offending stonework using the Polygonal Lasso, then do *Edit > Fill*, and choose *Content Aware* as the fill type Example [![enter image description here](https://i.stack.imgur.com/UOcsx.gif)](https://i.stack.imgur.com/UOcsx.gif)
Quick and dirty.. could be refined... 1 Copy left side area and flip it and move into position on the right. [![enter image description here](https://i.stack.imgur.com/3ljjD.png)](https://i.stack.imgur.com/3ljjD.png) 2 Add a **Layer Mask** and, using the **Gradient Tool** on the mask, soften the edges around the a...
20,227,196
I am trying to find duplicate values in one column and combine the values of a second column into one row. I also want to sum the values in a third column. For example: ``` A B C D h 4 w 3 h 4 u 5 h 4 g 7 h 4 f 4 k 9 t 6 k 9 o 6 k 9 p 9 k 9 ...
2013/11/26
[ "https://Stackoverflow.com/questions/20227196", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3037103/" ]
Merging rows by summing the numbers from column D and building a string concatenation from column C with a semi-colon delimiter based upon duplicate values in columns A and B. Before¹:         [![Merge Data Before](https://i.stack.imgur.com/fDFdI.png)](https://i.stack.imgur.com/fDFdI.png) Code: ``` Sub merge_A_to_D...
`.Cells(lngRow, 11) = .Cells(lngRow, 8) & "; " & .Cells(lngRow + 1, 8)` should be `.Cells(lngRow, 11) = .Cells(lngRow, 8) & "; " & .Cells(lngRow + 1, 11)`
20,227,196
I am trying to find duplicate values in one column and combine the values of a second column into one row. I also want to sum the values in a third column. For example: ``` A B C D h 4 w 3 h 4 u 5 h 4 g 7 h 4 f 4 k 9 t 6 k 9 o 6 k 9 p 9 k 9 ...
2013/11/26
[ "https://Stackoverflow.com/questions/20227196", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3037103/" ]
Try changing your code to this: ``` Sub mergeCategoryValues() Dim lngRow As Long With ActiveSheet lngRow = .Cells(65536, 1).End(xlUp).Row .Cells(1).CurrentRegion.Sort key1:=.Cells(1), Header:=xlYes Do If .Cells(lngRow, 1) = .Cells(lngRow - 1, 1) Then .Cells...
Here is my solution ``` Sub MyCombine() Dim i As Integer ActiveSheet.Sort.SortFields.Add Key:=Range("A:A"), _ SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:=xlSortNormal With ActiveSheet.Sort .SetRange Range("A:D") .Header = xlYes .MatchCase = False .Orientation = xlTopToBottom .SortMethod...
20,227,196
I am trying to find duplicate values in one column and combine the values of a second column into one row. I also want to sum the values in a third column. For example: ``` A B C D h 4 w 3 h 4 u 5 h 4 g 7 h 4 f 4 k 9 t 6 k 9 o 6 k 9 p 9 k 9 ...
2013/11/26
[ "https://Stackoverflow.com/questions/20227196", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3037103/" ]
Try changing your code to this: ``` Sub mergeCategoryValues() Dim lngRow As Long With ActiveSheet lngRow = .Cells(65536, 1).End(xlUp).Row .Cells(1).CurrentRegion.Sort key1:=.Cells(1), Header:=xlYes Do If .Cells(lngRow, 1) = .Cells(lngRow - 1, 1) Then .Cells...
This will do what you want. ``` Sub Macro() Dim lngRow As Long For lngRow = ActiveSheet.Cells(Rows.Count, "A").End(xlUp).Row To 2 Step -1 If StrComp(Range("B" & lngRow), Range("B" & lngRow - 1), vbTextCompare) = 0 Then If Range("C" & lngRow) <> "" Then Range("C" & lngRow - 1) = Range("C" & lngRow - 1) & ";" & Range("C...
20,227,196
I am trying to find duplicate values in one column and combine the values of a second column into one row. I also want to sum the values in a third column. For example: ``` A B C D h 4 w 3 h 4 u 5 h 4 g 7 h 4 f 4 k 9 t 6 k 9 o 6 k 9 p 9 k 9 ...
2013/11/26
[ "https://Stackoverflow.com/questions/20227196", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3037103/" ]
Try changing your code to this: ``` Sub mergeCategoryValues() Dim lngRow As Long With ActiveSheet lngRow = .Cells(65536, 1).End(xlUp).Row .Cells(1).CurrentRegion.Sort key1:=.Cells(1), Header:=xlYes Do If .Cells(lngRow, 1) = .Cells(lngRow - 1, 1) Then .Cells...
This looks sloppy and complicated. Both are true, but it works pretty fine. **Note!** I always recommend to define all `DIM`s like: ranges, integers, etc. Storing the last row to a variable like `LngRow` is best (not like the whole `App.WksFunc.COUNTA`). I also like to use functions directly on cells where possible (li...
20,227,196
I am trying to find duplicate values in one column and combine the values of a second column into one row. I also want to sum the values in a third column. For example: ``` A B C D h 4 w 3 h 4 u 5 h 4 g 7 h 4 f 4 k 9 t 6 k 9 o 6 k 9 p 9 k 9 ...
2013/11/26
[ "https://Stackoverflow.com/questions/20227196", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3037103/" ]
Merging rows by summing the numbers from column D and building a string concatenation from column C with a semi-colon delimiter based upon duplicate values in columns A and B. Before¹:         [![Merge Data Before](https://i.stack.imgur.com/fDFdI.png)](https://i.stack.imgur.com/fDFdI.png) Code: ``` Sub merge_A_to_D...
This will do what you want. ``` Sub Macro() Dim lngRow As Long For lngRow = ActiveSheet.Cells(Rows.Count, "A").End(xlUp).Row To 2 Step -1 If StrComp(Range("B" & lngRow), Range("B" & lngRow - 1), vbTextCompare) = 0 Then If Range("C" & lngRow) <> "" Then Range("C" & lngRow - 1) = Range("C" & lngRow - 1) & ";" & Range("C...
20,227,196
I am trying to find duplicate values in one column and combine the values of a second column into one row. I also want to sum the values in a third column. For example: ``` A B C D h 4 w 3 h 4 u 5 h 4 g 7 h 4 f 4 k 9 t 6 k 9 o 6 k 9 p 9 k 9 ...
2013/11/26
[ "https://Stackoverflow.com/questions/20227196", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3037103/" ]
Try changing your code to this: ``` Sub mergeCategoryValues() Dim lngRow As Long With ActiveSheet lngRow = .Cells(65536, 1).End(xlUp).Row .Cells(1).CurrentRegion.Sort key1:=.Cells(1), Header:=xlYes Do If .Cells(lngRow, 1) = .Cells(lngRow - 1, 1) Then .Cells...
Merging rows by summing the numbers from column D and building a string concatenation from column C with a semi-colon delimiter based upon duplicate values in columns A and B. Before¹:         [![Merge Data Before](https://i.stack.imgur.com/fDFdI.png)](https://i.stack.imgur.com/fDFdI.png) Code: ``` Sub merge_A_to_D...
20,227,196
I am trying to find duplicate values in one column and combine the values of a second column into one row. I also want to sum the values in a third column. For example: ``` A B C D h 4 w 3 h 4 u 5 h 4 g 7 h 4 f 4 k 9 t 6 k 9 o 6 k 9 p 9 k 9 ...
2013/11/26
[ "https://Stackoverflow.com/questions/20227196", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3037103/" ]
Here is my solution ``` Sub MyCombine() Dim i As Integer ActiveSheet.Sort.SortFields.Add Key:=Range("A:A"), _ SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:=xlSortNormal With ActiveSheet.Sort .SetRange Range("A:D") .Header = xlYes .MatchCase = False .Orientation = xlTopToBottom .SortMethod...
`.Cells(lngRow, 11) = .Cells(lngRow, 8) & "; " & .Cells(lngRow + 1, 8)` should be `.Cells(lngRow, 11) = .Cells(lngRow, 8) & "; " & .Cells(lngRow + 1, 11)`
20,227,196
I am trying to find duplicate values in one column and combine the values of a second column into one row. I also want to sum the values in a third column. For example: ``` A B C D h 4 w 3 h 4 u 5 h 4 g 7 h 4 f 4 k 9 t 6 k 9 o 6 k 9 p 9 k 9 ...
2013/11/26
[ "https://Stackoverflow.com/questions/20227196", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3037103/" ]
This looks sloppy and complicated. Both are true, but it works pretty fine. **Note!** I always recommend to define all `DIM`s like: ranges, integers, etc. Storing the last row to a variable like `LngRow` is best (not like the whole `App.WksFunc.COUNTA`). I also like to use functions directly on cells where possible (li...
`.Cells(lngRow, 11) = .Cells(lngRow, 8) & "; " & .Cells(lngRow + 1, 8)` should be `.Cells(lngRow, 11) = .Cells(lngRow, 8) & "; " & .Cells(lngRow + 1, 11)`
20,227,196
I am trying to find duplicate values in one column and combine the values of a second column into one row. I also want to sum the values in a third column. For example: ``` A B C D h 4 w 3 h 4 u 5 h 4 g 7 h 4 f 4 k 9 t 6 k 9 o 6 k 9 p 9 k 9 ...
2013/11/26
[ "https://Stackoverflow.com/questions/20227196", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3037103/" ]
Here is my solution ``` Sub MyCombine() Dim i As Integer ActiveSheet.Sort.SortFields.Add Key:=Range("A:A"), _ SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:=xlSortNormal With ActiveSheet.Sort .SetRange Range("A:D") .Header = xlYes .MatchCase = False .Orientation = xlTopToBottom .SortMethod...
This will do what you want. ``` Sub Macro() Dim lngRow As Long For lngRow = ActiveSheet.Cells(Rows.Count, "A").End(xlUp).Row To 2 Step -1 If StrComp(Range("B" & lngRow), Range("B" & lngRow - 1), vbTextCompare) = 0 Then If Range("C" & lngRow) <> "" Then Range("C" & lngRow - 1) = Range("C" & lngRow - 1) & ";" & Range("C...
20,227,196
I am trying to find duplicate values in one column and combine the values of a second column into one row. I also want to sum the values in a third column. For example: ``` A B C D h 4 w 3 h 4 u 5 h 4 g 7 h 4 f 4 k 9 t 6 k 9 o 6 k 9 p 9 k 9 ...
2013/11/26
[ "https://Stackoverflow.com/questions/20227196", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3037103/" ]
Try changing your code to this: ``` Sub mergeCategoryValues() Dim lngRow As Long With ActiveSheet lngRow = .Cells(65536, 1).End(xlUp).Row .Cells(1).CurrentRegion.Sort key1:=.Cells(1), Header:=xlYes Do If .Cells(lngRow, 1) = .Cells(lngRow - 1, 1) Then .Cells...
`.Cells(lngRow, 11) = .Cells(lngRow, 8) & "; " & .Cells(lngRow + 1, 8)` should be `.Cells(lngRow, 11) = .Cells(lngRow, 8) & "; " & .Cells(lngRow + 1, 11)`
12,001
I have been reading Davidson's Econometric theory and methods and I cannot understand one particular paragraph about the distribution of a test statistic.In the paragraph below he says that under the alternative hypothesis if the true $\beta$ is equal to $\beta\_1$ then $\hat b= \beta\_1+\hat\gamma$. Then he defines $z...
2016/05/14
[ "https://economics.stackexchange.com/questions/12001", "https://economics.stackexchange.com", "https://economics.stackexchange.com/users/8275/" ]
I will try to do this at an intuitive level without being technical. If you want rigorous definitions of any of this I can edit my post. --- We need a way to mathematically model the consumption choices that an agent faces. To accomplish this, we use $\mathbb{R}^L\_+$ to denote the agent's level of consumption of ea...
Of all the types of structures or spaces you mention, vector space $\mathcal{V}$ is the simplest type of structure. Other structures are constructed from this: 1. A real vector space with an [*inner product*](https://en.wikipedia.org/wiki/Inner_product_space) (which allows to define the ortogonality relation) is a [Hi...
12,001
I have been reading Davidson's Econometric theory and methods and I cannot understand one particular paragraph about the distribution of a test statistic.In the paragraph below he says that under the alternative hypothesis if the true $\beta$ is equal to $\beta\_1$ then $\hat b= \beta\_1+\hat\gamma$. Then he defines $z...
2016/05/14
[ "https://economics.stackexchange.com/questions/12001", "https://economics.stackexchange.com", "https://economics.stackexchange.com/users/8275/" ]
I will try to do this at an intuitive level without being technical. If you want rigorous definitions of any of this I can edit my post. --- We need a way to mathematically model the consumption choices that an agent faces. To accomplish this, we use $\mathbb{R}^L\_+$ to denote the agent's level of consumption of ea...
You have to distinguish between mathematical concepts and economic concepts. Vector space, euclidean space, metric space, are mathematical concepts. Commodity space is an economic concept. The most basic spaces are **vector spaces** and **metric spaces**. A *vector space* on $R$ is defined as a set $V$ (of elements ...
12,001
I have been reading Davidson's Econometric theory and methods and I cannot understand one particular paragraph about the distribution of a test statistic.In the paragraph below he says that under the alternative hypothesis if the true $\beta$ is equal to $\beta\_1$ then $\hat b= \beta\_1+\hat\gamma$. Then he defines $z...
2016/05/14
[ "https://economics.stackexchange.com/questions/12001", "https://economics.stackexchange.com", "https://economics.stackexchange.com/users/8275/" ]
Of all the types of structures or spaces you mention, vector space $\mathcal{V}$ is the simplest type of structure. Other structures are constructed from this: 1. A real vector space with an [*inner product*](https://en.wikipedia.org/wiki/Inner_product_space) (which allows to define the ortogonality relation) is a [Hi...
You have to distinguish between mathematical concepts and economic concepts. Vector space, euclidean space, metric space, are mathematical concepts. Commodity space is an economic concept. The most basic spaces are **vector spaces** and **metric spaces**. A *vector space* on $R$ is defined as a set $V$ (of elements ...
46,308,386
I am working on a .NET Core application for AWS. After reading [this post](https://stackoverflow.com/a/43243290/1987258), I added a file named `credentials` (without extension) in the folder: `C:\Users\Daan\`. In this text file, the access key and the secret access key are both there. Unfortunately, the `Credentials` ...
2017/09/19
[ "https://Stackoverflow.com/questions/46308386", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1987258/" ]
I'm sure you long ago figured out why it wasn't working, but just in case: Typically, the `credentials` and `config` files are placed in a folder called `.aws` that is in the `C:\Users\YourUser\` folder. So, the full path to the `credentials` file would be `C:\Users\YourUser\.aws\credentials` *( Note: for Linux users...
"toolkit\_artifact\_guid" could get populated in the "credentials" file due to 3rd party extensions and updates. Most probably could be due to AWS Toolkit for Visual Studio.
46,308,386
I am working on a .NET Core application for AWS. After reading [this post](https://stackoverflow.com/a/43243290/1987258), I added a file named `credentials` (without extension) in the folder: `C:\Users\Daan\`. In this text file, the access key and the secret access key are both there. Unfortunately, the `Credentials` ...
2017/09/19
[ "https://Stackoverflow.com/questions/46308386", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1987258/" ]
"toolkit\_artifact\_guid" could get populated in the "credentials" file due to 3rd party extensions and updates. Most probably could be due to AWS Toolkit for Visual Studio.
According to [this link](https://docs.aws.amazon.com/toolkit-for-visual-studio/latest/user-guide/credentials.html), the documentation says: > > The Toolkit for Visual Studio supports multiple sets of credentials > from any number of accounts. Each set is referred to as a profile. > When you add a profile to the Too...
46,308,386
I am working on a .NET Core application for AWS. After reading [this post](https://stackoverflow.com/a/43243290/1987258), I added a file named `credentials` (without extension) in the folder: `C:\Users\Daan\`. In this text file, the access key and the secret access key are both there. Unfortunately, the `Credentials` ...
2017/09/19
[ "https://Stackoverflow.com/questions/46308386", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1987258/" ]
I'm sure you long ago figured out why it wasn't working, but just in case: Typically, the `credentials` and `config` files are placed in a folder called `.aws` that is in the `C:\Users\YourUser\` folder. So, the full path to the `credentials` file would be `C:\Users\YourUser\.aws\credentials` *( Note: for Linux users...
According to [this link](https://docs.aws.amazon.com/toolkit-for-visual-studio/latest/user-guide/credentials.html), the documentation says: > > The Toolkit for Visual Studio supports multiple sets of credentials > from any number of accounts. Each set is referred to as a profile. > When you add a profile to the Too...
53,149,691
Below is my simple source code, I'm just trying to call that function after page load, but what is happening right now is: it calls that function before page load. Page loads for 5 seconds and, after that, it displays label execution. ``` protected void Page_Load(object sender, EventArgs e) { display(); } void dis...
2018/11/05
[ "https://Stackoverflow.com/questions/53149691", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9467121/" ]
You should read [this document](https://msdn.microsoft.com/en-us/library/ms178472.aspx#general_page_lifecycle_stages) about ASP.NET Page Life Cycle. It actually says what you are trying to do is not possible. Every code you write in the server side is going to run **before** the browser renders the page. That means yo...
Below Code is Working ``` protected void Page_Load(object sender, EventArgs e) { Timer1.Interval = 2000; Timer1.Enabled = true; } protected void Timer1_Tick(object sender, EventArgs e) { Label3.Text = "done"; } ```
385,241
Some times when I start a file download (direct not p2p) I get download speeds way more than what was promised to me, but then it gradually decreases to a more (un)acceptable speed. Is it the file hosting server slowing the speed as a measure to DOS attack or is it my ISP realizing its mistake late ? And also why ...
2012/02/02
[ "https://superuser.com/questions/385241", "https://superuser.com", "https://superuser.com/users/55019/" ]
Your ISP probably has a "boost". So, when you start the download it boosts your speed way up for the first couple of megs (this is common). Or the site you are connecting to could be doing the same thing.
It is possible that the server itself is throttling it. Some servers may prefer to throttle a client's connection except for the first few bytes (or KB, MB). This is more usual in FTP servers though. In this way clients downloading a small file has better user experience, and clients downloading a big file will not slo...
385,241
Some times when I start a file download (direct not p2p) I get download speeds way more than what was promised to me, but then it gradually decreases to a more (un)acceptable speed. Is it the file hosting server slowing the speed as a measure to DOS attack or is it my ISP realizing its mistake late ? And also why ...
2012/02/02
[ "https://superuser.com/questions/385241", "https://superuser.com", "https://superuser.com/users/55019/" ]
The calculation of download speed is prone to several issues that result in it giving a relatively inaccurate report at various times. The beginning of the download is perhaps most inaccurate. When you click the download link, depending on your browser and your settings you'll have to go through a process choosing whe...
It is possible that the server itself is throttling it. Some servers may prefer to throttle a client's connection except for the first few bytes (or KB, MB). This is more usual in FTP servers though. In this way clients downloading a small file has better user experience, and clients downloading a big file will not slo...
62,675
*Originally posted in the English Stack Exchange, but was suggested to post here.* I see it all the time in Facebook posters and memes where each row of text is of a different sized font, but with the margins justified. There are even [animations that use this feature](https://www.youtube.com/watch?v=QU7usI5HBWo). Wha...
2015/11/01
[ "https://graphicdesign.stackexchange.com/questions/62675", "https://graphicdesign.stackexchange.com", "https://graphicdesign.stackexchange.com/users/53075/" ]
This type of graphic art is generally known as **Typography**. Typography is the art and technique of arranging type to make written language both readable and appealing. However, Typography is a general term as it is used to refer to the structure and consistency of typefaces (fonts). The type of artwork you are look...
> > This example has both vertical and horizontally aligned text. > > > That's pretty much it. There's no other specific term for this. It's a style that's been used in various ways throughout history going back to handwritten illuminated manuscripts by the monks. Of more recent history, this was a style popular d...
66,303,901
how can I show image picked by `file_picker` in **web** while the file path is `null` in **web** platform ? If the path was not null, showing the image is too easy with `Image.file(File)`: ``` Image.file(context.select<BlogProvider, File>((BlogProvider p) => p.image)) ``` but It can not create File for image in web...
2021/02/21
[ "https://Stackoverflow.com/questions/66303901", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8144311/" ]
When **withReadStream** is set to **true**, selected image can be accessed as: ``` file.readStream.listen((event) { _blogImage = Image.memory(event); notifyListeners(); }); ``` but when **withReadStream** is **false**: ``` _blogImage = Image.memory(file.bytes); no...
You can use Image.memory() an exemple using the package universal\_html ``` void main() { runApp( MaterialApp( home: Scaffold( body: DemoApp0(), ), ), ); } class DemoApp0 extends StatefulWidget { DemoApp0({ Key key, }) : super(key: key); @override _DemoApp0State createSta...
52,191,675
To learn KVO, I copied the code from <https://developer.apple.com/documentation/swift/cocoa_design_patterns/using_key_value_observing_in_swift>. It is as follows ``` class MyObjectToObserve: NSObject { @objc dynamic var myDate = NSDate(timeIntervalSince1970: 0) // 1970 func updateDate() { ...
2018/09/05
[ "https://Stackoverflow.com/questions/52191675", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6890903/" ]
The code snippets in Apples documentation are for example only - that's not a complete implementation. Presumably, you will be doing something else with `observer`, at which point you will no longer get the "not used" warnings. Sample usage (just for demonstration, not to be considered production code): ``` class Ex...
The irony is that Apple's example is more complex than it needs to be. That is, the `MyObserver` object isn't even necessary. You can simply call `observe` on the object you are actually observing. This looks like the following: ``` class MyObjectToObserve: NSObject { @objc dynamic var myDate = NSDate(timeInterva...
8,304,818
Hey guys I have done lots of work with ASIHTTPRequest so far and use it several times in my ios application, however in one area of my app where I have added another asihttprequest method its not working properly. First of all it must be said that the reason I'm trying to spread the load of downloading and parsing the...
2011/11/29
[ "https://Stackoverflow.com/questions/8304818", "https://Stackoverflow.com", "https://Stackoverflow.com/users/807400/" ]
Can you view 'http://127.0.0.1:8888/codeData/' with Safari on the iPhone? Chances are that server isn't available from whatever networks the iPhone is connected to. If your iMac is using DCHP it is possible that the address has changed since you originally set the value.
Are you sure you have the case correct on the URL? The simulator is much more forgiving on case-sensitivity than the actual device.
8,304,818
Hey guys I have done lots of work with ASIHTTPRequest so far and use it several times in my ios application, however in one area of my app where I have added another asihttprequest method its not working properly. First of all it must be said that the reason I'm trying to spread the load of downloading and parsing the...
2011/11/29
[ "https://Stackoverflow.com/questions/8304818", "https://Stackoverflow.com", "https://Stackoverflow.com/users/807400/" ]
Can you view 'http://127.0.0.1:8888/codeData/' with Safari on the iPhone? Chances are that server isn't available from whatever networks the iPhone is connected to. If your iMac is using DCHP it is possible that the address has changed since you originally set the value.
Do not fly blind but use an HTTP Proxy like [Charles](http://www.charlesproxy.com/) for making sure your requests are actually fired and result into what you expect.
52,496,731
I have a `dev` branch which already merged with branches `featureA` and `featureB`. I merged that `dev` branch to `master` and pushed to remote. Later I identified `featureB` is not yet ready to merge with `master` as there is a faulty commit. So I revert that merge of `dev` --> `master`. ``` git revert -m 1 <merge-c...
2018/09/25
[ "https://Stackoverflow.com/questions/52496731", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2293686/" ]
You should not do a revert of the whole `develop` to `master` merge here, but do a revert of the 1 specific branch instead. In your case it should be a revert of `featureB` to `develop` merge. **If your revert cannot be undone, simplest solution is to revert it back and do a new revert of `featureB` to `develop` merge...
Generally I try to avoid reverts, because to my experience they cause chaos and some times I ended up resolving into cherry-picking. I would revert the merge of feature b in the dev branch and then merge the dev into master, rather than reverting the merge into master. I am not sure if git will allow you to do that...
41,236,205
I am creating an image slider, i knew this would happen somehow due to the images that i use, i have tried `android:largeHeap="true"` but i don't get any luck with it. Here is my adapter code that outputs the images ``` public class EsquireAdapter extends PagerAdapter { private int [] imgs = { R.drawable.conf4,...
2016/12/20
[ "https://Stackoverflow.com/questions/41236205", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5575868/" ]
Try `ng-style` directive: ```html <!DOCTYPE html> <html> <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular.min.js"></script> <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css"> <body> <script> var app = angular.module("TestApp"...
Please try by using a function rather than using the inline definition. Also I will prefer to use `ng-if` rather than `ng-show` because `ng-if` will block rendering the HTML template if the condition is wrong. Please try the below code snippet. ```html <!DOCTYPE html> <html> <script src="https://ajax.googleapis.com/...
41,236,205
I am creating an image slider, i knew this would happen somehow due to the images that i use, i have tried `android:largeHeap="true"` but i don't get any luck with it. Here is my adapter code that outputs the images ``` public class EsquireAdapter extends PagerAdapter { private int [] imgs = { R.drawable.conf4,...
2016/12/20
[ "https://Stackoverflow.com/questions/41236205", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5575868/" ]
Try `ng-style` directive: ```html <!DOCTYPE html> <html> <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular.min.js"></script> <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css"> <body> <script> var app = angular.module("TestApp"...
I don't see you have initialized your angular app. Try this one: ```html <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular.min.js"></script> <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css"> <script> angular.module("MyApp", []); //a...
41,236,205
I am creating an image slider, i knew this would happen somehow due to the images that i use, i have tried `android:largeHeap="true"` but i don't get any luck with it. Here is my adapter code that outputs the images ``` public class EsquireAdapter extends PagerAdapter { private int [] imgs = { R.drawable.conf4,...
2016/12/20
[ "https://Stackoverflow.com/questions/41236205", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5575868/" ]
Try `ng-style` directive: ```html <!DOCTYPE html> <html> <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular.min.js"></script> <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css"> <body> <script> var app = angular.module("TestApp"...
You can try this with ng-class CSS ``` <style> .visibleOff{visibility: hidden;} </style> ``` HTML ``` <div class="form-group"> <label class="col-lg-2 col-md-2 col-sm-2 col-xs-12 control-label">Registration</label> <div class="col-lg-10 col-md-10 col-sm-10 col-xs-12"> <div class="basic_info_radio_toggle"> ...
67,496,050
As far as I understood `ZoneInfo` in python 3.9 fixes the issue of "The year of 2038" problem with DST time issue. But I can see that the `timedelta` is wrong. Below it should have been 2 hours, not 3. What is wrong? ``` from zoneinfo import ZoneInfo import datetime dt = datetime.datetime(2038,3,14,0,0, tzinfo = Zone...
2021/05/12
[ "https://Stackoverflow.com/questions/67496050", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6087667/" ]
``` from zoneinfo import ZoneInfo import datetime dt = datetime.datetime(2038,3,14,0,0, tzinfo = ZoneInfo(r'America/New_York')) print(dt) # Output: 2038-03-14 00:00:00-05:00 dt2 = datetime.datetime(2038,3,14,3,0, tzinfo = ZoneInfo(r'America/New_York')) print(dt2) # Output: 2038-03-14 03:00:00-04:00 ...
I think It’s 3 hours, from 00 (which is 12) to 3 that’s absolutely 3 hours.
52,222,674
I try to run my lambda function with localstack. I installed awscli-local and localstack > > pip3 install awscli-local > > > pip3 install --user localstack --ignore-installed six > > > And then I started localstack > > LAMDBA\_EXECUTOR=docker localstack start --docker > > > When I now want to create my l...
2018/09/07
[ "https://Stackoverflow.com/questions/52222674", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4465464/" ]
You can invoke lambdas directly in localstack from the [Commandeer App](https://getcommandeer.com). It installs localstack under the hood with docker. [![enter image description here](https://i.stack.imgur.com/kL7K2.png)](https://i.stack.imgur.com/kL7K2.png) There is a button on the lambda detail that allows you to s...
I'm also seeing this issue. Though it does not happen each time I try to create a lambda in localstack. What I have noticed is that lambda create seems to take a rather long time and cause a lot of CPU consumption on my mac while it is creating the lambda. My initial guess is that because of the time being take to crea...
68,961,492
**I have a code like this** ``` const [inputComment, setInputComment] = useState(''); const [ commentPost, { data: data4, loading: loading4, errorCreate4 }, ] = useMutation(COMMENT_POST); const { error: error2, loading: loading2, data: data2 } = useQuery( GET_POST_BY_ID, { variables: { postid: item...
2021/08/28
[ "https://Stackoverflow.com/questions/68961492", "https://Stackoverflow.com", "https://Stackoverflow.com/users/14431276/" ]
Your mutation modifies data on the **server side**. Once your mutation is done, you should **refetch** your data in order to get the modified version in your local cache on the **client side**. By guessing how your mutation and query actually work, here is how it would look like: ``` const [ commentPost, { dat...
I assume `commentPost` is an insert operation, not an update of a single record. In this case, Apollo useMutation will not update the cache for you. **You need to modify the cache yourself.** The [official Apollo documentation](https://www.apollographql.com/docs/react/data/mutations/#the-update-function) has covered th...
43,880,640
In an existing code, I have an html page which contains some variables that exist in some java classes. What I want to do is **to hide some variables if there are not defined (no value at all) and show the others** like in a normal way. Here is a portion of the html code : ``` <li id="variable1" class="hide-me-if-bla...
2017/05/09
[ "https://Stackoverflow.com/questions/43880640", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6097477/" ]
You can slice 7 words, so that you keep 3 first words and 2 following pairs. ```js const types = "type:of:pets:pet:304126008:pet:328464062:pet:329003654:pet:274825265:pet:302508993"; const r = types.split(':').slice(0, 7).join(':'); console.log(r) ``` Swap `const` to `var` if needed for es5 compatibility.
```js const input = 'type:of:pets:pet:304126008:pet:328464062:pet:329003654:pet:274825265:pet:302508993'; const start = 'type:of:pets'; const petDelimiter = ':pet:'; const pets = input.substr(start.length + petDelimiter.length).split(petDelimiter); const result = start + pets.slice(0, 2).map(pet => petDelimiter + ...
43,880,640
In an existing code, I have an html page which contains some variables that exist in some java classes. What I want to do is **to hide some variables if there are not defined (no value at all) and show the others** like in a normal way. Here is a portion of the html code : ``` <li id="variable1" class="hide-me-if-bla...
2017/05/09
[ "https://Stackoverflow.com/questions/43880640", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6097477/" ]
You can slice 7 words, so that you keep 3 first words and 2 following pairs. ```js const types = "type:of:pets:pet:304126008:pet:328464062:pet:329003654:pet:274825265:pet:302508993"; const r = types.split(':').slice(0, 7).join(':'); console.log(r) ``` Swap `const` to `var` if needed for es5 compatibility.
Use a regex: ```js var pets = "type:of:pets:pet:304126008:pet:328464062:pet:329003654:pet:274825265:pet:302508993".match(/(pet:[0-9]+)/g); console.log("type:of:pets:" + pets.slice(0, 2).join(":")); ```
20,423,263
I have a container div which loops through items in a PHP array to generate repeating element divs all with a unique ID. I am using a countdown plugin (<http://keith-wood.name/countdown.html>) to apply to a date on each element and it worked out in PHP. This all works fine until I load more elements into the page u...
2013/12/06
[ "https://Stackoverflow.com/questions/20423263", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1001034/" ]
After your ajax function returns, just call the jquery to initialise the countdowns again. Instead of using php to echo the values into the jQuery call - add them to the div itself, e.g ``` <div class="defaultCountdown" data-year="2013" data-month="11"> ``` Then to initialise it would be: ``` $('div.defaultCountdo...
``` $(".element").each(function() { var item_id = "#" + this.id; if(this.id != 'discount_0'){ container.find(discount_id).remove(); } $(element_id).countdown({until: new Date($year, $month - 1, $day, $hour, $minute, $secs)}); }); ``` when you are applying countdown you are calling on `$(e...
355,460
If a wireless network does not assign an ip address/gateway ( automatic connection settings) automatically after connection, how can I find/setup correct ip and gateway address after connecting to the network?
2011/11/09
[ "https://superuser.com/questions/355460", "https://superuser.com", "https://superuser.com/users/104700/" ]
You could try listening on the wifi interface with [wireshark](http://www.wireshark.org/download.html). If anything else on the network knows the gateway, you'll see ARP requests for it. You'll at least get an idea of the network range from the traffic you see.
Sounds like DHCP is disabled. The default IP address of most routers is 192.168.0.1, check your documentation for your router if this is not the case. Different manufacturors certainly use different defaults. Also if the network has been setup it's very likely whoever administrates it will have changed it from defaul...
45,593,314
I am experimenting with ruby (2.4.1p111) and with the load method and it does have some strange behavior: I have two files: *mytest.rb*: ``` class MyClass def self.greet(param) puts "Got called: #{param}" end greet 'Called locally' load "./testld.rb" end ``` and the loaded file: *testld.rb*: ``` gr...
2017/08/09
[ "https://Stackoverflow.com/questions/45593314", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1716700/" ]
You need to call `MyClass.greet` in `testld.rb`, that is because `greet` is a class method defined in the class `MyClass`. [Here](https://rubymonk.com/learning/books/4-ruby-primer-ascent/chapters/45-more-classes/lessons/113-class-variables) is documentation for class methods.
Wherever you load a file, the loaded file is always evaluated within the main environment. The value of `self` in the main environment of `testld.rb` is the main environment of the entire script. Hence, your ``` greet 'Called by load' ``` is not equivalent to ``` MyClass.greet 'Called by load' ``` as you expected...
4,492,160
I have a simple question i.e. how can I pass objective-C function reference as a C function pointer so that C can invoke that function. *edit:* Sorry for not providing the sample source here it is: ``` - (void)init { CLibStructure cLibObject; cLibObject.on_work_done = &cWorkDone; } ``` the function that...
2010/12/20
[ "https://Stackoverflow.com/questions/4492160", "https://Stackoverflow.com", "https://Stackoverflow.com/users/538794/" ]
In short, you can't. Not directly. A method call is a combination of a target, the object to message, and the selector that identifies the method to call. You need to bundle those up together somehow. With Blocks it is easy enough. With pure C APIs, it can typically be done with a context pointer or something like it...
You can create a function that calls the method, and then manipulate a pointer to that: ``` int function(NSObject *something, int someArg) { return [something thisIsAMethod:someArg]; //assuming NSObject has a method called thisIsAMethod that takes an int as a parameter and returns an int. } ``` and then yo...
19,315,602
It's been quite a while since I wrote a program in C, and even so I always found the actual compiling and linking quite confusing. Since I've been playing / working with node.js lately, I have become curious enough to start taking a peek under the hood and am currently looking at libuv. I've found some excellent guid...
2013/10/11
[ "https://Stackoverflow.com/questions/19315602", "https://Stackoverflow.com", "https://Stackoverflow.com/users/560383/" ]
The most simple Makefile I could make work is this, but obviously it is specific to the location of libuv.a on my system. I would welcome an edit / new post of this answer that provides a more generic compile line. ``` main: main.c gcc -o main main.c /usr/local/lib/libuv.a -pthread clean: rm main ```
To improve the previous answer a bit, `pkg-config` can be used to avoid hardcoding the path: ``` LDFLAGS = `pkg-config --libs libuv` main: src/main.c $(CC) -o main src/main.c $(LDFLAGS) ```
72,655,063
So I am trying to add filters to my calorie tracking app and I encountered this problem. I try to individually change the value of different booleans (ex.: vegan, keto ...) and it changes in the widget that I change them in (Item), but not in the parent (CategoryGrid) widget. Although, the value of \_isSelected changes...
2022/06/17
[ "https://Stackoverflow.com/questions/72655063", "https://Stackoverflow.com", "https://Stackoverflow.com/users/17851375/" ]
This defines a method where some types aren't fixed, but generic. A non-generic version of that method would e.g. be ``` String[] toArray(String[] a); ``` meaning that you provide a `String[]` array and get a `String[]` array. The given method replaces the `String` with a generic type `T`, meaning that the result ...
Remember that the idea behind generics is to parameterise a class on *type* and that you specify that type when you instantiate the class. `<T>` is the type parameter - that is you write that to say that this class/method is parameterised on some type `T` specified at run time.
3,734,089
I am developing an App where I would need to perform HTTP Request using C#. Had in been PHP, I could use the HttpRequest class. Which class or group of class is best matched for the PHP HttpRequest by which I could make GET and POST Request.
2010/09/17
[ "https://Stackoverflow.com/questions/3734089", "https://Stackoverflow.com", "https://Stackoverflow.com/users/326820/" ]
You can use [QTextEdit](http://doc.qt.nokia.com/4.6/qtextedit.html) and [QSyntaxHighlighter](http://doc.qt.nokia.com/4.6/qsyntaxhighlighter.html) together to get text editing features with syntax highlighting. See Qt's richtext\syntaxhighlighter example. QtScript is based on the ECMAScript scripting language as is Jav...
Try [stealing the official one](http://svn://labs.trolltech.com/svn/qtscript/qtscriptdebug), you want src/editor/scripthighlighter.h and src/editor/scripthighlighter.cpp
3,734,089
I am developing an App where I would need to perform HTTP Request using C#. Had in been PHP, I could use the HttpRequest class. Which class or group of class is best matched for the PHP HttpRequest by which I could make GET and POST Request.
2010/09/17
[ "https://Stackoverflow.com/questions/3734089", "https://Stackoverflow.com", "https://Stackoverflow.com/users/326820/" ]
You can use [QTextEdit](http://doc.qt.nokia.com/4.6/qtextedit.html) and [QSyntaxHighlighter](http://doc.qt.nokia.com/4.6/qsyntaxhighlighter.html) together to get text editing features with syntax highlighting. See Qt's richtext\syntaxhighlighter example. QtScript is based on the ECMAScript scripting language as is Jav...
* Full-fledged code editor widget: [QCodeEdit](http://qcodeedit.org/) * Very simple solution: [QtScript highlighter](http://www.qtcentre.org/threads/25501-QtScript-script-text-editor-for-Qt-4-4-3-with-Syntax-Highlighter) (MultiLineCommentHighlighter class is defined [here](http://www.qtcentre.org/archive/index.php/t-25...
3,734,089
I am developing an App where I would need to perform HTTP Request using C#. Had in been PHP, I could use the HttpRequest class. Which class or group of class is best matched for the PHP HttpRequest by which I could make GET and POST Request.
2010/09/17
[ "https://Stackoverflow.com/questions/3734089", "https://Stackoverflow.com", "https://Stackoverflow.com/users/326820/" ]
You can use [QTextEdit](http://doc.qt.nokia.com/4.6/qtextedit.html) and [QSyntaxHighlighter](http://doc.qt.nokia.com/4.6/qsyntaxhighlighter.html) together to get text editing features with syntax highlighting. See Qt's richtext\syntaxhighlighter example. QtScript is based on the ECMAScript scripting language as is Jav...
Try KatePart of KDE: <http://kate-editor.org/about-katepart/> To quote: > > KatePart is a fast and feature-rich text editor component with many advanced features. It implements the KTextEditor interfaces, a common interface collection for text editor components in KDE, allowing it to be selected as the editor in ap...
3,734,089
I am developing an App where I would need to perform HTTP Request using C#. Had in been PHP, I could use the HttpRequest class. Which class or group of class is best matched for the PHP HttpRequest by which I could make GET and POST Request.
2010/09/17
[ "https://Stackoverflow.com/questions/3734089", "https://Stackoverflow.com", "https://Stackoverflow.com/users/326820/" ]
See [QScintilla](http://www.riverbankcomputing.co.uk/software/qscintilla/intro). It has Javascript highlighting and (auto-)completion support built-in.
Try [stealing the official one](http://svn://labs.trolltech.com/svn/qtscript/qtscriptdebug), you want src/editor/scripthighlighter.h and src/editor/scripthighlighter.cpp
3,734,089
I am developing an App where I would need to perform HTTP Request using C#. Had in been PHP, I could use the HttpRequest class. Which class or group of class is best matched for the PHP HttpRequest by which I could make GET and POST Request.
2010/09/17
[ "https://Stackoverflow.com/questions/3734089", "https://Stackoverflow.com", "https://Stackoverflow.com/users/326820/" ]
See [QScintilla](http://www.riverbankcomputing.co.uk/software/qscintilla/intro). It has Javascript highlighting and (auto-)completion support built-in.
* Full-fledged code editor widget: [QCodeEdit](http://qcodeedit.org/) * Very simple solution: [QtScript highlighter](http://www.qtcentre.org/threads/25501-QtScript-script-text-editor-for-Qt-4-4-3-with-Syntax-Highlighter) (MultiLineCommentHighlighter class is defined [here](http://www.qtcentre.org/archive/index.php/t-25...
3,734,089
I am developing an App where I would need to perform HTTP Request using C#. Had in been PHP, I could use the HttpRequest class. Which class or group of class is best matched for the PHP HttpRequest by which I could make GET and POST Request.
2010/09/17
[ "https://Stackoverflow.com/questions/3734089", "https://Stackoverflow.com", "https://Stackoverflow.com/users/326820/" ]
See [QScintilla](http://www.riverbankcomputing.co.uk/software/qscintilla/intro). It has Javascript highlighting and (auto-)completion support built-in.
Try KatePart of KDE: <http://kate-editor.org/about-katepart/> To quote: > > KatePart is a fast and feature-rich text editor component with many advanced features. It implements the KTextEditor interfaces, a common interface collection for text editor components in KDE, allowing it to be selected as the editor in ap...
3,734,089
I am developing an App where I would need to perform HTTP Request using C#. Had in been PHP, I could use the HttpRequest class. Which class or group of class is best matched for the PHP HttpRequest by which I could make GET and POST Request.
2010/09/17
[ "https://Stackoverflow.com/questions/3734089", "https://Stackoverflow.com", "https://Stackoverflow.com/users/326820/" ]
Try [stealing the official one](http://svn://labs.trolltech.com/svn/qtscript/qtscriptdebug), you want src/editor/scripthighlighter.h and src/editor/scripthighlighter.cpp
* Full-fledged code editor widget: [QCodeEdit](http://qcodeedit.org/) * Very simple solution: [QtScript highlighter](http://www.qtcentre.org/threads/25501-QtScript-script-text-editor-for-Qt-4-4-3-with-Syntax-Highlighter) (MultiLineCommentHighlighter class is defined [here](http://www.qtcentre.org/archive/index.php/t-25...
3,734,089
I am developing an App where I would need to perform HTTP Request using C#. Had in been PHP, I could use the HttpRequest class. Which class or group of class is best matched for the PHP HttpRequest by which I could make GET and POST Request.
2010/09/17
[ "https://Stackoverflow.com/questions/3734089", "https://Stackoverflow.com", "https://Stackoverflow.com/users/326820/" ]
Try KatePart of KDE: <http://kate-editor.org/about-katepart/> To quote: > > KatePart is a fast and feature-rich text editor component with many advanced features. It implements the KTextEditor interfaces, a common interface collection for text editor components in KDE, allowing it to be selected as the editor in ap...
* Full-fledged code editor widget: [QCodeEdit](http://qcodeedit.org/) * Very simple solution: [QtScript highlighter](http://www.qtcentre.org/threads/25501-QtScript-script-text-editor-for-Qt-4-4-3-with-Syntax-Highlighter) (MultiLineCommentHighlighter class is defined [here](http://www.qtcentre.org/archive/index.php/t-25...
66,114,572
tags -- `["tag1", "tag2, tag3"]` expected output -- `["tag1","tag2","tag3"]` Current code: ``` List<String> tagsProcessed = new ArrayList<>(); for(String t : tags) { tagsProcessed.addAll(Stream.of(t.split(",")).map(String::trim).collect(Collectors.toList())); } ``` How to rewrite it with streams?
2021/02/09
[ "https://Stackoverflow.com/questions/66114572", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4806903/" ]
one solution of many: ``` var delimiter = Pattern.compile(","); tags.stream() .flatMap(delimiter::splitAsStream) .map(String::trim) .forEach(tagsProcessed::add); ``` --- or, *avoiding* (hiding!) the `trim` call (but without removing white spaces at start and end of input strings): ``` var delimiter = P...
Use `flatMap`, which can map one element to any number of elements, represented as a stream. In this case, we map each tag to the array of tags produced by `split`. ``` List<String> tagsProcessed = tags.stream() .flatMap(tag -> Arrays.stream(tag.split(", "))) .collect(Collectors.toList()); ```
66,114,572
tags -- `["tag1", "tag2, tag3"]` expected output -- `["tag1","tag2","tag3"]` Current code: ``` List<String> tagsProcessed = new ArrayList<>(); for(String t : tags) { tagsProcessed.addAll(Stream.of(t.split(",")).map(String::trim).collect(Collectors.toList())); } ``` How to rewrite it with streams?
2021/02/09
[ "https://Stackoverflow.com/questions/66114572", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4806903/" ]
one solution of many: ``` var delimiter = Pattern.compile(","); tags.stream() .flatMap(delimiter::splitAsStream) .map(String::trim) .forEach(tagsProcessed::add); ``` --- or, *avoiding* (hiding!) the `trim` call (but without removing white spaces at start and end of input strings): ``` var delimiter = P...
You can also use: ``` List<String> tagsProcessed = tags.stream() .map(s -> s.trim().split(",\\s*")) .flatMap(Arrays::stream) .collect(Collectors.toList()); ```
66,114,572
tags -- `["tag1", "tag2, tag3"]` expected output -- `["tag1","tag2","tag3"]` Current code: ``` List<String> tagsProcessed = new ArrayList<>(); for(String t : tags) { tagsProcessed.addAll(Stream.of(t.split(",")).map(String::trim).collect(Collectors.toList())); } ``` How to rewrite it with streams?
2021/02/09
[ "https://Stackoverflow.com/questions/66114572", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4806903/" ]
one solution of many: ``` var delimiter = Pattern.compile(","); tags.stream() .flatMap(delimiter::splitAsStream) .map(String::trim) .forEach(tagsProcessed::add); ``` --- or, *avoiding* (hiding!) the `trim` call (but without removing white spaces at start and end of input strings): ``` var delimiter = P...
``` List<String> tags = Arrays.asList("1 ,2 ,3 ,4 ", "5 ,6 ,7 ,8 ", " 9, 10"); List<String> tagsProcessed = tags.stream() //Stream the list of String as is .flatMap(tag -> Arrays.stream(tag.split(","))) // flatMap to avoid Stream<Stream<String>>, this produces Stream<String> .map(String::trim) ...
27,932
I have a 4 year old daughter and a 2 year old son. Both are good kids and just have the usual kid moments here and there - but on the whole they're very good :) However, whenever we go out anywhere, literally anywhere, they always pine and try to get a new toy or little trinket... The scale really doesn't matter, they...
2016/11/26
[ "https://parenting.stackexchange.com/questions/27932", "https://parenting.stackexchange.com", "https://parenting.stackexchange.com/users/25435/" ]
I'd say if you have a concern, you should listen to your inner voice. I personally think you are setting up your kids to expect certain things at certain times. We all do it it different ways -- it is up to you to decide. They won't always get a treat, but they often will, perhaps only if you stop for coffee. In my o...
Kids want toys, finite. That is normal and they can have already tons, it doesn't matter. Also just for the future, expect to throw masses of these toys away later. If they get older and don't care any more about them. However now the smartest things you could do is using that to teach them planning and decision makin...
27,932
I have a 4 year old daughter and a 2 year old son. Both are good kids and just have the usual kid moments here and there - but on the whole they're very good :) However, whenever we go out anywhere, literally anywhere, they always pine and try to get a new toy or little trinket... The scale really doesn't matter, they...
2016/11/26
[ "https://parenting.stackexchange.com/questions/27932", "https://parenting.stackexchange.com", "https://parenting.stackexchange.com/users/25435/" ]
I'd say if you have a concern, you should listen to your inner voice. I personally think you are setting up your kids to expect certain things at certain times. We all do it it different ways -- it is up to you to decide. They won't always get a treat, but they often will, perhaps only if you stop for coffee. In my o...
I had the same problem with my son, and my solution was similar to @Willow Rex's amendment, a token system. I spray painted a bunch of pennies with gold paint, and got them each a "treasure bag" (with a pirate skull on it) to keep their pennies in. They got pennies for getting up in the morning, brushing, eating breakf...
27,932
I have a 4 year old daughter and a 2 year old son. Both are good kids and just have the usual kid moments here and there - but on the whole they're very good :) However, whenever we go out anywhere, literally anywhere, they always pine and try to get a new toy or little trinket... The scale really doesn't matter, they...
2016/11/26
[ "https://parenting.stackexchange.com/questions/27932", "https://parenting.stackexchange.com", "https://parenting.stackexchange.com/users/25435/" ]
I had the same problem with my son, and my solution was similar to @Willow Rex's amendment, a token system. I spray painted a bunch of pennies with gold paint, and got them each a "treasure bag" (with a pirate skull on it) to keep their pennies in. They got pennies for getting up in the morning, brushing, eating breakf...
Kids want toys, finite. That is normal and they can have already tons, it doesn't matter. Also just for the future, expect to throw masses of these toys away later. If they get older and don't care any more about them. However now the smartest things you could do is using that to teach them planning and decision makin...
63,790,683
I'm trying to use pyathena (which looks simpler than the native boto3) to perform some queries . However, I wasn't able to find how can I define which data catalog to use. For example the query execution using boto3: ``` athena_client = boto3.client('athena') start_execution_response = athena_client.start_que...
2020/09/08
[ "https://Stackoverflow.com/questions/63790683", "https://Stackoverflow.com", "https://Stackoverflow.com/users/12152617/" ]
I suppose you did not use the phone field in a domain. Many views are inheriting the partner view, the `sms.partner_form_send_sms_form_view` view adds a button (`Send SMS`) which uses the phone field in attrs (`attrs="{'invisible':[('phone', '=', False)]}"`). Even if you change that, there is an error (`TypeError: di...
Kenly, I want hide 'email': ``` email = fields.Char(groups='cmz_security_contacts.field_invisible_from_contacts') ``` But when I choose a contact: The requested operation cannot be completed due to security restrictions. Please contact your system administrator. (Document type: Contact, Operation: read) - (User: 12...
24,844,343
It may be a setting of some kind in the Chrome dev tools that I am missing. My goal is to pause a slideshow on my web site so that i can use the inspect element tool to target a html element and figure out the css that it uses? Clearly this is impossible to achieve while the animation is set to automatically run. Is t...
2014/07/19
[ "https://Stackoverflow.com/questions/24844343", "https://Stackoverflow.com", "https://Stackoverflow.com/users/680141/" ]
If you go to the "Sources" tab in web inspector there's a pause button in the debug controls. ![enter image description here](https://i.stack.imgur.com/OcJAN.png) Unfortunately, you won't be able to right-click an element to inspect it when paused, but you can locate it using the magnifier icon or on the Elements tab...
You can `Disable Javascript` by clicking `Three dots` on top right then go to `Setting`
24,844,343
It may be a setting of some kind in the Chrome dev tools that I am missing. My goal is to pause a slideshow on my web site so that i can use the inspect element tool to target a html element and figure out the css that it uses? Clearly this is impossible to achieve while the animation is set to automatically run. Is t...
2014/07/19
[ "https://Stackoverflow.com/questions/24844343", "https://Stackoverflow.com", "https://Stackoverflow.com/users/680141/" ]
If you go to the "Sources" tab in web inspector there's a pause button in the debug controls. ![enter image description here](https://i.stack.imgur.com/OcJAN.png) Unfortunately, you won't be able to right-click an element to inspect it when paused, but you can locate it using the magnifier icon or on the Elements tab...
If you want to pause a Bootstrap 4 carousel, you can open your Javascript console (`⌘` + `option` + `J` on a Mac or `ctrl`+ `shift` + `J` on Windows for the Chrome Browser) and then type: `$('.carousel').carousel('pause');` // then press the [enter/return] key Where the ".carousel" is the name of the class (hence the...
24,844,343
It may be a setting of some kind in the Chrome dev tools that I am missing. My goal is to pause a slideshow on my web site so that i can use the inspect element tool to target a html element and figure out the css that it uses? Clearly this is impossible to achieve while the animation is set to automatically run. Is t...
2014/07/19
[ "https://Stackoverflow.com/questions/24844343", "https://Stackoverflow.com", "https://Stackoverflow.com/users/680141/" ]
If you go to the "Sources" tab in web inspector there's a pause button in the debug controls. ![enter image description here](https://i.stack.imgur.com/OcJAN.png) Unfortunately, you won't be able to right-click an element to inspect it when paused, but you can locate it using the magnifier icon or on the Elements tab...
Just click on the setting icon and check the "disable javascript" checkbox, it's under the Debugger. [![](https://i.stack.imgur.com/LtuHQ.jpg)](https://i.stack.imgur.com/LtuHQ.jpg) Found the solution at this link: <https://stellarwebstudios.com/2012/11/stop-javascript-jquery-from-running-while-using-element-inspector...
24,844,343
It may be a setting of some kind in the Chrome dev tools that I am missing. My goal is to pause a slideshow on my web site so that i can use the inspect element tool to target a html element and figure out the css that it uses? Clearly this is impossible to achieve while the animation is set to automatically run. Is t...
2014/07/19
[ "https://Stackoverflow.com/questions/24844343", "https://Stackoverflow.com", "https://Stackoverflow.com/users/680141/" ]
If you want to pause a Bootstrap 4 carousel, you can open your Javascript console (`⌘` + `option` + `J` on a Mac or `ctrl`+ `shift` + `J` on Windows for the Chrome Browser) and then type: `$('.carousel').carousel('pause');` // then press the [enter/return] key Where the ".carousel" is the name of the class (hence the...
You can `Disable Javascript` by clicking `Three dots` on top right then go to `Setting`
24,844,343
It may be a setting of some kind in the Chrome dev tools that I am missing. My goal is to pause a slideshow on my web site so that i can use the inspect element tool to target a html element and figure out the css that it uses? Clearly this is impossible to achieve while the animation is set to automatically run. Is t...
2014/07/19
[ "https://Stackoverflow.com/questions/24844343", "https://Stackoverflow.com", "https://Stackoverflow.com/users/680141/" ]
Just click on the setting icon and check the "disable javascript" checkbox, it's under the Debugger. [![](https://i.stack.imgur.com/LtuHQ.jpg)](https://i.stack.imgur.com/LtuHQ.jpg) Found the solution at this link: <https://stellarwebstudios.com/2012/11/stop-javascript-jquery-from-running-while-using-element-inspector...
You can `Disable Javascript` by clicking `Three dots` on top right then go to `Setting`
49,888,032
When using [CSS Grid Layout](https://youtu.be/FEnRpy9Xfes) to dynamically arrange elements in rows the browser calculates how many items go in a row depending on the size of the viewport. I'm looking for a way using JavaScript to determine how many items are in each row at a given viewport size. My purpose is to fill t...
2018/04/17
[ "https://Stackoverflow.com/questions/49888032", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2743458/" ]
**`elem.getBoundingClientRect().left`** The `elem.getBoundingClientRect().left` property can be used to get the number of dynamic rows in a CSS grid layout. Just loop through the `article` elements [NodeList](https://developer.mozilla.org/en-US/docs/Web/API/NodeList) and compare the element's `getBoundingClientRect()....
**`elem.clientWidth`** This example uses the element property [`clientWidth`](https://developer.mozilla.org/en-US/docs/Web/API/Element/clientWidth) to calculate the number of elements in each row. ```js var rowlength = Math.floor( // round down to account for some spacing document.body.clientWidth / // width of vie...
59,251,136
This is the declaration of the virtual Sort-function located in an interface, using a std::function. ``` using Comparefunction = std::function<bool(const DataHandling::GridDataStruct &d1, const DataHandling::GridDataStruct &d2)>; virtual bool Sort(const Comparefunction& fct); ``` This is the function adressed by ...
2019/12/09
[ "https://Stackoverflow.com/questions/59251136", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9928872/" ]
This boils down to ``` struct Base { virtual ~Base(); }; struct Derived : Base {}; struct Comparer { bool operator()(const Derived&, const Derived&) { return true; } }; std::function<bool(const Base&, const Base&)> comp(Comparer{}); ``` <https://godbolt.org/z/_7Xtfn> `comp` is supposedly able...
You're presenting an interface that can take two of anything that derives from `DataHandling::GridDataStruct`. However, the actual implementation can only take two `Types::Order`s, a more specific, more derived class. I think you have your expectations backwards here.
235,387
In our workstations we don't have root privileges. Our home directories are synced (they don't depend on the physical computer). We have an old Iceweasel 26 installed. I'd like to block the ads. Unfortunately, Adblock Plus is not compatible with Iceweasel 26. I'd use `/etc/hosts`, but, as far as I know, I can't set up...
2015/10/11
[ "https://unix.stackexchange.com/questions/235387", "https://unix.stackexchange.com", "https://unix.stackexchange.com/users/61003/" ]
Instead of Adblock Plus you could use [uBlock origin](https://addons.mozilla.org/de/firefox/addon/ublock-origin/). It is apparently usable with Firefox 24.0 and newer, so it should work with Iceweasel 26.
While using /etc/hosts may not be the best solution, you *can* have a local hosts file by exporting the `HOSTALIASES` variable. Set it to `~/.hosts` or something. Take a look here: <http://blog.tremily.us/posts/HOSTALIASES/> Update: Just tested this on Debian Wheezy, works fine: ``` echo 'y www.yahoo.com' > ~/.hosts...
669,729
I've been struggling with the following task for two days. > > Find the number of sequences of length $2n$, with elements taken from the set $\{1,\ldots,2n\}$, such that no two neighboring elements sum up to $2n.$ > > > For example, for $n = 2$: > > > 1112 $\to$ good > > 1231 $\to$ wrong (because $3+1 = 4 = 2n...
2014/02/09
[ "https://math.stackexchange.com/questions/669729", "https://math.stackexchange.com", "https://math.stackexchange.com/users/127433/" ]
The step you do not understand is $$\frac{(x+1)}{6} x(2x+1) + \frac{6(x+1)^2}{6}=\frac{x+1}{6}[x(2x+1)+6(x+1)]$$ is it? In this step you just have to *factor out* the term $\frac16(x+1)$ First write $(x+1)^2$ as $(x+1)(x+1)$ $$\frac{(x+1)}{6} x(2x+1) + \frac{6\color{red}{(x+1)^2}}{6}= \frac{(x+1)}{6} x(2x+1) + \frac...
Indeed, we have $$\frac{x}{6}(x+1)(2x+1)+(x+1)^2\to(x+1)\left[\frac{x}{6}(2x+1)+(x+1)\right]\\ =(x+1)\left[\frac{2x^2+x}{6}+(x+1)\right]=(x+1)\left[\frac{2x^2+x+6x+6}{6}\right]=(x+1)\left[\frac{2x^2+7x+6}{6}\right]$$ and for the final polynomial $2x^2+7x+6$ we have $2x^2+7x+6=(x+3/2)(x+2)$.
669,729
I've been struggling with the following task for two days. > > Find the number of sequences of length $2n$, with elements taken from the set $\{1,\ldots,2n\}$, such that no two neighboring elements sum up to $2n.$ > > > For example, for $n = 2$: > > > 1112 $\to$ good > > 1231 $\to$ wrong (because $3+1 = 4 = 2n...
2014/02/09
[ "https://math.stackexchange.com/questions/669729", "https://math.stackexchange.com", "https://math.stackexchange.com/users/127433/" ]
Indeed, we have $$\frac{x}{6}(x+1)(2x+1)+(x+1)^2\to(x+1)\left[\frac{x}{6}(2x+1)+(x+1)\right]\\ =(x+1)\left[\frac{2x^2+x}{6}+(x+1)\right]=(x+1)\left[\frac{2x^2+x+6x+6}{6}\right]=(x+1)\left[\frac{2x^2+7x+6}{6}\right]$$ and for the final polynomial $2x^2+7x+6$ we have $2x^2+7x+6=(x+3/2)(x+2)$.
What the author is doing here is factoring out $\frac{x+1}6$ from the two expressions. Indeed, $$\frac{6(x+1)^2}6=\frac{6(x+1)(x+1)}6=\frac{x+1}{6}\cdot 6(x+1),$$ so $$\frac{x+1}6\cdot x(2x+1)+\frac{6(x+1)^2}6=\frac{x+1}6\bigl(x(2x+1)+6(x+1)\bigr).$$
669,729
I've been struggling with the following task for two days. > > Find the number of sequences of length $2n$, with elements taken from the set $\{1,\ldots,2n\}$, such that no two neighboring elements sum up to $2n.$ > > > For example, for $n = 2$: > > > 1112 $\to$ good > > 1231 $\to$ wrong (because $3+1 = 4 = 2n...
2014/02/09
[ "https://math.stackexchange.com/questions/669729", "https://math.stackexchange.com", "https://math.stackexchange.com/users/127433/" ]
The step you do not understand is $$\frac{(x+1)}{6} x(2x+1) + \frac{6(x+1)^2}{6}=\frac{x+1}{6}[x(2x+1)+6(x+1)]$$ is it? In this step you just have to *factor out* the term $\frac16(x+1)$ First write $(x+1)^2$ as $(x+1)(x+1)$ $$\frac{(x+1)}{6} x(2x+1) + \frac{6\color{red}{(x+1)^2}}{6}= \frac{(x+1)}{6} x(2x+1) + \frac...
What the author is doing here is factoring out $\frac{x+1}6$ from the two expressions. Indeed, $$\frac{6(x+1)^2}6=\frac{6(x+1)(x+1)}6=\frac{x+1}{6}\cdot 6(x+1),$$ so $$\frac{x+1}6\cdot x(2x+1)+\frac{6(x+1)^2}6=\frac{x+1}6\bigl(x(2x+1)+6(x+1)\bigr).$$
45,367,392
Im new here, Please help me to understand my new project's **log4j2** configuration. My question is: * How to get all Log outputs? * From where should I search log files? Also how to save tomcat console outputs in the **txt** file? I really appreciate your help and support, Today I want to learn something new from ...
2017/07/28
[ "https://Stackoverflow.com/questions/45367392", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7211869/" ]
I did the most obvious thing in the world and it worked, silly old me. ``` sudo apt-get install gcc ``` I did uninstall a lot of things while trying to fault find so to be on the same side I did the below, not needed for all but I did it anyway. ``` sudo apt-get install gcc libffi-dev libssl-dev python3-dev ``` ...
I have installed sudo apt install python-dev and it worked for me !! Actually i got this problem in rasperry pi 3
70,249,106
Im trying to make a header in NextJS but this keeps happenning: [![enter image description here](https://i.stack.imgur.com/Y9aUE.png)](https://i.stack.imgur.com/Y9aUE.png) I tried to use 100% width, 100% height. My code: ``` import type { NextPage } from 'next'; import { Fragment } from 'react'; import Header from ...
2021/12/06
[ "https://Stackoverflow.com/questions/70249106", "https://Stackoverflow.com", "https://Stackoverflow.com/users/16062735/" ]
You can split your your dataframe based on column names, using normal indexing operator `[]`, sort alphabetically the other columns using `sort_index(axis=1)`, and `concat` back together: ``` >>> pd.concat([df[['subject','timepoint']], df[df.columns.difference(['subject', 'timepoint'])]\ .sor...
Specify the first two columns you want to keep (or determine them from the data), then sort all of the other columns. Use `.loc` with the correct list to then "sort" the DataFrame. ``` import numpy as np first_cols = ['subject', 'timepoint'] #first_cols = df.columns[0:2].tolist() # OR determine first two other_cols...
70,249,106
Im trying to make a header in NextJS but this keeps happenning: [![enter image description here](https://i.stack.imgur.com/Y9aUE.png)](https://i.stack.imgur.com/Y9aUE.png) I tried to use 100% width, 100% height. My code: ``` import type { NextPage } from 'next'; import { Fragment } from 'react'; import Header from ...
2021/12/06
[ "https://Stackoverflow.com/questions/70249106", "https://Stackoverflow.com", "https://Stackoverflow.com/users/16062735/" ]
You can split your your dataframe based on column names, using normal indexing operator `[]`, sort alphabetically the other columns using `sort_index(axis=1)`, and `concat` back together: ``` >>> pd.concat([df[['subject','timepoint']], df[df.columns.difference(['subject', 'timepoint'])]\ .sor...
You can try getting the dataframe columns as a list, rearrange them, and assign it back to the dataframe using `df = df[cols]` ``` import pandas as pd subject = [1,1,1,1,1,1,2,2,2,2,2,2,3,3,3,4,4,4,4,4,4] timepoint = [1,2,3,4,5,6,1,2,3,4,5,6,1,2,4,1,2,3,4,5,6] c = [2,3,4,5,6,7,3,4,1,2,3,4,5,4,5,8,4,5,6,2,3] d = [2,3,...
1,412,875
My machine is slow, so whenever I open new file(by double click) I would like to have the previously opened tab(s) auto closed. In Notepad++ 7.5.7, I am opening a folder as a workspace, and every time I open a new file, I need to right click and select `close all but this`, is there a way to do that automatically from...
2019/03/10
[ "https://superuser.com/questions/1412875", "https://superuser.com", "https://superuser.com/users/1006332/" ]
I have never gotten a UAC prompt for command line shutdown before, but here are a couple things you can try. If you distributed your script to them over the internet, make sure the script is unblocked. You can do this by right-clicking the script file, clicking `Properties` then checking `Unblock` and then clicking `OK...
Sorry, false alarm, thanks for your time user9811991 - but it was a setting in my program that was checked that should not have been.
17,088,684
I'm trying to filter a mySQL database table into a web page. I am okay when it comes to getting specific data from a column using the query: ``` $result = mysql_query("SELECT * FROM availability WHERE location = 'London'"); ``` But what I am having particular trouble with is retrieving results from a column where th...
2013/06/13
[ "https://Stackoverflow.com/questions/17088684", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1697855/" ]
You forgot a semicolon between the first and the second row: ``` $result = mysql_query("SELECT * FROM availability WHERE team IS NOT NULL"); $result = mysql_query("SELECT team FROM availability WHERE team IS NOT NULL"); ``` And I guess you don't want to name both variables as `$result`. PS: You should use MySQLi or...
You did the right sql. The right sql should be: ``` $result = mysql_query(" SELECT `team` FROM `availability` WHERE `team` IS NOT NULL"); ``` then only show the value those are not null. You just check you are using the right field in where condition..
61,248
All new 737s use split-tip winglets, which are more efficient than the simpler blended winglets previously used. However, for no clear reason, they use two different types of split-tip winglet: * New 737 Next Generations (the 737-700/-800/-900)1 use *split-scimitar* winglets, which have a main body shaped like a blen...
2019/03/16
[ "https://aviation.stackexchange.com/questions/61248", "https://aviation.stackexchange.com", "https://aviation.stackexchange.com/users/22726/" ]
The 737NG was originally introduced with with no winglets. A company called Aviation Partners [worked with Boeing](http://www.b737.org.uk/winglets.htm) to develop the "blended" winglet, originally for the NG-based BBJ (Boeing Business Jet). Customers then had them installed after delivery for a while before Boeing work...
Since a winglet is basically a sail generating thrust (lift with a modest forward-tilted vector) from the circulating flow around the tip, extracting beneficial energy from the circulation (the thrust part) and producing an "outwash" that opposes and weakens the vortice flow in the process, it's just adding another sai...
1,228,870
I'm using Ubuntu 18.04. I want to add my user, "davea" to the group "www-data". I tried this ``` (venv) davea@chicommons-laboratory:/var/www/html/web$ groups davea sudo (venv) davea@chicommons-laboratory:/var/www/html/web$ sudo usermod -a -G www-data davea [sudo] password for davea: (venv) davea@chicommons-laboratory...
2020/04/20
[ "https://askubuntu.com/questions/1228870", "https://askubuntu.com", "https://askubuntu.com/users/609471/" ]
your command is good. you can check the group with ``` getent group | grep davea ``` if your user are in group www-data, you just have to relog your user davea. regards
You need to log off and on the `davea` user to see that `davea` is a member of `www-data` group.
1,228,870
I'm using Ubuntu 18.04. I want to add my user, "davea" to the group "www-data". I tried this ``` (venv) davea@chicommons-laboratory:/var/www/html/web$ groups davea sudo (venv) davea@chicommons-laboratory:/var/www/html/web$ sudo usermod -a -G www-data davea [sudo] password for davea: (venv) davea@chicommons-laboratory...
2020/04/20
[ "https://askubuntu.com/questions/1228870", "https://askubuntu.com", "https://askubuntu.com/users/609471/" ]
You need to log off and on the `davea` user to see that `davea` is a member of `www-data` group.
Or you can use newgrp From manpage > > The newgrp command is used to change the current group ID during a login session. If the optional - flag is given, the user's environment will be reinitialized as though the user had logged in, otherwise the current environment, including current working directory, remains unch...
1,228,870
I'm using Ubuntu 18.04. I want to add my user, "davea" to the group "www-data". I tried this ``` (venv) davea@chicommons-laboratory:/var/www/html/web$ groups davea sudo (venv) davea@chicommons-laboratory:/var/www/html/web$ sudo usermod -a -G www-data davea [sudo] password for davea: (venv) davea@chicommons-laboratory...
2020/04/20
[ "https://askubuntu.com/questions/1228870", "https://askubuntu.com", "https://askubuntu.com/users/609471/" ]
your command is good. you can check the group with ``` getent group | grep davea ``` if your user are in group www-data, you just have to relog your user davea. regards
Or you can use newgrp From manpage > > The newgrp command is used to change the current group ID during a login session. If the optional - flag is given, the user's environment will be reinitialized as though the user had logged in, otherwise the current environment, including current working directory, remains unch...
69,742,276
I am doing git tag on a repo and getting below output. **command** ``` def tagversion = sh(script:""" git tag --sort=v:refname """, returnStdout:true).trim() ``` **Output:-** ``` 1.0 1.10.0 1.11.0 1.6 1.7 1.7.1 ``` how can i add comma after each version? **expected output** ``` 1.0, 1.10.0, 1.11.0, 1.6, 1.7, 1...
2021/10/27
[ "https://Stackoverflow.com/questions/69742276", "https://Stackoverflow.com", "https://Stackoverflow.com/users/14680601/" ]
You could try a `delete` from a `select` ``` DELETE FROM products WHERE brand IN ( SELECT brand FROM products WHERE brand LIKE 'Brand%' ); ```
Try deleting in batches. You might have a hang up somewhere with foreign keys, or triggers delaying the deletion. ``` delete top (10) product WHERE brand LIKE 'Brand%' while @@rowcount > 0 begin delete top (10) product WHERE brand LIKE 'Brand%' end ```
51,314,143
This is my sample data. ``` index <- c(1,2,3,4,5,6,7,8,9,10) a <- c('a','b','c',NA,'D','e',NA,'g','h','i') data <- data.frame(index,a) ``` What I would like to is create a new column name where only 'a' and 'b' stay. All others like 'c','d','e'...will be tagged as others, while NA stays as NA. ``` data$name = ifels...
2018/07/12
[ "https://Stackoverflow.com/questions/51314143", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7564979/" ]
You should use `df['female']` with no comparison, rather than comparing to `True` with any operator. `df['female']` is already the mask you need. Comparison to `True` with `==` is almost always a bad idea, even in NumPy or Pandas.
Just do ``` df.loc[df['female'], 'wage'] = 200 ``` In fact `df['female']` as a Boolean series has exactly the same *values* as the Boolean series returned by evaluating `df['female'] == True`, which is also a Boolean series. (A Series is the Pandas term like a single column in a dataframe). By the way, the last ...