|
arnold_w wrote: in standard .bat-files I have not heard of such things in Linux. Are you using the wrong terminology, or the wrong files?
|
|
|
|
|
Richard MacCutchan wrote: arnold_w wrote: in standard .bat-files 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.
modified 9-Nov-19 10:23am.
|
|
|
|
|
Not sure if this is what you problem is, but:
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:
@echo off
:repeat
if "%1" == "" goto :eof
echo next parameter is %1
shift
goto :repeat
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.
modified 9-Nov-19 15:17pm.
|
|
|
|
|
Hi all,
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).
Html5 or JavaScript seems to be a great way to make webapps or even mobile apps in some cases. Very Linux friendly, but don't know how useful long term...
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.
Any votes?
|
|
|
|
|
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.
|
|
|
|
|
Hey k5054,
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.
|
|
|
|
|
Using "windows" as a generic GUI term , not as operating system, what is the hierarchy of tools available?
I am aware of "XWindows" , "OpenGL" and "GLFW".
For example -
I like to build basic GUI "window form" ( in C++) with "standard" features like "window title" , "minimize / maximize / close " "buttons" to start with.
What tools / API's do I need?
Cheers
|
|
|
|
|
Google "Linux GUI Toolkit", and take your choice. QT and GTK+ are probably the most used. GTK+ is a C library, but it has C++ bindings available here.
|
|
|
|
|
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 '=='
hi
|
|
|
|
|
If you are looking for all assignment statements in the code base then that is the only way.
|
|
|
|
|
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!
Thanks! https://github.com/lucaswhitaker22/bash_cafe
|
|
|
|
|
Sorry, these forums are for specific for technical questions, not to garner votes on your projects.
|
|
|
|
|
After more detours I am back to using "hci" ( term / name deliberately not used ) to program bluetooth in C++.
There is a proliferation of "BlueZ stack" source code on net, obviously freely copied from some unidentifiable original.
The code contains same "disclaimer " preamble hence it is not clear who wrote it first.
It does not matter.
Assuming the original "BlueZ stack" is no longer actively maintained / developed and according to some resources "hci" is dead anyway I like to ask this:
Which depository / github etc. should I use as a base source code to analyze and document , for myself, the "hci' functions?
Here are some sample links to consider
bluez/hcitool.c at master · pauloborges/bluez · GitHub[^]
linux/hci_core.c at master · torvalds/linux · GitHub[^]
|
|
|
|
|
Use the one that you can understand.
|
|
|
|
|
These are just rhetorical questions, right?
You just want to give a play-by-play, since at this point, why not look at all of them and create a "best of" ... ?
(I use Windows and it just works ... Bluetooth mouse, keyboards, clickers, VR controllers, headsets, blah, blah).
The Master said, 'Am I indeed possessed of knowledge? I am not knowing. But if a mean person, who appears quite empty-like, ask anything of me, I set it forth from one end to the other, and exhaust it.'
― Confucian Analects
|
|
|
|
|
Rhetoric questions belong to social media - IMHO.
With few notable exceptions this forum for has been a valuable resource "for those who code".
I am very happy for you as a user of Bluetooth technology.
You have a nice day.
|
|
|
|
|
Hello, I need to hide my taskbar. But I do not wish to behave like Auto Hide. Once
hidden it should not be seen even if I move my mouse on it. Any idea as to how to
achieve this?
Thanks in advance.
|
|
|
|
|
Why would you want to do such a thing?
|
|
|
|
|
Hello users,
This question may be offtopic here, but i need your kind suggestions. I am now
going to reinstall an operating system in my computer.
I had Windows 10 earlier. Now I am thinking to use Linux. I have not used it before
so I have a few doubts.
Will it be difficult to use and understand Linux?
Will Linux be faster than Winodows 10?
|
|
|
|
|
If you're having a hard time using this website, and it does appear that way, I would say avoid Linux.
DO NOT repost that same question over and over again.
|
|
|
|
|
Member 14509555 wrote: Will it be difficult to use and understand Linux? It depends on how quick you are at learning a completely new system. I would suggset you do some (a lot of) reading first. There are many websites that deal only with Linux; they are the best places to start.
Member 14509555 wrote: Will Linux be faster than Winodows 10? Yes, and no. It all depends on what you are trying to do.
|
|
|
|
|
hi all.
I have same application on WPF and on my company start using linux.
There is a way to compile/use/whatever my apps to run on linux without writing all again?
Maybe visual studio 2019 and .net core 3 does the trick today?
thank you.
|
|
|
|
|
|
WPF is not supported on Linux (that I know of). I think even WinForms isn't supported.
".45 ACP - because shooting twice is just silly" - JSOP, 2010 ----- You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010 ----- When you pry the gun from my cold dead hands, be careful - the barrel will be very hot. - JSOP, 2013
|
|
|
|