C lang

C lang

Application and Data / Languages & Frameworks / Languages
Software Developer at AvaiBook·
Needs advice
on
C langC langPHPPHP
and
WindowsWindows

Hi! I'm working on some components in PHP for system administration to be released as reusable packages, to build some kind of server control panel with some time and patience.

I'm working on a credentials component to check things like the current user running the PHP process, the ability to change the password (which I would do through a shell command), and a very important feature: the ability to login with OS credentials.

For that purpose I'm already considering LDAP, but I want to support first an easy setup, like I would do for a small VPS. I want to login to my future panel with my Linux root credentials. This is very easy by parsing the /etc/passwd and /etc/shadow files, but I want to be multiplatform from the beginning.

How could I check a username/password in a similar way to login on Windows without having to configure Active Directory and similar things? I allow myself to use FFI to make external calls to native DLLs, so if the answer is on a Windows internal API it will not be a problem.

So, here is the question: is there any shell/C /C++ way to check if a given username and password matches a real Windows credential? Is there any way to check if that account is a root user? Thank you so much!

EDIT: If there's not any API to check a login, could it be done through reading the hashed password of a user, and hashing the provided one to check if they match? If so, how can you get the hashed password of a user, and how can you encode a password to compare both hashes?

READ MORE
7 upvotes·18.9K views
Needs advice
on
C++C++
and
Node.jsNode.js
in

I want to make a website but im learning C and C++, and i dont know what language should i use.

READ MORE
1 upvote·10.3K views
Needs advice
on
AngularJSAngularJSFlutterFlutter
and
IonicIonic

Hi, I am currently doing my Final Year Project for uni. Basically, I would like to build an android mobile application that has features such as translation from picture to text to synthetic speech (using google cloud API) and also integration with other IoT devices and Google AIY Voice Kit. I am wondering which framework will be best to use.

As for language, I have some experience with HTML, JavaScript, PHP, MySQL from creating a website for a school project and also very basic experience with Python and C. I have to complete this project by February. Hope I can get some help. Thank you in advance!

READ MORE
9 upvotes·14.3K views
Needs advice
on
SpringSpring
and
Spring BootSpring Boot

Hello Guys

I am a newbie here and not very well experienced with different stacks. I have primarily programmed in C lang/C++ and am somewhat proficient in it.

I am now considering taking up Spring as a new framework to learn to get into Web dev as I know a little Java. But I have concerns about choosing it and am confused with JavaScript frameworks.

Could you please tell me which stack should I choose from?

READ MORE
7 upvotes·48K views
Replies (2)
Recommends
on
Quarkus

What is your objective here? It sounds like this is not to solve a particular issue, but is about learning? If so, do you have a preference for things used on the front-end or the backend? That decision would typically lead down a JAVA-oriented path or a JavaScript-oriented path.

If you decide to learn JAVA, then Spring + Spring-boot is a very relevant framework. A competitor is Microprofile + Quarkus. The Quarkus part is newer, but gaining a lot of traction.

READ MORE
5 upvotes·40.3K views
Recommends
on
Spring Boot

Javascript is not a framework, it's programming language that can run in browser or as server side application developed with node.js framework.

READ MORE
1 upvote·40.3K views
Needs advice
on
C langC langJavaJava
and
PythonPython

Actually, I'll add, C++ and C# as well.

Well, I'm into Computer Science since 1996, so I understand a bit of everything plus a lot of different OSs, I study 10 hours per day every day. However back in the 90s we didn't have books or universities about programming, all were passed through if you knew somebody in that profession. Which I did and in that time, he showed me .NET and MySQL, and that offered a lot of jobs also Java. Today you have a lot of options but I'm already discarding new languages as I believe they will jot succeed.

My always dream was to create game, and software. I don't understand all programming concepts and I'm studying all languages at the same time, so I'm heavy loaded. But that keeps me more aware.

I made a choice: use Python for everything but if you want performance, apps, security, compatibility, Multiplatform. What should I choose? The real question here is: which language should I go 100% and that language will teach me all I need about programming BUT without getting lost in that language forever (I discard any Assembly possibility) and one that has full documentation, support and libraries.

In my experience: I found a lot of info for python and java. But hardly I have ever found anything for C lang, C++ and, what about C# (it's only for Windows, is it easy, I saw a lot of documentation). Thanks!!

