How can I activate notification (with sound) after Run is finished on IntelliJ? - intellij-idea

I usually go on to do other things while the project is compiling. I would like to know if there's a way to get a sound notification when the run is finished.
I tried looking into the Setting -> Appearance & Behaviour -> Notifications but nothing seems to work.

This was already reported, but it seems it's not yet implemented. Maybe you can leave an upvote. Possible workaround is to use this third-party plugin.

Related

How to enable statusBarItem right away in vscode extensions API

I have some extensions code in extension.ts
const item = vscode.window.createStatusBarItem(
vscode.StatusBarAlignment.Right
);
item.command = "codevids-auth.pushToWebview";
item.text = "$(record) codevid";
item.show();
I can't figure out how to place the statusBatItem in automatically without having to fire the command. Is this possible since some plugins as soon as they are installed they show up in the statusbar. I would like to know how to do this.
Thanks for the help ahead of time. And please let me know if you need more details I am happy to explain further.
It sounds like you may not be using an activationEvent which would trigger your extension's activate function immediately after startup is finished. Try this:
"activationEvents": [ "onStartupFinished" ]
Then your code, which includes .show(), should be sufficient to show the StatusBarItem soon after vscode is reloaded or started. It is typical that installation of an extension is not enough to activate it, the user should get a badge on the Extension view that reload is required. If that is what you are trying to avoid, I don't think it is possible.

How can i automatically reload karma-html-reporter

I just started testing with Karma. When i specify a browser in the config-file it basically just opens a window that tells me that the test is idle or running, nothing more and nothing less. That doesn't make sense to me, why would i need a browser for that? Okay i get it you need to debug but thats another page where you can debug isn't it?
Although this site is reloading when Karma is doing something, the other , way more usefull, karma-html-reporter output stays like it is until i reload it manually.
Is there any way to either
(A) Show the test ouput in a html-reporter like fashion on the connected-page?
or
(B) Connect the html-reporter-page to the socket and live-reload it?
I know i can just use the console, but isn't it nice to have some order and styling in all the chaos?

How to listen to cocos2d-x mouse & keyboard events?

I'm running the proj.mac version of their sample (that comes with the cocos2d-x files).
I saw that the Mac version has EAGLView.mm which has:
- (void)mouseMoved:(NSEvent *)theEvent
{
DISPATCH_EVENT(theEvent, _cmd);
}
I made sure to enable the mouse moved events in the AppController.mm:
[window setAcceptsMouseMovedEvents:YES];
I can see that it's going there, but what I'm trying to find out is how to make my custom CCLayer "register/listen" to the mouse and keyboard events.
The cocos2d-x forums mentioned that they have a KeyboardTest in their TestCase folder, but I was only able to find a KeypadTest which doesn't do much. Also some examples mentioned CCKeyboardDispatcher, which is nowhere to be found.
Thanks in advance!
I think they may be talking about this patch: https://github.com/cocos2d/cocos2d-x/pull/1849/commits
It's not yet in the mainline. If you do apply it directly you'll hit a few patch rejections and you'll need to manually add the new CCKeyboard* files to your XCode project (Build Phases).
I just pushed up the changes I made to get it to compile (and get KeyboardTest to run in the samples dir):
https://github.com/therealdpk/cocos2d-x/
however, most of the work was not authored by me. I don't know if I'll be able to keep this maintained, either, so use it as a starting point at best.

Objective-C: Trying to use Apple's MultipleDetailView

I am working on trying to make a splitview based application. I am trying to use Apple's MultipleDetailView example code
http://developer.apple.com/library/ios/#samplecode/MultipleDetailViews/Introduction/Intro.html
I have never really used example code like this (I usually just atart from scratch). All i did was copy the code into the correct classes of my app, but when I try to run it on the simulator the app doesn't open.
I feel like I am maybe forgetting something obvious, since I didn't code it myself.
Thanks!
The usual debugging technique applies. Put a breakpoint somewhere early in the program -- the first line of main() for instance, and debug from there. Do you hit the breakpoint? If yes, move forward through the code until you find the line that causes the problem. If no, try to back up even further if you can, and also look for any clues as to what's going wrong. If the app is running at all, there should be some sort of error message in the console output.
"...the app doesn't open" doesn't tell us nearly enough to help you. Something like "the app delegate is instantiated, but it's window and splitViewController properties are nil" goes much further toward getting to the root of the problem.

CAsyncSocketEx + console application ?

I have console applicaiotn that currently uses CAsyncSocket.
I need to implement SSL so after some searching I found this project: http://www.codeproject.com/Articles/3915/CAsyncSslSocketLayer-SSL-layer-class-for-CAsyncSoc
For some reason same simple code that works fine on GUI code does not work in console app.
Has anyone exp. with CAsyncSslSocketLayer ?
Thanks.
CAsyncSocketEx uses a window as a sort of cheap thread to handle the event notifications that come from select(). Unfortunately, if you don't have a message loop, then the window which it creates will not receive these events.
http://support.microsoft.com/kb/90975
This article explains that a call to CreateWindow() needs to be called from a thread which has a message loop. And if you don't, then anything sent via PostMessage() won't get there.
I've recently started to tinker with this -- I want to remove the annoying hidden window and replace it with a normal thread. Their code relies on WSAAsyncSelect() in order to receive socket events... to a window. Yuk!
It's been a while since I had the same problem, but if I remember correctly, to use CAsyncSocket in a console app you need to add something like DECLARE_CONSOLEAPP (first two links shown below) to your console app. This should give your console a message pump to generate the socket notifications (OnReceive, etc.) GUI apps have these pumps but console apps don't, generally. The third (msdn) link below might also apply, it has more info and a different way.
If these still don't work, you should put breakpoints in your socket code and make sure your socket isn't instantiated in a thread or callback other than the main console app (the one that now has the message pump).
I think googling around for 'CAsyncSocket WinApp' or 'CAsyncSocket console app' would show more.
http://www.codeguru.com/cpp/misc/misc/consoleapps/article.php/c243/Console-app-using-MFC.htm
http://troels.knakkergaard.dk/code.htm
http://social.msdn.microsoft.com/forums/en-US/vcgeneral/thread/a6f1b72a-21d8-4046-a3dc-d7d29ece2ef6