qid
int64
1
74.6M
question
stringlengths
45
24.2k
date
stringlengths
10
10
metadata
stringlengths
101
178
response_j
stringlengths
32
23.2k
response_k
stringlengths
21
13.2k
34,255,552
Say, I have a table named `buildings` which could be created by the following query: ``` create table buildings( building_id number primary key, building_name varchar2(32), shape sdo_geometry ); ``` I can insert a rectangle into it by the following query: ``` insert into buildings values( 4, -- index 'Rea...
2015/12/13
['https://Stackoverflow.com/questions/34255552', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/3555000/']
Edit: The Event object in jQuery has a parameter for ctrlKey, you could assign that as true, on click. ``` var e = jQuery.Event("click"); e.ctrlKey = true; $('#id').trigger(e); ``` Reference: [jquery trigger ctrl + click](https://stackoverflow.com/questions/9377046/jquery-trigger-ctrl-click)
This is a non-jQuery version to simulate keyboard events. This works in both Chrome (WebKit based) and Firefox (Gecko based): ``` var keyboardEvent = document.createEvent("KeyboardEvent"); var initMethod = typeof keyboardEvent.initKeyboardEvent !== 'undefined' ? "initKeyboardEvent" : "initKeyEvent"; keyboardEvent[ini...
34,255,552
Say, I have a table named `buildings` which could be created by the following query: ``` create table buildings( building_id number primary key, building_name varchar2(32), shape sdo_geometry ); ``` I can insert a rectangle into it by the following query: ``` insert into buildings values( 4, -- index 'Rea...
2015/12/13
['https://Stackoverflow.com/questions/34255552', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/3555000/']
In pure javascript, you can use the [`MouseEvent`](https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent/MouseEvent) for that: ``` document.getElementById("todo").dispatchEvent(new MouseEvent("click", {ctrlKey: true})); ``` To programatically open a new tab you can do that: ``` const a = document.createElemen...
This is a non-jQuery version to simulate keyboard events. This works in both Chrome (WebKit based) and Firefox (Gecko based): ``` var keyboardEvent = document.createEvent("KeyboardEvent"); var initMethod = typeof keyboardEvent.initKeyboardEvent !== 'undefined' ? "initKeyboardEvent" : "initKeyEvent"; keyboardEvent[ini...
1,808,887
This is a part of an exercise from "Algebra: Chapter 0" by Paolo Aluffi. First, I provide the necessary definitions. > > An **action** of a group $G$ on a set $A$ is a set-function > > > $\rho: G \times A \to A$ > > > such that $\forall g,h \in G \ \ \forall a \in A$ we have > > > $\rho(e\_G, a) = a, \ \ \ \rho...
2016/06/01
['https://math.stackexchange.com/questions/1808887', 'https://math.stackexchange.com', 'https://math.stackexchange.com/users/229776/']
What “the same” means is that there exists a bijection between the set of left actions of $G$ on $A$ and the set of right actions of $G^{\mathrm{op}}$ on $A$. Thus we want to find a map $\lambda\mapsto\lambda^r$ and a map $\rho\mapsto\rho^l$ such that, for a left action $\lambda$, $\lambda^{rl}=\lambda$ and, for a rig...
I think the other answers are a bit misled into what the question is asking. It seems that they are answering the last bullet (the sixth bullet) in that exercise (chapter 2, exercise 9.3) in Aluffi's book. --- To answer your question (the fourth bullet in that exercise of Aluffi's book): If we have a right-action o...
53,974,212
Sorry I'm new to web server. I want to deploy a cloud server for user data: 1. User can login using web, with verification code sent to user's phone. 2. User can manipulate his data (add/modify/remove) when login. 3. Android/iPhone client can manipulate user data when login. 4. Server should have a database for storag...
2018/12/29
['https://Stackoverflow.com/questions/53974212', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/721441/']
A way around this issue is to stop VS Code from redundantly printing to the `TERMINAL` during debugging in the first place. Since it prints to the `DEBUG CONSOLE` as well, you can use that instead. Change `console` to ~~`"none"`~~ `"internalConsole"` in each configuration in your project's `launch.json` file: ``` "c...
Adding `"args": ["&&", "exit"],` to `launch.json` remedies this for Git Bash. Certainly a hack, but I no longer have to manually close many debug terminals.
53,974,212
Sorry I'm new to web server. I want to deploy a cloud server for user data: 1. User can login using web, with verification code sent to user's phone. 2. User can manipulate his data (add/modify/remove) when login. 3. Android/iPhone client can manipulate user data when login. 4. Server should have a database for storag...
2018/12/29
['https://Stackoverflow.com/questions/53974212', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/721441/']
A way around this issue is to stop VS Code from redundantly printing to the `TERMINAL` during debugging in the first place. Since it prints to the `DEBUG CONSOLE` as well, you can use that instead. Change `console` to ~~`"none"`~~ `"internalConsole"` in each configuration in your project's `launch.json` file: ``` "c...
Actually you can **delete** all the instances of the **terminal** just by clicking on the **trash can icon** . If it does not work for the first time, **restart** the **VS Code** and try again.
53,974,212
Sorry I'm new to web server. I want to deploy a cloud server for user data: 1. User can login using web, with verification code sent to user's phone. 2. User can manipulate his data (add/modify/remove) when login. 3. Android/iPhone client can manipulate user data when login. 4. Server should have a database for storag...
2018/12/29
['https://Stackoverflow.com/questions/53974212', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/721441/']
A way around this issue is to stop VS Code from redundantly printing to the `TERMINAL` during debugging in the first place. Since it prints to the `DEBUG CONSOLE` as well, you can use that instead. Change `console` to ~~`"none"`~~ `"internalConsole"` in each configuration in your project's `launch.json` file: ``` "c...
Hopefully fixed in the Insiders Build and should be in v1.54. See [Debug opens a new integrated terminal for each Python session](https://github.com/microsoft/vscode/issues/112055). Test it in the Insiders Build if you can and report at the issue if it fixed/did not fix.
53,974,212
Sorry I'm new to web server. I want to deploy a cloud server for user data: 1. User can login using web, with verification code sent to user's phone. 2. User can manipulate his data (add/modify/remove) when login. 3. Android/iPhone client can manipulate user data when login. 4. Server should have a database for storag...
2018/12/29
['https://Stackoverflow.com/questions/53974212', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/721441/']
A way around this issue is to stop VS Code from redundantly printing to the `TERMINAL` during debugging in the first place. Since it prints to the `DEBUG CONSOLE` as well, you can use that instead. Change `console` to ~~`"none"`~~ `"internalConsole"` in each configuration in your project's `launch.json` file: ``` "c...
This may have been resolved in recent debug updates to core VS Code within the last year (as of 8/2022), but I was still seeing this intermittently. I don't know if this will help the original poster, but I discovered that for me the issue persisted due to using Git Bash as the default terminal in Windows. Switching t...
53,974,212
Sorry I'm new to web server. I want to deploy a cloud server for user data: 1. User can login using web, with verification code sent to user's phone. 2. User can manipulate his data (add/modify/remove) when login. 3. Android/iPhone client can manipulate user data when login. 4. Server should have a database for storag...
2018/12/29
['https://Stackoverflow.com/questions/53974212', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/721441/']
Adding `"args": ["&&", "exit"],` to `launch.json` remedies this for Git Bash. Certainly a hack, but I no longer have to manually close many debug terminals.
Actually you can **delete** all the instances of the **terminal** just by clicking on the **trash can icon** . If it does not work for the first time, **restart** the **VS Code** and try again.
53,974,212
Sorry I'm new to web server. I want to deploy a cloud server for user data: 1. User can login using web, with verification code sent to user's phone. 2. User can manipulate his data (add/modify/remove) when login. 3. Android/iPhone client can manipulate user data when login. 4. Server should have a database for storag...
2018/12/29
['https://Stackoverflow.com/questions/53974212', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/721441/']
Adding `"args": ["&&", "exit"],` to `launch.json` remedies this for Git Bash. Certainly a hack, but I no longer have to manually close many debug terminals.
Hopefully fixed in the Insiders Build and should be in v1.54. See [Debug opens a new integrated terminal for each Python session](https://github.com/microsoft/vscode/issues/112055). Test it in the Insiders Build if you can and report at the issue if it fixed/did not fix.
53,974,212
Sorry I'm new to web server. I want to deploy a cloud server for user data: 1. User can login using web, with verification code sent to user's phone. 2. User can manipulate his data (add/modify/remove) when login. 3. Android/iPhone client can manipulate user data when login. 4. Server should have a database for storag...
2018/12/29
['https://Stackoverflow.com/questions/53974212', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/721441/']
Adding `"args": ["&&", "exit"],` to `launch.json` remedies this for Git Bash. Certainly a hack, but I no longer have to manually close many debug terminals.
This may have been resolved in recent debug updates to core VS Code within the last year (as of 8/2022), but I was still seeing this intermittently. I don't know if this will help the original poster, but I discovered that for me the issue persisted due to using Git Bash as the default terminal in Windows. Switching t...
53,974,212
Sorry I'm new to web server. I want to deploy a cloud server for user data: 1. User can login using web, with verification code sent to user's phone. 2. User can manipulate his data (add/modify/remove) when login. 3. Android/iPhone client can manipulate user data when login. 4. Server should have a database for storag...
2018/12/29
['https://Stackoverflow.com/questions/53974212', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/721441/']
This may have been resolved in recent debug updates to core VS Code within the last year (as of 8/2022), but I was still seeing this intermittently. I don't know if this will help the original poster, but I discovered that for me the issue persisted due to using Git Bash as the default terminal in Windows. Switching t...
Actually you can **delete** all the instances of the **terminal** just by clicking on the **trash can icon** . If it does not work for the first time, **restart** the **VS Code** and try again.
53,974,212
Sorry I'm new to web server. I want to deploy a cloud server for user data: 1. User can login using web, with verification code sent to user's phone. 2. User can manipulate his data (add/modify/remove) when login. 3. Android/iPhone client can manipulate user data when login. 4. Server should have a database for storag...
2018/12/29
['https://Stackoverflow.com/questions/53974212', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/721441/']
This may have been resolved in recent debug updates to core VS Code within the last year (as of 8/2022), but I was still seeing this intermittently. I don't know if this will help the original poster, but I discovered that for me the issue persisted due to using Git Bash as the default terminal in Windows. Switching t...
Hopefully fixed in the Insiders Build and should be in v1.54. See [Debug opens a new integrated terminal for each Python session](https://github.com/microsoft/vscode/issues/112055). Test it in the Insiders Build if you can and report at the issue if it fixed/did not fix.
8,841,575
I thought I could do it with the 'fs' module, but i couldnt find the right function.
2012/01/12
['https://Stackoverflow.com/questions/8841575', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/1087995/']
``` fs = require('fs'); fs.exists(path, function( exists ) { console.log( ( exists ? "File is there" : "File is not there" ) ); }); ```
See the [documentation for the `fs` module](http://nodejs.org/docs/latest/api/fs.html), in particular the "`stat`" family of functions (stat, fstat, lstat, statSync, fstatSync, lstatSync).
32,977
I recently visited the Colosseum in Rome, where a tour guide explained about the different seating sections for the elite (senators and the like), nobles, ordinary citizens, and slaves/women. He also talked about the 80 different gates and said that entry "tickets" were numbered by gate. I later found discussion of all...
2016/09/23
['https://history.stackexchange.com/questions/32977', 'https://history.stackexchange.com', 'https://history.stackexchange.com/users/2551/']
I have always understood they were free, paid for by the rich elite to woo/placate the general populace - hence the phrase "bread and circuses". According to the Wikipedia article you cite, the various levels were based on rank, not price. And IIRC, women were relegated to the topmost tier in case they got too... frien...
Many (maybe even most) events were free entrance, the entire cost covered by the sponsors (usually politicians, emperors, generals seeking influence, sometimes merchants). Seating was assigned based on social status rather than how much one could pay, the better seats going to the higher ranking members of society (...
32,977
I recently visited the Colosseum in Rome, where a tour guide explained about the different seating sections for the elite (senators and the like), nobles, ordinary citizens, and slaves/women. He also talked about the 80 different gates and said that entry "tickets" were numbered by gate. I later found discussion of all...
2016/09/23
['https://history.stackexchange.com/questions/32977', 'https://history.stackexchange.com', 'https://history.stackexchange.com/users/2551/']
**SHORT ANSWER** 1. Entrance to the Colosseum was most likely free. 2. Spectators were sometimes given free food and gifts. 3. Tickets were probably distributed through patronage and / or were obtained through membership of a club or society. 4. Tickets had seat numbers. Seating was according to social status. --- *...
I have always understood they were free, paid for by the rich elite to woo/placate the general populace - hence the phrase "bread and circuses". According to the Wikipedia article you cite, the various levels were based on rank, not price. And IIRC, women were relegated to the topmost tier in case they got too... frien...
32,977
I recently visited the Colosseum in Rome, where a tour guide explained about the different seating sections for the elite (senators and the like), nobles, ordinary citizens, and slaves/women. He also talked about the 80 different gates and said that entry "tickets" were numbered by gate. I later found discussion of all...
2016/09/23
['https://history.stackexchange.com/questions/32977', 'https://history.stackexchange.com', 'https://history.stackexchange.com/users/2551/']
**SHORT ANSWER** 1. Entrance to the Colosseum was most likely free. 2. Spectators were sometimes given free food and gifts. 3. Tickets were probably distributed through patronage and / or were obtained through membership of a club or society. 4. Tickets had seat numbers. Seating was according to social status. --- *...
Many (maybe even most) events were free entrance, the entire cost covered by the sponsors (usually politicians, emperors, generals seeking influence, sometimes merchants). Seating was assigned based on social status rather than how much one could pay, the better seats going to the higher ranking members of society (...
3,449,465
I work in Linux. In Linux with stat function, we can extract the permissions of a file. Similarly how can we extract the permissions of a file in windows. \_stat function in msdn states that permission bits are set in the stat buffer. But it does not give how to extract them. <http://msdn.microsoft.com/en-us/libra...
2010/08/10
['https://Stackoverflow.com/questions/3449465', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/266836/']
Windows uses an ACL (Access Control List) to control access to a file (or other kernel object). You can get the ACL for a file with [`GetFileSecurity`](http://msdn.microsoft.com/en-us/library/aa446639(VS.85).aspx) (you want the DACL, not the SACL). You can then get the actual permissions (rights) from that with [`GetEf...
I read in the link you provided that among others, file permissions as implemented in `_stat` and friends are UNIX specific and are left unused for NTFS, FAT and other Windows filesystems. I think you will have more luck reading file permissions using the classic [FindFirstFile](http://msdn.microsoft.com/en-us/library...
3,449,465
I work in Linux. In Linux with stat function, we can extract the permissions of a file. Similarly how can we extract the permissions of a file in windows. \_stat function in msdn states that permission bits are set in the stat buffer. But it does not give how to extract them. <http://msdn.microsoft.com/en-us/libra...
2010/08/10
['https://Stackoverflow.com/questions/3449465', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/266836/']
The struct stat structure does *not* contain any file permission info on Windows. Windows security is far more convoluted, you'd need GetFileSecurity() to retrieve the DACL for the file. That's rarely done in a Windows program, you'd typically let Windows evaluate the effective permissions and deal with the "you can't ...
I read in the link you provided that among others, file permissions as implemented in `_stat` and friends are UNIX specific and are left unused for NTFS, FAT and other Windows filesystems. I think you will have more luck reading file permissions using the classic [FindFirstFile](http://msdn.microsoft.com/en-us/library...
3,449,465
I work in Linux. In Linux with stat function, we can extract the permissions of a file. Similarly how can we extract the permissions of a file in windows. \_stat function in msdn states that permission bits are set in the stat buffer. But it does not give how to extract them. <http://msdn.microsoft.com/en-us/libra...
2010/08/10
['https://Stackoverflow.com/questions/3449465', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/266836/']
Windows uses an ACL (Access Control List) to control access to a file (or other kernel object). You can get the ACL for a file with [`GetFileSecurity`](http://msdn.microsoft.com/en-us/library/aa446639(VS.85).aspx) (you want the DACL, not the SACL). You can then get the actual permissions (rights) from that with [`GetEf...
MSDN doesn't have nearly as many hyperlinks as it should, you need to search a little to find [`_stat` Structure `st_mode` Field Constants](http://msdn.microsoft.com/en-us/library/3kyc8381.aspx). On both Unix and Windows, you only get the basic permissions of a file, not its access control lists. Since Windows uses AC...
3,449,465
I work in Linux. In Linux with stat function, we can extract the permissions of a file. Similarly how can we extract the permissions of a file in windows. \_stat function in msdn states that permission bits are set in the stat buffer. But it does not give how to extract them. <http://msdn.microsoft.com/en-us/libra...
2010/08/10
['https://Stackoverflow.com/questions/3449465', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/266836/']
The struct stat structure does *not* contain any file permission info on Windows. Windows security is far more convoluted, you'd need GetFileSecurity() to retrieve the DACL for the file. That's rarely done in a Windows program, you'd typically let Windows evaluate the effective permissions and deal with the "you can't ...
MSDN doesn't have nearly as many hyperlinks as it should, you need to search a little to find [`_stat` Structure `st_mode` Field Constants](http://msdn.microsoft.com/en-us/library/3kyc8381.aspx). On both Unix and Windows, you only get the basic permissions of a file, not its access control lists. Since Windows uses AC...
2,527,451
> > Let $x,y,z$ are non zero integers satisfying the system of equations $x+y+z=3$ and $x^3+y^3+z^3=3$ then find solution triplets (all) of $(x,y,z)$. > > > I tried using: $$x^3+y^3+z^3-3xyz=(x+y+z)(x^2+y^2+z^2-xy-yz-zx)$$ but didn't concluded something good, please help to begin with this, in write direction.
2017/11/19
['https://math.stackexchange.com/questions/2527451', 'https://math.stackexchange.com', 'https://math.stackexchange.com/users/281534/']
The hint: $$27=(x+y+z)^3=x^3+y^3+z^3+3(x+y)(x+z)(y+z)=3+3(x+y)(x+z)(y+z),$$ which gives $$(x+y)(x+z)(y+z)=8$$ and number of cases: $$x+y\in\{\pm1,\pm2\pm4\pm8\}$$
$x+y+z=x^3+y^3+z^3=3$ The solution set for $(x+y)$ in above equation given by Michael Rozenberg is shown below $(x+y)\in\{\pm1,\pm2\pm4\pm8\}$ The above solution implies that $(x,y,z)$ can only have the below mentioned integer solutions; $(x,y,z)= (4,4,-5),(-5,4,4),(4,-5,4),(1,1,1)$
20,821,730
``` #coding=utf-8 import wx class App(wx.App): def OnInit(self): frame=wx.Frame(parent=None,title='Bare') frame.Show() return Ture app=App() app.MainLoop() ``` runs OK! but the GUI interface is fleeting, just leaving the CMD console in the screen. a newer for python ,why the outcome of th...
2013/12/29
['https://Stackoverflow.com/questions/20821730', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/3143152/']
First, according to `help :!` command of `vim`: > > `:!{cmd}` Execute {cmd} with **the shell**. > > > `vim` cause the cmd shell to be executed. Second, according to [Using Python on Windows - Executing scripts](http://docs.python.org/2/using/windows.html#executing-scripts): > > Python scripts (files with the e...
It is fleeting because you have a NameError in your code. You should be returning True, not Ture, which is undefined. I am surprised you still see the console window though. If that stays up though, it should be showing the traceback.
90,738
I am trying to compile oclvanitygen because I have an Nvidia GTX 1080 that would most likely be helpful for this. I'm using the Windows Subsystem for Linux with Ubuntu 18.04. I tried this command: `gcc oclvanitygen.o oclengine.o pattern.o util.o -o oclvanitygen -ggdb -O3 -Wall -L/usr/lib/x86_64-linux-gnu/ -lpcre -lcry...
2019/09/30
['https://bitcoin.stackexchange.com/questions/90738', 'https://bitcoin.stackexchange.com', 'https://bitcoin.stackexchange.com/users/68755/']
You can reduce storage requirements by running Bitcoin-core in pruning mode * [How can I run bitcoind in pruning mode?](https://bitcoin.stackexchange.com/q/37496/13866)
The cheapest configuration consists from RPi3 or its copy Opange Pi equipped with SATA shield for external HDD. I've used my old HDD which left after laptop upgrade with SSD. I bought extension shield with metal case so everything is assembled together and the case has a fan. This hardware is working for almost two ...
90,738
I am trying to compile oclvanitygen because I have an Nvidia GTX 1080 that would most likely be helpful for this. I'm using the Windows Subsystem for Linux with Ubuntu 18.04. I tried this command: `gcc oclvanitygen.o oclengine.o pattern.o util.o -o oclvanitygen -ggdb -O3 -Wall -L/usr/lib/x86_64-linux-gnu/ -lpcre -lcry...
2019/09/30
['https://bitcoin.stackexchange.com/questions/90738', 'https://bitcoin.stackexchange.com', 'https://bitcoin.stackexchange.com/users/68755/']
Please do NOT run bitcoind on a remote server (I'm assuming cloud). This defeats the whole purpose of a decentralized network, not to mention privacy of being able to check your balances or broadcasting your transactions. Your cloud provider can always keep your ssh logs and any activity you perform on that server. A ...
You can reduce storage requirements by running Bitcoin-core in pruning mode * [How can I run bitcoind in pruning mode?](https://bitcoin.stackexchange.com/q/37496/13866)
90,738
I am trying to compile oclvanitygen because I have an Nvidia GTX 1080 that would most likely be helpful for this. I'm using the Windows Subsystem for Linux with Ubuntu 18.04. I tried this command: `gcc oclvanitygen.o oclengine.o pattern.o util.o -o oclvanitygen -ggdb -O3 -Wall -L/usr/lib/x86_64-linux-gnu/ -lpcre -lcry...
2019/09/30
['https://bitcoin.stackexchange.com/questions/90738', 'https://bitcoin.stackexchange.com', 'https://bitcoin.stackexchange.com/users/68755/']
You can run it locally in prune mode like @redgrittybrick suggested, or you can look into renting a cloud server. For example yesterday I created an AWS EC2 instance with extra storage and I played around with geth to deploy some smart contracts to testnet. You can do the same with bitcoind etc. You will connect to t...
The cheapest configuration consists from RPi3 or its copy Opange Pi equipped with SATA shield for external HDD. I've used my old HDD which left after laptop upgrade with SSD. I bought extension shield with metal case so everything is assembled together and the case has a fan. This hardware is working for almost two ...
90,738
I am trying to compile oclvanitygen because I have an Nvidia GTX 1080 that would most likely be helpful for this. I'm using the Windows Subsystem for Linux with Ubuntu 18.04. I tried this command: `gcc oclvanitygen.o oclengine.o pattern.o util.o -o oclvanitygen -ggdb -O3 -Wall -L/usr/lib/x86_64-linux-gnu/ -lpcre -lcry...
2019/09/30
['https://bitcoin.stackexchange.com/questions/90738', 'https://bitcoin.stackexchange.com', 'https://bitcoin.stackexchange.com/users/68755/']
Please do NOT run bitcoind on a remote server (I'm assuming cloud). This defeats the whole purpose of a decentralized network, not to mention privacy of being able to check your balances or broadcasting your transactions. Your cloud provider can always keep your ssh logs and any activity you perform on that server. A ...
You can run it locally in prune mode like @redgrittybrick suggested, or you can look into renting a cloud server. For example yesterday I created an AWS EC2 instance with extra storage and I played around with geth to deploy some smart contracts to testnet. You can do the same with bitcoind etc. You will connect to t...
90,738
I am trying to compile oclvanitygen because I have an Nvidia GTX 1080 that would most likely be helpful for this. I'm using the Windows Subsystem for Linux with Ubuntu 18.04. I tried this command: `gcc oclvanitygen.o oclengine.o pattern.o util.o -o oclvanitygen -ggdb -O3 -Wall -L/usr/lib/x86_64-linux-gnu/ -lpcre -lcry...
2019/09/30
['https://bitcoin.stackexchange.com/questions/90738', 'https://bitcoin.stackexchange.com', 'https://bitcoin.stackexchange.com/users/68755/']
Please do NOT run bitcoind on a remote server (I'm assuming cloud). This defeats the whole purpose of a decentralized network, not to mention privacy of being able to check your balances or broadcasting your transactions. Your cloud provider can always keep your ssh logs and any activity you perform on that server. A ...
The cheapest configuration consists from RPi3 or its copy Opange Pi equipped with SATA shield for external HDD. I've used my old HDD which left after laptop upgrade with SSD. I bought extension shield with metal case so everything is assembled together and the case has a fan. This hardware is working for almost two ...
219,984
Let $C$ be a (very) general genus 1 curve embedded in $\mathbb{CP}^1\times \mathbb{CP}^1$ as a (2,2)-divisor. Each projection defines $C$ as a double cover of $\mathbb{CP}^1$ and induces an involution $\tau\_i:C\to C$. Let $G\simeq \mathbb Z/2 \* \mathbb Z/2$ be the subgroup of $Aut(C)$ generated by these. Note that ...
2015/10/04
['https://mathoverflow.net/questions/219984', 'https://mathoverflow.net', 'https://mathoverflow.net/users/68722/']
No. Letting $\sigma$ and $\tau$ denote the two involutions, $\sigma \circ \tau$ is a translation by an element of $\mathrm{Pic}^0(C)$. In general, this translation will not be torsion, so its orbit through any point is infinite. (In fact, if the translation IS torsion, then $G$ is a finite dihedral group, not $\mathbb{...
Regarding K3 surfaces in $\mathbb P^1\times\mathbb P^1\times\mathbb P^1$, you might find the following two articles relevant. (Also forward trace them as references for further articles.) 1. Baragar, A. Rational points on K3 surfaces in $\mathbb P^1\times\mathbb P^1\times\mathbb P^1$. *Math. Ann.* **305** (1996), no....
4,343,329
While studying Stirling numbers of the second kind the following formula for $n!$ suddenly popped up! $$n! = (-1)^n \sum\_{i=1}^n (-1)^i\binom{n}{i} i^n $$ I was curious if I could find a "direct" proof, i.e. not involving Stirling numbers, but after trying different approaches, f.i. induction, I was stuck. So a hint...
2021/12/27
['https://math.stackexchange.com/questions/4343329', 'https://math.stackexchange.com', 'https://math.stackexchange.com/users/392000/']
Here is some insight for you. Consider a partially ordered set $S$ which has all meets. We will prove that $S$ has all joins. Let us consider some indexed collection $\{s\_i \in S\}\_{i \in I}$. Let $J = \{x \in S \mid \forall i \in I (s\_i \leq x)\}$. I claim that $\bigwedge J$ is the join of $s$. Indeed, we first ...
I found an alternative way to define the join. I would still like insight on the original question and/or a relationship to what follows. Let $A = \{ K \in H' \ | \ \underset{\alpha \in \mathcal{J}}{\bigcup} I\_{\alpha} \subseteq K \}$ that is $A$ is the set of complete ideals containing the union. Now clearly, $A$ is...
73,481,572
I have converted the timestamp `4/1/2021 00:00` into the format `Thu Apr 01 2021 00:00:00 GMT-0500 (Central Daylight Time)` as shown in the code below. However, adding 30 days is not giving me appropriate result. ```js //Handling Date String: 4/1/2021 00:00 function setStart(input) { if (!(input instanceof D...
2022/08/25
['https://Stackoverflow.com/questions/73481572', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/2271895/']
You want to get the date after 30 days from the initialDate, don't you? refer this ```js var date = new Date(initialDate); // Now //date.setDate(date.getDate() + 30); // Set now + 30 days as the new date date.setDate(date.getDate() + 30); console.log("Printing date after adding 30 days below") console.log(date); `...
You should something like ```js var date = new Date().getTime(); // Now const offset = 30*23*3600*1000; const newDate = new Date(date+offset).toLocaleString('en-US', {timeZone: 'CST'}); // Change added console.log("Printing date after adding 30 days below") console.log(newDate); ```
12,467,901
I am using soapUI for testing a REST web service. Is there a way to attach a file with the other parameters in a multipart request? I see the attachment tab in the panel but I cannot give that attachment a parameter name so that server can identify. It's not helping.
2012/09/17
['https://Stackoverflow.com/questions/12467901', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/957081/']
I found it but forgot to post it here. It was not so intuitive. 1. In your REST Request if you can see an attachment tab, open it and add and attachment with + button. The Name of that file would show full path. e.g. `C:\temp\my-file.csv` 2. In you parameters tab, add a parameter and give it a name. The value of that...
select mediatype as application/json and then add the json string to that. It will go to server as payload. Usually this request is of POST or PUT type
15,126,798
I have a form where I want people to put in their year of birth. You can only apply if you are over 18 so in the year of birth field I want the min age to be 18. I have done this as shown below however I want to sort the numbers from latest year at the top and oldest year at the bottom. currently I show 1913 first, but...
2013/02/28
['https://Stackoverflow.com/questions/15126798', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/737114/']
As [Nile mentioned](https://stackoverflow.com/questions/15126798/js-for-loop-sort-numbers/15126843#comment21290540_15126798), ``` var d = new Date(); var y = d.getFullYear(); var selectList = "<select>"; for (var x = y-18; x >= y-100; x--) { selectList += "<option>" + x + "</option>"; } selectList += "</select>"; ...
try this ``` <script> var d = new Date(); var y = d.getFullYear(); var selectList = "<select>"; for (var x = y-18; x > y - 100; x--) { selectList += "<option>" + x + "</option>"; } selectList += "</select>"; $('#my-container').html(selectList); </script> ```
15,126,798
I have a form where I want people to put in their year of birth. You can only apply if you are over 18 so in the year of birth field I want the min age to be 18. I have done this as shown below however I want to sort the numbers from latest year at the top and oldest year at the bottom. currently I show 1913 first, but...
2013/02/28
['https://Stackoverflow.com/questions/15126798', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/737114/']
try this ``` <script> var d = new Date(); var y = d.getFullYear(); var selectList = "<select>"; for (var x = y-18; x > y - 100; x--) { selectList += "<option>" + x + "</option>"; } selectList += "</select>"; $('#my-container').html(selectList); </script> ```
``` <script> $( document ).ready( function() { var d = new Date(); var y = d.getFullYear(); var selectList = "<select>"; for (var x = (y-18); x >= (y - 100); x--) { selectList += "<option>" + x + "</option>"; } selectList += "</select>"; $('#my-container').html(selectList); });...
15,126,798
I have a form where I want people to put in their year of birth. You can only apply if you are over 18 so in the year of birth field I want the min age to be 18. I have done this as shown below however I want to sort the numbers from latest year at the top and oldest year at the bottom. currently I show 1913 first, but...
2013/02/28
['https://Stackoverflow.com/questions/15126798', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/737114/']
As [Nile mentioned](https://stackoverflow.com/questions/15126798/js-for-loop-sort-numbers/15126843#comment21290540_15126798), ``` var d = new Date(); var y = d.getFullYear(); var selectList = "<select>"; for (var x = y-18; x >= y-100; x--) { selectList += "<option>" + x + "</option>"; } selectList += "</select>"; ...
``` <script> $( document ).ready( function() { var d = new Date(); var y = d.getFullYear(); var selectList = "<select>"; for (var x = (y-18); x >= (y - 100); x--) { selectList += "<option>" + x + "</option>"; } selectList += "</select>"; $('#my-container').html(selectList); });...
70,289,554
It's just a theoretical question. Is there a way to run the docker but only run one specific script without changing the Dockerfile? Maybe with the `docker run [container]` command? **Dockerfile:** ``` FROM python:3.8 ADD main1.py ADD main2.py ADD main3.py ADD main4.py ADD main5.py ``` **Theoretical Command:** `d...
2021/12/09
['https://Stackoverflow.com/questions/70289554', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/17496765/']
There is nothing "theoretical" about this. Docker copies into place the files, and if they are working executables, you can execute them with `docker run image executable` ... but * it requires the files to be properly executable (or you will need to explicitly say `docker run image python executable` to run a Python ...
In the specific case of a Python application, the standard Python [setuptools](https://setuptools.pypa.io/en/latest/) package has some functionality that can simplify this. In your application's `setup.cfg` file you can declare [entry points](https://setuptools.pypa.io/en/latest/userguide/entry_point.html) (different ...
6,028,128
How do I rotate text in css to get following output: ![enter image description here](https://i.stack.imgur.com/Kcbot.jpg)hi, Edit: Thanks for quick suggestion. I have added my sample code in jsfidle: <http://jsfiddle.net/koolkabin/yawYM/> HTML: ``` <div class="mainWrapper"> <div class="rotateObj"> <di...
2011/05/17
['https://Stackoverflow.com/questions/6028128', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/178301/']
In your case, it's the best to use rotate option from transform property as mentioned before. There is also `writing-mode` property and it works like rotate(90deg) so in your case, it should be rotated after it's applied. Even it's not the right solution in this case but you should be aware of this property. Example:...
I guess [this](http://snook.ca/archives/html_and_css/css-text-rotation) is what you are looking for? Added an example: The html: ``` <div class="example-date"> <span class="day">31</span> <span class="month">July</span> <span class="year">2009</span> </div> ``` The css: ``` .year { display:block; ...
6,028,128
How do I rotate text in css to get following output: ![enter image description here](https://i.stack.imgur.com/Kcbot.jpg)hi, Edit: Thanks for quick suggestion. I have added my sample code in jsfidle: <http://jsfiddle.net/koolkabin/yawYM/> HTML: ``` <div class="mainWrapper"> <div class="rotateObj"> <di...
2011/05/17
['https://Stackoverflow.com/questions/6028128', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/178301/']
I guess [this](http://snook.ca/archives/html_and_css/css-text-rotation) is what you are looking for? Added an example: The html: ``` <div class="example-date"> <span class="day">31</span> <span class="month">July</span> <span class="year">2009</span> </div> ``` The css: ``` .year { display:block; ...
Using `writing-mode` and `transform`. ``` .rotate { writing-mode: vertical-lr; -webkit-transform: rotate(-180deg); -moz-transform: rotate(-180deg); } <span class="rotate">Hello</span> ```
6,028,128
How do I rotate text in css to get following output: ![enter image description here](https://i.stack.imgur.com/Kcbot.jpg)hi, Edit: Thanks for quick suggestion. I have added my sample code in jsfidle: <http://jsfiddle.net/koolkabin/yawYM/> HTML: ``` <div class="mainWrapper"> <div class="rotateObj"> <di...
2011/05/17
['https://Stackoverflow.com/questions/6028128', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/178301/']
I guess [this](http://snook.ca/archives/html_and_css/css-text-rotation) is what you are looking for? Added an example: The html: ``` <div class="example-date"> <span class="day">31</span> <span class="month">July</span> <span class="year">2009</span> </div> ``` The css: ``` .year { display:block; ...
You can use like this... ``` <div id="rot">hello</div> #rot { -webkit-transform: rotate(-90deg); -moz-transform: rotate(-90deg); width:100px; } ``` Have a look at this fiddle:<http://jsfiddle.net/anish/MAN4g/>
6,028,128
How do I rotate text in css to get following output: ![enter image description here](https://i.stack.imgur.com/Kcbot.jpg)hi, Edit: Thanks for quick suggestion. I have added my sample code in jsfidle: <http://jsfiddle.net/koolkabin/yawYM/> HTML: ``` <div class="mainWrapper"> <div class="rotateObj"> <di...
2011/05/17
['https://Stackoverflow.com/questions/6028128', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/178301/']
In your case, it's the best to use rotate option from transform property as mentioned before. There is also `writing-mode` property and it works like rotate(90deg) so in your case, it should be rotated after it's applied. Even it's not the right solution in this case but you should be aware of this property. Example:...
Using `writing-mode` and `transform`. ``` .rotate { writing-mode: vertical-lr; -webkit-transform: rotate(-180deg); -moz-transform: rotate(-180deg); } <span class="rotate">Hello</span> ```
6,028,128
How do I rotate text in css to get following output: ![enter image description here](https://i.stack.imgur.com/Kcbot.jpg)hi, Edit: Thanks for quick suggestion. I have added my sample code in jsfidle: <http://jsfiddle.net/koolkabin/yawYM/> HTML: ``` <div class="mainWrapper"> <div class="rotateObj"> <di...
2011/05/17
['https://Stackoverflow.com/questions/6028128', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/178301/']
You need to use the CSS3 [transform property](http://www.w3.org/TR/css3-2d-transforms/#transform-property) `rotate` - [see here](http://caniuse.com/#search=rotate) for which browsers support it and the prefix you need to use. One example for webkit browsers is `-webkit-transform: rotate(-90deg);` **Edit:** The questi...
Using `writing-mode` and `transform`. ``` .rotate { writing-mode: vertical-lr; -webkit-transform: rotate(-180deg); -moz-transform: rotate(-180deg); } <span class="rotate">Hello</span> ```
6,028,128
How do I rotate text in css to get following output: ![enter image description here](https://i.stack.imgur.com/Kcbot.jpg)hi, Edit: Thanks for quick suggestion. I have added my sample code in jsfidle: <http://jsfiddle.net/koolkabin/yawYM/> HTML: ``` <div class="mainWrapper"> <div class="rotateObj"> <di...
2011/05/17
['https://Stackoverflow.com/questions/6028128', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/178301/']
I guess [this](http://snook.ca/archives/html_and_css/css-text-rotation) is what you are looking for? Added an example: The html: ``` <div class="example-date"> <span class="day">31</span> <span class="month">July</span> <span class="year">2009</span> </div> ``` The css: ``` .year { display:block; ...
[![enter image description here](https://i.stack.imgur.com/upf5W.png)](https://i.stack.imgur.com/upf5W.png) also you can ``` <div style="position:relative;display:block; height:125px;width:300px;"> <div class="status"> <div class="inner-point"> <div class="inner nowrap"> Some t...
6,028,128
How do I rotate text in css to get following output: ![enter image description here](https://i.stack.imgur.com/Kcbot.jpg)hi, Edit: Thanks for quick suggestion. I have added my sample code in jsfidle: <http://jsfiddle.net/koolkabin/yawYM/> HTML: ``` <div class="mainWrapper"> <div class="rotateObj"> <di...
2011/05/17
['https://Stackoverflow.com/questions/6028128', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/178301/']
You need to use the CSS3 [transform property](http://www.w3.org/TR/css3-2d-transforms/#transform-property) `rotate` - [see here](http://caniuse.com/#search=rotate) for which browsers support it and the prefix you need to use. One example for webkit browsers is `-webkit-transform: rotate(-90deg);` **Edit:** The questi...
[![enter image description here](https://i.stack.imgur.com/upf5W.png)](https://i.stack.imgur.com/upf5W.png) also you can ``` <div style="position:relative;display:block; height:125px;width:300px;"> <div class="status"> <div class="inner-point"> <div class="inner nowrap"> Some t...
6,028,128
How do I rotate text in css to get following output: ![enter image description here](https://i.stack.imgur.com/Kcbot.jpg)hi, Edit: Thanks for quick suggestion. I have added my sample code in jsfidle: <http://jsfiddle.net/koolkabin/yawYM/> HTML: ``` <div class="mainWrapper"> <div class="rotateObj"> <di...
2011/05/17
['https://Stackoverflow.com/questions/6028128', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/178301/']
Using `writing-mode` and `transform`. ``` .rotate { writing-mode: vertical-lr; -webkit-transform: rotate(-180deg); -moz-transform: rotate(-180deg); } <span class="rotate">Hello</span> ```
[![enter image description here](https://i.stack.imgur.com/upf5W.png)](https://i.stack.imgur.com/upf5W.png) also you can ``` <div style="position:relative;display:block; height:125px;width:300px;"> <div class="status"> <div class="inner-point"> <div class="inner nowrap"> Some t...
6,028,128
How do I rotate text in css to get following output: ![enter image description here](https://i.stack.imgur.com/Kcbot.jpg)hi, Edit: Thanks for quick suggestion. I have added my sample code in jsfidle: <http://jsfiddle.net/koolkabin/yawYM/> HTML: ``` <div class="mainWrapper"> <div class="rotateObj"> <di...
2011/05/17
['https://Stackoverflow.com/questions/6028128', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/178301/']
In your case, it's the best to use rotate option from transform property as mentioned before. There is also `writing-mode` property and it works like rotate(90deg) so in your case, it should be rotated after it's applied. Even it's not the right solution in this case but you should be aware of this property. Example:...
You can use like this... ``` <div id="rot">hello</div> #rot { -webkit-transform: rotate(-90deg); -moz-transform: rotate(-90deg); width:100px; } ``` Have a look at this fiddle:<http://jsfiddle.net/anish/MAN4g/>
6,028,128
How do I rotate text in css to get following output: ![enter image description here](https://i.stack.imgur.com/Kcbot.jpg)hi, Edit: Thanks for quick suggestion. I have added my sample code in jsfidle: <http://jsfiddle.net/koolkabin/yawYM/> HTML: ``` <div class="mainWrapper"> <div class="rotateObj"> <di...
2011/05/17
['https://Stackoverflow.com/questions/6028128', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/178301/']
You can use like this... ``` <div id="rot">hello</div> #rot { -webkit-transform: rotate(-90deg); -moz-transform: rotate(-90deg); width:100px; } ``` Have a look at this fiddle:<http://jsfiddle.net/anish/MAN4g/>
[![enter image description here](https://i.stack.imgur.com/upf5W.png)](https://i.stack.imgur.com/upf5W.png) also you can ``` <div style="position:relative;display:block; height:125px;width:300px;"> <div class="status"> <div class="inner-point"> <div class="inner nowrap"> Some t...
562,193
I want to make a Sallen & Key 2nd-Order Butterworth highpass filter with a defined gain. Let's say gain is +6 db. [![enter image description here](https://i.stack.imgur.com/EuwOs.png)](https://i.stack.imgur.com/EuwOs.png) Then, R3 = R4 = 1 kOhm F = 1000 Hz C = 100 nF R2 = 2 \* Q / ( 2 \* 3.14 \* F \* C ) Now, I ...
2021/04/26
['https://electronics.stackexchange.com/questions/562193', 'https://electronics.stackexchange.com', 'https://electronics.stackexchange.com/users/262542/']
Here's your diagram with some annotations: [![enter image description here](https://i.stack.imgur.com/t7JQnl.png)](https://i.stack.imgur.com/t7JQnl.png) (I'm not promising anything about stability here. This is a high pass filter with gain significantly greater than 1. So this is only an idealized analysis, by the nu...
> > First, I will present a method that uses [Mathematica](https://www.wolfram.com/mathematica) to solve this problem. When I was studying this stuff I used the method all the time (without using Mathematica of course). > > > Well, we are trying to analyze the following [opamp-circuit](https://en.wikipedia.org/wik...
562,193
I want to make a Sallen & Key 2nd-Order Butterworth highpass filter with a defined gain. Let's say gain is +6 db. [![enter image description here](https://i.stack.imgur.com/EuwOs.png)](https://i.stack.imgur.com/EuwOs.png) Then, R3 = R4 = 1 kOhm F = 1000 Hz C = 100 nF R2 = 2 \* Q / ( 2 \* 3.14 \* F \* C ) Now, I ...
2021/04/26
['https://electronics.stackexchange.com/questions/562193', 'https://electronics.stackexchange.com', 'https://electronics.stackexchange.com/users/262542/']
> > First, I will present a method that uses [Mathematica](https://www.wolfram.com/mathematica) to solve this problem. When I was studying this stuff I used the method all the time (without using Mathematica of course). > > > Well, we are trying to analyze the following [opamp-circuit](https://en.wikipedia.org/wik...
From "A handbook of Active Filters", by D.E. Johnson, et al., reference VCVS high-pass filter. This uses tables of coefficients for the various types of filters (butterworth, cheby, elliptic, ...). Warning, C is a coefficient, C1 are the capacitor values. For 2nd order butterworth coefficients: ``` B = sqrt(2) C = 1....
562,193
I want to make a Sallen & Key 2nd-Order Butterworth highpass filter with a defined gain. Let's say gain is +6 db. [![enter image description here](https://i.stack.imgur.com/EuwOs.png)](https://i.stack.imgur.com/EuwOs.png) Then, R3 = R4 = 1 kOhm F = 1000 Hz C = 100 nF R2 = 2 \* Q / ( 2 \* 3.14 \* F \* C ) Now, I ...
2021/04/26
['https://electronics.stackexchange.com/questions/562193', 'https://electronics.stackexchange.com', 'https://electronics.stackexchange.com/users/262542/']
Here's your diagram with some annotations: [![enter image description here](https://i.stack.imgur.com/t7JQnl.png)](https://i.stack.imgur.com/t7JQnl.png) (I'm not promising anything about stability here. This is a high pass filter with gain significantly greater than 1. So this is only an idealized analysis, by the nu...
From "A handbook of Active Filters", by D.E. Johnson, et al., reference VCVS high-pass filter. This uses tables of coefficients for the various types of filters (butterworth, cheby, elliptic, ...). Warning, C is a coefficient, C1 are the capacitor values. For 2nd order butterworth coefficients: ``` B = sqrt(2) C = 1....
562,193
I want to make a Sallen & Key 2nd-Order Butterworth highpass filter with a defined gain. Let's say gain is +6 db. [![enter image description here](https://i.stack.imgur.com/EuwOs.png)](https://i.stack.imgur.com/EuwOs.png) Then, R3 = R4 = 1 kOhm F = 1000 Hz C = 100 nF R2 = 2 \* Q / ( 2 \* 3.14 \* F \* C ) Now, I ...
2021/04/26
['https://electronics.stackexchange.com/questions/562193', 'https://electronics.stackexchange.com', 'https://electronics.stackexchange.com/users/262542/']
Here's your diagram with some annotations: [![enter image description here](https://i.stack.imgur.com/t7JQnl.png)](https://i.stack.imgur.com/t7JQnl.png) (I'm not promising anything about stability here. This is a high pass filter with gain significantly greater than 1. So this is only an idealized analysis, by the nu...
**Transfer function** for two **equal capacitors C** and gain **A=2**: H(s)=N(s)/D(s) with **N(s)=(s² \* 2 \* R1 \* R2 C²)** and **D(s)=[1+s(R1 \* 2C - R2 \* C) + s² \* R1 \* R2 \* C²]** From this (comparison with the general transfer function) with **k=R2/R1** Pole frequency **wp=1/[R1 \* C \* SQRT(k)]** and Pole...
562,193
I want to make a Sallen & Key 2nd-Order Butterworth highpass filter with a defined gain. Let's say gain is +6 db. [![enter image description here](https://i.stack.imgur.com/EuwOs.png)](https://i.stack.imgur.com/EuwOs.png) Then, R3 = R4 = 1 kOhm F = 1000 Hz C = 100 nF R2 = 2 \* Q / ( 2 \* 3.14 \* F \* C ) Now, I ...
2021/04/26
['https://electronics.stackexchange.com/questions/562193', 'https://electronics.stackexchange.com', 'https://electronics.stackexchange.com/users/262542/']
**Transfer function** for two **equal capacitors C** and gain **A=2**: H(s)=N(s)/D(s) with **N(s)=(s² \* 2 \* R1 \* R2 C²)** and **D(s)=[1+s(R1 \* 2C - R2 \* C) + s² \* R1 \* R2 \* C²]** From this (comparison with the general transfer function) with **k=R2/R1** Pole frequency **wp=1/[R1 \* C \* SQRT(k)]** and Pole...
From "A handbook of Active Filters", by D.E. Johnson, et al., reference VCVS high-pass filter. This uses tables of coefficients for the various types of filters (butterworth, cheby, elliptic, ...). Warning, C is a coefficient, C1 are the capacitor values. For 2nd order butterworth coefficients: ``` B = sqrt(2) C = 1....
76,845
Once the attacker finds an exploitable vulnerability in a user program, e.g., buffer overflow. Assume his goal is to gain root privilege and typical countermeasures are not present in the system (ASLR, NX, etc.). What are the general ways that an attacker can gain root privilege (in linux and windows)? EDIT 1: A si...
2014/12/25
['https://security.stackexchange.com/questions/76845', 'https://security.stackexchange.com', 'https://security.stackexchange.com/users/62118/']
There are many ways to get to root. You need to consider exploits which get you root, as well as those which get you access at a lower privilege in conjunction with a privilege escalation exploit. Generally what you need is an exploit in a service run as root, or another privileged account. As cremefraiche noted, you...
I think in real world case, the attacker would package a new vulnerability into a tool like Metasploit. That tool provides a full framework for gaining a presence on the target host and then escalating privileges.
76,845
Once the attacker finds an exploitable vulnerability in a user program, e.g., buffer overflow. Assume his goal is to gain root privilege and typical countermeasures are not present in the system (ASLR, NX, etc.). What are the general ways that an attacker can gain root privilege (in linux and windows)? EDIT 1: A si...
2014/12/25
['https://security.stackexchange.com/questions/76845', 'https://security.stackexchange.com', 'https://security.stackexchange.com/users/62118/']
There are many ways to get to root. You need to consider exploits which get you root, as well as those which get you access at a lower privilege in conjunction with a privilege escalation exploit. Generally what you need is an exploit in a service run as root, or another privileged account. As cremefraiche noted, you...
One way to gain the root privilege in Linux is to exploit a vulnerability in a set-root-uid program. Basically, a set-root-uid program allows an unprivileged user to do some tasks with the root privilege. An example of a set-root-uid program is the passwd program for password management. You can find a simple example w...
42,335
My boss (and, actually, his boss too, which is the company general director) are generally quite good. But it happens (seldom, but frequently enough) that they start to fiddle with the details: day to day chores that they should not do. Examples are: DB queries to extract data, scripts to parse excel files, even re-in...
2015/03/05
['https://workplace.stackexchange.com/questions/42335', 'https://workplace.stackexchange.com', 'https://workplace.stackexchange.com/users/7408/']
Is this actually a problem? =========================== I fairly recently had this exact experience. My manager was considerably more interested in doing day to day work than managerial duties, such as: * [Caring about resource management](https://workplace.stackexchange.com/q/9128/2322) * Effectively working with ot...
I'm kind of latching on to one idea that may not actually be relevant, but one thing you mentioned was the difficulty of giving up "getting my hands dirty". This could be true, or it could be that he just fails at delegating tasks once in a while. Various reasons could be at play for not delegating: * He's uncomfortab...
42,335
My boss (and, actually, his boss too, which is the company general director) are generally quite good. But it happens (seldom, but frequently enough) that they start to fiddle with the details: day to day chores that they should not do. Examples are: DB queries to extract data, scripts to parse excel files, even re-in...
2015/03/05
['https://workplace.stackexchange.com/questions/42335', 'https://workplace.stackexchange.com', 'https://workplace.stackexchange.com/users/7408/']
I'm kind of latching on to one idea that may not actually be relevant, but one thing you mentioned was the difficulty of giving up "getting my hands dirty". This could be true, or it could be that he just fails at delegating tasks once in a while. Various reasons could be at play for not delegating: * He's uncomfortab...
It isn't your place to do anything about this. Your manager will manage his time according to his boss and himself. If it's not affecting you then you shouldn't say anything. If it is affecting you, for example he hasn't made a decision on which way a project should go, politely ask him for a decision and state that ...
42,335
My boss (and, actually, his boss too, which is the company general director) are generally quite good. But it happens (seldom, but frequently enough) that they start to fiddle with the details: day to day chores that they should not do. Examples are: DB queries to extract data, scripts to parse excel files, even re-in...
2015/03/05
['https://workplace.stackexchange.com/questions/42335', 'https://workplace.stackexchange.com', 'https://workplace.stackexchange.com/users/7408/']
Is this actually a problem? =========================== I fairly recently had this exact experience. My manager was considerably more interested in doing day to day work than managerial duties, such as: * [Caring about resource management](https://workplace.stackexchange.com/q/9128/2322) * Effectively working with ot...
It isn't your place to do anything about this. Your manager will manage his time according to his boss and himself. If it's not affecting you then you shouldn't say anything. If it is affecting you, for example he hasn't made a decision on which way a project should go, politely ask him for a decision and state that ...
42,335
My boss (and, actually, his boss too, which is the company general director) are generally quite good. But it happens (seldom, but frequently enough) that they start to fiddle with the details: day to day chores that they should not do. Examples are: DB queries to extract data, scripts to parse excel files, even re-in...
2015/03/05
['https://workplace.stackexchange.com/questions/42335', 'https://workplace.stackexchange.com', 'https://workplace.stackexchange.com/users/7408/']
Build trust. Gently explain that other are dedicated to the type of problems that they are trying to solve and offer to be a proxy (i.e. tell them that you want to help them save time and point them in the right direction whenever they have a problem like the ones above). Also gently explain that their time is super va...
It isn't your place to do anything about this. Your manager will manage his time according to his boss and himself. If it's not affecting you then you shouldn't say anything. If it is affecting you, for example he hasn't made a decision on which way a project should go, politely ask him for a decision and state that ...
42,335
My boss (and, actually, his boss too, which is the company general director) are generally quite good. But it happens (seldom, but frequently enough) that they start to fiddle with the details: day to day chores that they should not do. Examples are: DB queries to extract data, scripts to parse excel files, even re-in...
2015/03/05
['https://workplace.stackexchange.com/questions/42335', 'https://workplace.stackexchange.com', 'https://workplace.stackexchange.com/users/7408/']
Build trust. Gently explain that other are dedicated to the type of problems that they are trying to solve and offer to be a proxy (i.e. tell them that you want to help them save time and point them in the right direction whenever they have a problem like the ones above). Also gently explain that their time is super va...
EDIT: this answer as written when OP's original version implied they were an individual contributor, before the crucial detail that they are a manager managing a team of 10, which completely changes the question. Moreover this makes the boss a level-2 manager, which is a different situation. --- I'd bloody rejoice. ...
42,335
My boss (and, actually, his boss too, which is the company general director) are generally quite good. But it happens (seldom, but frequently enough) that they start to fiddle with the details: day to day chores that they should not do. Examples are: DB queries to extract data, scripts to parse excel files, even re-in...
2015/03/05
['https://workplace.stackexchange.com/questions/42335', 'https://workplace.stackexchange.com', 'https://workplace.stackexchange.com/users/7408/']
I'm kind of latching on to one idea that may not actually be relevant, but one thing you mentioned was the difficulty of giving up "getting my hands dirty". This could be true, or it could be that he just fails at delegating tasks once in a while. Various reasons could be at play for not delegating: * He's uncomfortab...
EDIT: this answer as written when OP's original version implied they were an individual contributor, before the crucial detail that they are a manager managing a team of 10, which completely changes the question. Moreover this makes the boss a level-2 manager, which is a different situation. --- I'd bloody rejoice. ...
42,335
My boss (and, actually, his boss too, which is the company general director) are generally quite good. But it happens (seldom, but frequently enough) that they start to fiddle with the details: day to day chores that they should not do. Examples are: DB queries to extract data, scripts to parse excel files, even re-in...
2015/03/05
['https://workplace.stackexchange.com/questions/42335', 'https://workplace.stackexchange.com', 'https://workplace.stackexchange.com/users/7408/']
Build trust. Gently explain that other are dedicated to the type of problems that they are trying to solve and offer to be a proxy (i.e. tell them that you want to help them save time and point them in the right direction whenever they have a problem like the ones above). Also gently explain that their time is super va...
I'm kind of latching on to one idea that may not actually be relevant, but one thing you mentioned was the difficulty of giving up "getting my hands dirty". This could be true, or it could be that he just fails at delegating tasks once in a while. Various reasons could be at play for not delegating: * He's uncomfortab...
42,335
My boss (and, actually, his boss too, which is the company general director) are generally quite good. But it happens (seldom, but frequently enough) that they start to fiddle with the details: day to day chores that they should not do. Examples are: DB queries to extract data, scripts to parse excel files, even re-in...
2015/03/05
['https://workplace.stackexchange.com/questions/42335', 'https://workplace.stackexchange.com', 'https://workplace.stackexchange.com/users/7408/']
I'm kind of latching on to one idea that may not actually be relevant, but one thing you mentioned was the difficulty of giving up "getting my hands dirty". This could be true, or it could be that he just fails at delegating tasks once in a while. Various reasons could be at play for not delegating: * He's uncomfortab...
This depends a lot on the managers/directors in questions. Are you positive that they actually take longer to perform XX task? I have had directors & managers from both sides of the competence scale in regards to being able to perform the work of the people under them. You will find that in some cases while they may...
42,335
My boss (and, actually, his boss too, which is the company general director) are generally quite good. But it happens (seldom, but frequently enough) that they start to fiddle with the details: day to day chores that they should not do. Examples are: DB queries to extract data, scripts to parse excel files, even re-in...
2015/03/05
['https://workplace.stackexchange.com/questions/42335', 'https://workplace.stackexchange.com', 'https://workplace.stackexchange.com/users/7408/']
Is this actually a problem? =========================== I fairly recently had this exact experience. My manager was considerably more interested in doing day to day work than managerial duties, such as: * [Caring about resource management](https://workplace.stackexchange.com/q/9128/2322) * Effectively working with ot...
EDIT: this answer as written when OP's original version implied they were an individual contributor, before the crucial detail that they are a manager managing a team of 10, which completely changes the question. Moreover this makes the boss a level-2 manager, which is a different situation. --- I'd bloody rejoice. ...
42,335
My boss (and, actually, his boss too, which is the company general director) are generally quite good. But it happens (seldom, but frequently enough) that they start to fiddle with the details: day to day chores that they should not do. Examples are: DB queries to extract data, scripts to parse excel files, even re-in...
2015/03/05
['https://workplace.stackexchange.com/questions/42335', 'https://workplace.stackexchange.com', 'https://workplace.stackexchange.com/users/7408/']
This depends a lot on the managers/directors in questions. Are you positive that they actually take longer to perform XX task? I have had directors & managers from both sides of the competence scale in regards to being able to perform the work of the people under them. You will find that in some cases while they may...
EDIT: this answer as written when OP's original version implied they were an individual contributor, before the crucial detail that they are a manager managing a team of 10, which completely changes the question. Moreover this makes the boss a level-2 manager, which is a different situation. --- I'd bloody rejoice. ...
72,274,175
I am trying to reverse the contents of an array and store them in another array, but it just outputs last element of the original array. Here's my code: ``` #include <stdio.h> #include <stdlib.h> #include <string.h> float* copy(const float *source, int s){ float* target; int x=s-1; target=(float*)mallo...
2022/05/17
['https://Stackoverflow.com/questions/72274175', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/19136146/']
> > but it just outputs last element of the original array > > > Yes, that would be what the line `printf("%f\n", *target);` achieves. You need to print each item in `target` from inside a `for` loop.
You have to print your "target" like you scan your "source" to print all element of array one by one.
72,274,175
I am trying to reverse the contents of an array and store them in another array, but it just outputs last element of the original array. Here's my code: ``` #include <stdio.h> #include <stdlib.h> #include <string.h> float* copy(const float *source, int s){ float* target; int x=s-1; target=(float*)mallo...
2022/05/17
['https://Stackoverflow.com/questions/72274175', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/19136146/']
> > but it just outputs last element of the original array > > > Yes, that would be what the line `printf("%f\n", *target);` achieves. You need to print each item in `target` from inside a `for` loop.
Maybe you could try to print your "target" like you scan your "source" to print all element of array one by one.
8,310
When I'm not exploring fresh caves or lands in minecraft, I'm busy trying to find deposits of diamond, gold and iron deep in the earth. So far I've just been digging around just above bedrock on a whim to look for these rare minerals but I've started thinking that I should be taking a more controlled, efficient approac...
2010/10/01
['https://gaming.stackexchange.com/questions/8310', 'https://gaming.stackexchange.com', 'https://gaming.stackexchange.com/users/1070/']
I find the easiest way to get to the bottom of a mineshaft is to set your ladder 2 blocks onto the wall. That way you can carefully fall almost the entire way to the bottom and simply hold the backwards key to reattatch yourself to the ladder just before you hit the ground.
A good way to mine fast is by using a Haste II beacon combined with an Efficiency V Diamond or Netherite Pickaxe or some of the above answers are useful too. Edit: The above solution is good for pre-1.18 but only works while you're in the Beacon's range. Now, **Moss** is a faster solution, and once you get a Mob Grind...
8,310
When I'm not exploring fresh caves or lands in minecraft, I'm busy trying to find deposits of diamond, gold and iron deep in the earth. So far I've just been digging around just above bedrock on a whim to look for these rare minerals but I've started thinking that I should be taking a more controlled, efficient approac...
2010/10/01
['https://gaming.stackexchange.com/questions/8310', 'https://gaming.stackexchange.com', 'https://gaming.stackexchange.com/users/1070/']
If you're not married to building a completely man-made mine, the answer is to find a deep tunnel. Getting down to the bottom is correct, as that is where the highest concentration of useful minerals is located, but digging a tunnel doesn't expose you to nearly the same amount of blocks as using a generated cave syste...
I've dug straight down to bedrock as well and at the bottom carved out a 40 long by 20 wide room 4 high. This netted me a full stack of redstone, lots of lava. 2 diamond, lots of coal, almost no iron. The straight down to bedrock approach I find is really good for redstone but not much else. I find that in the generat...
8,310
When I'm not exploring fresh caves or lands in minecraft, I'm busy trying to find deposits of diamond, gold and iron deep in the earth. So far I've just been digging around just above bedrock on a whim to look for these rare minerals but I've started thinking that I should be taking a more controlled, efficient approac...
2010/10/01
['https://gaming.stackexchange.com/questions/8310', 'https://gaming.stackexchange.com', 'https://gaming.stackexchange.com/users/1070/']
This a well covered question already but the technique I personally use isn't listed so I figure I'll add it to the mix. It isn't the technique for strip mining a chunk and extracting absolutely **everything** but it **does** expose lots of extra unseen blocks. It is much faster for quickly gaining things you want, i...
i would like to add some (CREATIVITY) to the branch mining. conventional branch mining is explained above. also in *seven sided die*'s answer there is mention that veins occur in **2x2 blocks**. we generally think mining in term of 2d lets consider the third dimension. [![made an illustration showing the method](htt...
8,310
When I'm not exploring fresh caves or lands in minecraft, I'm busy trying to find deposits of diamond, gold and iron deep in the earth. So far I've just been digging around just above bedrock on a whim to look for these rare minerals but I've started thinking that I should be taking a more controlled, efficient approac...
2010/10/01
['https://gaming.stackexchange.com/questions/8310', 'https://gaming.stackexchange.com', 'https://gaming.stackexchange.com/users/1070/']
I've dug straight down to bedrock as well and at the bottom carved out a 40 long by 20 wide room 4 high. This netted me a full stack of redstone, lots of lava. 2 diamond, lots of coal, almost no iron. The straight down to bedrock approach I find is really good for redstone but not much else. I find that in the generat...
This is an update regarding all the new version released since this question as been asked as to date it is the 1.8.X). Mojang made some change in the generation of resources and cave. As the branch mining was used by almost all player, Mojang decide that this was not supposed to be the best case to Find resources, as...
8,310
When I'm not exploring fresh caves or lands in minecraft, I'm busy trying to find deposits of diamond, gold and iron deep in the earth. So far I've just been digging around just above bedrock on a whim to look for these rare minerals but I've started thinking that I should be taking a more controlled, efficient approac...
2010/10/01
['https://gaming.stackexchange.com/questions/8310', 'https://gaming.stackexchange.com', 'https://gaming.stackexchange.com/users/1070/']
Dig down to bedrock with a staircase. Then make a room about 10 by 10. Finally branch out on each side of the wall. Pick one side and go with it untill it is to long. Then get another side. Once all four are branched, branch off them. I now have about 15-20 BLOCKS of diamond 20-23 BLOCKS of gold like 30-50 stacks of co...
The easiest way to mine is to mine a 2x2 tunnel horizontally. You can cover 8 blocks that way, with the same amount of blocks mined as a branch mine, which only reveals 6 blocks. As for getting up and down, use a water fall cushion (to jump into, must be 2 deep) and a water LADDER (check the youtube videos to see what ...
8,310
When I'm not exploring fresh caves or lands in minecraft, I'm busy trying to find deposits of diamond, gold and iron deep in the earth. So far I've just been digging around just above bedrock on a whim to look for these rare minerals but I've started thinking that I should be taking a more controlled, efficient approac...
2010/10/01
['https://gaming.stackexchange.com/questions/8310', 'https://gaming.stackexchange.com', 'https://gaming.stackexchange.com/users/1070/']
In regards to getting to and from your mine: My solution is to never leave the mine. Bring down some saplings, some wheat seeds, and whatever else, and build your base underground near your mine. It's a lot safer and more predictable than living on the surface, since you can completely light your cave system. The onl...
Have you ever thought of getting the minions mod? Once you get it you have to get up to 8 levels of experiance (8 levels is recomended) then you press the "m" key then commit to evil in which you then pick one of three things, repeat untill you get the master staff, with it you right click the ground four times, one mi...
8,310
When I'm not exploring fresh caves or lands in minecraft, I'm busy trying to find deposits of diamond, gold and iron deep in the earth. So far I've just been digging around just above bedrock on a whim to look for these rare minerals but I've started thinking that I should be taking a more controlled, efficient approac...
2010/10/01
['https://gaming.stackexchange.com/questions/8310', 'https://gaming.stackexchange.com', 'https://gaming.stackexchange.com/users/1070/']
Referring to your edited question about the distances to and from your mine: For the way down to my mines I usually use a minecart. For the way up, this would be a nice construction: [Piston Elevator](http://www.youtube.com/watch?v=WNGVwyARMyE)
i would like to add some (CREATIVITY) to the branch mining. conventional branch mining is explained above. also in *seven sided die*'s answer there is mention that veins occur in **2x2 blocks**. we generally think mining in term of 2d lets consider the third dimension. [![made an illustration showing the method](htt...
8,310
When I'm not exploring fresh caves or lands in minecraft, I'm busy trying to find deposits of diamond, gold and iron deep in the earth. So far I've just been digging around just above bedrock on a whim to look for these rare minerals but I've started thinking that I should be taking a more controlled, efficient approac...
2010/10/01
['https://gaming.stackexchange.com/questions/8310', 'https://gaming.stackexchange.com', 'https://gaming.stackexchange.com/users/1070/']
personally for getting up and down I use 2 vertical shafts, one completely filled with water, and the other with a 1 block deep layer of water at the bottom and use a boat
A nice method if you don't like staircasing down is to mine a 1x2 tunnel down to bedrock and then using water to get up and down. To get down, drop a water bucket in and then remove it to float down with the water. To get up, simply place blocks of water above you and then remove and replace them to work your way up. A...
8,310
When I'm not exploring fresh caves or lands in minecraft, I'm busy trying to find deposits of diamond, gold and iron deep in the earth. So far I've just been digging around just above bedrock on a whim to look for these rare minerals but I've started thinking that I should be taking a more controlled, efficient approac...
2010/10/01
['https://gaming.stackexchange.com/questions/8310', 'https://gaming.stackexchange.com', 'https://gaming.stackexchange.com/users/1070/']
Dig down to bedrock with a staircase. Then make a room about 10 by 10. Finally branch out on each side of the wall. Pick one side and go with it untill it is to long. Then get another side. Once all four are branched, branch off them. I now have about 15-20 BLOCKS of diamond 20-23 BLOCKS of gold like 30-50 stacks of co...
A good way to mine fast is by using a Haste II beacon combined with an Efficiency V Diamond or Netherite Pickaxe or some of the above answers are useful too. Edit: The above solution is good for pre-1.18 but only works while you're in the Beacon's range. Now, **Moss** is a faster solution, and once you get a Mob Grind...
8,310
When I'm not exploring fresh caves or lands in minecraft, I'm busy trying to find deposits of diamond, gold and iron deep in the earth. So far I've just been digging around just above bedrock on a whim to look for these rare minerals but I've started thinking that I should be taking a more controlled, efficient approac...
2010/10/01
['https://gaming.stackexchange.com/questions/8310', 'https://gaming.stackexchange.com', 'https://gaming.stackexchange.com/users/1070/']
There is a [great wiki](https://web.archive.org/web/20131208061328/http://www.voxelwiki.com/minecraft/Elites_of_Minecraft:_The_Miner) with some number crunching. I use this in single player: ``` ▒▒██▒▒__▒▒__ ██ blocks you should mine ▒▒██▒▒__▒▒__ ▒▒ blocks you can see __▒▒__▒▒██▒▒ __ blocks you can't see if you...
The easiest way to mine is to mine a 2x2 tunnel horizontally. You can cover 8 blocks that way, with the same amount of blocks mined as a branch mine, which only reveals 6 blocks. As for getting up and down, use a water fall cushion (to jump into, must be 2 deep) and a water LADDER (check the youtube videos to see what ...
56,167,977
I have a Parent Div with class (".filterTags"), there is two child Div with class(".tagParent") inside it. There is a close button (x) inside the child div, on clicking the close button (x) the corresponding child becomes display none. when the two of the child div becomes display none, then the parent div should also ...
2019/05/16
['https://Stackoverflow.com/questions/56167977', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/9536402/']
You can just add: ``` if($('.filterTags .tagParent:visible').length == 0) $('.filterTags').hide(); ``` This will check if there are any visible elements with the class `tagParent` and if there is none, then it will hide `<div class="filterTags">` **Demo** ```js $(".tagCloser").click(function() { $(this).parent("...
You need to check if the number of hidden childs is equal to total childs or not, like in th efollowing snippet ```js $(".tagCloser").click(function() { $(this).parent(".tagParent").hide(); let tags = $(this).parents(".filterTags").find(".tagParent"); let hidden = $(this).parents(".filterTags").find(".tagParent:...
56,167,977
I have a Parent Div with class (".filterTags"), there is two child Div with class(".tagParent") inside it. There is a close button (x) inside the child div, on clicking the close button (x) the corresponding child becomes display none. when the two of the child div becomes display none, then the parent div should also ...
2019/05/16
['https://Stackoverflow.com/questions/56167977', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/9536402/']
You can just add: ``` if($('.filterTags .tagParent:visible').length == 0) $('.filterTags').hide(); ``` This will check if there are any visible elements with the class `tagParent` and if there is none, then it will hide `<div class="filterTags">` **Demo** ```js $(".tagCloser").click(function() { $(this).parent("...
You have 2 possibilities to achieve this: 1. **Handle the parent class, when all the childs are hidden** 2. **Give parent no layout, the layout is driven by the childrens** **Handle the parent class, when all the childs are hidden** You can create a jquery method wich handles the childrens show/hide behaviour, adding...
56,167,977
I have a Parent Div with class (".filterTags"), there is two child Div with class(".tagParent") inside it. There is a close button (x) inside the child div, on clicking the close button (x) the corresponding child becomes display none. when the two of the child div becomes display none, then the parent div should also ...
2019/05/16
['https://Stackoverflow.com/questions/56167977', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/9536402/']
You need to check if the number of hidden childs is equal to total childs or not, like in th efollowing snippet ```js $(".tagCloser").click(function() { $(this).parent(".tagParent").hide(); let tags = $(this).parents(".filterTags").find(".tagParent"); let hidden = $(this).parents(".filterTags").find(".tagParent:...
You have 2 possibilities to achieve this: 1. **Handle the parent class, when all the childs are hidden** 2. **Give parent no layout, the layout is driven by the childrens** **Handle the parent class, when all the childs are hidden** You can create a jquery method wich handles the childrens show/hide behaviour, adding...
1,414,662
We are currently using an HDD for our NetApp storage for our VMs. We're considering replacing them with SSDs, but many disk manufacturers have different performance. What range of latencies can we expect from SSDs versus HDDs? How much better are SSDs on average?
2019/03/16
['https://superuser.com/questions/1414662', 'https://superuser.com', 'https://superuser.com/users/639471/']
The latencies of an SSD vary hugely, but in terms of IOPs (which us probably the term you want to google)you are looking at an increase in the order of 2-5 magnitudes. (Ie 100 iops for HDD, starting at more then 10000 + for an SSD). Have a look at <https://en.m.wikipedia.org/wiki/IOPS> SSDs are like a night and day d...
NVMe SSD latencies can be as low as [250 µs](https://phoenixnap.com/kb/nvme-vs-sata-vs-m-2-comparison) (microseconds). Much faster than the typical [2-4 ms](https://en.wikipedia.org/wiki/Hard_disk_drive_performance_characteristics#Rotational_latency) (millisecond) latencies of HDDs that spin at 7,500 - 15,000 RPM. 0.2...
367,882
Some tags work inside their braces: `{\scriptsize lorem}`. Others, outside: `\flushright{lorem}` (and they stay in force for a while). *Edit*: Others outside, lasting only within the braces: `{\textbf lorem}`. Others, either inside or outside: `\em{lorem}`, ditto `\tt`. The difference may depend on declarative form...
2017/05/03
['https://tex.stackexchange.com/questions/367882', 'https://tex.stackexchange.com', 'https://tex.stackexchange.com/users/83172/']
``` % !TEX TS-program = pdflatex % !TEX encoding = UTF-8 Unicode % arara: pdflatex \pdfminorversion=7 % ateb: https://tex.stackexchange.com/a/367883/ \documentclass{article} \usepackage[a4paper,scale=.9]{geometry} \usepackage{booktabs} \usepackage{cfr-lm} \begin{document} \verb|\flushright| is really starting an enviro...
In addition to cfr's answer I think it's important to stress that declarations do not have braces, they are not "inside their braces", they just change the state (typically the font) at the current point So taking your examples ``` {\scriptsize lorem} ``` the outer braces are not part of the command syntax, you cou...
7,043,502
I am having trouble formating the dates that are being returned from my mySQL database. Here is the code that I am trying to use: ``` <?php function get_gold_time() { $goldquery = mysql_query("SELECT * FROM metal_price WHERE metal= 'GOLD' LIMIT 0, 96"); while($result = mysql_fetch_array( $goldquery )...
2011/08/12
['https://Stackoverflow.com/questions/7043502', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/766840/']
try date() ``` <?php function get_gold_time() { $goldquery = mysql_query("SELECT * FROM metal_price WHERE metal= 'GOLD' LIMIT 0, 96"); while($result = mysql_fetch_array( $goldquery )) { echo "'" . date('jS ,g A', strToTime($result['time'])) . "'" . ", " ; } } ?> ``` or use D...
It would be far better to just format the date in MySQL through DATE\_FORMAT() as it would be quite a bit faster and give you what you want. See this: <http://dev.mysql.com/doc/refman/5.5/en/date-and-time-functions.html#function_date-format>
19,719,635
I am building a website contact form. I have form submissions being added to Firebase via Angular js. When a new submission is submitted to Firebase I am using child\_added in Node to trigger nodemailer. This is working fine, except that the entire submissions collection is being re-emailed whenever I restart the dev s...
2013/11/01
['https://Stackoverflow.com/questions/19719635', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/2934691/']
You could use ``` var duty = [ "Operate Equipment", "Check for Water Damage", "Check for Mold", "Follow Insurance Procedure", "Restore" ], x = parseInt( document.getElementById('counter').value, 10 ); document.getElementById('task').innerHTML = duty.slice(0, x).join('<...
``` <!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML1.0Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Test2</title> </head> <body> <input type="button" onclic...
43,606,911
I've a function that gets a `.csv` file from parameter and a `myrownumber` (a number indicating a row of the .csv) of this array. This returns the content of the line number `myrownumber` of the csv file. ``` private function readASpecificRow($filePath, $myrownumber) { $rowImLookingFor = array(); $f = fopen($...
2017/04/25
['https://Stackoverflow.com/questions/43606911', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/742269/']
I know that this doesn't provide you with a different solution but it could help with the assumed inefficiency. I'd personally refactor the function to look more like this: ``` private function readASpecificRow($filePath, $myrownumber) { $f = fopen($filePath, "r"); $i = 0; $myrownumber = (int) $myrownumbe...
You can use `file()` to get file by lines, than use `str_getcsv` to parse specific line to CSV.
43,606,911
I've a function that gets a `.csv` file from parameter and a `myrownumber` (a number indicating a row of the .csv) of this array. This returns the content of the line number `myrownumber` of the csv file. ``` private function readASpecificRow($filePath, $myrownumber) { $rowImLookingFor = array(); $f = fopen($...
2017/04/25
['https://Stackoverflow.com/questions/43606911', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/742269/']
I know that this doesn't provide you with a different solution but it could help with the assumed inefficiency. I'd personally refactor the function to look more like this: ``` private function readASpecificRow($filePath, $myrownumber) { $f = fopen($filePath, "r"); $i = 0; $myrownumber = (int) $myrownumbe...
There's no simple way to start reading directly row, but what you can try this way: ``` $pre_pos = <previous position>; fseek($file, $pre_pos); while(...) { fgetcsv(...); ... } $pre_pos = ftell($file); ```
43,606,911
I've a function that gets a `.csv` file from parameter and a `myrownumber` (a number indicating a row of the .csv) of this array. This returns the content of the line number `myrownumber` of the csv file. ``` private function readASpecificRow($filePath, $myrownumber) { $rowImLookingFor = array(); $f = fopen($...
2017/04/25
['https://Stackoverflow.com/questions/43606911', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/742269/']
I know that this doesn't provide you with a different solution but it could help with the assumed inefficiency. I'd personally refactor the function to look more like this: ``` private function readASpecificRow($filePath, $myrownumber) { $f = fopen($filePath, "r"); $i = 0; $myrownumber = (int) $myrownumbe...
You need to iterate over the entire file, but you can return early once your row is found to make it a bit more efficient. I can't see any need for the inner `foreach` loop on each line so that could be removed: ``` private function readASpecificRow($filePath, $myrownumber) { $f = fopen($filePath, "r"); for($...
26,667,162
How can I perform an operation (like subsetting or adding a calculated column) on each imputed dataset in an object of class `mids` from R's package `mice`? I would like the result to still be a `mids` object. **Edit: Example** ``` library(mice) data(nhanes) # create imputed datasets imput = mice(nhanes) ``` The i...
2014/10/31
['https://Stackoverflow.com/questions/26667162', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/1212811/']
Another option is to calculate the variables before the imputation and place restrictions on them. ```r library(mice) # Create the additional variable - this will have missing nhanes$extra <- nhanes$chl / 2 # Change the method of imputation for extra, so that it always equals chl/2 # Change the predictor matrix so o...
There is an overload of `with` that can help you here ``` with(imput, chl/2) ``` the documentation is given at `?with.mids`
26,667,162
How can I perform an operation (like subsetting or adding a calculated column) on each imputed dataset in an object of class `mids` from R's package `mice`? I would like the result to still be a `mids` object. **Edit: Example** ``` library(mice) data(nhanes) # create imputed datasets imput = mice(nhanes) ``` The i...
2014/10/31
['https://Stackoverflow.com/questions/26667162', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/1212811/']
This can be done easily as follows - Use `complete()` to convert a mids object to a long-format data.frame: ``` long1 <- complete(midsobj1, action='long', include=TRUE) ``` Perform whatever manipulations needed: ``` long1$new.var <- long1$chl/2 long2 <- subset(long1, age >= 5) ``` use `as.mids()` to convert b...
There is an overload of `with` that can help you here ``` with(imput, chl/2) ``` the documentation is given at `?with.mids`
26,667,162
How can I perform an operation (like subsetting or adding a calculated column) on each imputed dataset in an object of class `mids` from R's package `mice`? I would like the result to still be a `mids` object. **Edit: Example** ``` library(mice) data(nhanes) # create imputed datasets imput = mice(nhanes) ``` The i...
2014/10/31
['https://Stackoverflow.com/questions/26667162', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/1212811/']
This can be done easily as follows - Use `complete()` to convert a mids object to a long-format data.frame: ``` long1 <- complete(midsobj1, action='long', include=TRUE) ``` Perform whatever manipulations needed: ``` long1$new.var <- long1$chl/2 long2 <- subset(long1, age >= 5) ``` use `as.mids()` to convert b...
Another option is to calculate the variables before the imputation and place restrictions on them. ```r library(mice) # Create the additional variable - this will have missing nhanes$extra <- nhanes$chl / 2 # Change the method of imputation for extra, so that it always equals chl/2 # Change the predictor matrix so o...
26,667,162
How can I perform an operation (like subsetting or adding a calculated column) on each imputed dataset in an object of class `mids` from R's package `mice`? I would like the result to still be a `mids` object. **Edit: Example** ``` library(mice) data(nhanes) # create imputed datasets imput = mice(nhanes) ``` The i...
2014/10/31
['https://Stackoverflow.com/questions/26667162', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/1212811/']
Another option is to calculate the variables before the imputation and place restrictions on them. ```r library(mice) # Create the additional variable - this will have missing nhanes$extra <- nhanes$chl / 2 # Change the method of imputation for extra, so that it always equals chl/2 # Change the predictor matrix so o...
There's a function for this in the `basecamb` package: ``` library(basecamb) apply_function_to_imputed_data(mids_object, function) ```
26,667,162
How can I perform an operation (like subsetting or adding a calculated column) on each imputed dataset in an object of class `mids` from R's package `mice`? I would like the result to still be a `mids` object. **Edit: Example** ``` library(mice) data(nhanes) # create imputed datasets imput = mice(nhanes) ``` The i...
2014/10/31
['https://Stackoverflow.com/questions/26667162', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/1212811/']
This can be done easily as follows - Use `complete()` to convert a mids object to a long-format data.frame: ``` long1 <- complete(midsobj1, action='long', include=TRUE) ``` Perform whatever manipulations needed: ``` long1$new.var <- long1$chl/2 long2 <- subset(long1, age >= 5) ``` use `as.mids()` to convert b...
There's a function for this in the `basecamb` package: ``` library(basecamb) apply_function_to_imputed_data(mids_object, function) ```
28,806,955
I have a problem with retrieve basic user information. This is my code: ``` require_once 'facebook-php-sdk/autoload.php'; FacebookSession::setDefaultApplication('appid', 'appsecret'); try { $token = 'mytoken'; $session = new FacebookSession($token); $request = (new FacebookRequest($session, 'GET', '/me'))...
2015/03/02
['https://Stackoverflow.com/questions/28806955', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/1246746/']
The notation `x.(T)` is called a [Type Assertion](http://golang.org/ref/spec#Type_assertions). > > For an expression `x` of interface type and a type `T`, the primary expression `x.(T)` asserts that `x` is not `nil` and that the value stored in `x` is of type `T`. > > > Your example: ``` result["args"].(map[stri...
`struct` is the best option, but if you insist, you can add a type declaration for a map, then you can add methods to help with the type assertions: ``` package main import "encoding/json" type dict map[string]interface{} func (d dict) d(k string) dict { return d[k].(map[string]interface{}) } func (d dict) s(k s...
60,028,662
When I have an xml layout like: ``` <ImageView android:layout_width="wrap_content" android:layout_height="wrap_content" android:src="@drawable/my_image" /> <ImageView android:layout_width="wrap_content" android:layout_height="wrap_content" android:src="@drawable/my_image" /> ``` Then there a...
2020/02/02
['https://Stackoverflow.com/questions/60028662', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/2401535/']
When loading drawables from `Resources`, these will be cached with a `DrawableCache` which is a `ThemedResourceCache`. The `ResourcesImpl` [states in a comment](https://android.googlesource.com/platform/frameworks/base/+/a09e9e4fe112a9db923cfee520ed7acfd708ecdc/core/java/android/content/res/ResourcesImpl.java#622): >...
Good question!!! I have viewed source code and it looks like it will create new bitmap instances for each ImageView. There is a cumbersome process goes under all of that... ImageView uses Drawable Drawable uses ImageDecoder ImageDecoder uses BitmapFactory BitmapFactory uses [native C++ code](https://android.google...
60,028,662
When I have an xml layout like: ``` <ImageView android:layout_width="wrap_content" android:layout_height="wrap_content" android:src="@drawable/my_image" /> <ImageView android:layout_width="wrap_content" android:layout_height="wrap_content" android:src="@drawable/my_image" /> ``` Then there a...
2020/02/02
['https://Stackoverflow.com/questions/60028662', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/2401535/']
When loading drawables from `Resources`, these will be cached with a `DrawableCache` which is a `ThemedResourceCache`. The `ResourcesImpl` [states in a comment](https://android.googlesource.com/platform/frameworks/base/+/a09e9e4fe112a9db923cfee520ed7acfd708ecdc/core/java/android/content/res/ResourcesImpl.java#622): >...
You can find the answer here : For instance, every time you create a Button, a new drawable is loaded from the framework resources (android.R.drawable.btn\_default). This means all buttons across all the apps use a different drawable instance as their background. However, all these drawables share a common state, call...
55,284,103
I have made a little pop up when I hover over a square but I want to go to this popup even with an existing margin. Here is a snippet with my HTML and CSS code: ```css .vertical { height: 70px; width: 70px; border-radius: 5px; margin-bottom: 10px; margin-right: 10px; border: solid lightgrey; ...
2019/03/21
['https://Stackoverflow.com/questions/55284103', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/9419485/']
My strategy would be to put the element to be shown on hover at `left:100%` so that there's no gap for the cursor to "fall in". You can then use `padding` on this element to create the visual whitespace between the main element and the hover element, and put the element's content in an inner element `.info-inner` in my...
You can use the css transitions property to delay the invisibility of the element. Example: ``` .info{ transition: visibility 2s ease-out;} ``` [`Updated jsFiddle`](https://jsfiddle.net/4n10kwra/) In this latter example, I increased the distance to the pop-up to improve the demo: [`UPDATED Updated jsFiddle`](http...
55,284,103
I have made a little pop up when I hover over a square but I want to go to this popup even with an existing margin. Here is a snippet with my HTML and CSS code: ```css .vertical { height: 70px; width: 70px; border-radius: 5px; margin-bottom: 10px; margin-right: 10px; border: solid lightgrey; ...
2019/03/21
['https://Stackoverflow.com/questions/55284103', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/9419485/']
My strategy would be to put the element to be shown on hover at `left:100%` so that there's no gap for the cursor to "fall in". You can then use `padding` on this element to create the visual whitespace between the main element and the hover element, and put the element's content in an inner element `.info-inner` in my...
There are several ways to do this but here is one example. It simple positions the element next to the previous one without a gap. ```css .vertical { height: 70px; width: 70px; border-radius: 5px; margin-bottom: 10px; margin-right: 10px; border: 3px solid lightgrey; position: relative; } .infoWrap { o...
55,284,103
I have made a little pop up when I hover over a square but I want to go to this popup even with an existing margin. Here is a snippet with my HTML and CSS code: ```css .vertical { height: 70px; width: 70px; border-radius: 5px; margin-bottom: 10px; margin-right: 10px; border: solid lightgrey; ...
2019/03/21
['https://Stackoverflow.com/questions/55284103', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/9419485/']
There are several ways to do this but here is one example. It simple positions the element next to the previous one without a gap. ```css .vertical { height: 70px; width: 70px; border-radius: 5px; margin-bottom: 10px; margin-right: 10px; border: 3px solid lightgrey; position: relative; } .infoWrap { o...
You can use the css transitions property to delay the invisibility of the element. Example: ``` .info{ transition: visibility 2s ease-out;} ``` [`Updated jsFiddle`](https://jsfiddle.net/4n10kwra/) In this latter example, I increased the distance to the pop-up to improve the demo: [`UPDATED Updated jsFiddle`](http...
3,002,562
I read that the modulo operation finds remainder after division. My misconseption here is about the remainder. Is the remainder the last digit of the result? I thought it was the first. Example: $5/7 = 0.7142857142857142857...$ $5 \mod 8 = 7$. $7/3 = 2.33333..$ but $7 \mod 3 = 1$. Remainder of the first result is po...
2018/11/17
['https://math.stackexchange.com/questions/3002562', 'https://math.stackexchange.com', 'https://math.stackexchange.com/users/-1/']
When you want to compute $a \bmod b$ with $a,b$ positive integers, you do division like you learned in school and write $a=qb+r$ where $q$ is the quotient and $r$ is the remainder. We typically choose $r$ to be in the range $0$ to $b-1$. Then we write $r=a \bmod b$, so is you want $1234 \bmod 7$, you write $1234=176\cd...
Let's examine a couple of your examples. First $\dfrac{7}3 = \color{#0a0}2.333\ldots = \color{#0a0}2 + \dfrac{\color{#c00}1}3\ $ has quotient $\color{#0a0}2$ and remainder $\color{#c00}1$ without fractions: $\ 7 = \color{#0a0}2\cdot 3 + \color{#c00}1$ and $\,\ \dfrac{9}7 = \color{#0a0}1.286\ldots = \color{#0a0}1 + \...
3,002,562
I read that the modulo operation finds remainder after division. My misconseption here is about the remainder. Is the remainder the last digit of the result? I thought it was the first. Example: $5/7 = 0.7142857142857142857...$ $5 \mod 8 = 7$. $7/3 = 2.33333..$ but $7 \mod 3 = 1$. Remainder of the first result is po...
2018/11/17
['https://math.stackexchange.com/questions/3002562', 'https://math.stackexchange.com', 'https://math.stackexchange.com/users/-1/']
When you want to compute $a \bmod b$ with $a,b$ positive integers, you do division like you learned in school and write $a=qb+r$ where $q$ is the quotient and $r$ is the remainder. We typically choose $r$ to be in the range $0$ to $b-1$. Then we write $r=a \bmod b$, so is you want $1234 \bmod 7$, you write $1234=176\cd...
$\frac 73 = 2\frac 13 = 2.333333....$ but neither $\frac 13$ nor $0.33333....$ are the "remainder". $\frac 13$ and $0.3333....$ are the *values* of the result of dividing a value by a divisor that is larger than it. The "remainder" is what *remains* after you have divided everything that will fit in in evenly. $2\*3 ...
583,558
I need to download 10,000 zip files from a client's FTP that has about 40,000 items on it. I have contemplated doing: ``` $ cat > files.txt file1 file2 file3 file4 ``` with ``` $ wget -i files.txt ``` Is there a better solution for such a large amount in case I get timed out?
2013/04/16
['https://superuser.com/questions/583558', 'https://superuser.com', 'https://superuser.com/users/187031/']
The solution is good and quite solid: with the proper options, `wget` will retry and download any file whose transfer got interrupted. You can also script most command-line FTP clients, however (e.g. BSD ftp client). But `wget` is better in that you can configure it to not download files you already have, which makes ...
`wget` is good and competent and will probably work fine in this case as mentioned by Iserni's answer, if you dig into the manual for available options. I'll just state some alternatives. I use [LFTP](http://lftp.yar.ru/) for transfers and syncing over both FTP and SFTP. It has an internal queuing system that works we...
583,558
I need to download 10,000 zip files from a client's FTP that has about 40,000 items on it. I have contemplated doing: ``` $ cat > files.txt file1 file2 file3 file4 ``` with ``` $ wget -i files.txt ``` Is there a better solution for such a large amount in case I get timed out?
2013/04/16
['https://superuser.com/questions/583558', 'https://superuser.com', 'https://superuser.com/users/187031/']
The solution is good and quite solid: with the proper options, `wget` will retry and download any file whose transfer got interrupted. You can also script most command-line FTP clients, however (e.g. BSD ftp client). But `wget` is better in that you can configure it to not download files you already have, which makes ...
lftp is pretty good at this. Note the *continue* and *expandnd wildcards* OPTS. ``` lftp :~> help mirror Usage: mirror [OPTS] [remote [local]] Mirror specified remote directory to local directory ``` -c, --continue continue a mirror job if possible -e, --delete delete files not present at remote site --delete-fir...
583,558
I need to download 10,000 zip files from a client's FTP that has about 40,000 items on it. I have contemplated doing: ``` $ cat > files.txt file1 file2 file3 file4 ``` with ``` $ wget -i files.txt ``` Is there a better solution for such a large amount in case I get timed out?
2013/04/16
['https://superuser.com/questions/583558', 'https://superuser.com', 'https://superuser.com/users/187031/']
`wget` is good and competent and will probably work fine in this case as mentioned by Iserni's answer, if you dig into the manual for available options. I'll just state some alternatives. I use [LFTP](http://lftp.yar.ru/) for transfers and syncing over both FTP and SFTP. It has an internal queuing system that works we...
lftp is pretty good at this. Note the *continue* and *expandnd wildcards* OPTS. ``` lftp :~> help mirror Usage: mirror [OPTS] [remote [local]] Mirror specified remote directory to local directory ``` -c, --continue continue a mirror job if possible -e, --delete delete files not present at remote site --delete-fir...