READ MORE
10 upvotes·99K views
Replies (3)
Recommends
on
C++
Python

Python can be linked with C++ both language are similar in many places (using same libraries or concepts to build libraries) - except memory and static types. C++ is more assembler and have different syntax (need 3x-4x coding more).

If you do engineering it is perfect stack - Java is to slow in coding (4x more code) and little faster than Python - whatever it is hard to mix Java/C++ what is easy Python/C++.

In the most program you do not need super performance but if you need C++ is the best and have rich Object Language much richer than Java and more poor than Python. Python is true object language - everything is object.

Whatever sometimes more important is framework than language for specific use.

READ MORE
5 upvotes·4 comments·84.6K views
Prakhar Vatsa
Prakhar Vatsa
·
March 26th 2022 at 6:49PM

I mean C++ is a superset of C, so might as well use C, am I right? It's just a case of simple bike, automatic car or manual car. python is simple bike, used for town based biking, like for going to school, etc. java is automatic car(like the memory management), while c is manual car(oil changes, motor changing, etc.). It's like comparing honda civic to bugatti chevron. Bugatti chevron is fast and all, but it isn't general purpose, it's purpose is for racing. honda civic is general, and that's what this guy is looking for, i think.

·
Reply
Cezary Wagner
Cezary Wagner
·
March 28th 2022 at 11:57AM

You can use C++/C with Python. Current C++ is not the old one so memory management can be automated whatever memory management in Python and C++ is different. You need understand how both behaves. Pointers, references, stacks, core types - in Python it is simple. Same with int in Python is one type in C++ 8 types for int with overflows.

·
Reply
Satoshi Nakamoto
Satoshi Nakamoto
·
May 24th 2022 at 6:08PM

Everyone says Python is great but they also say that it doesn't cover all programming concepts which puts you down the road. What book can you recommend me to get out of the beginner? I have seen that most content only lets you in the beginner zone. I struggle to read Python's manual, I have to decipher it. For now, I know what is built-in commands, some web scrapping, and some libraries. What else am I missing here?

·
Reply
Satoshi Nakamoto
Satoshi Nakamoto
·
May 24th 2022 at 6:07PM

Great answers! It really unlocked many doubts. But to start 1. where can I find poper C++ manual and which is the best book/video/DVD to cover all programming concepts at once like the book "The Linux Programming Interface" which covers all about the kernel

·
Reply
Recommends
on
Cython
Python

I would go with Python, it is fast to code, readable and very powerful without giving you too much to think about (e.g. memory management). If you're looking for speed, Cython is a fairly good way to get there, since Python is a C-based language it can be compiled to C using Cython and will get you a very significant boost in speed! You can also make use of C libraries if you prefer. The only downside to Cython over Python is that it is compiled and not interpreted, which can make debugging a pain (but you might find yourself doing most of the debugging in Python before switching to Cython). C languages are a bit of a pain to read up on (API, libraries etc.), but Stack Overflow has you covered in most cases!

READ MORE
5 upvotes·71.6K views
View all (3)
Needs advice
on
C#C#JavaJava
and
JavaScriptJavaScript

I studied C lang/C++ and G (lab view) for 2 years at my previous university, the university where I study now teaches me C#, I am interested in web development (frontend and backend), embedded (for the Internet of Things, for Arduino), mobile development (Android, iOS), game development, The science of data and ML. I studied mathematics (discrete mathematics, analytical geometry, mathematical analysis).

I ask the developers for advice: what should I learn to be able to do everything I want (websites, games, drivers, sockets, desktop applications and others)?

I am looking for a universal solution, and I am limited in training time, and the number of vacancies is also important.

P.S. I used Google translator

READ MORE
8 upvotes·45.6K views
Replies (3)
IT Manager at Codek Technologies·

I would suggest instead of going all over, you should focus on one specific field you want to master. I also have prior experience with all of these languages and during my studies, I can understand the mess you are going through.

In the end, I would say you should go with JavaScript, here are the Libraries/Frameworks you can use. - WEB DEVELOPMENT : Frontend: React, Angular, Vue - Backend: ExpressJs, NestJs - MOBILE DEVELOPMENT (IOS & Android): React Native - IOT : Socket.io - DataScience : TensorflowJs

