I have dual citizenship. Born in the UK, but we emigrated to Canada when I was only six, which was over 50 years ago, now. So, yeah, I do, bit it's somewhat tenuous. I don't really remember much about life in Britain.
I generally do not like when post ask " I am using / have X ..." and poster receives "advise" "why don't you use XYZ instead.."
I have been struggling using Linux version of X IDE together with "plug-in" called "Terminal communication framework" - TCF.
It is rather obscure framework , but does all the "dirty work" after the code is cross-compiled.
My app is intended to run on RPi and so far TCF works as expected.
i set up python 3.4 and PostgreSQL 10.6 on Oracle Linux 7.4.
when i create plpython3u it's error.
could not load library "/u01/PostgreSQL/10/lib/postgresql/plpython3.so": libpython3.4m.so.1.0: cannot open shared object file: No such file or directory
then i add export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH in file ~/bash_profile
Finally, i have to restart services postgreSQL : pg_ctl restart ==> it's ok.
but when i reboot linux , it will be error again, i guess LD_LIBRARY_PATH load after service postgres start. How i Can resolve it ?
Thank you !
There should be some information in the PostgreSQL installation guide as to how to set this up. But if not then I would guess it needs to be set in one of the /etc/rc startup scripts. You will need to check the Linux man pages to decide which one you should use.
to /lib/systemd/system/postgresql.service. The best place for that would be right after the line that says Export=PGDATA=path-to-pgdata
Meanwhile, I would follow Richard's advice and contact the PostgreSQL mailing list and ask there. They may have a better solution so that when you update to PGSQL 10.XX or 11.XX, you won't have to continually remember to edit the startup script.
I am new to Linux Shell (there is #!/bin/sh in the beginning of my file) and I need to write a Git pre-commit hook, for my Visual Studio C# Project repository, that must prevent a commit from being performed if a specific file
Thank you. The hooks are already enabled and working and they are calling standard .bat-files as it is now. My plan was to write as much as possible in standard .bat-files, but I think a check like this is difficult to pass on to a .bat-file.
Afzaal Ahmad Zeeshan wrote:
is not part of the selected files to be committed
What exactly do you mean by this? Does the file need to be added, modified or anyway altered in the commit, or just to make sure that it is not deleted?
I use TortoiseGit and when I click commit I get a list of all files with modifications. Next to each file name in the list there's a checkbox that I can mark the specific file for inclusion in the commit about to happen. So, the user must always check the checkbox next to GitCommitDateAndTime.cs. Now, you could argue that I could always programmatically click the checkbox as a convenience for the user, but I have seen that some of my colleagues use git from some kind of command line tool so this solution wouldn't work for them.
If I was able to pass parameters (in this case ASCII-strings with files that have their checkboxes checked) to an .exe-file then this problem would be gone since it would be extremely easy to write a C#-application that would perform the check, but I have no clue how to do that either.
I have not heard of such things in Linux. Are you using the wrong terminology, or the wrong files?
No, not in Linux, in Windows (the type of .bat-files you could run on dos in the 1990's). So in this case I start off with a Git hook file written in #!/bin/sh, which I believe has some relation with Linux, but since I have no knowledge of that I want to move into Windows environment (.bat-file or .exe written in C#), but I have no idea how to make that bridge and pass parameters.
Windows still supports .bat files; more commonly .cmd these days. And passing parameters is just the same as in running an executable in a console window. Try the following:
if "%1" == "" goto :eof
echo next parameter is %1
Save as zzz.cmd and then run it by calling "zzz one two three". That shows how to pass a variable number of parameters to a batch file. Alternatively the parameters can be addressed by their actual position (but only the first 9).
However, converting a shell script to a Windows cmd file is no easy matter unless you are reasonably proficient in bash or similar, and Windows batch commands. And unless they are small (less than 15-20 lines) it is going to be a considerable task.
Wait a minute, I think I just had an epiphany! That line that gets the files about to be committed, git diff --cached --name-only, isn't that the same as calling something like (I'm not at work now, but in another .bat-file there is something close to this) "C:/program files/git/bash.exe" git diff --cached --name-only? In that case I might as well retrieve the list of files directly in the .bat-file, not in the #!/bin/sh file.
I'm looking to dive a bit deeper into programming, and I have a few app ideas I'd like to build. The market is flooded with different languages for different tasks. I am hoping to find the language that will pay off the most in the end for me, one that will help me in my day job of Linux Administration as well as help me build useful cross platform applications.
Java/Kotlin seems most directly tied to the Unix/Linux platform. Java all over industry, and Kotlin starting to make a bigger splash. Kotlin would at least bring familiarity to the JVM and it's quirks.
C# is moving .Net core to be the new standard that is Linux, Mac and Windows friendly. At this point this is not commonly used in enterprise to my experience (.Net on Linux).
C++ is pretty happy on all platforms, and there are tools for building GUIs or just cmdline tools.
Pascal/Delphi, this is a unique choice that is home on all platforms including all types of mobile. Under represented and not really prevalent in Enterprise industry at all.
If you're looking for systems programming, then probably C/C++ is your best bet. Rust seems to be well thought of in some circles, so it might be worth while.
If you're doing applications programming, then the answer comes down to what you're familiar with and what resources are available. Almost any language you can think of is somewhat supported by linux, so if its what works for you, then go with it. If you're familiar with C++ then QT is a possibility if you need a GUI framework. There's endless libraries for python, so that's another option.
Of course, for the one-off, quick and dirty, or just tired of typing the same commands over and over again, there's always bash scripts, which should not be overlooked. With some of the other tools available (e.g. dialog), bash can be a workable solution for some application.
Thanks. I think you made good points on C++ and C and that might be the best route forward. Those are always useful on *nix systems.
I think I've been side tracked by the new and shiny... C# & Kotlin.
And also can't escape the grasp of Java, which runs everywhere. Getting familiar with it's issues seemed like a useful lesson I could apply at work managing enterprise Java apps. Though the over complexity of Java and it's tools is cringe worthy, and I was hoping to find an alternative solution.
As far as most portable and also most used, I'd have to agree is C & C++. Has it's faults but certainly not going anywhere.
I will say freepascal is fun, and extremely readable/easy. I'd say more than python even. Might play with that some more also.
How to find where a variable takes value in the code? variable types are Integer,char* and string that can get value by =, or arbitrary function without =)
-We're dealing with a great code base and watch- in debugger- can be done but in many cases it is time consuming and ineffective and we need some tool or script, for example if we looking for integer value i we can write something like that
$grep -nE '^\s*i\s*=' directory_of_code | grep -v '=='
Hello! I am a 16 year old who just got into programming. I am fairly new, but I have been trying to learn Bash. I thought a fun project I can attempt is to to make a small text based game based on "Lemonade Stand" from the late 70s. I created a very simple version (works, most of the time) and put it on Github. It would be great if you guys can maybe take a look, give me some feedback (I know my code will be revolting, but hope to learn how to improve it) or even contribute!
I am actively working on it, adding new stuff every few days. It is still in it's really early stages, and I plan to make it something much much bigger then this. I would really appreciate it if you guys can watch the repository and give it a star. It would mean a lot!
Last Visit: 8-Aug-20 8:23 Last Update: 8-Aug-20 8:23