Explore topic-wise InterviewSolutions in .

This section includes InterviewSolutions, each offering curated multiple-choice questions to sharpen your knowledge and support exam preparation. Choose a topic below to get started.

1551.

Solve : embedding excell in an html file?

Answer»

I am working on a website for a CLIENT who NEEDED me to embed excell spreadsheets in a few pages. I have no experience with excell so he simply gave me an object tag containing the spreadsheets to copy and paste. Everything works fine except USERS with Office 2003 cannot view the actual speadsheets. They recieve an error message stating "To use this Web page interactively, you must have Microsoft® Internet EXPLORER 4.01 or later and the Microsoft Office Web Components." I don't even have excell on my computer and I can view the spreadsheets just fine. The settings on my client's pc are corrrect but he cannot view the excell becuase if Office 2003. We know this is the problem because every other PC in the office pulls up the spreadsheets. Is there anything I can ADD to the code that would enable all users to to view the spread sheets.? I am tottaly baffled because I don't understand the object tag to begin with. If there is anyone who can help I would appreciate it.

1552.

Solve : Using batch file to name files in sequence?

Answer» HI, I have a problem with files downloaded from my digital CAMERA, they always have funny NAMES, is there a batch file I can use to rename those files in the folder in sequance? EG, name the files to Holiday01, Holiday02.... etc...? Thanks..
1553.

Solve : MySQL weasy backup?

Answer»