Best of luck with your studies.

READ MORE
10 upvotes·7 comments·41.9K views
Taymuraz Baskaev
Taymuraz Baskaev
·
November 26th 2022 at 1:21AM

Do I need to learn java before I start learning javascript?

·
Reply
Secret Guest
Secret Guest
·
November 28th 2022 at 9:53PM

No you don't. Java share with javascript only the name, it's 2 different languages to make different things.

Javascript is one of the most easy to learn language but it's also one of the worst and illogical one ;

at its very beginning it was compiled with errors and cause a fast and huge deployement these bugs have never been solved because of too much people using them.

example ; 10 - '1' = 9 but 10 + '1' = 101 🤦‍♂️

So as Muhammad wrote you better learn JS frameworks than JS itself who's a waste of time.

·
Reply
jlsoffical
jlsoffical
·
December 27th 2022 at 5:11PM

From what I understand, Java and JavaScript are two different languages, but it probably wouldn't be a bad idea to learn Java syntax before learning JavaScript. Even though I have little programming experience, I still recommend learning how to read and understand syntax because it makes debugging easier.

·
Reply
The Sharp Ninja
The Sharp Ninja
·
January 31st 2023 at 5:01PM

No, it will just break your heart for both languages.

·
Reply
Taymuraz Baskaev
Taymuraz Baskaev
·
November 26th 2022 at 12:55AM

Thank you very much, Muhammad!

·
Reply
developer at freelance·

If you will be studying c# checkout A ASP-NET core, MAUI - mobile cross-platform, and if you have time look at Blazor and Entity Framework.

READ MORE
5 upvotes·1 comment·31.6K views
Taymuraz Baskaev
Taymuraz Baskaev
·
February 7th 2023 at 12:38PM

thanks!

·
Reply
View all (3)
Needs advice
on
ElectronElectron
and
Qt5Qt5

The appropriate programming language is required to deploy GUI programs used by small people for continuous updates. I'm currently developing with PyQt, but I'm having trouble implementing the update. So when I make my next program, I want to use a development language with a lot of community or documents, which one is good, Electron or PyQt? Or are there other options such as Java or C lang?

READ MORE
3 upvotes·7.8K views
Needs advice
on
EclipseEclipse
and
Visual Studio CodeVisual Studio Code

I have to do basic Java projects for university, I already use Visual Studio Code for C lang. They recommend Eclipse but it seems a little bit complex for me. Please suggest.

READ MORE
2 upvotes·86 views
Replies (2)

I spent years and years with Eclipse, and did VS Code as well, but nothing can compare with JetBrain's line of products. I have been coding since 1992, so I have a long list of IDEs I had my hands on, including developing a couple of IDEs of my own.

JetBrains IntelliJ IDEA stands out as a superior choice for Java programmers compared to Eclipse or Visual Studio Code for several compelling reasons. Firstly, IntelliJ IDEA's intelligent code editor significantly enhances productivity by offering advanced code navigation and comprehensive refactoring support. This intelligence extends to real-time code analysis, which can detect potential errors and suggest fixes as you type, thus streamlining the development process.

Another key advantage is the seamless integration with modern frameworks and technologies. IntelliJ supports a wide range of Java frameworks and provides out-of-the-box integration with tools like Maven, Gradle, and version control systems, which can be more intuitive than in Eclipse or Visual Studio Code. This makes it easier for developers to manage projects and dependencies, as well as to maintain a smooth workflow for continuous integration and deployment.

IntelliJ IDEA's user interface is designed to maximize developer productivity by offering a more intuitive and responsive experience. It provides a cleaner, more organized workspace than Eclipse, and many users find its interface to be more navigable and less cluttered. This focus on user experience reduces the learning curve for new users and enhances efficiency for seasoned developers.

The availability of the IntelliJ IDEA Community Edition is a significant advantage, offering a free, open-source version of the IDE. This makes it accessible to a wide range of developers, from students to professionals, without the need for an initial financial investment. The Community Edition includes many of the core features necessary for Java development, making it an excellent choice for those looking to develop pure Java applications or server-side code.

You can grab IDEA from here https://www.jetbrains.com/idea/

READ MORE
3 upvotes·10 views