Help Bites
-
What's the official way to turn on Numlock on boot in Ubuntu 16.04? I can't find any option that would let me do that, all the instructions I found online use menus that don't exist over here, and the only thing that has a chance to work is this
numpadx
program you're supposed to put in some boot script, which is just asking for trouble due to interference with whatever Ubuntu does to disable it in the first place. Is there any better solution?
-
@gąska said in Help Bites:
What's the official way to turn on Numlock on boot in Ubuntu 16.04?
Depends on which DE you're using.
KDE : System Settings > Input Devices > Keyboard > Hardware > NumLock on Plasma Startup
If you're not using KDE
-
@timebandit alas, it's GNOME.
-
-
@timebandit it's a preconfigured work laptop. I don't want to mess with it any more than absolutely necessary. Inb4: yes, numlock is absolutely necessary.
-
@gąska said in Help Bites:
yes, numlock is absolutely necessary
The really easy solution is to turn it on manually, then never reboot :face_with_stuck-out_tongue:
-
@gąska I’d gladly exchange a few problems of mine for that one of yours.
But in gnome-tweak-tool, under „Typing”, you have all kinds of delicous options. I think there was one where you could emulate Apple’s numpad (which only has numbers, no numlock, and numlock is always on).
-
In IntelliJ, how do I reorder dock panels so that left sidebar spans entire window height and bottom "side" bar is limited to text editor width? The default is the other way around - the bottom spanning all the way and side being limited by it - and there's no obvious way to alter it.
Edit: also, when selecting different windows in sidebars, each seems to have its own width, so the sidebars resize themselves constantly. Is there a way to unify width of all tools, or to make sidebars unresizable?
-
Press the wonderful Ctrl+Shit+A keyboard shortcut, then search for this option.
Edit: you can make every tool window the same width by focusing each one at a time, tapping Ctrl+Shift+Left until it resizes to 0, then tapping Ctrl+Shift+Right a fixed number of times.
You'll have to avoid resizing them again afterwards. Is there a better way?
-
@zecc said in Help Bites:
Press the wonderful Ctrl+Shit+A keyboard shortcut
*searches for that modifier key*
-
@heterodox Probably somewhere on this keyboard
-
-
Trying to learn SQL (Oracle I think 11, dunno, school server not mine; using SQL Developer 18.1).
BEGIN TRANSACTION; ROLLBACK;
I get this error:
Error report - ORA-06550: linia 2, kolumna 9: PLS-00103: Encountered the symbol "end-of-file" when expecting one of the following: ( begin case declare end exception exit for goto if loop mod null pragma raise return select update while with <an identifier> <a double-quoted delimited-identifier> <a bind variable> << continue close current delete fetch lock insert open rollback savepoint set sql execute commit forall merge pipe purge 06550. 00000 - "line %s, column %s:\n%s" *Cause: Usually a PL/SQL compilation error. *Action:
What am I doing wrong?
-
@gąska
OracleAlso remove the ; at the start
Or at the end? Oracle is a shitfest about such things, unlike sql server where ; is optional
-
@gąska It might want a
/
.
-
@pleegwat what does '/' mean?
I think it's important to note that I'm trying to do plain old SQL query, not PL/SQL or whatever.
-
@gąska Certain statements (mostly pl/sql ones though) need to be terminated by a
/
on its own line instead of a;
.
-
@gąska said in Help Bites:
I think it's important to note that I'm trying to do plain old SQL query, not PL/SQL or whatever.
That's not really how it works. Once you're in PL/SQL or T-SQL territory, everything's PL/SQL or T-SQL. Both are based on SQL 99, but SQL 99 is so tiny virtually every query you write is going to have to venture outside its confines.
-
@blakeyrat I always thought PL/SQL is some special language for stored procedures distinct from regular Oracle SQL.
-
@gąska said in Help Bites:
@blakeyrat I always thought PL/SQL is some special language for stored procedures distinct from regular Oracle SQL.
Yes and no, and I'm not sure where the lines lie either. Broadly SQL consists of queries, DML, and DDL. Triggers, function definitions, package definitions, and basically anything containing the BEGIN or END keywords are in PL/SQL. There is a third category of commands which are used in SQL*PLUS, but are not valid in applications, and SQL developer may have a similar list.
I tend to look at the official reference for correct syntax. It does not list
BEGIN TRANSACTION
, or anything starting inBEGIN
, and I know BEGIN in PL/SQL doesn't need to be terminated with a semicolon so most likely the parser is scanning for a matching END before parsing the text within, causing the error.
-
@pleegwat that was very informative, thanks. So, what's the syntax for starting transaction?
-
-
@luhmann said in Help Bites:
Seems to indicate you can just drop the first line completely
To the contrary - looks like I have to wrap everyrhing in
BEGIN..END
. I'll play with it more next week.
-
@gąska said in Help Bites:
BEGIN..END
Like
BEGIN TRANSACTION; BEGIN --ToDo: do something END ROLLBACK;
That is retarded. All my (T)SQL is throwaway code I just wrap that one line UPDATE/DELETE statement in a transaction ... I only need BEGIN/END when there are multiple statements to group.
-
@gąska said in Help Bites:
@pleegwat that was very informative, thanks. So, what's the syntax for starting transaction?
In oracle you're always in a transaction. However your tool likely has an autocommit setting which you can enable or disable. Or you can use a pl/sql block like:
BEGIN UPDATE FOO SET BAR='baz' WHERE 'qux'=1; /* ... */ COMMIT; END; /
-
Should a laptop with disassembled case emit a high-pitched hum similar to those of scanners? I'm pretty sure it didn't do that before.
-
Git, private server (not GitHub, GitLab or whatever — https://whatever.mycompany.com:12345/path/to/project/repo). I pushed a branch upstream:
git push -u origin mybranch ... Assorted messages suggesting success git branch -a * mybranch master remote/origin/HEAD -> remote/origin/master remote/origin/master remote/origin/mybranch
(Or something like that; doing this from memory.)
Co-worker cannot see the branch.
git checkout mybranch Blah blah unknown branch git branch -a * master remote/origin/HEAD -> remote/origin/master remote/origin/master
Even an hour after I pushed it, he still couldn't see it on the server. (Yes, I checked that he's using the same server.)
Any ideas?
-
@hardwaregeek
git fetch --all
?Is he really using the same server (as in actually hitting the server) or just the local tracking branches?
-
-
@timebandit
git branch -a
lists all, local and remote. As I posted, I can seemybranch
on both. He should be able to see it on remote, but can't.
-
@zecc said in Help Bites:
actually hitting the server
I ... think so. It's asking for his password, which local operations don't need. I think. I'll check with him this morning.
-
@hardwaregeek said in Help Bites:
He should be able to see it on remote, but can't.
I think he won't see the remote branches until he update.
git fetch origin
& try again
-
@timebandit I know I can see branches that other people create without doing that, but it's worth a try.
-
@hardwaregeek If you use
git pull
a lot then you might not need an explicitgit fetch
because pull will simply do that for you (depending on which remote repo the current branch is associated with through its "upstream branch").If your cow-orker is not doing any remote work for now then he might not see the remote branch ever unless he runs
fetch
to sync.
-
Help Cartman name things #5123211
Socket.IO has a concept of "rooms". Server can add clients to arbitrary groupings, so that when it sends messages to a grouping, everyone in it receives it.
I want to extend that so that:
- rooms can belong to super-rooms
- within a "super-room", user can be in only one room at a time
Example would be if you had a chat page with multiple languages, where you can only pick one language at a time . Here, super-room would be "chat", and it would have a sub-room for each language (chat/eng, chat/fra).
Any idea what metaphor to use here? It needs to be something to signal that a client can only belong to one thing at a time. "room" could actually work, if it wasn't already taken by Socket.IO.
-
@cartman82 A super-room is obviously a house or apartment. Or more generically a building.
-
Or a wing, or story/floor.
-
Chest\drawer?
-
Sigh. I'll go with sector -> room for now.
But I hate it.
-
@cartman82 Ooh. Sector is good, though.
-
@heterodox Nah "sector" is jargon, people only know it from bad sci-fi movies. You could do something like "gathering", but I'd personally find a way to get access to "room" by renaming something else.
-
@blakeyrat said in Help Bites:
@heterodox Nah "sector" is jargon, people only know it from bad sci-fi movies.
My impression is that this is only visible in the code (not in the UI), so not necessarily a problem.
-
@cartman82 why not RoomGroup?
-
@scarlet_manuka said in Help Bites:
@cartman82 A super-room is obviously a house or apartment. Or more generically a building.
@zecc said in Help Bites:
Or a wing, or story/floor.
Those are the closest real world equivalents of a thing that has many rooms and where a user can only be in one of those rooms while being in the bigger thing.
I'd choose building. You send a message to a building, which can then be delivered to each room or even to a single room if it has a c/o on it. Makes absolute sense.
-
@cartman82
Department?
Division?
-
Bathroom/Stall
-
@cartman82 said in Help Bites:
Sigh. I'll go with sector -> room for now.
But I hate it.
Update on this.
In the meantime, I've ditched rooms and switched to namespaces. SocketIO is terrible in general, but namespaces are slightly less terrible than rooms. I kept the nomenclature, though.
So the public api is now like this.
Client:
/** * Set value for a given sector. So within this sector, this client * will receive only the messages sent under given value. * In the background, this will (re)create namespace for this sector. */ setSector(sector, value) { //... } /** * Attach handler to normal event * (untargeted broadcast or targeted to this client) */ onEvent(name, handler) { //... } /** * Attach handler to receive events for specific sector */ onSectorEvent(sector, name, handler) { //... }
Server:
/** * Send message to specific client. */ this.sendToClient = (clientId, name, payload) => { //... }; /** * Send message to user. The message will be received by all user's clients * (so it will appear in multiple browser tabs) * @param userId * @param name * @param payload */ this.sendToUser = (userId, name, payload) => { //... }; /** * Broadcast message to all clients */ this.broadcastToAll = (name, payload) => { //... }; /** * Broad message to specific sector. Sector can be just a name or a [name, value] pair. * Clients can only join one sector at a time, so in case of a sector pair, "value" is exclusive. * @param {string|Array} sector * @param name * @param payload */ this.broadcastToSector = (sector, name, payload) => { //... };
-
My UPS (APC Back-UPS 600) beeps angrily whenever I'm doing something graphically intensive on GW2.
The light is greenish yellow and the beeps are like the morse code for "taa": long, short-long, short-long.
I'm almost 100% certain that nothing is changing on the input end of the UPS (at least, it would be a huge coincidence if there was a voltage fluctuation in real life every time something graphically complex happened in a video game), and the light is definitely not red - I've seen the red light on the other UPS purchased at the same time when my dad thought it would be a good idea to plug in an airplane cockpit worth of joysticks and switches into it in addition to his computer.
Out of the four types of beeps listed on the page, only the first is remotely close to what I'm experiencing.
Is this safe to ignore? As far as I know, the beeping has never happened when I wasn't playing a video game.
-
@ben_lubar Is your PC's PSU sufficient?
-
@blakeyrat said in Help Bites:
@ben_lubar Is your PC's PSU sufficient?
I assume so. I haven't had any weird noises come out of my computer or any error messages pop up about low power.