hey, I found such an easy way to backup your databases on MySQL if it crashes. First, TAKE the folder data from mysql dir, then copy it where ever u want it, then its backed up. To restore, replace the OLD fiolder with the NEW! my mysql crashed and i did this and i was like WHOA! All my users and databases were restored. Oh yeah, to delete the mysql service, the key to servicesw is /HKEY_LOCAL_MACHINE/SYSTEM/CurentConfig/services , delete the mysql folder, and BINGO ( u have to do this to reinstall mysql, i learnedf that the hard way LOL

1554.

Solve : Using BLAT as a mail notification service in GITLAB?

Answer»

Using BLAT as a MAIL NOTIFICATION SERVICE in GITLAB.

We have a GITLAB setup and We want to send the output of a error file as a ATTACHMENT and giving a proper message including in the body as a mail notification to the recipients using BLAT as a service. Using below code:

Code: [Select]blat -subject "IP is not pingable" -body "please check the attachment for the error logs" -attach C:\Temp\error.txt -to [emailprotected]
We want to send this from the GITLAB. But I am getting BLAT error log as :
Error: Not a socket for a SMTP server

How to achieve this and get rid of this error.Your quick response will be appreciated.Any update here please!!!

1555.

Solve : Program Activity Graph Routine in GW Basic?

Answer»

I am having GREAT difficulties to WRITE a COMPUTER program in GW BASIC to find the longest path in a project network (critical path) as per EXAMPLE attached.

Actually, it’s not the programming that is the problem but finding an easily understood algorithm to do it. The computer code I find to solve this problem is always in Java and I do not have experience in this language.

If anyone has already developed such a routine I would appreciate having a copy of it.
GW Basic I started playing with back around 1985 with DOS 2.11.

Is there a reason why your using GW Basic when its been obsolete for over 25 years. QBasic supported legacy GW Basic Programs in the early 90s and the Visual Basic came in the mid to late 90s to take the place of QBasic.

GW Basic is only able to run within 64k memory and so your very limited in how large the program can be.

I'd avoid GW-Basic and learn Java for this.

1556.

Solve : Wanted: programmer to remove the bell icon of notification in every webpage.?

Answer»

There is a bell icon of notification in every WEBPAGE of the site I am accessing.

I seem to know that a webpage programming can be entered into by a PROGRAMMER, in order to say, get RID of ads.

Can a programmer get in to remove the bell icon - it is causing me annoyance no end.
Is this top-right corner of every Google web page is your profile icon, web app launcher, and notifications, is it this?Does it GO away if you use a different browser, IE. Google Chrome, FireFox, Apple Safari, Internet Explorer. Can you post a picture, it might diagnose the issue. It sounds like a browser plugin

1557.

Solve : Screen Recording Library/Language Suggestions?

Answer»

Hello all,

I am trying to create a program that can record my screen just for the heck of it. I wanted to see what others thought would be a good language and library to use.

Initially, I wanted to go with Java using the JCodec library because it would be quick, easy, and portable. In hindsight, Java PROBABLY wasn't a good choice for something as CPU intensive as video recording because of how RESOURCE hungry Java can be. Recording my screen (1080p) at 60fps took a good 30%+ of my i7 7700k with nothing ELSE noteworthy running.

Does ANYONE have experience with this? What is a good language/library combo? Why?

Thanks!
Hey,

Think there could be a few. YouTube would be a good place to start, lots of coding videos. Could give these a watch see what you think and perhaps have a go.

https://www.youtube.com/watch?v=wjfWa590EFQ

https://www.youtube.com/watch?v=kTCmjSFodpM

Hope these point you in the right direction, and you find what you're looking for!
Following up on this, I wound up sticking with Java and going with the JNA library specifically for getting the locations and sizes of other windows on-screen. I did what I wanted to, plus more. I wound up going further and made a way for someone to not only record their screen (or portions of it, being able to specify windows, monitors, or everything), but also let someone stream their selected area to someone else.

I learned a lot from doing this too. To send the "video" which wound up just being a steady feed of Buffered Images, you have to make sure your code is efficient and your threads don't mess up anything. Otherwise, the video your friend/client receives will appear choppy, slow, or out of order. Granted, recording two 1920 x 1080 monitors at 60fps destroyed my CPU by using 70%+, but that is pretty close to 4k so I was somewhat satisfied with that. I probably won't be able to do much better than that with Java using the ROBOT screen capture.

I am going to try it in Python next to see if I can make it more efficient and get access to other windows in a less roundabout way.Quote from: kalm1234 on July 01, 2020, 05:22:41 PM

I am going to try it in Python next to see if I can make it more efficient and get access to other windows in a less roundabout way.

python-ffmpeg?
1558.

Solve : Batch script should send a mail for the error output?

Answer»

This script runs under Powershell Windows, USES Curl and I made an attempt at a Powershell version of the Blat command line:

Code: [Select]$url = "url.txt"
$not_ok_url = "not_ok_url.txt"
$work = "response.txt"

[regex] $regex = @"
(?smi)(.*200\sOK)
"@

if ( Test-Path $not_ok_url ) { REMOVE-Item $not_ok_url }

Get-Content $url | foreach {
$site = $_
Start-Process -FilePath "curl.exe" -ArgumentList "-I -s $_" -NoNewWindow -RedirectStandardOutput $work -Wait
$response = Get-Content $work -Raw
if ( $response -match $regex) {
Write-Output "$site ... OK"
} else {
Write-Output "$site ... NOK"
("-" * 75) | Out-File -FilePath $not_ok_url -Append -encoding ascii
$site | Out-File -FilePath $not_ok_url -Append -encoding ascii
("-" * 75) | Out-File -FilePath $not_ok_url -Append -encoding ascii
$response | Out-File -FilePath $not_ok_url -Append -encoding ascii
}
if ( Test-Path $work ) { Remove-Item $work }
}

# if ( Test-Path($not_ok_url) ) {
# $sender =
# $log =
# $smtp =
# Start-Process -FilePath "blat.exe" -ArgumentList "$sender -subject 'URLs DOWN STATUS' -body 'please check the attachment for the Application DOWN error logs' $smtp -attach 'C:\Not_OK_URL.txt' $log -to '[email protected]'
# }

You can tweak the paths at the top of the script. The Blat section is commented out but if remove the COMMENT marks (#) and fill in the values for the variables, it just might work.

1559.

Solve : Visual studio data formats?

Answer»

Can anyone offer any advice?
I am building a Windows application using VB.NET in Visual Studio. A MS Access database is represented in a datagrid. One of the columns in the database table is a TIME, with the format of short time, which works fine in Access. However, when I fill the datagrid the time is SHOWN as a date DESPITE the fact that the dataset schema is also set to time for this column.
In addition, the datagrid rearranges all the columns into alphabetical order.
It's doing my head in!The time COULD probably just be a format issue.It is a format issue, that's kind of the point.
I don't see what is converting the format to a date when it's set up to be a time at each end!
It isn't even a valid date, such as the default. It is usually 13/11/1788 or some such.
Help...I guess I was trying to point out that you could use the Format() and make it a time type.

Can you post the piece of code that you're dealing with?

1560.

Solve : Shutting Programs down?

Answer»

I want to shut down programs that are RUNNING in the background. It has a BOX that you can CHECK or uncheck what programs you want running.

THANKS ::)have a look here it will help you>http://www.blackviper.com/WinXP/servicecfg.htm

1561.

Solve : Looking into Folders using Visual Basic?

Answer» HEY everyone,

is there a way in Visual Basic(VB6) to automatically LOOK into a folder and add a FILENAME to a listbox? or part of a filename(e.g. c:\ver_25, but the program would automatically extract only the 25 when you start the program)

Any Help is greatly appreciated, THANKS!i found out how to do it, you have to declare a variable as type "folder" then use the "GetFolder" method to get the folder. You can even get the subfolders by using the ".subfolder" method.

Thanks anyways everyone
1562.

Solve : SAM file?

Answer»

ok from the looks of this SITE no one really messes with the sam FILE but i need to know a batch file beside AUTOEXEC that starts at STARTUP on WINDOWS 2000, ME,XP
regards
morteWhat do you need this for?

I think you can simply call your batch file from autoexec.bat. Another way might be using the registry (have a look at HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\Run).

1563.

Solve : Problem with batch file?

Answer»

If i run this file it says he can't copy some files because the file been used or somethink WHATS wrong with did i forgat some think?

rem
rem Ftp script tbv move logfiles
rem from test1\\D:\weblogs\
rem to test2\\D:\webtrends\
rem
rem copy to \\test2\Webtrends\Logs\test1*

D:

set filelocation=D:\weblogs\
set backlocation=D:\weblogs\webtrends\backup
set targetloc=\\test2\webtrends\logs
set logfile=D:\weblogs\webtrends\logging\copylog.log
set progloc=D:\weblogs\webtrends\bin
set logloc=D:\weblogs\webtrends\logging

echo -------------------------------------------------------------- >>%logfile%

Echo Start COPYSCRIPT >> %logfile%
echo.
time/t >> %logfile%
echo.
rem SAFETY for logs

echo Directory:%filelocation% include: >> %logfile%
echo.
Dir %filelocation%\*.* >> %logfile%
echo.

echo.
rem start SEND

:startCOPY

Echo Start copyscript >> %logfile%

echo. >>%logfile%

rem send files
cd %filelocation%
for %%a in (in*.*) do copy %%a %targetloc%\rg844%%a >> %logfile%
dir %targetloc%\rg844* >> %logfile%
echo.
rem generate target.txt file with dir at target
dir %targetloc%\test1* > D:\weblogs\webtrends\logging\target.txt

rem generate Lokaal.txt file with dir lokal
dir %filelocation%\in* /-C > D:\weblogs\webtrends\logging\Lokal.txt
echo.
rem find 'in' hierin...
cd %progloc%
fgrep "in" D:\weblogs\webtrends\logging\lokal.txt > D:\weblogs\webtrends\logging\lok.txt

rem if not found... no upload...
if errorlevel=1 then goto nofiles

rem receive the size from lokal and filename..
for /F "tokens=3" %%i in (D:\weblogs\webtrends\logging\Lok.txt) do set SizeLokal=%%i
for /f "tokens=4" %%i in (D:\weblogs\webtrends\logging\Lok.txt) do set Filename=%%i

rem look if filename at target...
fgrep "%filename%" D:\weblogs\webtrends\logging\target.txt > D:\weblogs\webtrends\logging\ta.txt

rem look FILESIZE at target
for /f "tokens=3" %%i in (D:\weblogs\webtrends\logging\ta.txt) do set SizeTarget=%%i
echo.
echo filename:%filename% Size loaal=%sizelokal% Size target=%sizetarget% >>%logfile%

rem if Targetsize en Lokalsize diffrent... restart COPY
if %sizelokal% NEQ %sizetarget% then goto startcopy


rem remove files older than 7 day at lokal %filelocation%
echo All files older than 7 day at %filelocation% will be removed, those are:
%progloc%\cleanftp.cmd >> %logfile%

echo.

i hope you guys help me

1564.

Solve : Multiline variable in Batch script?

Answer»

For work I frequently need to email the same emails to users who need my ASSISTANCE. Things like "I'm glad I was able to ASSIST you, if you need ..."
I have a few scripts that WRITE those variable to my clipboard so I just need to paste them into my email. Is there a way to TURN an output of
I'm glad I could help Joshua
into
I'm glad I could help
Joshua


here is the script I have already.


echo|set /p="Glad I could helpJoshua"
paste | command | clip



and with that i need to go back and put an enter in. Is there a better way?




Not sure about a better way, but this will get two lines on the clipboard:

Code: [SELECT](echo Glad I Could Help && echo Joshua) | clip

Tested on Win10 using Notepad to paste data from clipboard.

Good luck,

1565.

Solve : Batch to access toolbar?

Answer»

I have written a batch FILE that will open the url for my online portfolio. How do I ACCESS File>Send>PAGE by email?

1566.

Solve : How does a computer “wait” time??

Answer»

Me and a friend were discussing how programming languages can perform asynchronous tasks, LIKE waiting 15 seconds before PERFORMING another task, and we started a debate.

I know that computers have an internal clock that uses the CMOS battery that can keep track of time, but how does it know it has been 15 seconds since right now and since when I TOLD it to wait 15 seconds without looping infinitely and performing conditional operations, or does it do that? Quote from: UglyPepper on DECEMBER 01, 2020, 04:09:27 AM

Me and a friend were discussing how programming languages can perform asynchronous tasks, like waiting 15 seconds before performing another task, and we started a debate.

I know that computers have an internal clock that uses the CMOS battery that can keep track of time, but how does it know it has been 15 seconds since right now and since when I told it to wait 15 seconds without looping infinitely and performing conditional operations, or does it do that?

The CMOS data is used only when the computer starts to get the current date and time after which the OS updates the date and time. If software needs an interval TIMED it uses timer interrupts.

Here is a better explanation than I can do https://www.visualmicro.com/page/Timer-Interrupts-Explained.aspxQuote from: Lisa_maree on December 01, 2020, 03:35:15 PM
The CMOS data is used only when the computer starts to get the current date and time after which the OS updates the date and time. If software needs an interval timed it uses timer interrupts.

Here is a better explanation than I can do https://www.visualmicro.com/page/Timer-Interrupts-Explained.aspx/MyGroundBiz

I got sufficient information from your soul of heart.Thank you so much
1567.

Solve : Lex & Yacc How to ??

Answer»

by the NAME of allah

this is a first topic for me in this forum

and my quistion about
LEXICAL & Yet Another compiler compiler

I Can FOUND SOMEONE tell me about it,or link for website
talk about it.....

thank's for all members.

abdullah eid

1568.

Solve : Setting up a dual boot system?

Answer» HI everyone, I'm new to the forum and was wondering if you COULD help me with this.

Basically I have 2 hard drives. Hd1 I use for plying media, work, create documents, etc. Hd2 I use only for gaming (it has a frontend application installed which automatically loads all my library).

What I want is for my system to ask me which drive I'd like to boot from automatically when I turn on my computer. If nothing is SELECTED in 15s then the system should select automatically Hd1 and proceed with the booting process.

Let me know if this makes sense.

Thank you in advance for the help. I'm scared to tell you how to do what you are asking.
It's not something the average person should be messing with.. and requires some advanced computer knowledge.
Especially when it COMES to Win10 which I have to assume you are using.


So can I steer you into a safer/easier/better way to GET the same result.

1. Buy this: https://www.amazon.com/Kingwin-Optimized-Controls-Provide-Longevity/dp/B00TZR3E70?th=1
(Kingwin Hard Drive Power Switch Module)

2. Set your boot order in the bios. "Gaming" drive Hd2 to load 1st. Default drive "Hd1" to load 2nd.
2b. If you have a hot-swap option in your bios, turn it on as well. But it's not necessary.

3. Install the switch & connect your 'gaming' drive to the Kingwin device.

4. Any time you want to game, just press the 'on' button before you power the system on.

5. Done. And you didn't brick Windows by messing with the bootloader.

---

If you really want to have the boot menu option, start studying here: https://www.boyans.net/
1569.

Solve : qbasic programming?

Answer»

hi guys. i'm programming in qbasic. and i need to activate my menus when alt. key is PRESSED. but i could not do this. while i could perform some actions but pressing alt+(any key).
do you have any IDEA to TRAP only alt key??

thanx.

1570.

Solve : Book for Python?

Answer»

Hello all, I want to learn Python. I am a beginner and want to learn Python from SCRATCH, please suggest to me which ONLINE course is best to learn python and suggest some good book also.
"Learn Python the Hard Way" -

https://learntocodetogether.com/learn-python-the-hard-way-free-ebook-download/

Don't be intimidated by the TITLE, it's tongue in cheek - as the author explains, "the hard way is actually easier." He focuses on doing (instruction), rather than just explaining. It's a great book, very human, and really good for beginners who also want to learn something about computer programming theory and best practices in general.thank you for reply, I found some of the best books while searching on the internet:
1: Head First Python
2: Learning Python
3: Python Tricks
4: FLUENT Python
5: Python in Nutshell
also found this https://www.techgeekbuzz.com/best-python-books/, in the internet author SEPARATELY listed books for beginners and for advanced developers here

1571.

Solve : How to Learn Python?

Answer»

Hello EVERYONE, I am 24 years old and I want to build my career as a python developer. I have completed my 6 month internship in some python related projects. Now I am looking for a roadmap from step to step. where i can know how to learn python quickly. Can anyone know the essential SKILLS for becoming a python developer? I cannot not answer your question.

What I can tell you is that if you want to keep employed and make the best salary, you want to learn C# Dot Net or Java.

I have been a professional developer for 23 years. Professionally, I have done Java, Cobol, VB & C# Dot Net and Perl. Mostly Java.

Although Python seems to be popular for artificial intelligence and machine learning, so maybe I am wrong.

Go to Dice.com and search for Python JOBS. Compare the number of results to Java or Dot Net.

Although sometimes if you can get into something before its popular then you have an edge on the competition if it does become popular.

Anyway, I know this really does not answer your question, but I thought it was worth bringing up.

You mentioned that you already have 6 months of experience. That should be enough to to make you valuable to employers.

I would advise staying away from employment agencies that just want your resume for their DB. If they don't have a specific job they want to submit you for, then I would advise passing. I would advise not working with any recruiter that is not willing to answer some questions. Ask where they got your contact info and if you can you have their contact info.

Good luck.



1572.

Solve : lil x's?

Answer»

I have a computer that is approx 8 yrs old. I had so much spyware that I dumped my puter with a system recover disc ( going back to day1) I added my spysweeper disc than I reinstalled my yahoo dsl. I scanned for windows updates and did that. Now on websites I can see thins but some things have lil boxes with lil x's in them. For example if you goto marktwainboats.org the top left of the screen i have an x. At the bottom of the screen Wheere it says make payment by paypal theres an x left of it. On the top of the page RIGHT under the first BLUE strip theres 3 x's. the first red strip where it says your messenger to the left of that theres one and the second blue strip where it says mark twain board to the left of that is one. Please someone help!!! email me pease. Someone says I have java problems. If you cant help me please refer me somewhere. Im LOST!!!

my email [emailprotected]

this web site also....when i start new topic and it says *censored* smileys.....i see words but all x's next to wordsYou know, just posting this in one forum part would have been enough.raptor can you please help me? I didnt mean to cause no harm. My boss is going to make me get rid of my puter if I dont get it LINED out. Please a lil help would be greatly appreciatedIf you are running short of time before you meet the deadline and have to turn in your computer, best would be to format your computer and reinstall whatever Operating System you wish to use.

If not, you may wish to uninstall and then reinstall Internet Explorer. If you attempt do so, use a program such as Regseeker to clean your registry to make sure that reinstalling your browser will have a better chance of working.

What exactly is Yahoo DSL?

http://www.snapfiles.com/get/regseeker.html - Regseeker - Freeware

Or you can look into another browser. Mozilla Firefox for example. This will NOT replace Internet Explorer, it will function on it's own.

You can also set Firefox to function as your standard browser.

I donot know if this will please your employer. You can, however, use this as a TEMPORARY solution until you can get your original browser repaired.

Or COMPLETELY forget about Internet Explorer and move on with Firefox. It is much more user friendly.

http://texturizer.net/firefox/ - Firefox - Freeware

1573.

Solve : The menu to run the batch?

Answer»

I run the batch file used for OS backup and Recover the data from the Storage on the Window. The source code only for adjust host name and folder name. The new host backup, it only adjust the folder name and host name. But it sometimes to human error to lead the script run fail.

Therefore I want to the script have the MENU to select do the backup and recover. The operator only select the menu option, input the hostname to run the backup or recover.

May I know any one guy have such experience to use menu option to run the batch jobs ? Please advice Back in the day I use to have a menu in my autoexec.bat for options. The options were pretty much Enter ( 1 ) for this option, and Enter ( 2 ) for this other option, and so on. The options were then individual batch files named by number such as 1.bat and 2.bat located in the root of the drive with autoexec.bat and so if you pressed 2 and then the enter key it would process the batched instructions contained within 2.bat

so if the following was in 2.bat

Quote

cls
@echo. Hello World
And you enter 2 at the command line

you would have something like

Quote
Hello World
c:\>

You can also do away with the @echo. and just use echo. if you use Echo Off at the beginning. This will hide the command prompt until Echo On is executed.

Quote
echo off
cls
echo. hello world
pause
echo on

This is a description of what the above does:
1.) Echo Off to hide command prompt
2.) cls to clean SCREEN
3.) echo. hello world so "hello world" is displayed ( Print to Screen = echo. ) in this case.
4.) pause to pause the batches execution until any key is pressed
5.) Echo On to bring back the command prompt

