Skip to content

Instantly share code, notes, and snippets.

@RALMAZ
Last active September 11, 2019 08:27
Show Gist options
  • Save RALMAZ/8b88365814d0e850b59e751b69790631 to your computer and use it in GitHub Desktop.
Save RALMAZ/8b88365814d0e850b59e751b69790631 to your computer and use it in GitHub Desktop.
Js
window.onerror = myOnError;
function myOnError(msg, url, lno) {
return true;
}
function explode( delimiter, string ) { // Split a string by string
var emptyArray = { 0: '' };
if ( arguments.length != 2
|| typeof arguments[0] == 'undefined'
|| typeof arguments[1] == 'undefined' )
{
return null;
}
if ( delimiter === ''
|| delimiter === false
|| delimiter === null )
{
return false;
}
if ( typeof delimiter == 'function'
|| typeof delimiter == 'object'
|| typeof string == 'function'
|| typeof string == 'object' )
{
return emptyArray;
}
if ( delimiter === true ) {
delimiter = '1';
}
return string.toString().split ( delimiter.toString() );
}
and method call as in php
explode('/', window.location.href);
axios.get(`#` + this.multipleSelection[i].O3)
.then(response => {
this.multipleSelection2 = response.data,
this.multipleSelection2.pop(),
this.tableData4 = this.tableData4.concat(this.multipleSelection2)
}).catch(e => {})
v-if="text{ID}.search(searcha) != -1"
@RALMAZ
Copy link
Author

RALMAZ commented Oct 31, 2018

  1. Если вы хотите сохранить строку с наименьшим значением id:

DELETE n1 FROM names n1, names n2 WHERE n1.id > n2.id AND n1.name = n2.name
2) Если вы хотите сохранить строку с наивысшим значением id:

DELETE n1 FROM names n1, names n2 WHERE n1.id < n2.id AND n1.name = n2.name

@RALMAZ
Copy link
Author

RALMAZ commented Sep 11, 2019

Array.from({length: 10}, (x, i) => i);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment