InterviewSolution
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.
| 1501. |
Solve : VBA Excel 2010 export to add to a central CSV or xlsm file? |
|
Answer» Good Morning, |
|
| 1502. |
Solve : [Lua] More help needed? |
|
Answer» So it's giving me |
|
| 1503. |
Solve : Quick Course C++? |
|
Answer» I am doing a quick course on C++ and the book told me to build a program. d:\c++ weekend crash course\work\conversion.cpp(13) : error C2676: binary '>' : 'class istream_withassign' does not define this operator or a conversion to a type acceptable to the predefined operator The book is from 2000 and is called C++ Weekend Crash Course I am using Microsoft Visual 6.0 C++ Standard Edition What could that error possibly mean? I have looked on the Internet, but what I found made no sense to me. A friend of mine is doing the exact same with the same VERSION of Visal C++ and runs into the same error... Here is the program I am told to recreate.. Code: [Select]// // Program to convert temperature from Celsius degree // units into Fahrenheit degree units: // Fahrenheit = Celsius * (212 - 32)/100 + 32 // #include <stdio.h> #include <iostream.h> int main(int nNumberofArgs, char* pszArgs[]) { // enter the temperature in Celsius int nCelsius; cout << “Enter the temperature in Celsius:”; cin > nCelsius; // calculate conversion FACTOR for Celsius // to Fahrenheit int nFactor; nFactor = 212 - 32; // use conversion factor to convert Celsius // into Fahrenheit values int nFahrenheit; nFahrenheit = nFactor * nCelsius/100 + 32; // output the results cout << “Fahrenheit value is:”; cout << nFahrenheit; return 0; } Copied from a .PDF document into a forum.. The layout's a BIT.... messy now.Code: [Select] cin > nCelsius; Had to be Code: [Select] cin >> nCelsius; I wonder if they ever bother to DOUBLE check important things on SPELLING errors.. No wonder wars are started.As you've already found out.. a missing "" or ; can completely blow apart your app. Syntax is everything and spelling is huge. Happy learning.I am aware of that - however, this was not my fault: cin > instead of cin >> (The writer's Texan, and we all know what comes from Texas..)Quote this was not my fault A wise carpenter never blames his tools.Quote A wise carpenter never blames his tools. nice quote there Joleen Quote nice quote Indeed it is. As you'll probably know, Raptor and I frequently poke fun at each other both here and on MSN. No insult is intended except the friendly one found in any friendship.group hug |
|
| 1504. |
Solve : MSDN (Juli 2004)? |
|
Answer» I managed to OBTAIN an (outdated) version of MSDN. |
|
| 1505. |
Solve : .bat Image Renaming For WD TV Live? |
|
Answer» Hello all, |
|
| 1506. |
Solve : C++? |
|
Answer» Have just started to learn C++ from the Ubuntu COMMAND line and i am enjoying it so far. |
|
| 1507. |
Solve : ArrayList in PHP Question - Find line in file and populate with list data? |
|
Answer» Making a Turn Based RPG game to strengthen skills in PHP and looking for advice on handling population of stats per usable items. You can easily install the Apache web server (A), MySQL (M) and PHP (P) on your laptop or home PC. The three come bundled together, referred to as either the WAMP, MAMP or LAMP according to whether you are installing them on Windows (W), a Mac (M), or Linux (L)How to run PHP at home: WAMP, MAMP and LAMP Hope that MIGHT help a little. There is no arraylist in PHP. PHP arrays however are associative arrays/hashmaps, so you can use any key you want. This loads in a file with a similar format to what you gave and creates a associative array with the key being the Item# (the first item on each line). Code: [Select]<?php functionreadData(datafile){ $lines=explode("\n",file_get_contents(datafile)); return$lines; } functionparseData(input){ hash=array(); foreach(inputas$line){ $splitline=explode(",",$line); hash[$splitline[0]]=array_slice($splitline,1); } returnhash; } echo"begin"; $weapondata=parseData(readData("weapon.txt")) //$weapondatacannowbelookedupwithIDnumbers. //eg$weapondata["0179"]willreturnanarray{"BroadAxe","1","10","20","0","0","2","1"} ?> Ideally, you would be using a separate class to store the information for each item; then you could use something like $weapondata["0179"].getDamage() or something to that effect.Quote There is no arraylist in PHP. PHP arrays however are associative arrays/hashmaps, so you can use any key you want. hmmm .... I found this example when looking for an arraylist for PHP at the link below using the list() function the other day and since it is termed an arraylist even though list() function I thought it was the same. http://www.w3schools.com/php/func_array_list.asp Thanks for providing me with code below to work with showing the explode and parse of the data. Thats a Big Help! Now beyond the roadblock I had with your help. |
|
| 1508. |
Solve : Can someone identify the language or encryption type?? |
|
Answer» Hello everyone, |
|
| 1509. |
Solve : need help with mysqli? |
|
Answer» What I'm trying to do is select once from the dropdown and use the selection |
|
| 1510. |
Solve : Graphics Programming Advice? |
|
Answer» Good morning FOLKS, |
|
| 1511. |
Solve : [Lua] Splitting strings again? |
|
Answer» So I have a table that contains tables that holds a line from a TEXT file, so if the file's first line is "0,0,0,50" then table = { 1 = {a = "0,0,0,50"} 2 = { a = "LINE 2"} 3 = { .....etc. } I want to seperate t[1][a] by commas and STORE each of them in their respective places within the table. |
|
| 1512. |
Solve : JS alternative to BASIC's GOSUB? |
|
Answer» Not a programmer - at least since QBASIC. Just looking for a simple JS SCRIPT that does what GOSUB did in BASIC. It will be used to call a series of JS routines. Thanks in advanceStart here: http://www.youtube.com/watch?v=_cLvpJY2deo http://javascript.about.com/od/reference/g/jsubroutine.htm Quote from: Geek-9pm on November 17, 2013, 12:30:34 AM Start here: Not sure I have the time or BANDWIDTH to learn the nitty-gritties of JS, but that is one great tutorial! I got engrossed in it and used up half my daily bandwidth before I REALIZED it. (I'm on dorky Hughes.net). Anyhow, thanks for the link. If I find the time I may be downloading those and get to studying. I really love the way that FELLOW is doing that.Quote from: Salmon TROUT on November 17, 2013, 02:43:04 AM http://javascript.about.com/od/reference/g/jsubroutine.htm Thank you for the info.. |
|
| 1513. |
Solve : text to mp3? |
|
Answer» HI, I have downloaded an mp3 (ckmp3)that says "RETURN to homepage" and I'm TRYING to code so that when I click on my home IMAGE I get that mp3 saying "return to homepage". Any ADVICE? I'm trying this. ============================================================================= src="house.jpg" height=75 width=75 alt="image of home">[/url] ========================================================================== thanks, Charlie |
|
| 1514. |
Solve : Re: my computer is dead? |
|
Answer» What OS are you running; Windows - - ? Can you give me any more details? Sounds like you might have to re-format and reload Windows but again, maybe not. |
|
| 1515. |
Solve : Good sites for learning JavaScript?? |
| Answer» ANYONE know any good sites for learning the ins and out of JavaScript? Free is best! Thank you!LOTS of good stuff at Youtube as WELL as one of my favorite sites is W3 Schools as LINKED here: https://www.w3schools.com/js/DEFAULT.asp | |
| 1516. |
Solve : I really need some help here? |
|
Answer» I have a message that reads attention onsignal chck input signalconnection or follow power save mode has been enable how do i fix this |
|
| 1517. |
Solve : Script not working!? |
|
Answer» It ends whenever the command 'goto' is involved It helps if you can break your code in little sections. That is how you try are possibilities for an IF statement without going into the whole page of code. I know this wasn't directed at me - but why doesn't that work? Shouldn't it check if %you% is A. If it is, then goto A1. But if not, shouldn't it move to the next line and check if %you% is b. Then goto B1 if it is, but if not just move on and exit? I just saw that it wasn't working so I made a case to check with both instead and it worked. |
|
| 1518. |
Solve : Run FTP from vbscript? |
|
Answer» Greetings all. I am trying to get a vbscript to run ftp command. If I run "ftp -s:c:\test\ftp.txt>c:\test\ftp_out.txt" (without the quotes) from the command prompt, it works like a charm. The only thing c:\test\ftp.txt is doing is downloading dir contents to text file c:\test\ftp_out.txt. Below are the lines in c:\test\ftp.txt (host, user, pass changed to protect the innocent) |
|
| 1519. |
Solve : setting colors on coumuter? |
|
Answer» I recently replaced the hare drive and now my COLOR settings are way off. I have no idea how to CORRECT. |
|
| 1520. |
Solve : Need help with Simple Java Program? |
|
Answer» Here is what I have to do for my class http://pastebin.com/tegBmTe5. Could someone maybe teamview me to HELP me out because I am pretty lost.Are you serious? Are you serious? You need to stop making posts like this, Google. Quote from: Google on November 25, 2013, 12:04:07 PM Are you serious? While we don't assist with homework here, it's not your place to be RUDE to PEOPLE. Knock it off. |
|
| 1521. |
Solve : when any key is pressed? |
|
Answer» I need a powershell script which will detect for about 3 MINUTES if any key on keyboard is pressed. When it is it MAKE a txt file. |
|
| 1522. |
Solve : VB programming for AutoCAD? |
|
Answer» Can someone point me to a good tutorial on creating an Autocad DRAWING thru VB? I know scripting, but that is not what I am talking about. Also, I am not talking about the VB EDITOR in Autocad. I am talking about a stand-alone APPLICATION which outputs a FINISHED Autocad-format DWG file. |
|
| 1523. |
Solve : C LIB Help? |
|
Answer» Hi,
I'm stumpt and would appreciate any help with this C syntax, since I'm in transition from BASIC. thx qito |
|
| 1524. |
Solve : VB Dir$ Function? |
|
Answer» Has anyone GOT this to display subdirectories? I am USING a list box, and I have USED vbDirectory and vbSystem ETC but they don't seem to work. Am I FORGETTING something? I also want it to display the contents of the tempory internet files folder, but it doesn't work. I am thinking this is because it is a hidden folder, is there a way round this? |
|
| 1525. |
Solve : Python programs won't run.? |
|
Answer» I had a power outage and temperatures a bit below freezing in my home. My computer was exposed to those temps for a short while. When I started it up, Windows 7 had to repair some problems. Since then, any program I write in Python will not run in IDLE or otherwise. I have uninstalled Python and re-installed several times. I have tried to run down every piece of the program and delete it also (I might not be good at that). Still nothing. The older programs that I wrote before the recent weather work fine. Anything new will not run. My computer seems to be working fine otherwise.What version of Python do you have? This turned out to be a user error on my part. Care to share? First: I did have a syntax error. I don't remember exactly what it was. Second: I was selecting "Python shell" from the run menu equating that with "Run in shell" Third: I made that mistake only minutes after Windows performing repairs. So my line of reasoning was diverted to that. Fourth: When I re-installed Python, I upgraded and there might have been a CHANGE in appearance. Fifth: Some other excuse.Quote from: Liquidius on December 09, 2013, 06:45:49 AM First: I did have a syntax error. I don't remember exactly what it was.it was the variable name "1000s", which isn't a valid variable name. Quote from: Liquidius on December 09, 2013, 06:45:49 AM First: I did have a syntax error. I don't remember exactly what it was. Summary: I don't care about wasting everybody's TIME. Quote from: BC_Programmer on December 09, 2013, 09:24:47 AM it was the variable name "1000s", which isn't a valid variable name. Indeed. How hard is it to understand this? Variable names can be arbitrarily long. They can contain both letters and numbers, but they have to begin with a letter. Well, it was a goo read anyway. Toe Err is Human - computers never forgive.Gentlemen, it was the variable indeed, but I think there might have been some change in the Run menu from 2.5 to 2.7. That might not be the case though. I did state that I don't know much. This turned out to be a great exercise in resourcefulness. I went into 3 IRC chat rooms, emailed 2 groups, queried 3 friends, posted in a forum, did a system restore and became more familiar with a registry. Maybe you can appreciate that. Maybe, also, you can appreciate my embarrassment after discovering that I was making a beginner's mistake, and that I had wasted everyone's time as a RESULT...and, perhaps, you will note that I took the time to mark this as "resolved" and confess my ignorance. I was tired after 13 hours and agitated and in an incommunicable state. Perhaps you'll forgive. I did thank you GUYS, I think. Thanks again for the attempts. |
|
| 1526. |
Solve : php prepared statements? |
|||||||||
|
Answer» gave up on this for awhile but thought to try the prepared statements again. I'm trying to select RECORDS from database to REMEMBER info, click on and GO to the target and update the date last used, visit count, time VISITED and if the info hasn't been saved, save it. Below is my latest feeble attempt. I'm hoping for advice ------------------------------------------------------------------------------------------- echo ' ', date('m/d/y'), ''; $con = new mysqli('localhost', 'root', 'cookie', 'homedb'); if ($con->connect_error) { echo 'Cannot Connect to MYSQL: ', $con->connect_error(); } else { echo ' E-Mail Account: -- select --'; $targets = $con->query('SELECT target FROM emailtbl'); while ($row = $targets->fetch_array(MYSQLI_ASSOC)) echo ' ', $row['target'], ''; echo ' '; } ?> $con = new mysqli('localhost', 'root', 'cookie', 'homedb'); if ($con->connect_error) { echo 'Cannot Connect to mySQL: ', $con->connect_error(); } else { if (isset($_POST['target'])) { $stmt = $con->prepare(' SELECT target, purpose, username, password, emailused, lastused, visit-count, time-visited, saved FROM emailtbl WHERE target = ? '); $stmt->bindValue(1, $_POST['target']); $stmt->execute(); if ($row = $stmt->fetch()) { echo '
} else echo 'No Results Found'; } else echo 'No valid "target" for Query'; } $stmt = $con->prepare(' UPDATE emailtbl SET lastused = NOW(), visit-count = visit-count + 1, time-visited = time-visited + 1 WHERE target = ? '); $stmt->bindParam(s, $_POST['target']); $stmt->execute(); echo $stmt->error ? ' Lastused update query error: ' . $stmt->error . ' ' : ( $stmt->affected_rows > 0 ? ' Success! Updated ' . $stmt->affected_rows . ' records. ' : ' FAILED! No records updated. '); ?> ===================================================================================== below is the result ------------------------------------------------------------------------------------ ', date('m/d/y'), ''; $con = new mysqli('localhost', 'root', 'cookie', 'homedb'); if ($con->connect_error) { echo 'Cannot Connect to mySQL: ', $con->connect_error(); } else { echo ' E-Mail Account: '; } ?> connect_error) { echo 'Cannot Connect to mySQL: ', $con->connect_error(); } else { if (isset($_POST['target'])) { $stmt = $con->prepare(' SELECT target, purpose, username, password, emailused, lastused, visit-count, time-visited, saved FROM emailtbl WHERE target = ? '); $stmt->bindValue(1, $_POST['target']); $stmt->execute(); if ($row = $stmt->fetch()) { echo ' '; do { echo ' '; foreach ($row as $value) echo ' '; echo ' '; } while ($row = $stmt->fetch()); echo ' Email Activity for ', htmlspecialchars($_POST['target']), ' Purpose Username Password E-Mail Used Last Used visit count time visited Saved ', $value, ' '; } else echo ' No Results Found '; } else echo ' No valid "target" for Query '; } $stmt = $con->prepare(' UPDATE emailtbl SET lastused = NOW(), visit-count = visit-count + 1, time-visited = time-visited + 1 WHERE target = ? '); $stmt->bindParam(s, $_POST['target']); $stmt->execute(); echo $stmt->error ? ' Lastused update query error: ' . $stmt->error . ' ' : ( $stmt->affected_rows > 0 ? ' Success! Updated ' . $stmt->affected_rows . ' records. ' : ' FAILED! No records updated. '); ?> |
||||||||||
| 1527. |
Solve : An unusual problem......? |
|
Answer» As part of an experiment I'm doing, I have to generate random word lists. I already have the WORDS; they just need to be put in a random order. There are 40 lists with 14 words in each list. |
|
| 1528. |
Solve : Raw estimate of budget needed? |
|
Answer» Dear COMPUTER Hope forum, |
|
| 1529. |
Solve : keypress or mouse move exe? |
|
Answer» I need a small program which will detect if any key from A to Z or 0 to 9 is pressed than it makes a txt file, after that if nothing happend for 30 minutes it delete that file and it should work as process. |
|
| 1530. |
Solve : Any good hexadecimal tutorials?? |
|
Answer» Hai.....is there any good sites that teach hexadecimal...i know theres alot ALREADY but STILL very confusing coz all of it don't SHOW good example of applying or using it. |
|
| 1531. |
Solve : [Lua] If-then always returning false? |
|
Answer» Maybe some fresh eyes can see what's wrong here. In the function Write_Map() the 2nd If tree is always PROVIDING false, whereas the 3rd works the way it should. It is suppose to grab the coordinates from pt.txt and then display any that are withing a -7 -> 7 (y) and -7 -> 7 (x) area around you (at pos.x , pos.y , pos.z). It works for everything accept displaying a point from pt. This tends to happen a lot. I'll post a question, and then 5-10 min later, when I go away to do something else, I'll come up with an answer.You successfully rubber-ducked the problem. |
|
| 1532. |
Solve : java programming? |
|
Answer» i m studying java programming,i m using a win 95 , I ve just installed a jdk1.2.2 compiler , but every time i want to COMPILE for example : |
|
| 1533. |
Solve : running java files in windows background? |
|
Answer» hi i am working on a PROJECT which NEEDS me to run a JAVA file as a background process in windows. moreover the file MUST run continously. looking for some help in this regard. THANK u. |
|
| 1534. |
Solve : Restart network PCs by using Java? |
|
Answer» Dear All, TipSo there. Please read the WHOLE thing. It is very accurate and update. Can you explain why you are doing this?Geek-9pm Thanks for your response but I already created a batch file to do what i want like remote registry CHANGE , restart one Or couple Or even all of them as i want with considering the restart time for each PC and some simple command and have no restrictions in my company but i want to do that with Java program instead of batch files , so can you help me.I Found some people were talking about the use of the server and client and other people talked about the use of socket service and i wasn't know about its really and after i knew it i didn't like it , so I thank Allah for guiding me to the truth of that issue and as i was wanted to give the order to my computer directly without any mediator like any service then the operating system and network protocols taking the responsibility for sending my command to other PC on my network then the other PC directly execute my command as it using the same operating system that exactly what i want here is my last code below if it helping any one latter String Time = "0"; Time = txt1.getText(); String HostName = txt2.getText(); String shutdownCmd = "shutdown -r -t "+Time+" -m \\\\"+HostName; try { Process p = Runtime.getRuntime().exec(shutdownCmd); } catch (IOException ex) { Logger.getLogger(frmRestart.class.getName()).log(Level.SEVERE, null, ex); } |
|
| 1535. |
Solve : Random_Shuffle with single space in the list of characters to shuffle C++? |
|
Answer» Been playing around with Random_Shuffle again and trying to figure out a way to add a single space into the string to shuffle it as a single character space that can end up in any element location as a result of the random_shuffle. The C++ instructions that I am working with are like the following. But there is no escape character sequence that I can find to add a single space to the string to be shuffled. string str="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklm [emailprotected]#$%^&*()_-+=?<>:\\/~.,;"; Wasn't sure if maybe an unusual to English character may need to be used such as ö added to the list for substitution for space, and ö is used for a space translation in the output, or if there is a method to add the ASCII equivalent to space character in the string above such as ASCII code 0x20. Been trying a few things and compiler not happy with trying to force it to accept a single space to the string str. I haven't gone through the method yet of adding an ö to the string to be shuffled and perform a space to ö translation yet because I have been known to do things the hard way and perhaps there is a better way than a character substitution, however if the character substitution method if the best way to get it to accept adding a space to the shuffle, then i can go that route. Unless I am misunderstanding, does Code: [Select]string str="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklm [emailprotected]#$%^&*()_-+=?<>:\\/~.,; "; That not work? Just adding a space to the end of the string itself? Thanks for help with this BC. That's the one thing I didnt try was a space without an escape character. That fixed the compile issue, however now trying to figure out a way to fix another part of PROGRAM that broke. The part that broke looks at the length of the string that is input and it seems that the first space that is entered it thinks is the end of the string and so a string of ABC DE it thinks is 3 characters in length long instead of 6, so the space entry confuses the string length instruction that I have. It measures proper length of characters when all bound tight without SPACES, so curious how to fix this string length issue where a single space is seen as end of string? Here is more code snippet to show what I have going on: ( location=i-1; is used to point to the correct array element where ARRAYS start with first element at 0. ) Also hoping its not confusing having a lot going on with little commenting. I had to print it out and write on paper with colored pens showing WHATS passed to what to keep track of it where values are passed between arguments of functions as its slightly SPAGHETTI. Quote cout<<"Enter String\n";reading a string from standard input via the << operator only reads to the first whitespace character, so the length is not incorrect- the string is not what you expected. If you want to read an entire line you can use std::getline. Code: [Select]getline(cin, MyString); Sweet! Thanks for the help BC. And brought your thanked to 1111 |
|
| 1536. |
Solve : run my program? |
|
Answer» HELLO Sir/Madam I am narasiman. I WANT to know how to RUN my own program before the bootstrap loader program, i.e, OPERATING System. suggest me. |
|
| 1537. |
Solve : Small script required? |
|
Answer» Need to identify when a USB device has been plugged in, look for a file on the device, if file found then copy contents of device to a sub folder called current date, inside the folder named the same as the file looked for. |
|
| 1538. |
Solve : php coding? |
|||||||||||||||||||
|
Answer» my objective is to select records from database to remember info, click on and go to the target and
} ?> Why did you pick PHP? Are you a PHP programmer? If so, what tools do you use? Quote from: Geek-9pm on February 19, 2020, 11:22:04 AM Why did you pick PHP? Please, answers npt ?? what would pick and why, Are you a PHP programmer? If so, what tools do you use? Are you a PHP programmer? If so, what tools do you use? I wonder if the fact that win7 is no longer supported is cause for PHP not to work. Checking "php error logs" gets "cannot find path". Installed new xampp. still no PHP?You are directly loading the PHP file into the browser. You need to access it through your server. Usually that is via http://localhostDear topic POSTER; it seems that nobody is giving you a direct answer to your question. Judging by the appearance of things it seems that you are not an experienced PHP programmer. This gives rise to the question about why you chose PHP to solve the database problem. Although PHP is used widely for creating special programs, most users do not need to have a special program created by themselves solve the problem. INSTEAD, most ordinary users just use something somebody else had already prepared and just adapted to their own needs. You seem to indicate that you need to update the database and you need to have some way of editing it according to when something was updated. That sort of thing is often DONE by people using some form of SQL. So that makes me wonder what kind of programming experience you have and what kind of work do you do. Or perhaps I should ask, is this for your own pleasure. If so, perhaps we should concentrate on what your needs are rather than giving you specific help on PHP syntax and usage. Perhaps it is not really need to write a program to get what you want. Perhaps you could give us some clues as to what kind of database you're working on and whether not to doing this for yourself or somebody else. It looks like you have copied somebody else's code. Is that true? And did you get permission to copy the code and posts it somewhere else? There are many experienced people year on this forum that would like to help you, but you make it difficult without providing more information about your background and your objectives. In any case, we do not to homework for people. Please help us understand about who you are and what your objectives are. This has nothing to do with your privacy, rather it helps us to understand what kind of background and experience you have and whether or not it would be wise for us to try to coach you in PHP usage. Have you had experience with managing databases? If so how large a better database and what sort of information for you handling? Again, these questions are to help others know how to respond to your request. In order to help you quickly I have written this post in my speech recognition program. So please excuse some bad grammar or spelling mistakes |
||||||||||||||||||||
| 1539. |
Solve : VB5 Beep?? |
|
Answer» I'm PROGRAMMING with Visual Basic 5. The "Beep" Command doesn't PRODUCE a sound. |
|
| 1540. |
Solve : php time and php date? |
|
Answer» I need to update a date used field (lastused) and time used field (time). how to relate with code? |
|
| 1541. |
Solve : Eclipse IDE? |
|
Answer» Hey there, Just a quickie. Installing Eclipse IDE. Looks like its a stand alone that just runs like a portable app. Is that correct or should it still be in my uninstall programs? Just asking because as I have a slight ISSUE. It's when I open it and try using the tutorial for "create a Hello World SWT application". When I open this it asks me to "Open the Java perspective, however its not there. Also doing the import of the "Import the SWT project from target platform using the PDE... well I follow the instructions and again I don't have it there. Any info how to use Eclipse optimally, because I don't think I've done it correctly, would be great thanks! I have done a simple hello world and it runs fine. Although when compiling to a .jar file it compiles but when I run it it doesn't seem to run. I can write it in notepad++ and save as .java and run javac on it and it's okay that way. I just want to use Eclipse as EFFECTIVELY as I can to build up my java skills though. thanks! The code I was trying to get working was as below, but it says that Display and Shell cannot be resolved to a type. Code: [Select]public class MySWT { public static void main(String[] args) { Display display = new Display(); Shell shell = new Shell(display); shell.setText("Hello world!"); shell.open(); while (!shell.isDisposed()) { if (!display.readAndDispatch()) display.sleep();} } } If you don't have a Java Perspective VISIBLE in Window->Open Perspective (including checking the list in "Other..." then you may have DOWNLOADED a copy of Eclipse that was not intended for Java development. As for Display and Shell, you need to add a reference to the SWT jar file. It should be in the plugins directory in the eclipse directory. (org.eclipse.swt.jar) Hi there, Thanks Dave. Will give ANOTHER download a try and see what happens. I'll close the thread just now and re-open if need further assistance. Cheers mate! Sorry meant BC not Dave, was doing another post at the same time, sorry about that! |
|
| 1542. |
Solve : Script files? |
|
Answer» I am trying to write a script for a NT4.0 server to map drives for users, depending on what groups they are MEMBERS of. I cannot find the PROPER syntax for these IF statements and group names. |
|
| 1543. |
Solve : Password In A Bat File? |
|
Answer» Hello, i need help with the code: |
|
| 1544. |
Solve : check port at some web? |
|
Answer» any software can intro me to check the web's port?? |
|
| 1545. |
Solve : Old computer experts wanted? |
|
Answer» here. https://www.cnn.com/2020/04/08/business/coronavirus-cobol-programmers-new-jersey-trnd/index.htmlDo you want experts in old computers or old experts in computers? There is a difference. By the way, I fall into both categories having had 50 years in the COMPUTER INDUSTRY and the TEACHING of I.T. |
|
| 1546. |
Solve : VB6 Text files? |
|
Answer» I need to WRITE a vb script that will extract a string from a text file. The only problem is that I'm having trouble LOADING the text file. I can get the string easily enough with len() and mid() statements, but how the *censored* do you load or open a text file inside runtime?USE the Open dialog control.you need to use the open command. |
|
| 1547. |
Solve : Write a YAML file inside GITLAB to call batch file? |
|
Answer» I want to call it from YAML FILE inside GITLAB |
|
| 1548. |
Solve : Microsoft Access? |
|
Answer» Hey people, |
|
| 1549. |
Solve : Get characters from a String? |
|
Answer» Does anyone know how to GET single characters, or two characters at a TIME(small string), from a string? |
|
| 1550. |
Solve : Visual Basic-REGISTRY USAGE? |
|
Answer» does anyone know how to use the Registry class in VISUAL basic? |
|