So a simple menu can be set up like this named autoexec.bat
Quote
Echo Off
cls
echo. Please chose from the following options
echo. -----------------------------------------------------
echo. Enter ( 1 ) to Start Process 1
echo. Enter ( 2 ) to Start Process 2
echo. Enter ( 3 ) to Start Process 3
echo. Enter ( Q ) to exit menu

1.bat will contain the batched instructions for option 1
2.bat will contain the batched instructions for option 2
3.bat will contain the batched instructions for option 3
q.bat will contain the batches instructions for (q or Q key - not case sensitive on MS OS ) and at the end of the batch instructions contained within q.bat you might want to issue a Echo On command to bring the command prompt back to the user.

If you want to have it all contained within a single batch you can use goto statements, but I am trying to make this as simple for you to comprehend as possible. Isolating the batched instructions also makes management of it EASIER as for instead of having 1 batch with everthing contained within it, you can modify the batch for option 2 etc and if you have a typo your batch will function until you get to option 2 and then you know that the issue is contained within 2.bat etc. If you want to have a single batch such as all choices listed and goto's it can be done in a menu type batch with gotos.

The above was written for MS OS .... are you doing this on a SUN OS since your user name is SUN_OS? If so the q and Q will be case sensitive and cls for clear screen I think is "CLEAR" instead of CLS etc. There also may be differences in how the echo works under SUN. Its been a long time since I played with SUN OSTo turn off echoing the first line of a batch file should be really be

