qid int64 1 74.7M | question stringlengths 15 58.3k | date stringlengths 10 10 | metadata list | response_j stringlengths 4 30.2k | response_k stringlengths 11 36.5k |
|---|---|---|---|---|---|
65,260,529 | I have a program where I place the element using CSS in % of window height and width. When opened in a monitor with different resolution (only if the ratio height-width is different), the elements are a little bit misplaced. My solution is limit the height of the window when open in Chrome, so I can keep the same ratio... | 2020/12/12 | [
"https://Stackoverflow.com/questions/65260529",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/14067660/"
] | In order to make window.resizeTo(x, y) to work, you need to have opened the window using window.open(...) with size dimentions. Moreover it is not acceptable to resize a browser window, hence Chrome and other browsers have disabled it by default.
Quote from [MDN](https://developer.mozilla.org/en-US/docs/Web/API/Window/... | I read Parikshith's comment and refined my search.
I found examples to use the window. Using \_self you can use your code in combo with an window.open object.
<https://www.w3schools.com/jsref/met_win_open.asp>
[window.onload vs document.onload](https://stackoverflow.com/questions/588040/window-onload-vs-document-onl... |
21,536,413 | I'm currently working on a project which requires a large amount of memory, and I cannot get Mule 3.4.0 to utilize over 4gb of RAM (running on RHEL 6.2). I am using the Java HotSpot 64-bit server JVM 1.7.0\_45-b18 and the community version of Mule.
I have been editing the wrapper.conf file and I have tried numerous se... | 2014/02/03 | [
"https://Stackoverflow.com/questions/21536413",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3267186/"
] | I believe that Anton's answer will work just fine, however I couldn't clearly figure out when the Java Service Wrapper's license changed to GPL and didn't want to risk any negative implications of that change for my use case.
I found a way to make this work using the current version of the Java Service Wrapper include... | As the Jira ticket comments say, you can download a later version of the Tanuki wrapper (and replace the wrapper files included in the Mule standalone under lib/boot) to overcome this restriction. So, [download Tanuki 3.3.0](http://wrapper.tanukisoftware.com/downloads/3.3.0/), remove all files with "wrapper" in their n... |
21,536,413 | I'm currently working on a project which requires a large amount of memory, and I cannot get Mule 3.4.0 to utilize over 4gb of RAM (running on RHEL 6.2). I am using the Java HotSpot 64-bit server JVM 1.7.0\_45-b18 and the community version of Mule.
I have been editing the wrapper.conf file and I have tried numerous se... | 2014/02/03 | [
"https://Stackoverflow.com/questions/21536413",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3267186/"
] | I believe that Anton's answer will work just fine, however I couldn't clearly figure out when the Java Service Wrapper's license changed to GPL and didn't want to risk any negative implications of that change for my use case.
I found a way to make this work using the current version of the Java Service Wrapper include... | Tried to increase CompressedClassSpaceSize for a Mule Instance running as a Windows Service to no avail. The value would not get picked up until I finally figured out why.
I made the changes inside the wrapper.conf file by adding this line
wrapper.java.additional.4=-XX:CompressedClassSpaceSize=2G (by the way 1G is def... |
39,900,550 | My angular code works just fine before it is minified:
```
angular.module('starter', ['ionic', 'ionic.contrib.ui.tinderCards2'])
.config(function($stateProvider, $urlRouterProvider) {})
.directive('noScroll', function($document) {
return {
restrict: 'A',
link: function($scope, $element, $attr) {
... | 2016/10/06 | [
"https://Stackoverflow.com/questions/39900550",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5484423/"
] | Create a calculator function and then you can fire it on keyup or you can assign it to a button if you'd like.
```js
function calcTotal(){
var inputs = document.getElementsByTagName('input'),
result = 0;
for(var i=0;i<inputs.length;i++){
if(parseInt(inputs[i].value))
result += parseInt(inputs[... | In this example, you have a form with 2 input. When you press on a button, the value of those 2 input is added inside a paragraph.
Hope this help.
```js
function addInputContentToParagraph() {
var txtValue1 = document.getElementById('textbox1').value;
var txtValue2 = document.getElementById('textbox2').value;
... |
39,900,550 | My angular code works just fine before it is minified:
```
angular.module('starter', ['ionic', 'ionic.contrib.ui.tinderCards2'])
.config(function($stateProvider, $urlRouterProvider) {})
.directive('noScroll', function($document) {
return {
restrict: 'A',
link: function($scope, $element, $attr) {
... | 2016/10/06 | [
"https://Stackoverflow.com/questions/39900550",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5484423/"
] | Very simple:
```js
document.getElementById('sum').onsubmit = add;
function add(e) {
e.preventDefault();
var num1 = document.getElementById('num1').value;
var num2 = document.getElementById('num2').value;
var result = 'Result: ' + String(parseInt(num1) + parseInt(num2));
var p = document.getElementById... | In this example, you have a form with 2 input. When you press on a button, the value of those 2 input is added inside a paragraph.
Hope this help.
```js
function addInputContentToParagraph() {
var txtValue1 = document.getElementById('textbox1').value;
var txtValue2 = document.getElementById('textbox2').value;
... |
39,900,550 | My angular code works just fine before it is minified:
```
angular.module('starter', ['ionic', 'ionic.contrib.ui.tinderCards2'])
.config(function($stateProvider, $urlRouterProvider) {})
.directive('noScroll', function($document) {
return {
restrict: 'A',
link: function($scope, $element, $attr) {
... | 2016/10/06 | [
"https://Stackoverflow.com/questions/39900550",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5484423/"
] | follow bellow JS code:
```
<html>
<head>
<title>Sum Two Number</title>
<script language="javascript">
function addNumbers()
{
var val1 = parseInt(document.getElementById("value1").value);
var val2 = parseInt(document.getE... | In this example, you have a form with 2 input. When you press on a button, the value of those 2 input is added inside a paragraph.
Hope this help.
```js
function addInputContentToParagraph() {
var txtValue1 = document.getElementById('textbox1').value;
var txtValue2 = document.getElementById('textbox2').value;
... |
39,900,550 | My angular code works just fine before it is minified:
```
angular.module('starter', ['ionic', 'ionic.contrib.ui.tinderCards2'])
.config(function($stateProvider, $urlRouterProvider) {})
.directive('noScroll', function($document) {
return {
restrict: 'A',
link: function($scope, $element, $attr) {
... | 2016/10/06 | [
"https://Stackoverflow.com/questions/39900550",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5484423/"
] | Very simple:
```js
document.getElementById('sum').onsubmit = add;
function add(e) {
e.preventDefault();
var num1 = document.getElementById('num1').value;
var num2 = document.getElementById('num2').value;
var result = 'Result: ' + String(parseInt(num1) + parseInt(num2));
var p = document.getElementById... | Create a calculator function and then you can fire it on keyup or you can assign it to a button if you'd like.
```js
function calcTotal(){
var inputs = document.getElementsByTagName('input'),
result = 0;
for(var i=0;i<inputs.length;i++){
if(parseInt(inputs[i].value))
result += parseInt(inputs[... |
39,900,550 | My angular code works just fine before it is minified:
```
angular.module('starter', ['ionic', 'ionic.contrib.ui.tinderCards2'])
.config(function($stateProvider, $urlRouterProvider) {})
.directive('noScroll', function($document) {
return {
restrict: 'A',
link: function($scope, $element, $attr) {
... | 2016/10/06 | [
"https://Stackoverflow.com/questions/39900550",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5484423/"
] | Very simple:
```js
document.getElementById('sum').onsubmit = add;
function add(e) {
e.preventDefault();
var num1 = document.getElementById('num1').value;
var num2 = document.getElementById('num2').value;
var result = 'Result: ' + String(parseInt(num1) + parseInt(num2));
var p = document.getElementById... | follow bellow JS code:
```
<html>
<head>
<title>Sum Two Number</title>
<script language="javascript">
function addNumbers()
{
var val1 = parseInt(document.getElementById("value1").value);
var val2 = parseInt(document.getE... |
25,497,372 | I have created a Spring Integration application with Spring Boot. I would like to know how to configure JMX with Spring Boot. I believe by default JMX is configured when using Spring Boot Actuator.
Do I need to configure anything else to be able to export MBeans for Spring Integration?
Most of the example I see have ... | 2014/08/26 | [
"https://Stackoverflow.com/questions/25497372",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/181564/"
] | As you understand the Spring Integration JMX is enabled by default, if you just have `spring-integration-jmx` in the classpath. And, of course, if `spring.jmx.enabled = true` (default).
You can't overrride that just declaring one more `@EnableIntegrationMBeanExport`, because it is based on `@Import` and you just can't... | It is quite late to add this; but in addition to the `endpoints.jmx.domain` I found it useful to change the `spring.jmx.default-domain` to someting unique per application
This is with multiple instances of Spring Boot 1.4.1 apps running in Tomcat 7 |
46,513,024 | Upon page load, I see "hi2"
When I click the button, nothing happens. I tried with `setUser` as well.
I suspect I'm just editing the props themselves and somehow the observable is not being triggered?
See sample code of it not working here in a brand new rails/react environment: <https://github.com/bufordtaylor/mobxt... | 2017/10/01 | [
"https://Stackoverflow.com/questions/46513024",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/269778/"
] | ```
<button onClick={this.props.userStore.setUser.bind(this,"fwefwe")}>faew</button>
```
Be careful. You are binding `this`. `This` in this case is the instance of the Hello Component. Now the `this` in the setUser function points to the Hello Component. So setUser will set a property user in the Hello Component.
``... | In my case, whilst running an old version of mobx (4.3), the issue came from a component which rendered another component and passed a lambda to that component which returns a node
```js
@observer
class Parent extends Component {
@observable
value = "Initial";
renderSub() {
return <Text>{this.value}</Text>
... |
46,513,024 | Upon page load, I see "hi2"
When I click the button, nothing happens. I tried with `setUser` as well.
I suspect I'm just editing the props themselves and somehow the observable is not being triggered?
See sample code of it not working here in a brand new rails/react environment: <https://github.com/bufordtaylor/mobxt... | 2017/10/01 | [
"https://Stackoverflow.com/questions/46513024",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/269778/"
] | ```
<button onClick={this.props.userStore.setUser.bind(this,"fwefwe")}>faew</button>
```
Be careful. You are binding `this`. `This` in this case is the instance of the Hello Component. Now the `this` in the setUser function points to the Hello Component. So setUser will set a property user in the Hello Component.
``... | I had similar issue, I was using arrow function for render method:
```
render = (): React.ReactNode
```
correct should be:
```
render(): React.ReactNode
```
still not sure why first case confuses mobx. |
46,513,024 | Upon page load, I see "hi2"
When I click the button, nothing happens. I tried with `setUser` as well.
I suspect I'm just editing the props themselves and somehow the observable is not being triggered?
See sample code of it not working here in a brand new rails/react environment: <https://github.com/bufordtaylor/mobxt... | 2017/10/01 | [
"https://Stackoverflow.com/questions/46513024",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/269778/"
] | My problem was the order of wrapping the component, because I was using Material UI framework.
**Wrong**:
```
export inject('store')(observer(withStyles(styles)(MyComponent)));
```
**Correct**:
```
export withStyles(styles)(inject('store')(observer(MyComponent)));
```
So, it's important the order with **MobX** a... | ```
<button onClick={this.props.userStore.setUser.bind(this,"fwefwe")}>faew</button>
```
Be careful. You are binding `this`. `This` in this case is the instance of the Hello Component. Now the `this` in the setUser function points to the Hello Component. So setUser will set a property user in the Hello Component.
``... |
46,513,024 | Upon page load, I see "hi2"
When I click the button, nothing happens. I tried with `setUser` as well.
I suspect I'm just editing the props themselves and somehow the observable is not being triggered?
See sample code of it not working here in a brand new rails/react environment: <https://github.com/bufordtaylor/mobxt... | 2017/10/01 | [
"https://Stackoverflow.com/questions/46513024",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/269778/"
] | if you use the latest version of mobx, and babel version 7.12
add this to you constructor
```
makeObservable(this)
``` | I'm sure there are multiple reasons why this can happen.
In my case I was NOT using decorators. I was just using `makeAutoObservable(this)` in the constructor of my mobx state object. The reason why my component was not re-rendering on state change was because I didn't apply a default value to the state property.
I h... |
46,513,024 | Upon page load, I see "hi2"
When I click the button, nothing happens. I tried with `setUser` as well.
I suspect I'm just editing the props themselves and somehow the observable is not being triggered?
See sample code of it not working here in a brand new rails/react environment: <https://github.com/bufordtaylor/mobxt... | 2017/10/01 | [
"https://Stackoverflow.com/questions/46513024",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/269778/"
] | For anyone arriving here, make sure you're not being a complete idiot like me and that you didn't forget to add the `@observer` decorator before the class component.
(Or the `@observable` decorator in the store)
God, wasted a full day on that | I'm sure there are multiple reasons why this can happen.
In my case I was NOT using decorators. I was just using `makeAutoObservable(this)` in the constructor of my mobx state object. The reason why my component was not re-rendering on state change was because I didn't apply a default value to the state property.
I h... |
46,513,024 | Upon page load, I see "hi2"
When I click the button, nothing happens. I tried with `setUser` as well.
I suspect I'm just editing the props themselves and somehow the observable is not being triggered?
See sample code of it not working here in a brand new rails/react environment: <https://github.com/bufordtaylor/mobxt... | 2017/10/01 | [
"https://Stackoverflow.com/questions/46513024",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/269778/"
] | I'm sure there are multiple reasons why this can happen.
In my case I was NOT using decorators. I was just using `makeAutoObservable(this)` in the constructor of my mobx state object. The reason why my component was not re-rendering on state change was because I didn't apply a default value to the state property.
I h... | I had similar issue, I was using arrow function for render method:
```
render = (): React.ReactNode
```
correct should be:
```
render(): React.ReactNode
```
still not sure why first case confuses mobx. |
46,513,024 | Upon page load, I see "hi2"
When I click the button, nothing happens. I tried with `setUser` as well.
I suspect I'm just editing the props themselves and somehow the observable is not being triggered?
See sample code of it not working here in a brand new rails/react environment: <https://github.com/bufordtaylor/mobxt... | 2017/10/01 | [
"https://Stackoverflow.com/questions/46513024",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/269778/"
] | if you use the latest version of mobx, and babel version 7.12
add this to you constructor
```
makeObservable(this)
``` | ```
<button onClick={this.props.userStore.setUser.bind(this,"fwefwe")}>faew</button>
```
Be careful. You are binding `this`. `This` in this case is the instance of the Hello Component. Now the `this` in the setUser function points to the Hello Component. So setUser will set a property user in the Hello Component.
``... |
46,513,024 | Upon page load, I see "hi2"
When I click the button, nothing happens. I tried with `setUser` as well.
I suspect I'm just editing the props themselves and somehow the observable is not being triggered?
See sample code of it not working here in a brand new rails/react environment: <https://github.com/bufordtaylor/mobxt... | 2017/10/01 | [
"https://Stackoverflow.com/questions/46513024",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/269778/"
] | Your code looks sound. I think you have stumbled upon an issue discussed in the [**How to (not) use decorators**](https://mobx.js.org/best/decorators.html) part of the documentation. It is important that `transform-decorators-legacy` is first in the list of babel plugins. | ```
<button onClick={this.props.userStore.setUser.bind(this,"fwefwe")}>faew</button>
```
Be careful. You are binding `this`. `This` in this case is the instance of the Hello Component. Now the `this` in the setUser function points to the Hello Component. So setUser will set a property user in the Hello Component.
``... |
46,513,024 | Upon page load, I see "hi2"
When I click the button, nothing happens. I tried with `setUser` as well.
I suspect I'm just editing the props themselves and somehow the observable is not being triggered?
See sample code of it not working here in a brand new rails/react environment: <https://github.com/bufordtaylor/mobxt... | 2017/10/01 | [
"https://Stackoverflow.com/questions/46513024",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/269778/"
] | if you use the latest version of mobx, and babel version 7.12
add this to you constructor
```
makeObservable(this)
``` | In my case, whilst running an old version of mobx (4.3), the issue came from a component which rendered another component and passed a lambda to that component which returns a node
```js
@observer
class Parent extends Component {
@observable
value = "Initial";
renderSub() {
return <Text>{this.value}</Text>
... |
46,513,024 | Upon page load, I see "hi2"
When I click the button, nothing happens. I tried with `setUser` as well.
I suspect I'm just editing the props themselves and somehow the observable is not being triggered?
See sample code of it not working here in a brand new rails/react environment: <https://github.com/bufordtaylor/mobxt... | 2017/10/01 | [
"https://Stackoverflow.com/questions/46513024",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/269778/"
] | Your code looks sound. I think you have stumbled upon an issue discussed in the [**How to (not) use decorators**](https://mobx.js.org/best/decorators.html) part of the documentation. It is important that `transform-decorators-legacy` is first in the list of babel plugins. | For anyone arriving here, make sure you're not being a complete idiot like me and that you didn't forget to add the `@observer` decorator before the class component.
(Or the `@observable` decorator in the store)
God, wasted a full day on that |
267,408 | Every so often I keep receiving this "java" command-line tool notification on my Macbook Air - macOS Sierra.
[](https://i.stack.imgur.com/GM9y7.png)
When I click on More Info it just redirects me to
>
> <http://www.apple.com/safari/>
>
>
>
No... | 2017/01/04 | [
"https://apple.stackexchange.com/questions/267408",
"https://apple.stackexchange.com",
"https://apple.stackexchange.com/users/37225/"
] | The problem was in my case that I installed the JRE, which was installed only as Safari Plugin, but not as usable commandline tool. Therefore `/usr/libexec/java_home -v *` would not find any installed Java.
The solution is to install the JDK, not the JRE.
Recommending to install Java 6 is not a good idea, this is an... | Something is triggering the java command-line pop up, you can
* Investigate and find out the source and disable it.
* Install java command line from : <https://support.apple.com/kb/DL1572>, don't worry it's not a virus or malware this bug is known sometimes the more info button may redirect to the wrong url on some s... |
1,828,923 | Both matrices are trivial and it is easy to find their eigenvalues, but I can't find the eigenvalues of the sum D+M. | 2016/06/16 | [
"https://math.stackexchange.com/questions/1828923",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/348245/"
] | Let $v$ denote the vector containing only $1$s. We note (by applying [the matrix determinant lemma](https://en.wikipedia.org/wiki/Matrix_determinant_lemma)) that
$$
\det(\lambda I - (D + M)) =
\det((\lambda I - D) - vv^T) = (1 - v^T(\lambda I - D)^{-1}v) \det(\lambda I - D)
$$
So, if $\lambda$ is **not** an eigenvalue... | If the diagonal elements of $D$ are $d\_1,\ldots,d\_n$, the eigenvalues of $M$ are $(n,0,0,\ldots)$ (it is a rank-$1$ matrix) and the eigenvalues of $D+M$ are bounded in absolute value by $n+\max\_i |d\_i|$. If $D=cI$, the eigenvalues of $D+M$ are exactly $(c+n,c,c,\ldots)$. |
192,688 | The password has been a method of authentication for a long time now and we always hear of breaches happening where users passwords get stolen and sometimes are not even hashed at all or correctly. Plus there are loads of other problems with people using the password like reuse, too simple or brute forcing etc.
So my ... | 2018/08/30 | [
"https://security.stackexchange.com/questions/192688",
"https://security.stackexchange.com",
"https://security.stackexchange.com/users/185532/"
] | One option would be biometric authentication (e.g. fingerprint). This is a bad idea in a lot of cases. Primarily not because you finger might be damaged or someone uses it in some unsafe way but because if your secret (fingerprint) gets oublicly known: You will have the heck of a hard time changing it.
Another option ... | "Passwordless" (not using a password I have to remember) methods and examples I've personally experienced:
1. Medium - in order to login to Medium, you can either do it with your social media account or sign in with email. By choosing the latter, they send you an email with an OTP link available for 15 minutes. Basica... |
192,688 | The password has been a method of authentication for a long time now and we always hear of breaches happening where users passwords get stolen and sometimes are not even hashed at all or correctly. Plus there are loads of other problems with people using the password like reuse, too simple or brute forcing etc.
So my ... | 2018/08/30 | [
"https://security.stackexchange.com/questions/192688",
"https://security.stackexchange.com",
"https://security.stackexchange.com/users/185532/"
] | There are actually a number of ways that something other than a password can be used. They all fall under the umbrella of methods to Authenticate.
The main ones are something you are, something you have, something you know, something you do, and somewhere you are. I'll explain each one below in a little more detail.
... | "Passwordless" (not using a password I have to remember) methods and examples I've personally experienced:
1. Medium - in order to login to Medium, you can either do it with your social media account or sign in with email. By choosing the latter, they send you an email with an OTP link available for 15 minutes. Basica... |
192,688 | The password has been a method of authentication for a long time now and we always hear of breaches happening where users passwords get stolen and sometimes are not even hashed at all or correctly. Plus there are loads of other problems with people using the password like reuse, too simple or brute forcing etc.
So my ... | 2018/08/30 | [
"https://security.stackexchange.com/questions/192688",
"https://security.stackexchange.com",
"https://security.stackexchange.com/users/185532/"
] | The state of the art for remote authentication is usage of a client certificate. It has even a legal value is some countries (France and other European countries) because it is brute force resistent, and when a certificate is delivered with correct procedures, the private key is always under the exclusive control of it... | "Passwordless" (not using a password I have to remember) methods and examples I've personally experienced:
1. Medium - in order to login to Medium, you can either do it with your social media account or sign in with email. By choosing the latter, they send you an email with an OTP link available for 15 minutes. Basica... |
63,904,719 | I have the following phone number validation using `yup` but I am getting TS error after upgrading
`"yup": ^0.27.0` to `"yup": "^0.29.3"`
and
`"@types/yup": "^0.26.27"` to `"@types/yup": "^0.29.7"`
```
const ValidationSchema = Yup.object().shape<ICreateUserForm>({
phone: Yup.string()
.required("Required")
... | 2020/09/15 | [
"https://Stackoverflow.com/questions/63904719",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1695685/"
] | The problem is in how you declare the type of the argument in the function passed to `.test`.
You are passing `(phone?: string)` but it needs to be `(phone?: string | null)` as the error mentions.
Here is how it should work
```
const ValidationSchema = Yup.object().shape<ICreateUserForm>({
phone: Yup.string()
... | I had a similar problem and solved it by installing the **latest version** of the Yup package and @types/yup packages.
```
npm i -S yup@0.32.8
npm i -D @ types/yup@0.29.11
```
I did a test on Repl.it:
[https://repl.it/join/ytnxoyno-jefferson1919] |
11,649,340 | Is it possible to do something like
```
byte[] byteArray = new byte[100]
byteArray = {0x00, 0x01, 0x02, 0x03, ... , 0x10}
```
and then set the rest of the variables later?
I would rather avoid using:
```
byteArray[0] = 0x00;
byteArray[1] = 0x01;
```
and so on
Sorry, I should have made it more... | 2012/07/25 | [
"https://Stackoverflow.com/questions/11649340",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1551500/"
] | If you mean can you create an array of 100 items and set 5 of them in-line, something like:
```
int[] i = new int[100] { 1, 2, 3, 4, 5 };
```
Then no, you'll get a compiler error:
>
>
> >
> > An array initializer of length '100' is expected.
> >
> >
> >
>
>
>
However, you can do in-line initialization of ... | Yes you can use the array initialization syntax.
```
byte[] byteArray = new byte[] { 0x00, 0x01, 0x02, 0x03, ... , 0x10};
``` |
11,649,340 | Is it possible to do something like
```
byte[] byteArray = new byte[100]
byteArray = {0x00, 0x01, 0x02, 0x03, ... , 0x10}
```
and then set the rest of the variables later?
I would rather avoid using:
```
byteArray[0] = 0x00;
byteArray[1] = 0x01;
```
and so on
Sorry, I should have made it more... | 2012/07/25 | [
"https://Stackoverflow.com/questions/11649340",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1551500/"
] | Yes you can use the array initialization syntax.
```
byte[] byteArray = new byte[] { 0x00, 0x01, 0x02, 0x03, ... , 0x10};
``` | While typing out all 100 entries would be, programmatically, the most performant. If you want to avoid typing them all out, you could do it in a loop:
```
byte[] byteArray = new byte[100];
byte currentByte = 0x00;
for (int i = 0; i < byteArray.Length; i++)
byteArray[i] = currentByte++;
```
Unless you have a v... |
11,649,340 | Is it possible to do something like
```
byte[] byteArray = new byte[100]
byteArray = {0x00, 0x01, 0x02, 0x03, ... , 0x10}
```
and then set the rest of the variables later?
I would rather avoid using:
```
byteArray[0] = 0x00;
byteArray[1] = 0x01;
```
and so on
Sorry, I should have made it more... | 2012/07/25 | [
"https://Stackoverflow.com/questions/11649340",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1551500/"
] | Yes you can use the array initialization syntax.
```
byte[] byteArray = new byte[] { 0x00, 0x01, 0x02, 0x03, ... , 0x10};
``` | If you know how many items you want to initialize at first, you can create an Dictionary initializer. Example:
```
Dictionary<int,byte> initializer = new Dictionary<int,byte> { {0, 0x01}, {3, 0x04}, {7, 0xFF} .. };
```
Then preinitialize your empty array with simple loop:
```
byte[] byteArray = new byte[100];
fore... |
11,649,340 | Is it possible to do something like
```
byte[] byteArray = new byte[100]
byteArray = {0x00, 0x01, 0x02, 0x03, ... , 0x10}
```
and then set the rest of the variables later?
I would rather avoid using:
```
byteArray[0] = 0x00;
byteArray[1] = 0x01;
```
and so on
Sorry, I should have made it more... | 2012/07/25 | [
"https://Stackoverflow.com/questions/11649340",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1551500/"
] | Yes you can use the array initialization syntax.
```
byte[] byteArray = new byte[] { 0x00, 0x01, 0x02, 0x03, ... , 0x10};
``` | I think what you're looking for is something mutable so I would recommend the following.
```
List<byte> byteArray = new List<byte>() { initialize what you want here };
...
...
byteArray[*n*] = *value*
...
...
byteArray.Add(*value*);
```
This is a lot more flexible. With the list of bytes you can add to it whenever y... |
11,649,340 | Is it possible to do something like
```
byte[] byteArray = new byte[100]
byteArray = {0x00, 0x01, 0x02, 0x03, ... , 0x10}
```
and then set the rest of the variables later?
I would rather avoid using:
```
byteArray[0] = 0x00;
byteArray[1] = 0x01;
```
and so on
Sorry, I should have made it more... | 2012/07/25 | [
"https://Stackoverflow.com/questions/11649340",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1551500/"
] | If you mean can you create an array of 100 items and set 5 of them in-line, something like:
```
int[] i = new int[100] { 1, 2, 3, 4, 5 };
```
Then no, you'll get a compiler error:
>
>
> >
> > An array initializer of length '100' is expected.
> >
> >
> >
>
>
>
However, you can do in-line initialization of ... | While typing out all 100 entries would be, programmatically, the most performant. If you want to avoid typing them all out, you could do it in a loop:
```
byte[] byteArray = new byte[100];
byte currentByte = 0x00;
for (int i = 0; i < byteArray.Length; i++)
byteArray[i] = currentByte++;
```
Unless you have a v... |
11,649,340 | Is it possible to do something like
```
byte[] byteArray = new byte[100]
byteArray = {0x00, 0x01, 0x02, 0x03, ... , 0x10}
```
and then set the rest of the variables later?
I would rather avoid using:
```
byteArray[0] = 0x00;
byteArray[1] = 0x01;
```
and so on
Sorry, I should have made it more... | 2012/07/25 | [
"https://Stackoverflow.com/questions/11649340",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1551500/"
] | If you mean can you create an array of 100 items and set 5 of them in-line, something like:
```
int[] i = new int[100] { 1, 2, 3, 4, 5 };
```
Then no, you'll get a compiler error:
>
>
> >
> > An array initializer of length '100' is expected.
> >
> >
> >
>
>
>
However, you can do in-line initialization of ... | If you know how many items you want to initialize at first, you can create an Dictionary initializer. Example:
```
Dictionary<int,byte> initializer = new Dictionary<int,byte> { {0, 0x01}, {3, 0x04}, {7, 0xFF} .. };
```
Then preinitialize your empty array with simple loop:
```
byte[] byteArray = new byte[100];
fore... |
11,649,340 | Is it possible to do something like
```
byte[] byteArray = new byte[100]
byteArray = {0x00, 0x01, 0x02, 0x03, ... , 0x10}
```
and then set the rest of the variables later?
I would rather avoid using:
```
byteArray[0] = 0x00;
byteArray[1] = 0x01;
```
and so on
Sorry, I should have made it more... | 2012/07/25 | [
"https://Stackoverflow.com/questions/11649340",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1551500/"
] | If you mean can you create an array of 100 items and set 5 of them in-line, something like:
```
int[] i = new int[100] { 1, 2, 3, 4, 5 };
```
Then no, you'll get a compiler error:
>
>
> >
> > An array initializer of length '100' is expected.
> >
> >
> >
>
>
>
However, you can do in-line initialization of ... | I think what you're looking for is something mutable so I would recommend the following.
```
List<byte> byteArray = new List<byte>() { initialize what you want here };
...
...
byteArray[*n*] = *value*
...
...
byteArray.Add(*value*);
```
This is a lot more flexible. With the list of bytes you can add to it whenever y... |
11,649,340 | Is it possible to do something like
```
byte[] byteArray = new byte[100]
byteArray = {0x00, 0x01, 0x02, 0x03, ... , 0x10}
```
and then set the rest of the variables later?
I would rather avoid using:
```
byteArray[0] = 0x00;
byteArray[1] = 0x01;
```
and so on
Sorry, I should have made it more... | 2012/07/25 | [
"https://Stackoverflow.com/questions/11649340",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1551500/"
] | While typing out all 100 entries would be, programmatically, the most performant. If you want to avoid typing them all out, you could do it in a loop:
```
byte[] byteArray = new byte[100];
byte currentByte = 0x00;
for (int i = 0; i < byteArray.Length; i++)
byteArray[i] = currentByte++;
```
Unless you have a v... | If you know how many items you want to initialize at first, you can create an Dictionary initializer. Example:
```
Dictionary<int,byte> initializer = new Dictionary<int,byte> { {0, 0x01}, {3, 0x04}, {7, 0xFF} .. };
```
Then preinitialize your empty array with simple loop:
```
byte[] byteArray = new byte[100];
fore... |
11,649,340 | Is it possible to do something like
```
byte[] byteArray = new byte[100]
byteArray = {0x00, 0x01, 0x02, 0x03, ... , 0x10}
```
and then set the rest of the variables later?
I would rather avoid using:
```
byteArray[0] = 0x00;
byteArray[1] = 0x01;
```
and so on
Sorry, I should have made it more... | 2012/07/25 | [
"https://Stackoverflow.com/questions/11649340",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1551500/"
] | I think what you're looking for is something mutable so I would recommend the following.
```
List<byte> byteArray = new List<byte>() { initialize what you want here };
...
...
byteArray[*n*] = *value*
...
...
byteArray.Add(*value*);
```
This is a lot more flexible. With the list of bytes you can add to it whenever y... | If you know how many items you want to initialize at first, you can create an Dictionary initializer. Example:
```
Dictionary<int,byte> initializer = new Dictionary<int,byte> { {0, 0x01}, {3, 0x04}, {7, 0xFF} .. };
```
Then preinitialize your empty array with simple loop:
```
byte[] byteArray = new byte[100];
fore... |
54,884,069 | I've this code below:
```
var ValorData = document.getElementById("RetiraValorDate").innerHTML.replace(/\s/g,'');
```
[](https://i.stack.imgur.com/1t8IB.png)
Without the innerHTML and Replace the result is this:
[ over (order by (select null)) as rowid_x
from ' + @Schema + '.' + @Table + '
) x;
```
You can use `x` in the `update`. I don't understand the refe... | You have two issues in your query.
1- When you want to update using FROM, you need to use alias.
2- in your order by, you need to pass table name as a string.
Change your query like following.
```
Set @SqlStringTwo = ('
update x
Set x.RowID = x.RowID_x
from
(select ... |
26,897,773 | I am using selenium for some browser automation. I need to install an extension in the browser for my work. I am doing it as follows:
```
import selenium
from selenium import webdriver
from selenium.webdriver.chrome.options import Options
executable_path = "/usr/bin/chromedriver"
options = Options()
options.add_extens... | 2014/11/12 | [
"https://Stackoverflow.com/questions/26897773",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1849260/"
] | Usually, you cannot test inline installation of a Chrome extension with *just Selenium*, because of that installation dialog. There are a few examples in the wild that show how to use external tools outside Selenium to solve this problem, but these are not very portable (i.e. platform-specific) and rely on a state of C... | I had some really big code which I would have to re-write if I had to use Java. Luckily, python has a library for automating GUI events called [ldtp](http://ldtp.freedesktop.org/wiki/). I used that to automate the clicking on the "Add" button. I did something on the following lines:
```
from ldtp import *
from threadi... |
27,057,255 | I'm newbie to SQL Server. I'm not clear about how an index helps for join in SQL Server. When we join two tables, how does the index took place, in which manner it executes the query? Is there any links to read out to understand this?
I understand how the where clause works, by the this [VIDEO](https://www.youtube.com... | 2014/11/21 | [
"https://Stackoverflow.com/questions/27057255",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4073393/"
] | There are three ways to do a join:
1. Nested Loops
With nested loops one side of the join is scanned, and the other side is probed (key is seek-ed). The probe can get a huge boost if there is an index to leverage. See [Understanding Nested Loops Joins](http://technet.microsoft.com/en-us/library/ms191318(v=sql.105).as... | You have to read at least 1 book before looking for Video!
With the index, the server can find the corresponding rows much faster than scanning all records (in case when table has many rows and result is few of them). For example, if the table has 10,000,000 rows and the query has to return 20 rows - with index the se... |
42,787,037 | I have few textboxes and `data-attrribute` for installment number.
```
<input type="text" id="54" data-instno="12"/>
<input type="text" id="124" data-instno="13"/>
<input type="text" id="88" data-instno="14"/>
<input type="text" id="126" data-instno="15"/>
<input type="text" id="102" data-instno="16"/>
<input type="te... | 2017/03/14 | [
"https://Stackoverflow.com/questions/42787037",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/7036750/"
] | Use jQuery [Has Attribute Selector [name]](https://api.jquery.com/has-attribute-selector/) to selecting target elements and use [`.filter()`](http://api.jquery.com/filter/) to filtering element has `data-instno` great than 15.
```
$("[data-instno]").filter(function(){
return $(this).attr("data-instno") >= 15;
}).doS... | ```
var arrNumber = new Array();
$('input[type=text]').each(function(){
if($(this).attr('data-instno') >= 15){
arrNumber.push($(this).attr('data-instno'));
}
});
```
use this you will get this as an array |
42,787,037 | I have few textboxes and `data-attrribute` for installment number.
```
<input type="text" id="54" data-instno="12"/>
<input type="text" id="124" data-instno="13"/>
<input type="text" id="88" data-instno="14"/>
<input type="text" id="126" data-instno="15"/>
<input type="text" id="102" data-instno="16"/>
<input type="te... | 2017/03/14 | [
"https://Stackoverflow.com/questions/42787037",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/7036750/"
] | Use jQuery [Has Attribute Selector [name]](https://api.jquery.com/has-attribute-selector/) to selecting target elements and use [`.filter()`](http://api.jquery.com/filter/) to filtering element has `data-instno` great than 15.
```
$("[data-instno]").filter(function(){
return $(this).attr("data-instno") >= 15;
}).doS... | Just plain JavaScript:
```js
console.log(
[].filter.call(document.getElementsByTagName('INPUT'),
function(elem) {
return elem.dataset.instno >= 15;
})
);
```
```html
<input type="text" id="54" data-instno="12"/>
<input type="text" id="124" data-instno="13"/>
<input type="text" id="88" data-in... |
42,787,037 | I have few textboxes and `data-attrribute` for installment number.
```
<input type="text" id="54" data-instno="12"/>
<input type="text" id="124" data-instno="13"/>
<input type="text" id="88" data-instno="14"/>
<input type="text" id="126" data-instno="15"/>
<input type="text" id="102" data-instno="16"/>
<input type="te... | 2017/03/14 | [
"https://Stackoverflow.com/questions/42787037",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/7036750/"
] | Just plain JavaScript:
```js
console.log(
[].filter.call(document.getElementsByTagName('INPUT'),
function(elem) {
return elem.dataset.instno >= 15;
})
);
```
```html
<input type="text" id="54" data-instno="12"/>
<input type="text" id="124" data-instno="13"/>
<input type="text" id="88" data-in... | ```
var arrNumber = new Array();
$('input[type=text]').each(function(){
if($(this).attr('data-instno') >= 15){
arrNumber.push($(this).attr('data-instno'));
}
});
```
use this you will get this as an array |
48,095,742 | I'm building a responsive website. There's a separate set of CSS to apply for smartphones. To do this, I use the following code
```
@media all and (min-width: 760px) {
.wrap {
/*css for large screens goes here*/
}
}
@media not all and (min-width: 760px) {
.wrap {
/*css for small screens goes here*/
}
... | 2018/01/04 | [
"https://Stackoverflow.com/questions/48095742",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/7553068/"
] | There are two different concepts: the physical pixels of the screen, and the CSS pixels.
Initially, they were in most cases the same, but with so-called “retina” or “hidpi” screens, they are no longer the same. The idea is that a CSS pixel should retain about the same size, and be independent from the actual number of... | Change your media query with this.
```
@media only screen and (min-width: 760px) {
// for screens above 760px
.wrap {
color: blue;
}
}
@media only screen and (max-width: 760px) {
// for screens below 760px
.wrap {
color: lightblue;
}
}
```
If you want to change designing ba... |
48,095,742 | I'm building a responsive website. There's a separate set of CSS to apply for smartphones. To do this, I use the following code
```
@media all and (min-width: 760px) {
.wrap {
/*css for large screens goes here*/
}
}
@media not all and (min-width: 760px) {
.wrap {
/*css for small screens goes here*/
}
... | 2018/01/04 | [
"https://Stackoverflow.com/questions/48095742",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/7553068/"
] | Instead of this
```
@media not all and (min-width: 760px) {
```
use this
```
@media all and (max-width: 759px) {
```
to address all viewports below 760 width.
---
ADDITION, answering the question in the comment "I'm asking what does px mean since it doesn't seem to be the physical pixel count on the screen":
I... | Change your media query with this.
```
@media only screen and (min-width: 760px) {
// for screens above 760px
.wrap {
color: blue;
}
}
@media only screen and (max-width: 760px) {
// for screens below 760px
.wrap {
color: lightblue;
}
}
```
If you want to change designing ba... |
48,095,742 | I'm building a responsive website. There's a separate set of CSS to apply for smartphones. To do this, I use the following code
```
@media all and (min-width: 760px) {
.wrap {
/*css for large screens goes here*/
}
}
@media not all and (min-width: 760px) {
.wrap {
/*css for small screens goes here*/
}
... | 2018/01/04 | [
"https://Stackoverflow.com/questions/48095742",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/7553068/"
] | Go to development tools of your browser and select body tag and after that, you will find width and height by this:
[](https://i.stack.imgur.com/wIPYK.png)
due to some CSS issue this may not work properly will be great if you create a simple HTML with... | Change your media query with this.
```
@media only screen and (min-width: 760px) {
// for screens above 760px
.wrap {
color: blue;
}
}
@media only screen and (max-width: 760px) {
// for screens below 760px
.wrap {
color: lightblue;
}
}
```
If you want to change designing ba... |
48,095,742 | I'm building a responsive website. There's a separate set of CSS to apply for smartphones. To do this, I use the following code
```
@media all and (min-width: 760px) {
.wrap {
/*css for large screens goes here*/
}
}
@media not all and (min-width: 760px) {
.wrap {
/*css for small screens goes here*/
}
... | 2018/01/04 | [
"https://Stackoverflow.com/questions/48095742",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/7553068/"
] | There are two different concepts: the physical pixels of the screen, and the CSS pixels.
Initially, they were in most cases the same, but with so-called “retina” or “hidpi” screens, they are no longer the same. The idea is that a CSS pixel should retain about the same size, and be independent from the actual number of... | Instead of this
```
@media not all and (min-width: 760px) {
```
use this
```
@media all and (max-width: 759px) {
```
to address all viewports below 760 width.
---
ADDITION, answering the question in the comment "I'm asking what does px mean since it doesn't seem to be the physical pixel count on the screen":
I... |
48,095,742 | I'm building a responsive website. There's a separate set of CSS to apply for smartphones. To do this, I use the following code
```
@media all and (min-width: 760px) {
.wrap {
/*css for large screens goes here*/
}
}
@media not all and (min-width: 760px) {
.wrap {
/*css for small screens goes here*/
}
... | 2018/01/04 | [
"https://Stackoverflow.com/questions/48095742",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/7553068/"
] | There are two different concepts: the physical pixels of the screen, and the CSS pixels.
Initially, they were in most cases the same, but with so-called “retina” or “hidpi” screens, they are no longer the same. The idea is that a CSS pixel should retain about the same size, and be independent from the actual number of... | Go to development tools of your browser and select body tag and after that, you will find width and height by this:
[](https://i.stack.imgur.com/wIPYK.png)
due to some CSS issue this may not work properly will be great if you create a simple HTML with... |
2,357,183 | I have an assignment where I have questions that ask for the following implementations:
```
insertAtRanks(Integer x, Integer y, Object o): insert a new element to be stored at position (x,y)
```
and
```
Object removeAtRanks(Integer x, Integer y): remove and return the element at position (x,y)
```
It already as... | 2010/03/01 | [
"https://Stackoverflow.com/questions/2357183",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/45471/"
] | ```
|3 6|
|null 8|
|2 5|
```
or
```
|3 6|
|0 8|
|2 5|
```
or
```
|3 6|
|2 8|
```
or many other forms suggest themselves as alternatives. I think you have to decide what you have been asked to implement, and then implement it. | I don't know which language are you using, but it should be something like:
* Insert a new row with empty values
* for i = newSizeOnX until i reach x (your row), with i decreasing, copy
the row (m[i+1]=[i])
* then you just insert object in the position m[x][y] and fill the rest
m[x][y'] (all the y' != y) |
2,357,183 | I have an assignment where I have questions that ask for the following implementations:
```
insertAtRanks(Integer x, Integer y, Object o): insert a new element to be stored at position (x,y)
```
and
```
Object removeAtRanks(Integer x, Integer y): remove and return the element at position (x,y)
```
It already as... | 2010/03/01 | [
"https://Stackoverflow.com/questions/2357183",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/45471/"
] | ```
|3 6|
|null 8|
|2 5|
```
or
```
|3 6|
|0 8|
|2 5|
```
or
```
|3 6|
|2 8|
```
or many other forms suggest themselves as alternatives. I think you have to decide what you have been asked to implement, and then implement it. | Up to a certain point, this is a question of specifications.
In a normal system, you could either:
* decide to treat those cases as forbidden exceptions, and return an error or a warning if it happens
* define a specific predetermined behavior, that is consistent for all functions you implement, and clearly document... |
45,431,663 | Consider the object:
```
var myObj = {
hugeKey1: 'xxx',
hugeKey2: 'xxx',
hugeKey3: 'xxx',
hugeKey4: 'xxx',
prettyKey1: 'Only one'
};
```
Following is the code for getting a list of all keys with pattern `hugeKey`:
```
var filteredKeySet = _.filter(
Object.keys(data),
function (key) {
if (k... | 2017/08/01 | [
"https://Stackoverflow.com/questions/45431663",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1570408/"
] | According to your requirements, this is probably what you need:
```
const firstMatchedKeyNameInObject = Object.keys(myObj).find(keyName => keyName.includes('prettyKey'));
``` | Ok so found a possible answer almost immediately after posting:
`Object.keys(myObj).findIndex(x=>x.match(/PrettyKey/i))`
Just needed to use the `=>` based index search on the keys.
Wonder if there is a faster way of doing this via lodash. |
45,431,663 | Consider the object:
```
var myObj = {
hugeKey1: 'xxx',
hugeKey2: 'xxx',
hugeKey3: 'xxx',
hugeKey4: 'xxx',
prettyKey1: 'Only one'
};
```
Following is the code for getting a list of all keys with pattern `hugeKey`:
```
var filteredKeySet = _.filter(
Object.keys(data),
function (key) {
if (k... | 2017/08/01 | [
"https://Stackoverflow.com/questions/45431663",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1570408/"
] | In addition to previous answers, in case you need to perform such operation frequently and the target object is also changing you could write following utility function:
```
function matchBy(pattern) {
return obj => Object.keys(obj).find(k => k.match(pattern));
}
```
or
```
function findBy(pattern) {
retur... | Ok so found a possible answer almost immediately after posting:
`Object.keys(myObj).findIndex(x=>x.match(/PrettyKey/i))`
Just needed to use the `=>` based index search on the keys.
Wonder if there is a faster way of doing this via lodash. |
45,431,663 | Consider the object:
```
var myObj = {
hugeKey1: 'xxx',
hugeKey2: 'xxx',
hugeKey3: 'xxx',
hugeKey4: 'xxx',
prettyKey1: 'Only one'
};
```
Following is the code for getting a list of all keys with pattern `hugeKey`:
```
var filteredKeySet = _.filter(
Object.keys(data),
function (key) {
if (k... | 2017/08/01 | [
"https://Stackoverflow.com/questions/45431663",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1570408/"
] | From
```
function callback(elm){
if(elm.match(/prettyKey/i)) return true;
}
Object.keys(myObj).findIndex(callback);
```
to
```
Object.keys(myObj).findIndex(key=>key.match(/PrettyKey/i))
```
or
```
Object.keys(myObj).findIndex(key=>key.includes('prettyKey'))
``` | Ok so found a possible answer almost immediately after posting:
`Object.keys(myObj).findIndex(x=>x.match(/PrettyKey/i))`
Just needed to use the `=>` based index search on the keys.
Wonder if there is a faster way of doing this via lodash. |
45,431,663 | Consider the object:
```
var myObj = {
hugeKey1: 'xxx',
hugeKey2: 'xxx',
hugeKey3: 'xxx',
hugeKey4: 'xxx',
prettyKey1: 'Only one'
};
```
Following is the code for getting a list of all keys with pattern `hugeKey`:
```
var filteredKeySet = _.filter(
Object.keys(data),
function (key) {
if (k... | 2017/08/01 | [
"https://Stackoverflow.com/questions/45431663",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1570408/"
] | In addition to previous answers, in case you need to perform such operation frequently and the target object is also changing you could write following utility function:
```
function matchBy(pattern) {
return obj => Object.keys(obj).find(k => k.match(pattern));
}
```
or
```
function findBy(pattern) {
retur... | According to your requirements, this is probably what you need:
```
const firstMatchedKeyNameInObject = Object.keys(myObj).find(keyName => keyName.includes('prettyKey'));
``` |
45,431,663 | Consider the object:
```
var myObj = {
hugeKey1: 'xxx',
hugeKey2: 'xxx',
hugeKey3: 'xxx',
hugeKey4: 'xxx',
prettyKey1: 'Only one'
};
```
Following is the code for getting a list of all keys with pattern `hugeKey`:
```
var filteredKeySet = _.filter(
Object.keys(data),
function (key) {
if (k... | 2017/08/01 | [
"https://Stackoverflow.com/questions/45431663",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1570408/"
] | In addition to previous answers, in case you need to perform such operation frequently and the target object is also changing you could write following utility function:
```
function matchBy(pattern) {
return obj => Object.keys(obj).find(k => k.match(pattern));
}
```
or
```
function findBy(pattern) {
retur... | From
```
function callback(elm){
if(elm.match(/prettyKey/i)) return true;
}
Object.keys(myObj).findIndex(callback);
```
to
```
Object.keys(myObj).findIndex(key=>key.match(/PrettyKey/i))
```
or
```
Object.keys(myObj).findIndex(key=>key.includes('prettyKey'))
``` |
10,113,270 | ```
>>> import ast
>>> string = '[Small, Medium, Large, X-Large]'
>>> print string
[Small, Medium, Large, X-Large]
>>> string = ast.literal_eval(string)
Traceback (most recent call last):
File "<pyshell#26>", line 1, in <module>
string = ast.literal_eval(string)
File "C:\Python27\lib\ast.py", line 80... | 2012/04/11 | [
"https://Stackoverflow.com/questions/10113270",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1159901/"
] | [`ast.literal_eval()`](http://docs.python.org/library/ast.html#ast.literal_eval) only accepts strings which contain valid Python literal structures (strings, numbers, tuples, lists, dicts, booleans, and `None`).
This is a valid Python expression containing only those literal structures:
```
["Small", "Medium", "Large... | Your string isn't a valid list. If it's a list of strings, you need quotes.
E.g:
```
string = '["Small", "Medium", "Large", "X-Large"]'
``` |
10,113,270 | ```
>>> import ast
>>> string = '[Small, Medium, Large, X-Large]'
>>> print string
[Small, Medium, Large, X-Large]
>>> string = ast.literal_eval(string)
Traceback (most recent call last):
File "<pyshell#26>", line 1, in <module>
string = ast.literal_eval(string)
File "C:\Python27\lib\ast.py", line 80... | 2012/04/11 | [
"https://Stackoverflow.com/questions/10113270",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1159901/"
] | Your string isn't a valid list. If it's a list of strings, you need quotes.
E.g:
```
string = '["Small", "Medium", "Large", "X-Large"]'
``` | If your have **many not-quoted strings** inside your sting list, you can do this:
```py
string = '[Small, Medium, Large, X-Large]'
[s.strip() for s in string[1:-1].split(',')]
```
which prints this:
```bash
['Small', 'Medium', 'Large', 'X-Large']
```
However, if you have **lots of numbers** in your string list a... |
10,113,270 | ```
>>> import ast
>>> string = '[Small, Medium, Large, X-Large]'
>>> print string
[Small, Medium, Large, X-Large]
>>> string = ast.literal_eval(string)
Traceback (most recent call last):
File "<pyshell#26>", line 1, in <module>
string = ast.literal_eval(string)
File "C:\Python27\lib\ast.py", line 80... | 2012/04/11 | [
"https://Stackoverflow.com/questions/10113270",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1159901/"
] | [`ast.literal_eval()`](http://docs.python.org/library/ast.html#ast.literal_eval) only accepts strings which contain valid Python literal structures (strings, numbers, tuples, lists, dicts, booleans, and `None`).
This is a valid Python expression containing only those literal structures:
```
["Small", "Medium", "Large... | If your have **many not-quoted strings** inside your sting list, you can do this:
```py
string = '[Small, Medium, Large, X-Large]'
[s.strip() for s in string[1:-1].split(',')]
```
which prints this:
```bash
['Small', 'Medium', 'Large', 'X-Large']
```
However, if you have **lots of numbers** in your string list a... |
62,862,312 | In my `terragrunt.hcl` file I pass few variables to a module - one of them is map and list
```
terraform {
source = "git@github.com:<my_account>/infrastructure-modules.git//iam?ref=v.0.0.9"
}
include {
path = find_in_parent_folders()
}
inputs = {
var_1 = "string"
var_2 = {
object1 = {
val1 : "a",... | 2020/07/12 | [
"https://Stackoverflow.com/questions/62862312",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/13115677/"
] | You could try this:
```
//Do the insert
oc.CommandText = "INSERT INTO TABLE (NO1, NO2, NO3, NO4, NO5, NO6, NO7, NO8, NO9, NO10, NO11, NO12, DATE) VALUES(1,2,3,1,1,1,'{txb_Textbox1}',5,0.5,10,11,12,TO_DATE('09.07.2020 16:24:00', 'DD.MM.YYYY HH24:MI:SS'))";
oc.ExecuteNonQuery;
//Retrieve in a separate action (you have... | You are doing it in the wrong order, you need to set the command text first and then execute the command (with `ExecuteNonQuery()` or `ExecuteReader()`):
```
OracleCommand oc = connection.CreateCommand();
oc.CommandText = "INSERT INTO TABLE (NO1, NO2, NO3, NO4, NO5, NO6, NO7, NO8, NO9, NO10, NO11, NO12, DATE) VALUES... |
45,813,400 | Assume I want to sort a list of lists like explained [here](https://stackoverflow.com/questions/4174941/how-to-sort-a-list-of-lists-by-a-specific-index-of-the-inner-list):
```
>>>L=[[0, 1, 'f'], [4, 2, 't'], [9, 4, 'afsd']]
>>>sorted(L, key=itemgetter(2))
[[9, 4, 'afsd'], [0, 1, 'f'], [4, 2, 't']]
```
(Or with lambd... | 2017/08/22 | [
"https://Stackoverflow.com/questions/45813400",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4596891/"
] | If I understood you correctly, you want to order `B` in the example below, based on a sorting rule you apply on `L`. Take a look at this:
```
L = [[0, 1, 'f'], [4, 2, 't'], [9, 4, 'afsd']]
B = ['a', 'b', 'c']
result = [i for _, i in sorted(zip(L, B), key=lambda x: x[0][2])]
print(result) # ['c', 'a', 'b']
# that cor... | If I understand correctly, you want to know how the list has been rearranged. i.e. where is the 0th element after sorting, etc.
If so, you are one step away:
```
L2 = [L.index(x) for x in sorted(L, key=itemgetter(2))]
```
which gives:
```
[2, 0, 1]
```
As tobias points out, this is needlessly complex compared to... |
45,813,400 | Assume I want to sort a list of lists like explained [here](https://stackoverflow.com/questions/4174941/how-to-sort-a-list-of-lists-by-a-specific-index-of-the-inner-list):
```
>>>L=[[0, 1, 'f'], [4, 2, 't'], [9, 4, 'afsd']]
>>>sorted(L, key=itemgetter(2))
[[9, 4, 'afsd'], [0, 1, 'f'], [4, 2, 't']]
```
(Or with lambd... | 2017/08/22 | [
"https://Stackoverflow.com/questions/45813400",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4596891/"
] | If I understand correctly, you want to know how the list has been rearranged. i.e. where is the 0th element after sorting, etc.
If so, you are one step away:
```
L2 = [L.index(x) for x in sorted(L, key=itemgetter(2))]
```
which gives:
```
[2, 0, 1]
```
As tobias points out, this is needlessly complex compared to... | NumPy
=====
Setup:
```
import numpy as np
L = np.array([[0, 1, 'f'], [4, 2, 't'], [9, 4, 'afsd']])
S = np.array(['a', 'b', 'c'])
```
Solution:
```
print S[L[:,2].argsort()]
```
Output:
```
['c' 'a' 'b']
```
Just Python
===========
You could combine both lists, sort them together, and separate them again.
``... |
45,813,400 | Assume I want to sort a list of lists like explained [here](https://stackoverflow.com/questions/4174941/how-to-sort-a-list-of-lists-by-a-specific-index-of-the-inner-list):
```
>>>L=[[0, 1, 'f'], [4, 2, 't'], [9, 4, 'afsd']]
>>>sorted(L, key=itemgetter(2))
[[9, 4, 'afsd'], [0, 1, 'f'], [4, 2, 't']]
```
(Or with lambd... | 2017/08/22 | [
"https://Stackoverflow.com/questions/45813400",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4596891/"
] | If I understood you correctly, you want to order `B` in the example below, based on a sorting rule you apply on `L`. Take a look at this:
```
L = [[0, 1, 'f'], [4, 2, 't'], [9, 4, 'afsd']]
B = ['a', 'b', 'c']
result = [i for _, i in sorted(zip(L, B), key=lambda x: x[0][2])]
print(result) # ['c', 'a', 'b']
# that cor... | NumPy
=====
Setup:
```
import numpy as np
L = np.array([[0, 1, 'f'], [4, 2, 't'], [9, 4, 'afsd']])
S = np.array(['a', 'b', 'c'])
```
Solution:
```
print S[L[:,2].argsort()]
```
Output:
```
['c' 'a' 'b']
```
Just Python
===========
You could combine both lists, sort them together, and separate them again.
``... |
19,481,038 | Is it possible to use the *AppName*-Prefix.pch file to import a given header file in all source files except one?
**Problem:**
I have followed the approach described here: <https://stackoverflow.com/a/617559/1062572> to overwrite a C function call, namely the GCD `dispatch_async` function.
Now I need to import the he... | 2013/10/20 | [
"https://Stackoverflow.com/questions/19481038",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1062572/"
] | Problem is with your macros not expanding as you expect
```
(defmacro bind-to-name [name-string stuff-to-bind]
`(def ~(symbol name-string) ~stuff-to-bind))
(defmacro bind-services [services]
`(do
~@(for [s services]
`(bind-to-name ~(first s) ~(second s)))))
(bind-services [["*my-service*" se.foo.ba... | No way!
```
user=> (doc first)
-------------------------
clojure.core/first
([coll])
Returns the first item in the collection. Calls seq on its
argument. If coll is nil, returns nil.
user=> (first ["a" "b" "c"])
"a"
``` |
136,485 | The GTmetrix score of my website when tested in Vancouver differ from the results in Mumbai by a whopping 4 seconds! Different locations are giving me different results. What's happening here and which score must I take to be true? I use the Jetpack CDN for images. | 2021/08/19 | [
"https://webmasters.stackexchange.com/questions/136485",
"https://webmasters.stackexchange.com",
"https://webmasters.stackexchange.com/users/122375/"
] | Google evaluates mobile-friendliness on a page by page basis, not for your site as a whole. Having some pages that are not mobile-friendly will not hurt the rankings of your mobile-friendly pages. | Yes, definetely. Most of the visitors use a mobile device. This is the reason why Google started to focuse on mobile devices (mobile-centric indexing by default since July, 2019).
Make sure that your website is fully responsive by using the right media queries. A well-structured layout using HTML5 with semantic elemen... |
61,005,599 | I'm doing this challenge where i am tasked at coding up a game of hangman - where I am supposed to reduce the range of words in a set.The rules of the game states that you get 8 tries too guess otherwise you'd lose.If the user were to key in the same letter more than once a message would pop up stating that he's alread... | 2020/04/03 | [
"https://Stackoverflow.com/questions/61005599",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/13142206/"
] | The problem appears when the chosen word has the same letter more once. In that case, since you iterate over all the letters in word (`for i in range(len(word))`) you will try to remove this word few times from the set `word_set` (as much as this letter appears in the word) but `word_set` will have this letter only onc... | Your key error is going to happen every time you pick a letter that is repeated in the word. When you do `word_set.remove(word[i])` inside a `for i in range(len(word)):` loop and the `word` has the same letter at multiple `i`s, this key error will occur when it hits the second `i` corresponding to that letter in the wo... |
61,005,599 | I'm doing this challenge where i am tasked at coding up a game of hangman - where I am supposed to reduce the range of words in a set.The rules of the game states that you get 8 tries too guess otherwise you'd lose.If the user were to key in the same letter more than once a message would pop up stating that he's alread... | 2020/04/03 | [
"https://Stackoverflow.com/questions/61005599",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/13142206/"
] | The problem appears when the chosen word has the same letter more once. In that case, since you iterate over all the letters in word (`for i in range(len(word))`) you will try to remove this word few times from the set `word_set` (as much as this letter appears in the word) but `word_set` will have this letter only onc... | You need to understand what your code does:
When you remove a character from word\_set.remove(word[i]). This removes it but on 2nd iteration it doesn't find the character thus it throws the key error because it cannot find the key which is already removed.
Try adding an if condition like in this code to check if key ... |
61,005,599 | I'm doing this challenge where i am tasked at coding up a game of hangman - where I am supposed to reduce the range of words in a set.The rules of the game states that you get 8 tries too guess otherwise you'd lose.If the user were to key in the same letter more than once a message would pop up stating that he's alread... | 2020/04/03 | [
"https://Stackoverflow.com/questions/61005599",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/13142206/"
] | The problem appears when the chosen word has the same letter more once. In that case, since you iterate over all the letters in word (`for i in range(len(word))`) you will try to remove this word few times from the set `word_set` (as much as this letter appears in the word) but `word_set` will have this letter only onc... | You try to remove the same letter multiple times because you iterate the `word` - iterate its set of letters instead. You could also precalculate the positions of each letter in your word into a dictionary and use that to "fill in the gaps" like so:
```
word = "javascript"
seen = set() # letters that were gu... |
61,005,599 | I'm doing this challenge where i am tasked at coding up a game of hangman - where I am supposed to reduce the range of words in a set.The rules of the game states that you get 8 tries too guess otherwise you'd lose.If the user were to key in the same letter more than once a message would pop up stating that he's alread... | 2020/04/03 | [
"https://Stackoverflow.com/questions/61005599",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/13142206/"
] | The problem appears when the chosen word has the same letter more once. In that case, since you iterate over all the letters in word (`for i in range(len(word))`) you will try to remove this word few times from the set `word_set` (as much as this letter appears in the word) but `word_set` will have this letter only onc... | Set.remove() throws a KeyError if the item you are removing is not part of the set.
In your case, it's caused by the word\_set and word not having the same letters.
E.g. If word = java, then word\_set = ( j, a, v)
And since you are looping over word instead of word\_set, your code will attempt to remove the letter '... |
61,005,599 | I'm doing this challenge where i am tasked at coding up a game of hangman - where I am supposed to reduce the range of words in a set.The rules of the game states that you get 8 tries too guess otherwise you'd lose.If the user were to key in the same letter more than once a message would pop up stating that he's alread... | 2020/04/03 | [
"https://Stackoverflow.com/questions/61005599",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/13142206/"
] | You try to remove the same letter multiple times because you iterate the `word` - iterate its set of letters instead. You could also precalculate the positions of each letter in your word into a dictionary and use that to "fill in the gaps" like so:
```
word = "javascript"
seen = set() # letters that were gu... | Your key error is going to happen every time you pick a letter that is repeated in the word. When you do `word_set.remove(word[i])` inside a `for i in range(len(word)):` loop and the `word` has the same letter at multiple `i`s, this key error will occur when it hits the second `i` corresponding to that letter in the wo... |
61,005,599 | I'm doing this challenge where i am tasked at coding up a game of hangman - where I am supposed to reduce the range of words in a set.The rules of the game states that you get 8 tries too guess otherwise you'd lose.If the user were to key in the same letter more than once a message would pop up stating that he's alread... | 2020/04/03 | [
"https://Stackoverflow.com/questions/61005599",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/13142206/"
] | You try to remove the same letter multiple times because you iterate the `word` - iterate its set of letters instead. You could also precalculate the positions of each letter in your word into a dictionary and use that to "fill in the gaps" like so:
```
word = "javascript"
seen = set() # letters that were gu... | You need to understand what your code does:
When you remove a character from word\_set.remove(word[i]). This removes it but on 2nd iteration it doesn't find the character thus it throws the key error because it cannot find the key which is already removed.
Try adding an if condition like in this code to check if key ... |
61,005,599 | I'm doing this challenge where i am tasked at coding up a game of hangman - where I am supposed to reduce the range of words in a set.The rules of the game states that you get 8 tries too guess otherwise you'd lose.If the user were to key in the same letter more than once a message would pop up stating that he's alread... | 2020/04/03 | [
"https://Stackoverflow.com/questions/61005599",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/13142206/"
] | You try to remove the same letter multiple times because you iterate the `word` - iterate its set of letters instead. You could also precalculate the positions of each letter in your word into a dictionary and use that to "fill in the gaps" like so:
```
word = "javascript"
seen = set() # letters that were gu... | Set.remove() throws a KeyError if the item you are removing is not part of the set.
In your case, it's caused by the word\_set and word not having the same letters.
E.g. If word = java, then word\_set = ( j, a, v)
And since you are looping over word instead of word\_set, your code will attempt to remove the letter '... |
67,965,253 | I am using ngx-bootstrap 5.x.x in my Angular 8 project but now I have migrated my Angular v8 to v11 and I start facing issues with dropdown. It does not open on first click. I find they are recommended to use v7.0.0 but when I install it using
```
npm i ngx-bootstrap@7.0.0 --save
```
It throws an error
```
npm ERR!... | 2021/06/14 | [
"https://Stackoverflow.com/questions/67965253",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1838451/"
] | Since 7.0.0 is a Release candidate version, you should mention -rc and version. it becomes `npm i ngx-bootstrap@7.0.0-rc.1`
you can see install command from [here](https://www.npmjs.com/package/ngx-bootstrap/v/7.0.0-rc.1).
it is ready to go out, but it isn't proven yet so it's not ready to be marked as a stable releas... | simply you can visit this for more information
[www.npmjs.com](https://www.npmjs.com/package/ngx-bootstrap/v/7.0.0-rc.1) |
67,965,253 | I am using ngx-bootstrap 5.x.x in my Angular 8 project but now I have migrated my Angular v8 to v11 and I start facing issues with dropdown. It does not open on first click. I find they are recommended to use v7.0.0 but when I install it using
```
npm i ngx-bootstrap@7.0.0 --save
```
It throws an error
```
npm ERR!... | 2021/06/14 | [
"https://Stackoverflow.com/questions/67965253",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1838451/"
] | You can see the official npm CDN [link](https://www.npmjs.com/package/ngx-bootstrap) where the latest version is 6.2.0. As there is no 7.0 version available with the npm CDN that explains the problem. If you want to force install the version which is not yet published and in the queue then use
>
> npm i ngx-bootstrap... | simply you can visit this for more information
[www.npmjs.com](https://www.npmjs.com/package/ngx-bootstrap/v/7.0.0-rc.1) |
24,243,357 | I'm evaluating the Boötes ActiveGantt control. The control works fine on my machine. But when I share my Access application with other colleagues they get the error message "control does not contain an object"
```
Public Function ActiveGanttVCCtl1() As ActiveGanttVCCtl
Set ActiveGanttVCCtl1 = ActiveGanttVCCtl1A.Ob... | 2014/06/16 | [
"https://Stackoverflow.com/questions/24243357",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3744627/"
] | Swift 5 version of @MilanPatel answer, that i found very useful :
```
func splitSecondVideo() {
guard did<splitdivide else {return}
guard let videourl = URL(string: "YOUR_VIDEO_URL_HERE") else {return}
let asset = AVURLAsset(url: videourl, options: nil)
let exportSession = AVAssetExpo... | Nice Question.The solution is here...
```
-(void)splitSecondVideo
{
if (did<splitdivide){
AVURLAsset *asset = [AVURLAsset URLAssetWithURL:_videourl options:nil];
AVAssetExportSession *exportSession = [[AVAssetExportSession alloc]initWithAsset:asset presetName:AVAssetExportPresetHighestQuality];
NSArray *paths = NSS... |
13,457,444 | I have a SQL table which stores the different rates charged to clients.
The table also includes a list of 'default' rates to be used if the client has none specific to them.
What I need, is once the user selects a client from a combo box, to create a table of rates for that client, consisting of the defaults, or the ra... | 2012/11/19 | [
"https://Stackoverflow.com/questions/13457444",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1109750/"
] | In other words, you're posting a notification whenever the message list is updated. That's a perfectly valid use of NSNotificationCenter.
Another option is to use [Key-Value Observing](http://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/KeyValueObserving/KeyValueObserving.html).
Your controller (a... | In my opinion using a delegate protocol pattern would be a much better fit for this scenario. Consider the scenario where your "api layer" needs used across many view controllers in an application. If another developer were to be introduced to your code, they would have to hunt around for notificationcenter subscriptio... |
13,457,444 | I have a SQL table which stores the different rates charged to clients.
The table also includes a list of 'default' rates to be used if the client has none specific to them.
What I need, is once the user selects a client from a combo box, to create a table of rates for that client, consisting of the defaults, or the ra... | 2012/11/19 | [
"https://Stackoverflow.com/questions/13457444",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1109750/"
] | In other words, you're posting a notification whenever the message list is updated. That's a perfectly valid use of NSNotificationCenter.
Another option is to use [Key-Value Observing](http://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/KeyValueObserving/KeyValueObserving.html).
Your controller (a... | `NSNotifications` run the receivers code synchronously as soon as they are posted, so a new message during repopulation would join the back of that execution queue. On the whole it seems valid to me, and it keeps a reasonable degree of separation between The view controllers and the model.
Depending on the number of ... |
5,003,994 | I have rails application, which sends file to FTP. I want to move entire folder to Ftp, but it's giving this error:
```
/home/Anup/code/DashGo-2.2.0/vendor/rails/railties/lib/commands/runner.rb:47: /usr/lib/ruby/1.8/net/ftp.rb:471:in `gets': Is a directory - /home/Anup/code/DashGo-2.2.0/private/temp_file (Errno::EISDI... | 2011/02/15 | [
"https://Stackoverflow.com/questions/5003994",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/549773/"
] | FTP (in general - not just the ruby gem) has never been good at transferring directories. In fact, I'm not sure that it's ever supported it.
Take a look at SCP instead. That's what I ended up using to transfer directories between a couple of my computers. In ruby, there's even a [Net::SCP](http://net-ssh.github.com/sc... | Also I think that Net::Scp is better solution, but sometimes is not possible to use it. In this case I use [FTPSync](https://github.com/ashchan/ftpsync) ... but is very sloooooooooow (as FTP is slow) in big directories
```
ftpconn = FtpSync.new(<host>, <user>, <pass>)
ftpconn.verbose = true
ftpconn.push_dir(@local_pa... |
52,843,715 | I want to sort a list of files based on file name.
Input
```
280900_b24.txt
280900_b23.txt
280900_b25.txt
280900_b28.txt
280900.txt
280900_b27.txt
280900_b22.txt
280900_b30.txt
280900_b29.txt
280902.txt
280902_b01.txt
280901_b08.txt
280901.txt
280900_b26.txt
```
Expected output
```
280902_b01.txt
280902.txt
28090... | 2018/10/16 | [
"https://Stackoverflow.com/questions/52843715",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/8534446/"
] | I cannot test it but I believe you can do
```
sort -k1.1,1.6r -k1.8,1.8 -k1.9r
```
This, however, will give problems with
```
280900.txt
280900_b30.txt
280900_s30.txt
```
So it might be better to do
```
sort -k1.1,1.6r -k1.7,1.7 -k1.8r
```
The latter is better as it reverse-sorts on the first 6 characters... | It looks like you want a reverse sort on the first, numeric, part, . and \_ to sort the same and a forward (non-reverse) sort on everything after that. This does what you say you want when I try it with your data:
```
sort -k1.1,1.6r -k1.8,1.14 input.txt
```
This does the reverse sort on columns 1-6, ignores column ... |
52,843,715 | I want to sort a list of files based on file name.
Input
```
280900_b24.txt
280900_b23.txt
280900_b25.txt
280900_b28.txt
280900.txt
280900_b27.txt
280900_b22.txt
280900_b30.txt
280900_b29.txt
280902.txt
280902_b01.txt
280901_b08.txt
280901.txt
280900_b26.txt
```
Expected output
```
280902_b01.txt
280902.txt
28090... | 2018/10/16 | [
"https://Stackoverflow.com/questions/52843715",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/8534446/"
] | I cannot test it but I believe you can do
```
sort -k1.1,1.6r -k1.8,1.8 -k1.9r
```
This, however, will give problems with
```
280900.txt
280900_b30.txt
280900_s30.txt
```
So it might be better to do
```
sort -k1.1,1.6r -k1.7,1.7 -k1.8r
```
The latter is better as it reverse-sorts on the first 6 characters... | You can do:
```
$ echo "280900_b24.txt
280900_b23.txt
280900_b25.txt
280900_b28.txt
280900.txt
280900_b27.txt
280900_b22.txt
280900_b30.txt
280900_b29.txt
280902.txt
280902_b01.txt
280901_b08.txt
280901.txt
280900_b26.txt" | sort -t _ -k1r
280902_b01.txt
280902.txt
280901_b08.txt
280901.txt
280900_b30.txt
280900_b29.t... |
13,659 | I filled out an online form which is submitting to a crashed ASP.NET app. If I refresh, I get the message:
>
> To display the webpage again, Internet Explorer
> needs to resend the information you've
> previously submitted.
>
>
> If you were making a purchase, you
> should click Cancel to avoid a
> duplicate tr... | 2009/07/27 | [
"https://superuser.com/questions/13659",
"https://superuser.com",
"https://superuser.com/users/730/"
] | I have Fiddler 2 installed and just tried it with a page that asks me to repost data. I can see all of the session information in the top Session Inspector tab. TextView shows a raw format and WebForms shows a table with each name-value pair. You can even build your own response. I use the IE Developer Toolbar for most... | Try installing [Web Development Helper](http://projects.nikhilk.net/WebDevHelper). I think you can see the posted content with that tool. |
13,659 | I filled out an online form which is submitting to a crashed ASP.NET app. If I refresh, I get the message:
>
> To display the webpage again, Internet Explorer
> needs to resend the information you've
> previously submitted.
>
>
> If you were making a purchase, you
> should click Cancel to avoid a
> duplicate tr... | 2009/07/27 | [
"https://superuser.com/questions/13659",
"https://superuser.com",
"https://superuser.com/users/730/"
] | I have Fiddler 2 installed and just tried it with a page that asks me to repost data. I can see all of the session information in the top Session Inspector tab. TextView shows a raw format and WebForms shows a table with each name-value pair. You can even build your own response. I use the IE Developer Toolbar for most... | There is the IE developer toolbar available from microsoft. It has all the data required.
Wikipedia link : <http://en.wikipedia.org/wiki/Internet_Explorer_Developer_Toolbar> |
13,659 | I filled out an online form which is submitting to a crashed ASP.NET app. If I refresh, I get the message:
>
> To display the webpage again, Internet Explorer
> needs to resend the information you've
> previously submitted.
>
>
> If you were making a purchase, you
> should click Cancel to avoid a
> duplicate tr... | 2009/07/27 | [
"https://superuser.com/questions/13659",
"https://superuser.com",
"https://superuser.com/users/730/"
] | I have Fiddler 2 installed and just tried it with a page that asks me to repost data. I can see all of the session information in the top Session Inspector tab. TextView shows a raw format and WebForms shows a table with each name-value pair. You can even build your own response. I use the IE Developer Toolbar for most... | The IE Developer Toolbar and Fiddler2 tools already suggested are are worthwhile.
I also like the [TamperIE](http://www.bayden.com/TamperIE/) add-on for this type of troubleshooting, specifically when form values are what you're looking for. Essentially, when enabled TamperIE lets you see *and modify* the query string... |
76,217 | Are "for some" and "to some" interchangable?
>
> To some the sun appears brighter in the afternoons.
>
>
>
My natural instinct is to use "for some" in that sentence, but I don't understand why "to some" is incorrect (if it is). Can anyone shed some light? | 2012/07/28 | [
"https://english.stackexchange.com/questions/76217",
"https://english.stackexchange.com",
"https://english.stackexchange.com/users/23679/"
] | *To* is preferable here for a simple reason. You say:
>
> The sun appears to some (people) to be brighter in the afternoons.
>
>
>
Not:
>
> The sun appears for some (people) to be brighter in the afternoons.
>
>
>
Fronting of the experiencer, *to some (people)*, does not license a change of preposition. (Si... | As a native BE speaker ***to some*** is slightly more natural in this context and, indeed, it is context that dictates the preference. The terms are pretty much interchangeable and will be readily accepted by most people. |
76,217 | Are "for some" and "to some" interchangable?
>
> To some the sun appears brighter in the afternoons.
>
>
>
My natural instinct is to use "for some" in that sentence, but I don't understand why "to some" is incorrect (if it is). Can anyone shed some light? | 2012/07/28 | [
"https://english.stackexchange.com/questions/76217",
"https://english.stackexchange.com",
"https://english.stackexchange.com/users/23679/"
] | As a native BE speaker ***to some*** is slightly more natural in this context and, indeed, it is context that dictates the preference. The terms are pretty much interchangeable and will be readily accepted by most people. | The correct construction for the verb "appear" is
>
> appear to <indirect object>
>
>
>
Therefore the correct preposition to use in this case is "to".
A similar rule will follow for other such verbs which use "to <indirect object>".
>
> To me, that seems wrong.
>
>
> To me, that sounds wrong.
>
>
>
Choic... |
76,217 | Are "for some" and "to some" interchangable?
>
> To some the sun appears brighter in the afternoons.
>
>
>
My natural instinct is to use "for some" in that sentence, but I don't understand why "to some" is incorrect (if it is). Can anyone shed some light? | 2012/07/28 | [
"https://english.stackexchange.com/questions/76217",
"https://english.stackexchange.com",
"https://english.stackexchange.com/users/23679/"
] | *To* is preferable here for a simple reason. You say:
>
> The sun appears to some (people) to be brighter in the afternoons.
>
>
>
Not:
>
> The sun appears for some (people) to be brighter in the afternoons.
>
>
>
Fronting of the experiencer, *to some (people)*, does not license a change of preposition. (Si... | The correct construction for the verb "appear" is
>
> appear to <indirect object>
>
>
>
Therefore the correct preposition to use in this case is "to".
A similar rule will follow for other such verbs which use "to <indirect object>".
>
> To me, that seems wrong.
>
>
> To me, that sounds wrong.
>
>
>
Choic... |
45,026,607 | I have a list of word library and a text in which there are a spell error (typos), and I want to correct the word spell error to be correct according to list of library
for example
in list of word :
`listOfWord = [...,"halo","saya","sedangkan","semangat","cemooh"..];`
this is my string :
`string = "haaallllllooo ... | 2017/07/11 | [
"https://Stackoverflow.com/questions/45026607",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/7627349/"
] | You can use `difflib`'s get close matches, though it is not that efficient.
```
words = ["halo","saya","sedangkan","semangat","cemooh"]
def get_exact_words(input_str):
exact_words = difflib.get_close_matches(input_str,words,n=1,cutoff=0.7)
if len(exact_words)>0:
return exact_words[0]
else:
... | You can use hashing techniques for checking correct pattern, something on the lines of [Rabin Karp Algorithm.](https://en.wikipedia.org/wiki/Rabin%E2%80%93Karp_algorithm)
You know what would be the hash value of your original strings in the list. For spell correction, you can try the combination of those words that gi... |
45,026,607 | I have a list of word library and a text in which there are a spell error (typos), and I want to correct the word spell error to be correct according to list of library
for example
in list of word :
`listOfWord = [...,"halo","saya","sedangkan","semangat","cemooh"..];`
this is my string :
`string = "haaallllllooo ... | 2017/07/11 | [
"https://Stackoverflow.com/questions/45026607",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/7627349/"
] | You can use `difflib`'s get close matches, though it is not that efficient.
```
words = ["halo","saya","sedangkan","semangat","cemooh"]
def get_exact_words(input_str):
exact_words = difflib.get_close_matches(input_str,words,n=1,cutoff=0.7)
if len(exact_words)>0:
return exact_words[0]
else:
... | You can use pyenchant to check spelling with your list of words.
```
>>> import enchant
>>> d = enchant.request_pwl_dict("mywords.txt")
>>> d.check('helo')
False
>>> d.suggest("Helo")
['He lo', 'He-lo', 'Hello', 'Helot', 'Help', 'Halo', 'Hell', 'Held', 'Helm', 'Hero', "He'll"]
```
You need to split your words and ch... |
45,026,607 | I have a list of word library and a text in which there are a spell error (typos), and I want to correct the word spell error to be correct according to list of library
for example
in list of word :
`listOfWord = [...,"halo","saya","sedangkan","semangat","cemooh"..];`
this is my string :
`string = "haaallllllooo ... | 2017/07/11 | [
"https://Stackoverflow.com/questions/45026607",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/7627349/"
] | It depends on how your data is stored, but you'll probably want to use a pattern matching algorithm like [Aho–Corasick](https://en.wikipedia.org/wiki/Aho%E2%80%93Corasick_algorithm). Of course, that assumes your input data structure is a Trie. A [Trie](https://en.wikipedia.org/wiki/Trie) a very space-efficient storage ... | I think you should apply string distance algorithms with a word to find nearest. You can apply [these](https://en.wikipedia.org/wiki/Levenshtein_distance) algorithms to find the nearest word. Those are mostly O(n) algorithms so at the end your sentence replacement would cost you O(n) at most. |
45,026,607 | I have a list of word library and a text in which there are a spell error (typos), and I want to correct the word spell error to be correct according to list of library
for example
in list of word :
`listOfWord = [...,"halo","saya","sedangkan","semangat","cemooh"..];`
this is my string :
`string = "haaallllllooo ... | 2017/07/11 | [
"https://Stackoverflow.com/questions/45026607",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/7627349/"
] | It depends on how your data is stored, but you'll probably want to use a pattern matching algorithm like [Aho–Corasick](https://en.wikipedia.org/wiki/Aho%E2%80%93Corasick_algorithm). Of course, that assumes your input data structure is a Trie. A [Trie](https://en.wikipedia.org/wiki/Trie) a very space-efficient storage ... | You can use pyenchant to check spelling with your list of words.
```
>>> import enchant
>>> d = enchant.request_pwl_dict("mywords.txt")
>>> d.check('helo')
False
>>> d.suggest("Helo")
['He lo', 'He-lo', 'Hello', 'Helot', 'Help', 'Halo', 'Hell', 'Held', 'Helm', 'Hero', "He'll"]
```
You need to split your words and ch... |
45,026,607 | I have a list of word library and a text in which there are a spell error (typos), and I want to correct the word spell error to be correct according to list of library
for example
in list of word :
`listOfWord = [...,"halo","saya","sedangkan","semangat","cemooh"..];`
this is my string :
`string = "haaallllllooo ... | 2017/07/11 | [
"https://Stackoverflow.com/questions/45026607",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/7627349/"
] | You can use `difflib`'s get close matches, though it is not that efficient.
```
words = ["halo","saya","sedangkan","semangat","cemooh"]
def get_exact_words(input_str):
exact_words = difflib.get_close_matches(input_str,words,n=1,cutoff=0.7)
if len(exact_words)>0:
return exact_words[0]
else:
... | I think you should apply string distance algorithms with a word to find nearest. You can apply [these](https://en.wikipedia.org/wiki/Levenshtein_distance) algorithms to find the nearest word. Those are mostly O(n) algorithms so at the end your sentence replacement would cost you O(n) at most. |
45,026,607 | I have a list of word library and a text in which there are a spell error (typos), and I want to correct the word spell error to be correct according to list of library
for example
in list of word :
`listOfWord = [...,"halo","saya","sedangkan","semangat","cemooh"..];`
this is my string :
`string = "haaallllllooo ... | 2017/07/11 | [
"https://Stackoverflow.com/questions/45026607",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/7627349/"
] | I am assuming you are writing spell checker for some language.
You might want tokenize the sentence into words.
Then shorten words like `haaallllllooo` to `haalloo`. Assuming the language you have doesn't have words that have many repeated letters too often. Easy to check since you have the dictionary.
Then you ca... | I think you should apply string distance algorithms with a word to find nearest. You can apply [these](https://en.wikipedia.org/wiki/Levenshtein_distance) algorithms to find the nearest word. Those are mostly O(n) algorithms so at the end your sentence replacement would cost you O(n) at most. |
45,026,607 | I have a list of word library and a text in which there are a spell error (typos), and I want to correct the word spell error to be correct according to list of library
for example
in list of word :
`listOfWord = [...,"halo","saya","sedangkan","semangat","cemooh"..];`
this is my string :
`string = "haaallllllooo ... | 2017/07/11 | [
"https://Stackoverflow.com/questions/45026607",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/7627349/"
] | It depends on how your data is stored, but you'll probably want to use a pattern matching algorithm like [Aho–Corasick](https://en.wikipedia.org/wiki/Aho%E2%80%93Corasick_algorithm). Of course, that assumes your input data structure is a Trie. A [Trie](https://en.wikipedia.org/wiki/Trie) a very space-efficient storage ... | You can use hashing techniques for checking correct pattern, something on the lines of [Rabin Karp Algorithm.](https://en.wikipedia.org/wiki/Rabin%E2%80%93Karp_algorithm)
You know what would be the hash value of your original strings in the list. For spell correction, you can try the combination of those words that gi... |
45,026,607 | I have a list of word library and a text in which there are a spell error (typos), and I want to correct the word spell error to be correct according to list of library
for example
in list of word :
`listOfWord = [...,"halo","saya","sedangkan","semangat","cemooh"..];`
this is my string :
`string = "haaallllllooo ... | 2017/07/11 | [
"https://Stackoverflow.com/questions/45026607",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/7627349/"
] | You can use hashing techniques for checking correct pattern, something on the lines of [Rabin Karp Algorithm.](https://en.wikipedia.org/wiki/Rabin%E2%80%93Karp_algorithm)
You know what would be the hash value of your original strings in the list. For spell correction, you can try the combination of those words that gi... | I think you should apply string distance algorithms with a word to find nearest. You can apply [these](https://en.wikipedia.org/wiki/Levenshtein_distance) algorithms to find the nearest word. Those are mostly O(n) algorithms so at the end your sentence replacement would cost you O(n) at most. |
45,026,607 | I have a list of word library and a text in which there are a spell error (typos), and I want to correct the word spell error to be correct according to list of library
for example
in list of word :
`listOfWord = [...,"halo","saya","sedangkan","semangat","cemooh"..];`
this is my string :
`string = "haaallllllooo ... | 2017/07/11 | [
"https://Stackoverflow.com/questions/45026607",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/7627349/"
] | You can use `difflib`'s get close matches, though it is not that efficient.
```
words = ["halo","saya","sedangkan","semangat","cemooh"]
def get_exact_words(input_str):
exact_words = difflib.get_close_matches(input_str,words,n=1,cutoff=0.7)
if len(exact_words)>0:
return exact_words[0]
else:
... | I am assuming you are writing spell checker for some language.
You might want tokenize the sentence into words.
Then shorten words like `haaallllllooo` to `haalloo`. Assuming the language you have doesn't have words that have many repeated letters too often. Easy to check since you have the dictionary.
Then you ca... |
45,026,607 | I have a list of word library and a text in which there are a spell error (typos), and I want to correct the word spell error to be correct according to list of library
for example
in list of word :
`listOfWord = [...,"halo","saya","sedangkan","semangat","cemooh"..];`
this is my string :
`string = "haaallllllooo ... | 2017/07/11 | [
"https://Stackoverflow.com/questions/45026607",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/7627349/"
] | It depends on how your data is stored, but you'll probably want to use a pattern matching algorithm like [Aho–Corasick](https://en.wikipedia.org/wiki/Aho%E2%80%93Corasick_algorithm). Of course, that assumes your input data structure is a Trie. A [Trie](https://en.wikipedia.org/wiki/Trie) a very space-efficient storage ... | I am assuming you are writing spell checker for some language.
You might want tokenize the sentence into words.
Then shorten words like `haaallllllooo` to `haalloo`. Assuming the language you have doesn't have words that have many repeated letters too often. Easy to check since you have the dictionary.
Then you ca... |
14,511,655 | There is probably a simple one-liner that I am just not finding here, but this is my question:
How do I check if an ArrayList contains all of the objects in another ArrayList? I am looking (if it exists) for something along the lines of:
```
//INCORRECT EXAMPLE:
if(one.contains(two))
{
return true;
}
else
{
r... | 2013/01/24 | [
"https://Stackoverflow.com/questions/14511655",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1889720/"
] | Here is another example use of containsAll() that I have used for asserting that two arrays are equal in JUnit testing:
```
List<String> expected = new ArrayList<String>();
expected.add("this");
expected.add("that");
expected.add("another");
List<String> actual = new ArrayListString();
actual.add("another");
actual.a... | Your code in the example doesn't make sense, but here's an example anyway.
```
ArrayList<Integer> one, two;
//initialize
boolean good = true;
for (int i = 0; i < two.size(); i ++) {
if (!(one.contains(two.get(i))) {
good = false;
break;
}
}
```
It simply loops through all of `two`'s elements ... |
14,511,655 | There is probably a simple one-liner that I am just not finding here, but this is my question:
How do I check if an ArrayList contains all of the objects in another ArrayList? I am looking (if it exists) for something along the lines of:
```
//INCORRECT EXAMPLE:
if(one.contains(two))
{
return true;
}
else
{
r... | 2013/01/24 | [
"https://Stackoverflow.com/questions/14511655",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1889720/"
] | Take a look at `containsAll(Collection<?> c)` method from `List` interface. I think it is what you are looking for. | isEqualCollection() method declared in the org.apache.commons.collections.CollectionUtils gives you the collections are same or not.
if (CollectionUtils.isEqualCollection(collectionA,collectionB))
{
do smt...
} |
14,511,655 | There is probably a simple one-liner that I am just not finding here, but this is my question:
How do I check if an ArrayList contains all of the objects in another ArrayList? I am looking (if it exists) for something along the lines of:
```
//INCORRECT EXAMPLE:
if(one.contains(two))
{
return true;
}
else
{
r... | 2013/01/24 | [
"https://Stackoverflow.com/questions/14511655",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1889720/"
] | There is a method called `containsAll` declared in the `java.util.Collection` interface. In your setting `one.containsAll(two)` gives the desired answer. | Per the List interface:
```
myList.containsAll(...);
``` |
14,511,655 | There is probably a simple one-liner that I am just not finding here, but this is my question:
How do I check if an ArrayList contains all of the objects in another ArrayList? I am looking (if it exists) for something along the lines of:
```
//INCORRECT EXAMPLE:
if(one.contains(two))
{
return true;
}
else
{
r... | 2013/01/24 | [
"https://Stackoverflow.com/questions/14511655",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1889720/"
] | This can also be done using streams in Java
```
List<String> employeeList = Arrays.asList("Marc","john");
List<String> masterEmployeeList = Arrays.asList("Marc", "Stacy", "john");
System.out.println(employeeList.stream().allMatch(masterEmployeeList::contains));
``` | isEqualCollection() method declared in the org.apache.commons.collections.CollectionUtils gives you the collections are same or not.
if (CollectionUtils.isEqualCollection(collectionA,collectionB))
{
do smt...
} |
14,511,655 | There is probably a simple one-liner that I am just not finding here, but this is my question:
How do I check if an ArrayList contains all of the objects in another ArrayList? I am looking (if it exists) for something along the lines of:
```
//INCORRECT EXAMPLE:
if(one.contains(two))
{
return true;
}
else
{
r... | 2013/01/24 | [
"https://Stackoverflow.com/questions/14511655",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1889720/"
] | Take a look at `containsAll(Collection<?> c)` method from `List` interface. I think it is what you are looking for. | Here is another example use of containsAll() that I have used for asserting that two arrays are equal in JUnit testing:
```
List<String> expected = new ArrayList<String>();
expected.add("this");
expected.add("that");
expected.add("another");
List<String> actual = new ArrayListString();
actual.add("another");
actual.a... |
14,511,655 | There is probably a simple one-liner that I am just not finding here, but this is my question:
How do I check if an ArrayList contains all of the objects in another ArrayList? I am looking (if it exists) for something along the lines of:
```
//INCORRECT EXAMPLE:
if(one.contains(two))
{
return true;
}
else
{
r... | 2013/01/24 | [
"https://Stackoverflow.com/questions/14511655",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1889720/"
] | There is a method called `containsAll` declared in the `java.util.Collection` interface. In your setting `one.containsAll(two)` gives the desired answer. | Your code in the example doesn't make sense, but here's an example anyway.
```
ArrayList<Integer> one, two;
//initialize
boolean good = true;
for (int i = 0; i < two.size(); i ++) {
if (!(one.contains(two.get(i))) {
good = false;
break;
}
}
```
It simply loops through all of `two`'s elements ... |
14,511,655 | There is probably a simple one-liner that I am just not finding here, but this is my question:
How do I check if an ArrayList contains all of the objects in another ArrayList? I am looking (if it exists) for something along the lines of:
```
//INCORRECT EXAMPLE:
if(one.contains(two))
{
return true;
}
else
{
r... | 2013/01/24 | [
"https://Stackoverflow.com/questions/14511655",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1889720/"
] | There is a method called `containsAll` declared in the `java.util.Collection` interface. In your setting `one.containsAll(two)` gives the desired answer. | Here is another example use of containsAll() that I have used for asserting that two arrays are equal in JUnit testing:
```
List<String> expected = new ArrayList<String>();
expected.add("this");
expected.add("that");
expected.add("another");
List<String> actual = new ArrayListString();
actual.add("another");
actual.a... |
14,511,655 | There is probably a simple one-liner that I am just not finding here, but this is my question:
How do I check if an ArrayList contains all of the objects in another ArrayList? I am looking (if it exists) for something along the lines of:
```
//INCORRECT EXAMPLE:
if(one.contains(two))
{
return true;
}
else
{
r... | 2013/01/24 | [
"https://Stackoverflow.com/questions/14511655",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1889720/"
] | There is a method called `containsAll` declared in the `java.util.Collection` interface. In your setting `one.containsAll(two)` gives the desired answer. | You can use `containsAll` method of the list to do the check. However, this is a linear operation. If the list is large, you should convert it to `HashSet` first, and then perform `containsAll`:
```
HashSet tmp = new HashSet(one);
if (tmp.containsAll(two)) {
...
}
```
If the length of `one` is `N` and the length... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.