Linux ns1.utparral.edu.mx 6.8.0-79-generic #79~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Fri Aug 15 16:54:53 UTC 2 x86_64
Apache/2.4.58 (Unix) OpenSSL/1.1.1w PHP/8.2.12 mod_perl/2.0.12 Perl/v5.34.1
: 10.10.1.9 | : 10.10.1.254
Cant Read [ /etc/named.conf ]
daemon
Terminal
AUTO ROOT
Adminer
Backdoor Destroyer
Linux Exploit
Lock Shell
Lock File
Create User
README
+ Create Folder
+ Create File
/
usr /
share /
doc /
gjs /
examples /
[ HOME SHELL ]
Name
Size
Permission
Action
calc.js
3.59
KB
-rw-r--r--
dbus-client.js
4.73
KB
-rw-r--r--
dbus-service.js
3.43
KB
-rw-r--r--
gettext.js
630
B
-rw-r--r--
gio-cat.js
733
B
-rw-r--r--
glistmodel.js
3.73
KB
-rw-r--r--
gtk3-template.js
1.54
KB
-rw-r--r--
gtk3-template.ui
1.61
KB
-rw-r--r--
gtk4-template.js
1.59
KB
-rw-r--r--
gtk4-template.ui
1.61
KB
-rw-r--r--
gtk-application.js
3.65
KB
-rw-r--r--
gtk.js
2.53
KB
-rw-r--r--
http-client.js
1.4
KB
-rw-r--r--
http-server.js
1.19
KB
-rw-r--r--
README
77
B
-rw-r--r--
test.jpg
35.55
KB
-rw-r--r--
test.jpg.license
158
B
-rw-r--r--
timers.js
434
B
-rw-r--r--
webkit.js
485
B
-rw-r--r--
websocket-client.js
1.41
KB
-rw-r--r--
Delete
Unzip
Zip
${this.title}
Close
Code Editor : glistmodel.js
/* exported GjsListStore */ // SPDX-License-Identifier: MIT OR LGPL-2.0-or-later // SPDX-FileCopyrightText: 2020 Andy Holmes <andrew.g.r.holmes@gmail.com> 'use strict'; const GObject = imports.gi.GObject; const Gio = imports.gi.Gio; /** * An example of implementing the GListModel interface in GJS. The only real * requirement here is that the class be derived from some GObject. */ var GjsListStore = GObject.registerClass({ GTypeName: 'GjsListStore', Implements: [Gio.ListModel], }, class MyList extends GObject.Object { constructor() { super(); /* We'll use a native Array as internal storage for the list model */ this._items = []; } /* Implementing this function amounts to returning a GType. This could be a * more specific GType, but must be a subclass of GObject. */ vfunc_get_item_type() { return GObject.Object.$gtype; } /* Implementing this function just requires returning the GObject at * @position or %null if out-of-range. This must explicitly return %null, * not `undefined`. */ vfunc_get_item(position) { return this._items[position] || null; } /* Implementing this function is as simple as return the length of the * storage object, in this case an Array. */ vfunc_get_n_items() { return this._items.length; } /** * Insert an item in the list. If @position is greater than the number of * items in the list or less than `0` it will be appended to the end of the * list. * * @param {GObject.Object} item - the item to add * @param {number} position - the position to add the item */ insertItem(item, position) { if (!(item instanceof GObject.Object)) throw new TypeError('not a GObject'); if (position < 0 || position > this._items.length) position = this._items.length; this._items.splice(position, 0, item); this.items_changed(position, 0, 1); } /** * Append an item to the list. * * @param {GObject.Object} item - the item to add */ appendItem(item) { if (!(item instanceof GObject.Object)) throw new TypeError('not a GObject'); let position = this._items.length; this._items.push(item); this.items_changed(position, 0, 1); } /** * Prepend an item to the list. * * @param {GObject.Object} item - the item to add */ prependItem(item) { if (!(item instanceof GObject.Object)) throw new TypeError('not a GObject'); this._items.unshift(item); this.items_changed(0, 0, 1); } /** * Remove @item from the list. If @item is not in the list, this function * does nothing. * * @param {GObject.Object} item - the item to remove */ removeItem(item) { if (!(item instanceof GObject.Object)) throw new TypeError('not a GObject'); let position = this._items.indexOf(item); if (position === -1) return; this._items.splice(position, 1); this.items_changed(position, 1, 0); } /** * Remove the item at @position. If @position is outside the length of the * list, this function does nothing. * * @param {number} position - the position of the item to remove */ removePosition(position) { if (position < 0 || position >= this._items.length) return; this._items.splice(position, 1); this.items_changed(position, 1, 0); } /** * Clear the list of all items. */ clear() { let length = this._items.length; if (length === 0) return; this._items = []; this.items_changed(0, length, 0); } });
Close