@echo off

(i.e. the first character of the line is @). If you just have

Echo Off

then those two words will be echoed to the screen, although subsequent commands will not be echoed. Thank you for all helpful hints,

I draft the batch file like this, source code as below
ECHO off
CLS
:MENU
ECHO.
ECHO ....................................... ........
ECHO Select server for Applies Standalone Lan Server
ECHO ....................................... ........
ECHO.
ECHO 1 - Shutdown
ECHO 2 - Restart
ECHO 3 - Ping test
ECHO 4 - Quit
ECHO.
SET /p M=Type 1 2 3 4 then press ENTER:
IF %M%==1 GOTO SHUTDOWN
IF %M%==2 GOTO RESTART
IF %M%==3 GOTO PING
IF %M%==4 GOTO QUIT

:SHUTDOWN
set /p servername=" Enter the server name "
set /p yesno=Shutdown the %servername% ? [y/n]
IF "%yesno%" == "y" GOTO CONFIRM1
IF "%yesno%" == "n" GOTO MENU

:CONFIRM1
shutdown -m \\"%servername%" -s

:RESTART
set /p servername=" Enter the server name "
set /p yesno=Reboot the "%servername%" ? [y/n]
IF "%yesno%" == "y" GOTO CONFIRM2
IF "%yesno%" == "n" GOTO MENU

:CONFIRM2
shutdown -m \\"%servername%" -r

:PING
set /p servername=" Enter the server name "
set /p yesno=Are you ping the "%servername%" ? [y/n]
IF "%yesno%" == "y" GOTO CONFIRM3
IF "%yesno%" == "n" GOTO MENU

:CONFIRM3
ping "%servername%"

:break
GOTO QUIT

:END

From the source code, I want to enhance the menu to do several things
1. I want to the operator can return the menu page after ping test.
2. I want to the operator can runas admin right account to remote reboot and shutdown
3. Due to the operator has the right restriction, they cannot do run CMD to run the command. May I know how to process the batch file without cmd ?

Thanks
1574.

Solve : C Programming Help?

Answer»

Can SOMEONE help me with this C program. What I need is a program that will create scrambled words by circularly rotating the middle characters of each WORD by 1 CHARACTER. Place the scrambled words, 1 per line in an output file.

The Input File format is such that the first line contains a NUMBER indicating the number of words in the file, followed by ONE line for every word to be scrambled (no spaces in any of the words).Post what you've come up with so far please.

1575.

Solve : N?

Answer»

Hi friends,
I have two OPERATING Systems installed in the C Drive of my laptop computer. I SHALL be much thankful if someone would kindly advise me how to uninstall one of the two operating systems. Both are WINDOWS XP.
Thanks.

