Stream a terminal application's GUI inside a view - objective-c

I have been experiencing with the ncurses library for a couple of weeks now and I started wondering if there was a way to wrap the terminal app's GUI inside a Cocoa window.
I've been searching around but I can't seem to find anyone who has done it. I would appreciate any help on the matter.
Thanks.

You could try using classes from iTerm 2 - which is a complete open source terminal app. That should give you a view with the ncurses support you require. iTerm 2 is on GitHub.

Related

How to troubleshoot React Native build error?

Below you can see the output I get when I try to run npx react-native run-android. It suggests some options to try in order to further pinpoint the problem, however they don't work with the aforementioned command so I assume that they are related to a gradle (just an educated guess).
I know ZERO about gradle; I have just seen the name here and there and in the output shown below. So please keep that in mind when you answer. If I need to learn how to run some gradle command(s) directly, please be as verbose as possible in your answer.
The project was working fine just a bit ago, but I wanted the ability to force portrait mode for certain screens but without configuring my entire app to always have to stick to portrait mode. So I found what looked to be a solution in the react-native-orientation-locker module. I installed it with yarn and then proceeded to update files as directed: https://www.npmjs.com/package/react-native-orientation-locker.
After updating the appropriate files, I got an error that suggested axios was the problem. I uninstalled and reinstalled axios. After that didn't work, I proceeded to undo all the file changes I had just made. Then I uninstalled the react-native-orientation-locker module.
To my knowledge, I have undone everything I did between the time the project worked and stopped working.
Sadly, I had not put this into source control yet (a mistake I won't make again), so I can't revert.
Where to go from here?
Problems like this are hard to pin point. What you can do is open the android project in android studio and see the logs as the project is being assembled. I assume you do not have much knowledge about android either so you might need some senior resource to help you.
What I usually do in this case is open android studio and if I am lucky enough, it tells me which file has an issue and I go to the file and do what android studio suggests me. Some times it fixes the problem and sometimes it doesn't.
Another thing I would like to mention is that the documentation of the package you are using is important to follow. I assume you did that already but I would suggest to review it narrowly and closely.
Another guess I can tell you is try to go to your-project/android/build.gradle and over there, you'll see something like this in the start. The package you are using mentions something about target SDK 27. I think you should check that out too. May be it helps
Lastly I would say always use source control while working with react native. It can easily blow up at any time so you should always have a safety net to fallback to :)

macOS use "Command key" as zsh shorcuts

I want to use macOS command key as iterm2's shortcut. (not an alias, I mean ^W ^E Command-B, etc)
Is this possible?
I search for this question and found some tips in zsh doc.
However, I still cannot fix my problem.
Besides, is there any best practice for writing zle config?
I totally messed up by lots of ways to change my custom terminal shortcuts.
Is there somebody can help?
a detail tutorial article will be great, too
If you're on macOS, rather than trying to configure keyboard shortcuts in every shell and/or terminal you use, it's much easier to just configure it once, on the OS level, with Karabiner-Elements. It even comes with a handy module for it, called Keyboard shortcuts for terminal apps, so you don't have to configure it yourself.

Why won't CodeBlocks attach to a process?

I recently ran into an issue that I want to share Q&A style here. Hopefully it will help others, at minimum it is documented so I can find it later :)
When trying to run Ncurses in CodeBlocks it blows up when it hit initscr();. With VSCode this was not a problem, so I know there was something I am missing. With the help of StackOverflow it appears the best way to approach this with gdb (and CodeBlocks) is to attach to the process itself after it is running, rather than starting it in CodeBlocks. (Debugging ncurses application with gdb)
However, when I try to attach to the PID it just says that it was unable to attach to the process. Why is this?
I found that if I tried to run it through gdb on the commandline I also got this same issue. It comes from Kernal Hardening to prevent hacking. With this answer: https://stackoverflow.com/a/32274645/1770034
I discovered I needed to switch over to the root user. Then run echo 0 > /proc/sys/kernel/yama/ptrace_scope Now Code blocks will happily attach to the process and you can use your break points.

How to make expandable list for Windows10 Universal App?

I am newbie to windows universal app development and I need an expadable list. In the past I did it with WPToolkit for Windows Phone 8 but I read that it is not available for UWP. I see ExpanderRT project and tried to use it but I couldn't be successfull. I add Shared project of ExpanderRT as an existing project to my solution and use as in the screenshot. Now I'm taking the namespace error.
I have a time limit. I need fast and easy working soluton for expandable list. Thank you all for your help.
[UPDATE]
I tried https://github.com/brendankowitz/ZeroProximity.Accordion as #Osman said. But I'm not sure if it is the right decision. Because I see the expandable list and it works but project build throw error as in the screenshot below. I install it via nuget. It wasn't installed in the first place. I run as a administrator and changed project.json 's Copy to Output Directory value to Copy always. Then it was installed.
So my questions; Is this error important? Will it create problems when I want to put the app on store? I don't know how to act to this error, please help!
https://github.com/brendankowitz/ZeroProximity.Accordion
You can use the library given in the link above. I used it on our UWP project.It works great.
Hope this helps,
Osman

TextMate/Macfusion combo for mounting projects over SSH

Here is my workflow: I use Macfusion to mount a server over SSH, and then edit the root directory of the project in TextMate (using mate /Volumes/server/projectdir). I have a plug in installed that disables refreshing on refresh. This works ALMOST perfectly--the only thing I have problems with is "Find in Project": it's REALLY slow. Has anyone run into this problem before and been able to find any solutions? Currently I go to terminal when I have to do a search, but it would be great to be able to do it in TextMate.
Thanks!
Find in Project is slow no matter what. You probably want something like AckMate