mithun,
Dhaka, Bangladesh.
June 11, 2004.You have them in seperate partitions I imagine. Just format one of the partitions and you're golden.

ps.. you should only need to post once and if you post in the correct area (say Windows for instance) you'll get a much better RESPONSE SINCE the only people looking in this section would be those interested in programming.

1576.

Solve : Stef the Dutchman learning Python.?

Answer»

Hello kind people,

At first, i'm Dutch and have some - a lot - problems writing in Englisch, so do appologise me for gramattica spelling en etc. You're language is realy differend from mine, and it will take some time for me to mengle in you're style of conversation (big difefrence in expressions en etc). Well thats that and i will overgome that problem by learning.

I will use this topic for learning and for help when needed, only i dont want the answers given on a SHEET. See me like a student and homework what i got (age 39 )

My first piece of codeding (with some help and hours of testing) is:

Code: [Select]import time
from datetime import datetime

DS18B20="/sys/bus/w1/devices/28-01204febab44/w1_slave"

while TRUE:
now = datetime.now()
dt_string = now.strftime('%d/%m/%Y %H:%M ')

f = open(DS18B20, "r")
data = f.read()
f.close()
(discard, sep, reading) = data.partition(" t=")
t = float(reading) / 1000.0

print dt_string, '{:.1f}*C' .format(t)
time.sleep(4)

f = open("data.txt", "a+")
print >> f, dt_string,'{:.1f}*C' .format(t)

I'm building my own weather station with a RPi 3B and python code. Never dit something before and have no experiance in coding, so i'm testing and wrecking everything to see what happens. I'm using Geany for programming (thats fine for me now). I hope that this gives a small expression of what i am doing.

Thanks to Veltes and Quantos for the first introduction with my project.


Greetsss
StefAre you asking a question?Yes, i have different questions but don't WANNE spil them all over the place on the forum. And before anybody tels me the exact anwser i wanny TRY as mucht as possble so i can learn why things work or not.

At this moment i'm trying to figgure out how to change my "." in to "," for writing in the .txt. I found something like * Only i have not figgured out where to place it/use it


Code: [Select] x = replace (".", ",")

Also in my prevorius post there is a line that tells the reading off my sensor. I dont understand why or how {:.1f} i dont have some refference where the 1f come's from...




I would appriciate some hints zo i can figgure this out.It works

1577.

Solve : HTML & DBs?

Answer»

I would like to know if someone out there is able to inform me or just give me a clue about the interaction of a HTML's page with a Database or Databank, such as that one that occurs with PHP, but without the use of scripts?

Is there a system procedure that we could use, programing on SQL that could reach, read, store and send the information concerning to that inputed on the page writen in HTML?

Thanx U all and Happy Easter!!I'm afraid that without .asp/.jsp you're not GOING to be able to write to a database. You *might* be able to do it with XML but my knowledge of it is basic at best. Sorry.Thanx anyhow for this tip... At LAST, we must try!!

[glb]Happy Easter[/glb]Nope - you can't do it with normal HTML or JavaScript. JavaScript is a client-side language, which means it is executed on your BROWSER, and therefore doesn't have the functionality to connect to a server-side database.

Even though server-side languages RETURN HTML-formatted output from databases and such, HTML is also considered to be a client-side language by many web designers and developers.

So, as Joleen said - sorry - no!

Regards,

FolkLore

1578.

Solve : SmallBasic...?

Answer»

Hi All,

Just signed up to the FORUM. I am doing some programming using SMALLBASIC. Would like to connect with other SmallBasic USERS. And actually have a general SmallBasic question- can anyone explain the difference between the following:

graphicswindow.drawimage and shape.image, I think I have that right? The only THING I can think of is shape.image is geared more TOWARDS sprites?

1579.

Solve : Right to Left language problem?

Answer»

i want to write an APPLICATION on a right to left LANGUAGE(Farsi) in winxp. when i USE usual characters everything is ok but when i want to get special characters ( like , ;() : ) from INPUT, characters direction failes. what can i do? :-/Wow that's a dandy. I don't know the answer but when you find out, please post it here. I'd love to know. My gut feeling is that it can't be done but don't let that stop you from PROVING me wrong.

1580.

Solve : C++ Error?

Answer»

I'm having a "MICROSOFT Visual C++ Runtime Library" error. The dialog box says
"Runtime Error!
Program: C:\Program Files\...

abnormal prgram termination"

Anyone DEALT with this before? It OCCURS when I try to open a DVD BACKUP tool known as DVD Shrink, and when I try to play movies from my hard drive with RealOne. Any help would be greatly APPRECIATED. Thanks.http://support.microsoft.com/?kbid=316512

1581.

Solve : Recovering files?

Answer»

Okay, I've seen numerous programs on the web to do this however, I'm really just curious as to how you would either do it without a program like that, or how you would write your own. Thanx in advance.

~KasperYou MAY have seen some of the prices involved in data recovery. Those prices are high because it's very hard. To write your own, you'd have to know the hex address of your data and you'd have to be sure that the data wasn't overwritten.That's interesting, cuz I've seen plenty of FREE ones, in fact, I'm not sure that I've seen any that cost anything ^_^. Anyway, I understand the general idea I'm just not sure how to GO about it.

If you know what the path was before it was deleted, could you effectively get a hex address from that somehow? Would it help if it was sent to the Recycle BIN FIRST so the index file is created?

1582.

Solve : Schedule a cron job in gitlab by using parameters?

Answer» Schedule a cron job in Gitlab by using parameters as trigger NIGHTLY builds

For EXAMPLE:
I have option in Gitlab called schedule and by using that I can schedule a job, but it just triggers a pipeline for that project with default values.

I am configuring it in such a way that my project should trigger on nightly build by using the values provided as a parameter.
Example: for a particular branch the project should trigger and that branch details should come from a YAML file.

So please help me with that.you should be able to configure and schedule different builds with yaml variables and conditional rules:

https://docs.gitlab.com/ee/ci/pipelines/schedules.html#using-variables

More about the yaml syntax:

https://docs.gitlab.com/ee/ci/yaml/index.htmlI have scheduled a pipeline using cron job. But my requirement is like in the gitlab.yml file we cannot include this below code.
I need to call it from somewhere outside but I am not getting how to call a nightly build for a project without using the main Gitlab project gitlab.yml file

Code: [Select]CURL --request POST \
--form token=TOKEN \
--form ref=main \
--form "[RUN_NIGHTLY_BUILD]=true" \
"https://gitlab.example.com/api/v4/projects/9/trigger/pipeline"
It sounds like you are learning Gitlab as a beginner, is that correct? Is this for school?

If you provide some context of what your project is for, I can TRY to refer you to INFORMATION that might help.I am an employee, but started working on Gitlab from past one year, but this one sounds interesting and this type of builds may use in our projects so I was trying out on my own.

Details of project is, Project has its own pipeline set-up already. But to run it as a scheduled nightly build I am trying out the above curl statement. So please help me on that.Gotcha. I strongly recommend you post your question directly on the Gitlab forums:

https://forum.gitlab.com/

That's where you'll get the best advice.
1583.

Solve : Batch files - text manipulation?

Answer»

Hey,

I was HOPING if someone could help me with the following.

I'm trying to get output from IPCONFIG, the Ethernet adapter names that are currently enabled, and have them stored in a variable for later use.

I've been able to come up with the following:

FOR /f "TOKENS=3* DELIMS=: " %%a IN ('ipconfig ^| FIND "Ethernet adapter"') DO ECHO %%a %%b

echo.

pause


This will RETURN something like the following:

VMware NETWORK Adapter VMnet8:
VMware Network Adapter VMnet1:
Local Area Connection:


My requirement is to have each without the colon at the end, all WITHIN double-quotes and all stored within a variable.

The expected output is:

%LANS%="VMware Network Adapter VMnet8"*"VMware Network Adapter VMnet1"*"Local Area Connection"

or similar. Here, I've used * as the common delimiter/tokenizer.

Does anyone have any ideas that this can be achieved?

Thanks

- stebie

1584.

Solve : How to Solve this Problem using Recursive Bubble Sort Algorithm ??

Answer»

Hey,

I tried to implement bubble sort using recursion and have got a response

Code: [Select]ArrayIndexOutOfBoundsException: 11
Code: [Select]public static int[] recBubSort(int []arr, int n){
if(n > arr.length-1){
return arr;
}

if(arr[n] > arr[n+1]){
swap(arr,n,n+1);
}
return recBubSort(arr,n+1);
}

public static void swap(int arr[], int minPos, int index) {
//System.out.println("SelectionSort SWAP...");
int temp = arr[minPos];
arr[minPos] = arr[index];
arr[index] = temp;
}











Because the if statement in line 6 is using an invalid index of n+1 when n=arr.length-1. May be change the if statement in line 2 to "if (n >= arr.length-1)"

Code: [Select]1 public static int[] recBubSort(int []arr, int n){
2 if(n > arr.length-1){
3 return arr;
4 }
5
6 if(arr[n] > arr[n+1]){
7 swap(arr,n,n+1);
8 }
9 return recBubSort(arr,n+1);
10 }
...

1585.

Solve : help with batch file (entering commands)?

Answer»

I need to be ABLE to fill out cmmands that will then be entered into the running program that the batch FILE starts up. (i.e. as though i was ENTERING text myself). Is this POSSIBLE. I know it is into DOS command window but can't make it work into command window once the program starts.

Any help would be great. I just need to TYPE, "c", "1", "100" , "100",

pleeeeese

--what i have working--
:: startsoftware.bat
:: Runs software
::
@ECHO OFF

C:
CD\folder
mysoftware

1586.

Solve : E books of java programming language?

Answer»

Hello Everyone, I am in the First YEAR of My engineering and want to learn Java Programming language, as an engineering student I think java is ONE of the most important languages after C, and this ALSO help me in my future as well, so i decided to learn java programming language, can any one have GOOD knowledge of Java Programming please suggest me best online courses and please suggest best e BOOKS of java programming language.

Thank you

1587.

Solve : Batch file Wizard Required?

Answer»

I have an appplication with one ".ini" file that contains machine specific details as well as a general rule set which CHANGES very frequently. My challenge is to be able to USE Active Directory to copy a new set of rules to each machine without overwriting the machine specific entries. I'm trying to get the ".ini" file to somehow call or import the rule set then return to the original ini file. This would allow me to change only the rules for everyone and not their customised settings. If anyone COULD help, it would be GREATLY appriciated.

1588.

Solve : mysqli prepared update?

Answer» HI guys, I believe I"ve correctly coded this and think I'm so close.

I ENTER my HTML form:
record a PAYMENT
Unit: apt1 Amt paid: 530.00 Hudpay: 0.00 Date paid: - yyyy-mm-dd: 2021-07-10
---------------------------------------------------------------------------------
and get this result:
receiptno updated successfully 0 payfile updated successfully
For:
tenant paying: apt1 - Amount paid: 530.00 - Date paid: 2021-07-10 - Amount due: 530
-----------------------------------------------------------------------------------
The numbers table IS updated. The receiptno is 1310 but is displayed as 0 ??. The payfile IS NOT updated ??
The amount due should display as 0.00. The ? I've had all along: is "$receiptno = 0;" a way to define
it as numeric and does it also define it as having 0 value? I leave it out, it's undefined, put it in
the table value of 1310 is replaced with 0 ??
In the calcs:
elseif ($amtpaid == $owed)
{ $prevbal = 0.00; }
is true, yet "Amount due: " displays 530.00??
----------------------------------------------------------------------------------
the code:

$unit = $_POST['unit'];
$amtpaid = $_POST['amtpaid']; // **********************************
$hudpay = $_POST['hudpay'];
$datepaid = $_POST['datepaid'];

$amtdue = 0.00; // ****************************************
$prevbal=0.00;
$latechg=0.00;
$secdep=0.00;
$damage=0.00;
$courtcost=0.00;
$nsf=0.00;
$paidsum=0.00;
$comments="";
$receiptno=0; // ****************************************
$id="id";

$sql = "UPDATE numbers SET receiptno =receiptno+1 WHERE id=1"; // ****************************
if ($conn->query($sql) === TRUE) { echo "receiptno updated successfully"; }
else { echo "Error updating record: " . $conn->error; }
echo $receiptno; // ****************************

// Attempt SELECT query execution
$result = mysqli_query($conn,"SELECT * FROM payfile Where amtpaid =''");
$row= mysqli_fetch_array($result);

$owed = $amtdue + $prevbal + $latechg + $secdep + $damage + $courtcost + $nsf;

/* if no payment or partial payment, add $10 to latechg field and amount not paid to prevbal field */
if ($amtpaid < $owed)
{ $latechg = $latechg + 10.00; $prevbal = $owed - $amtpaid; }

/* if payment = amtdue clear due */ // ****************************** this event
elseif ($amtpaid == $owed)
{ $prevbal = 0.00; $latechg = 0.00; $secdep = 0.00; $damage = 0.00; $courtcost = 0.00; $nsf = 0.00; }

/* if over-payment subtract over-payment from prevbal field */
elseif ($amtpaid > $owed )
{ $prevbal = $amtpaid - $owed; $latechg = 0.00; $secdep = 0.00; $damage = 0.00; $courtcost = 0.00; $nsf = 0.00; }

$amtpaid = $paidsum;

$sql = "UPDATE payfile SET
amtpaid=?, prevbal=?, latechg=?, secdep=?, damage=?, courtcost=?, nsf=?, hudpay=?, datepaid=?, paidsum=?, comments=?
WHERE id=?";
$stmt = $conn->prepare($sql);
$stmt->bind_param("ddddddddsdsi", $amtpaid, $prevbal, $latechg, $secdep, $damage, $courtcost, $nsf, $hudpay, $datepaid, $paidsum,
$comments, $id);
$stmt->execute();
echo "payfile updated successfully"; // ****************************
?>

tenant paying: <?php echo $_POST["unit"]; ?> -
Amount paid: -
Date paid: -
Amount due:
/* *****************************
1589.

Solve : how long should I study programming per day??

Answer»

I'm learning javascript css and HTML SELF study at the momentAs a rule of thumb, 1 hr is better than 0 hrs.A couple years AGO, I wanted to learn it for the sake of learning. I found HTML5 Game Development for Dummies fun and instructive.
https://www.amazon.com/HTML5-Game-Development-Dummies-Harris/dp/1118074769

Do you have a specific goal?
Quote

I want to do "x" with HTML, CSS and JavaScript.
I study about 7 HOURS a day. Might be too much

My goal is to do front END web design
1590.

Solve : How to try Project Loom and would Project Loom replace Threads in java.net.Serve?

Answer»

Hi
Scalability is OS-dependent as ServerSocket that handle multiple CONNECTIONS use Threads. In websocket, you would need 1 thread for 1 connection. In other words, scalability is bad if you use IO ServerSocket. Therefore, I believe most people would use NIO for the WebSocket SERVER, but maybe stick with IO for HTTP server.
What do you think? Would porting to virtual threads e.g this snippet of code will be easy? `SessionHandler implements Runnable`.

```

SessionHandler handler = new SessionHandler(SOCKET);

new Thread(handler).start();

1591.

Solve : Re: single task windows?

Answer»

Might help if you told us what language you're programming in. Why on earth you want to have such a lockdown I'll never know but you could make your app system modal. Restricting USERS is easy.. have a login screen and if they can't login they can't run the app. You say you want to replace your program with EXPLORER.. I don't understand.Quote

i want to prevent users of my program from running any other progrem in windows nt. in the other hand , i want to replace my program with explorer and restrict users in my program. is it possible? how can i do this?

Quote
my applicatin works in a FINANCIAL organization and containes many FILES and rules thereby i want to become users as restricted as possible for avoiding undesirable events.
I can understand wanting to restrict users abilities within the application.. I do that all the time. Have the user log in and based on the login they have ACCESS to certain areas/functions. Again.. what language are you writing your code in? I think, to prevent a user from using ANY other software, you'll have to go with a 3rd party application like zenworks on a Novell network. You will find it very difficult if not impossible to prevent users from using something other than your app.
1592.

Solve : Errors Wit Bot?

Answer»

this is what i am encountering when i try to start my bot that i want to use as a manager for my msn group chat:
this error STARTS while the program is loading up:

(Yield sign Here) MIRC has caused an error in KERNEL32.DLL
Mirc will now close

If you continue to EXPERIENCE problems, try RESTARTING your computer


and i did but i still encounter the same problems after even reinstalling it and restarting computer.
I dunno what to do so ppl plzzz HELP me i need to get this bot runin :-/
Thanks alot For any help

1593.

Solve : What does (!) dohere??

Answer»

What does (!) do here?
(!a ) Means not 500?
or it CHANGE the value 500 ( TRUE ) to false?


Its a function that is INVERSE so instead of true false or instead of false true as seen here

https://teamtreehouse.com/community/what-does-the-means-if-its-before-a-variable

1594.

Solve : my pong game?

Answer»

right now in intro to C++ we are developing games for our final but im havin some difficulties and i was hoping someone could give me some help. here is what i have soo far. the problem is i cant get my paddle to move when i run my applet

import java.awt.*;
import java.applet.*;
import java.lang.Thread;

PUBLIC class Padle extends Applet implements RUNNABLE{

int yourPadle = 70; mcdvoice

private Image dbImage;
private Graphics dbg;
private Thread th;

public void init() {
setBackground (Color.black);
th = new Thread(this);
}

public void start (){
th.start();
}

public void stop(){
th.stop();
}

public boolean keyDown(Event e, int KEY){
if(key==Event.UP){
yourPadle =- 7;
}

else if(key==Event.DOWN){
yourPadle =+ 7;
}
return true;
}

public void destroy(){
th.stop();
}

public void run(){

}

public void paint(Graphics g) {

g.setColor(Color.white);
g.fillRect(20,yourPadle,20,80);
}

}

1595.

Solve : bad marks?

Answer»

i got bad marks on my 1.5 gig hard DRIVE how do i get RID of them???I'm ASSUMING that you are referring to bad sections of the hard DISK drive that are being detected by a disk utility such as DEFRAG. If this is the case, you cannot get rid of these _marks_, these are bad sections of the hard disk drive that are being skipped to prevent data corruption.

1596.

Solve : how i answer without clicking anything??

Answer»

i was new in computer... so i NEED to get some info from URS...
eerm... problem here...
i was working in cycber cafe.. and we got 2 GAMES here , and that 2 games also run in same registry
i success to change the registry eachtime clicking it... if didt change... it will run the same version of the games , but .... its pop-up (yes o no)while clicking the games...coz my script was CHANGING registry... can any1 help me to SLOVE the problem??
just apply it without the question (yes o no)

1597.

Solve : Pass the variables as a parameter for a Release build in Azure DevOps pipeline?

Answer» PASS the variables as a parameter for a Release build in Azure DevOps pipeline.

I have a file named "Generate-manifest.ps1" file which after executing it creates manifest.json file which is a collection of different packages from artifactory.
Now I want to rename a file with some version values like "1.0.0" EG: manifest-1.0.0.json file and use it for the next build.

Basically I have a REPO named Deploy-scripts which contains Generate-manifest.ps1 script. Once we execute them it will create manifest.json file.
But I want to pass some variables during runtime in such a way that manifest.json file should UPDATE with version info.

manifest.json:
Code: [Select]{
"version": "1.0.0",
"TIMESTAMP": "2021-05-07T09:41:34+00:00",
"packages": [
{
"name": "data-service",
"type": "docker-image",
"version": "REL-1.0.5367"
},
{
"name": "feedback-service",
"type": "docker-image",
"version": "REL-1.0.6099"
},
]
}
1598.

Solve : Convert shell script to python?

Answer»

I have written a shell script and I need the same script in PYTHON to execute it for windows.

Code: [Select]#!/usr/bin/env bash

sonar_token=$1
sonar_server=$2
sonar_project_key=$3


echo "Fetching the Sonar Quality gate status using api"
quality_gatesstatus=$(curl -u $sonar_token: https://$sonar_server/api/qualitygates/project_status?pullRequest=$PullRequestId | grep -Po '"status": *\K"[^"]*"')

echo "the Sonar quality gates for current analysis is: $quality_gatesstatus"
if ("$quality_gatesstatus" != "OK") && ("$quality_gatesstatus" != "NONE")
then
echo "Check Sonar server and fix the issues"
echo $quality_gatesstatus
exit 1
else
echo "No code violations found"
exit 0
fi
I am trying but i am failing to do that, please help us on that.The problem is you are calling is a shell script. You to tell use it is bash and what version of bash.
Here is a possible answer:
https://stackoverflow.com/questions/2839810/converting-a-bash-script-to-python-small-script

Sorry I can not do it. I am GETTING too OLD.

1599.

Solve : I need help reformatting?

Answer»

I am trying to reformat my computer but i cannot due to the fact my floppy drive is nto formatting the disk and the computer does not list the CORRECT capacity i need help Hi dont worry about formatting a floppy just go to the control panel and then to add\remove programs then go to the create bootdisk tab and create a bootdisk then restart your computer go in to the bios and find were it says floppy seek and then enable it then change the order that the computer boots from, so it should start IDE-0, then CD-Rom, then floppy, you change it so the floppy boots first then CD-Rom SAVE the changes and reboot with the boot disk in the floppy drive then wait awhile for the computer to start READING the floppy drive select start computer with CD-Rom support make sure your windows cd is in the CD-Rom drive.
After the computer has finished readind the floppy you should be in MS-Dos withe the command prompt C:\ type in A:\ then type format c:\ that should format the drive you see you cannot format or erase something as big as windows unless your in DOS after the hard drive is formated type D:\ which should be your CD-Rom drive letter or if you have got 2 hard drives it might be E:\ then go to setup and install a clean version of windows to do this type D:\setup or install and that should work, and 1 last thing make sure you go back into the bios and change to bootup sequence back to IDE-0 first then CD-Rom and then floppy and also turn floppy seek off.

Hope i have been of help to you.

If that doesn`t work post a reply to me here and i`ll try to find another way.First tip: post the question in the Windows section since this has nothing to do with programming and you'll get more viewers there.

Second tip: if you're using XP you should be able to change the bios (as NOTED in Searles excellent tip) to CD first then simply insert your CD and off you go. Be warned!!! Formatting will completely wipe your system of ALL files and settings so make sure you have a list of APPLICATIONS you want to reinstall and all the software. Also list your hardware components and get the drivers ready or at least write down links to company webpages for the needed info.

1600.

Solve : Programming Path?

Answer»

Hi there guys, so I thought about starting to learn programming. However, I don't know from where to start. So, after some research I found that a lot of people SAYING that it's better to learn C programming first to be able to learn other programming language. Now the problem here is, do I need to learn the three C programming languages that are the C++, C, and C# to be able to learn .NET or I can just learn one of the the C programming language. Moreover, after I thought about it for sometimes I found that I need to learn some programming language that will help me develop some software and also I am interested in scripts. So, I thought that if I need to be a software engineer or developer I need to study C, C++, C# and .NET and if I want to make scripts I need to study Python. So, do I need to learn all the C programming languages or I can just learn one of them? You asked "... study Python"
Yes. It is a good start. Quote from: Geek-9pm on May 07, 2022, 06:24:51 PM

You asked "... study Python"
Yes. It is a good start.

So, the Python is used for scripting. But I need to know if I want to make some UI desktop Applications. Do I need to know C# and C++ or I can learn C# only?If you're GOING to write desktop apps for Windows, I would recommend starting with C, then moving to C++. C will give you a basic understanding of how to "talk to the machine," and help you understand the fundamentals of C++.

Then I would learn C++, because the majority of Windows software, including the operating system itself is written in C++. It is way more complex than C, providing you with all sorts of tools and programming paradigms that are not INCLUDED in C. You don't need to learn them all, so try to focus on exactly what kind of applications you want to make. Look for applications that are open-source if possible, and read the source code. Try to determine what libraries and algorithms they use, and use that as a guide for what you should learn in C++.

For learning C, you can't go wrong with the original "K&R" book by Kernighan and Ritchie. This book is very old but still extremely relevant, and it will help you understand C from the ground up.

https://en.wikipedia.org/wiki/The_C_Programming_Language

When you feel like you have a handle on C, get the newest edition of C++ Programming Language by Bjarne Stroustrup. It's still considered the bible of C++:

https://en.wikipedia.org/wiki/The_C%2B%2B_Programming_Language

I hope this helps.Quote from: nil on May 08, 2022, 08:16:20 AM
If you're going to write desktop apps for Windows, I would recommend starting with C, then moving to C++. C will give you a basic understanding of how to "talk to the machine," and help you understand the fundamentals of C++.

Then I would learn C++, because the majority of Windows software, including the operating system itself is written in C++. It is way more complex than C, providing you with all sorts of tools and programming paradigms that are not included in C. You don't need to learn them all, so try to focus on exactly what kind of applications you want to make. Look for applications that are open-source if possible, and read the source code. Try to determine what libraries and algorithms they use, and use that as a guide for what you should learn in C++.

For learning C, you can't go wrong with the original "K&R" book by Kernighan and Ritchie. This book is very old but still extremely relevant, and it will help you understand C from the ground up.

https://en.wikipedia.org/wiki/The_C_Programming_Language

When you feel like you have a handle on C, get the newest edition of C++ Programming Language by Bjarne Stroustrup. It's still considered the bible of C++:

https://en.wikipedia.org/wiki/The_C%2B%2B_Programming_Language

I hope this helps.

So, can C# help me to create UI desktop apps? Also, which programming language I can use to create UI (User Interface) desktop applications?C,C++, and C# are three completely different languages. C++ is technically a superset of C barring a few features but code written in C++ shouldn't have much direct resemblance to C. C# is a completely different language altogether.

Asking the BEST way to learn programming is sort of like asking what the best way to read a book is. You aren't going to get through, say, the Lord of the Rings by asking the best way to read The Lord of the Rings, and hemming and haawwing about what the best environment for reading books is. You simply have to start reading it; same for programming. Instead of asking questions about the best way to start programming, you have to dive in.