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.
| 1251. |
Solve : Draw multiple of the same sprite without ton's of strings -- XNA --? |
|
Answer» How would I use a "for" (or other) loop to draw a bullet sprite in a unique direction from the center point? |
|
| 1252. |
Solve : VB 6 .....ASP? |
|
Answer» Can some please tell me what this function does? My suprise is, if i save the date as 05 Feb 2009, what i get on my display page is 02 May 2009. Until I passed a #date# field, I kept getting a 1899 year as xx/xx/xxxx was being computed as a series of arithmetic divisions. Try modifying the function headers. This will force an error if the data is mistyped. Code: [Select]Function SwopIt(tmpDatum as Date) as Date Private Function MakeDate(aDate as Date) as Date Make sure the database field is ALSO defined as a date. Thanks so much, i got it right. I removed the function call to SwopIt which was interchanging the date with the month. Thanks |
|
| 1253. |
Solve : Batch file code problem? |
|
Answer» I want to run a batch file while I am away from computer and at one time I need to press 'ENTER' on the keyboard (or to click somewhere PRECISE in the screen), is it possible to make the batch file 'press' the enter key or to program a way to click somewhere in the screen? |
|
| 1254. |
Solve : Can someone help me with this .bat file? |
|
Answer» I'm trying to copy and modify this: authenticate with external SMTP mail server and send SIMPLE email using .bat but I'm doing a bad job here. Why is there 'C:\>' ? That would be your prompt. You are currently logged on to the root directory on the C: drive. Quote C:\>[emailprotected] -FROM [emailprotected] -TO [emailprotected] -TEXT "You have Email" -SUBJECT "You have Email" -SMTP smtp.somewhere.com -AUTH AUTO -USER pete -PASS 123456 This string appears to be parameters for some program. Unless you have a program named [emailprotected], this code will not EXECUTE. How did this string arrive on your doorstep? Quote I'm trying to copy and modify this: authenticate with external SMTP mail server and send simple email using .bat but I'm doing a bad job here. Blat is one method, ALTHOUGH on a XP machine I would suggest a VBScript using either the Outlook application or Collaboration Data OBJECTS (CDO). One advantage of a VBScript is you have more control over the final product. |
|
| 1255. |
Solve : Help with Disk Defragmenter? |
|
Answer» So i've gone aroundto a bunch of different forums and done all kinds of different things....but EVERY time i try to analyze or defragment in Windows Disk Defragmenter it says "Disk Defragmenter could not start." I haven't used any third party defragmenters, and for some reason it just will not work.....HELP!!!Duplicate post - please continue here.boot from the os disk and ENTER first screen REPAIR ...and then do a chkdsk /p till it gives MESSAGE found one or more errors and then finally if it list u the INFO of the HDD ..then simply type fixboot Duplicate post - please continue here.Understand that Dipesh? Topic closed. |
|
| 1256. |
Solve : Macro: Beginner needs help? |
|
Answer» Hello Members, |
|
| 1257. |
Solve : Outlook 2000: How to Attach a File with Macro? |
|
Answer» Hello, I am using Outlook 2000 |
|
| 1258. |
Solve : Unrecognized Database Format? |
|
Answer» I'm unable to create a database application using visual basic 6 enterprise EDITION. When I put the address in the "DatabaseName" property of "Data" control and then want to select the table using "RecordSource" property, it says: Unrecognized Databse FORMAT. I'm using a .mdb Microsoft Access databse. I'd like to know why it is not working. |
|
| 1259. |
Solve : VBScript min.max? |
|
Answer» I have a program that I want it to minimize it SELF then maximize it self 2 times using a loop how can I do this? I have a program that I want it to minimize it self then maximize it self 2 times using a loop how can I do this? Not sure what you're referring to. VBScript does not have any native support for windows. If you use the cscript engine, the script runs within the cmd shell. If you use the wscript engine, the script runs inside windows without an entry on the taskbar. If you create an object that SUPPORTS windows, then you'd need to use that object's properties to minimize and maximize the window. Perhaps if you showed us the script we could be more helpful. he could be referring to full blown VB. If that's the CASE, one would need to toggle the WindowState property.Well the code is not very important because it is just the very start of a new program right so then what happens next is that it MINIMIZES it self, then it restores it self back into what it was when it started. This I think runs in the command line. 'cscript min_max.vbs' is how I run it. If you still can't help me with that information I'll show the code. Tan_ZaQuote from: Tan_Za on January 08, 2009, 04:24:32 PM Well the code is not very important because it is just the very start of a new program right so then what happens next is that it minimizes it self, then it restores it self back into what it was when it started. This I think runs in the command line. VBScript doesn't handle windows, as Sidewinder stated. do you want it to minimize the console window?yes that it what I ment... If it was possible to minimize a msg DIALOG that you create? e.g. dim msg msg = msgbox("Don't click ok, ok...") just an example, Tan_ZaMessageboxes are dialog windows- they cannot be minimized. And minimizing the console window, I don't know if that's possible.hmm, that makes things a little worse meh I'll get used to it... Perl looks like a better language to learn anyway. Tan_ZaQuote from: Tan_Za on January 08, 2009, 05:02:52 PM hmm, that makes things a little worse meh I'll get used to it... Perl doesn't have window management either, at least not intrinsically. I believe there are some PPM's in development (probably done now) that implement both OLE interop and window creation/management. problem being they aren't cross-compatible with any Linux Window management systems. But I doubt that was a concern anyway since VBScript isn't on Linux either.Yes I realized that and it doesn't really matter because to do this I just used C to do this via making my own window and messing with it. Tan_Za |
|
| 1260. |
Solve : Perl random and count? |
|
Answer» I have decided to START to learn a new programming language, which in this case if perl. I have got 6 numbers that get RANDOMLY printed on the screen and I want to be able to count how many times each number show up/get's randomly picked. My code is below of what I have done so far. |
|
| 1261. |
Solve : Debugger looking for CRT0.C? |
|
Answer» I debug the simple file through mcvc6 or msvc2005 but as SOON as i click on RUN it asked me for crt0.c . Did you try handling exceptions as they are thrown? (Under Debug | Exceptions ... and then pick access violation under WIN32 Exceptions).Source: Access Violation Good luck. |
|
| 1262. |
Solve : Convert wav sound to PC Speaker?? |
|
Answer» How would I write a program to convert a wav file into BEEP Statments for C++? Is this even possible?What EXACTLY do you MEAN? |
|
| 1263. |
Solve : New User?? |
|
Answer» I am trying to learn V script to HELP a friend with a project. What would be some good 'proof-of-concept' programs/ CODE snippets to look up so I can get the basics down?If you're looking to TEACH VBScript (something I have no experience in), there are many tutorials at your DISPOSAL online: |
|
| 1264. |
Solve : VB Text Highlights?? |
|
Answer» Simple QUESTION... |
|
| 1265. |
Solve : decompile dll? |
|
Answer» is there anyway to decompile a dll into its original SOURCE code ( not assembly ) ?There are products that can CONVERT binaries to source code, but most likely will not be the source code the original PROGRAMMER wrote. |
|
| 1266. |
Solve : Help! Microsoft Visual Basic!? |
|
Answer» Im trying to make a fake progress bar () Im trying to make a fake progress bar Please explain more. VB has a real progress bar control of which you can increase the value based on a count or a TIME INTERVAL or any NUMERICAL value. Any reason you cannot use that? |
|
| 1267. |
Solve : java.lang.NullPointerException? |
|
Answer» I am a beginner in Java programming, and I am writing my first program. I am really enjoying it, but now I have a problem which I cannot solve. Each time I am building the code I dont get any error, but when I run it the following error is displayed. |
|
| 1268. |
Solve : in display(html)? |
|
Answer» I want to make a paragraph right, well that is simple just ' put something here but my problem is that I want few CERTAIN symbols. Below is what I want to do. access connect: where the ARROWS are is what I want the web site to display the <> stuff(not the or the |
|
| 1269. |
Solve : The programming song? |
|
Answer» For your reading entertainment... Hmmmmm......Shouldn't the number of bugs go down? ha ha Carbon, so naive, so naive... here, I'll compose one as WELL. I examined in the debugger my program which had crashed without a single warning it happened in a flash and then it came before me the debugger on the line a pointer has a null value how very assinine And so to test my theory I inserted a lot of checks in a vain attempt to avoid becoming a nervous wreck so I recompile sure of the bugs defeat I run the program and to my surprise it's still standing on it's feet. the program it still crashes of this I am QUITE sure. and so for the 5th time I'm back to debug more. wow, that isn't so BAD for an on the fly poem!Thunder roared, lightning crashed, TREE fell down and a bug got smashed. Oh well...poetry ain't my thing... |
|
| 1270. |
Solve : Button Codes Needed!? |
|
Answer» JavaScript, or HTML works on my website (Only) |
|
| 1271. |
Solve : need help turning .class into .jar? |
|
Answer» OK i had extracted a .jar file to modify the CONTENTS, it made about 10 .class files. i modified what i NEEDED to and now i dont know how to convert them back into .jar files please can SOME1 help me Franka .jar file is simply a renamed zip file with no compression. you MIGHT need an actual unzipping program, if you don't have one already. |
|
| 1272. |
Solve : VB path problem... File not found? |
|
Answer» I made sure the file exists and I'm still getting problems. I made sure the file exists and I'm still getting problems. How did you check? Code: [Select]If My.Computer.FileSystem.FileExists("c://Check.txt") MsgBox("File found.") Else MsgBox("File not found.") End If By the way, if your file is delimited, you were on the right track with Using MyReader: This is the entire snippet from the MSDN help: Code: [Select]Using MyReader As New _ Microsoft.VisualBasic.FileIO.TextFieldParser("C:\Documents and Settings\Nick\Desktop\readertest.txt") MyReader.TextFieldType = FileIO.FieldType.Delimited MyReader.SetDelimiters(",") Dim currentRow As String() While Not MyReader.EndOfData Try currentRow = MyReader.ReadFields() Dim currentField As String For Each currentField In currentRow MsgBox(currentField) Next Catch ex As Microsoft.VisualBasic.FileIO.MalformedLineException MsgBox("Line " & ex.Message & _ "is not valid and will be skipped.") End Try End While End Using Good LUCK. Sorry Gamerx365, LOOKS like I sent you down the wrong path. I never said I was a .NET programmer.Quote from: Sidewinder on September 26, 2008, 02:31:42 PM Quotei made sure it was there, and also I checked the path from the PROPERTIES. I've tried the file in different places also.QuoteI made sure the file exists and I'm still getting problems.How did you check? i made sure it was there, and also I checked the path from the properties Please explain. Have you checked the file existence with program code? Is Nick your userid? You may not have permissions for the file. Only other thing I can think of is the hidden attribute of the file is flipped on. well i CREATED the file right before trying this. Yes i'm using nick as my userid. I went to the source and it was visible is what i mean when i said i made sure it was there. I probably dont have admissions. my step dad is retarded and changed the password on my admin account. |
|
| 1273. |
Solve : constructor destructor error and sntax error? |
|
Answer» I have written a code that is surpose to output questions from a file after that the program should input all the answers to an array then afterwards close the file. in implementation program the answers program should re-open to allow me to read the answers from the answers file and check whether they are correct or not. |
|
| 1274. |
Solve : VB Coding Question? |
|
Answer» Hello all! I'm trying to make a program to where when a user inputs their name and selects a color of what they want their name to be will display within the program. But my issue is trying to get a image that is supposed to switch from on to off. |
|
| 1275. |
Solve : Visual Studio 2008 - VB - Background work? |
|
Answer» YAY ! Got this done allready |
|
| 1276. |
Solve : calendar control? |
|
Answer» In an Access database, I want the user to select a date using the CALENDAR control and have the selection POPULATE a date field rather than have the user type a date directly into the field. How do I ARRANGE for the calendar to open and how do I bind it to the date field? |
|
| 1277. |
Solve : kernel zip file?? |
|
Answer» Does anybody know of, or would be willing to create me, a SET of software for windows to create a kernel?If you want to play with Kernels I'd play with Linux. As for creating a Kernel with a software for Windows, you will find yourself using a PACKAGE like Borland or MS C++ and if creating from scratch you will need LOTS of help. Its easier to modify the wheel then to reinvent it in the case of kernels, and Linux lets you do that without any worry about legality. Bill Gates doesnt like any competition / clones of his software and operating systems, so trying to reinvent Windows or DOS would be a lost cause and up hill legality battle. Closest Kernel yet to touch on MS territory that I know of is FREEDOS, and the only reason why this is not a major ISSUE for MS is only because they havent created a FREEWINDOWS. a kernel IDE anything from drivers down isn't possible to debug on the fly, unless you use remote debugging. |
|
| 1278. |
Solve : basic programming? |
|
Answer» I have a batch file that copies files from a DESIGN file to a computer running an automated cutting machine. At present, we use XCOPY to copy over all existing files and ADD newly created files. I want to be ABLE to only copy to the cutter computer files with a newer date and newly created files. We change drill holes to notches on the cutter and do not want to lose that if the existing files did not change. Help.Welcome to the CH forums. XCopy \\Nest3\Cutterfiles\*.* /s C:\ISO\*.* /s /d Try it without the double /S |
|
| 1279. |
Solve : Typematic rate delay? |
|
Answer» In qbasic 1.1, when I use an ON KEY for the arrow keys, for example: |
|
| 1280. |
Solve : Odd Startup...? |
|
Answer» In june, I reformatted this computer. When I modified the startup items in MSCONFIG, i restsrted, and now, everytimne it STARTS, it comes up qwith a BLACK screen that says start windows XP, or start windows recovery console. I odn't think this is suposed to happen. It is an hp pavilion a1400e, if that helpes at all. |
|
| 1281. |
Solve : Flash Button? |
|
Answer» Code: [SELECT]next_btn.on(RELEASE) { |
|
| 1282. |
Solve : Making a pic? |
|
Answer» I know this ISNT the right section..or i think so but it ACTUALLY is the right section.. |
|
| 1283. |
Solve : Getting response from MessageBox()? |
|
Answer» I use Borland C++ 3.1 (because its small in size & gives everything a learner needs).I wanted to learn the MESSAGEBOX() so I wrote the following CODE:- |
|
| 1284. |
Solve : * as batch file password characters? |
|
Answer» I've been searching and searching codes to hide characters for a batch file password. Can anyone help? There are THIRD PARTY programs that can do this. A likely solution would be a C program, however you have the tools to do this yourself with a debug script: i was told 3 simple batch files can help me, i have set the first but having problems with the password batch tho, i have a time log batch for when my start bar is opened, a program used batch working but the pass word batch is a bother Where did the info come from? Vista is a Windows OS and I suspect you can FIND any information you need in the event logs. For instance you can check event code 528 (logins) in the security log which should pinpoint all the users who used your machine (including you). The batch file above was nothing more than a slick demonstration of how to introduce a password to a batch file. Unfortunately, it does nothing to enhance the security of Windows. As explained in the PM's, any user could bypass the password security by directly starting the application from a shortcut or the run box. Quote what am trying to do is to catch out the person who keeps using my laptop How does this work? Do you leave your PC unattended and another person uses your PC? Does this other person login with your credentials or his own? If you change your password, will this prevent someone else using your machine? I really need for you to layout the scenario on how this other person gets access to your PC. |
|
| 1285. |
Solve : simula 67? |
|
Answer» can someone give me a compiler fir simula67? i REALLY nid it for my class presentation. i KNOW simula 67 is obsolete nowadays. i can't find some of it..can someone mind if they can elp me..yanks it will be a great help for me.. i am currently using windows XP..with a memory of 256 Mb..i want to know if in what platform is simula 67 running...You MAY want to read here-> http://en.wikipedia.org/wiki/Simula67 and http://www.iro.umontreal.ca/~simula/tnx a lot....but still i can't find any compiler for it..it gave me information for my REPORT..tnx..in what platform does simula 67 run?After the PM I found another thing if it is of any use-> http://prosjekt.ring.hibu.no/simula/download.htm |
|
| 1286. |
Solve : Solved - "Dissassembling a C++ .LIB or .OBJ"? |
|
Answer» Does anybody know how to disassemble a C++ .LIB or .OBJ file?you can use the dumpbin program to dissasemble a program. Here are a few I managed to dig up, Not sure if they'll work with OBJ or LIB.What links? Quote from: BC_Programmer on November 26, 2008, 01:18:47 AM Say- why do you want to dissassemble it anyway?To find the declaration of POW(), and a few other functions. lol. oops. I forget the link I had on my clipboard at that time. But another search found a program called "hackman" It claims to be able to dissasemble from OBJ and BIN. http://www.freewareweb.com/cgi-bin/archive.cgi?ID=185 Strictly speaking, "decompile" is the word, surely? decompile would turn it back into source code.so, technically, disassembling is a special case of decompiling, just into a particular language, ASM.Thanks, GUYS. |
|
| 1287. |
Solve : GDI+ Slowly?? |
|
Answer» So I have my command for drawing a line in GDI+ for visual basic .net |
|
| 1288. |
Solve : Windows Programming in Visual C++ 2008 Express? |
|
Answer» I wanted to LEARN Windows Programming in Visual C++ 2008 EXPRESS. Could anybody suggest any book or tutorial.There should be something here for you. There should be something here for you.Thanks Dusty ? ! |
|
| 1289. |
Solve : Zoom in/out for java graph.? |
|
Answer» I have generated a GRAPH using java, but WITHOUT using any external packages like jfreechart etc. Now is it possible to add a zoom in/out feature, with or without using external packages? And how? I have GOOGLED a lot but not getting anything. |
|
| 1290. |
Solve : Detecting collision in C? |
|
Answer» Could anyone help me detect collision between two graphical objects (a BULLET and a SHIP) [ ] in C. |
|
| 1291. |
Solve : Need to convert a dos batch into c++? |
|
Answer» Hi, |
|
| 1292. |
Solve : Program function stuck in the running!!!? |
|
Answer» Hi I am currently writing a program in C that is like an arithmetic system for kids. The teacher user can add,modify,delete questions from the question bank.so i have writen functions for all of these but the thing is whenever I GET to the delete function it stops running after asking the user the questions they want to delete. Like I press enter and then try one more time but it just gets stuck there no message or anything just stuck.I PERSONALLY think there is something wrong with the file openind and closing. |
|
| 1293. |
Solve : Where Do I Start? |
|
Answer» Ok I have been takeing a C++ Programming class through school. I am about 3/4 done with this class. |
|
| 1294. |
Solve : VBS: Can it shut down a PC?? |
|
Answer» Can VBScript shut down a PC? Can VBScript shut down a PC? Yes. This little snippet will shutdown the local computer. Code: [Select]strComputer = "." Set objWMIService = GetObject_ ("winmgmts:{impersonationLevel=impersonate,(Shutdown)}\\" & _ strComputer & "\root\cimv2") Set colOperatingSystems = objWMIService.ExecQuery _ ("Select * from Win32_OperatingSystem") For Each objOperatingSystem in colOperatingSystems objOperatingSystem.Win32Shutdown(1) Next Quote Can it shut down all PCs on a LAN? Only if the PC's are part of a domain. This little snippet will shutdown 3 computers on the network. Code: [Select]arrComputer = Array("Computer1", "Computer2", "Computer3") For Each strComputer In arrComputer Set objWMIService = GetObject _ ("winmgmts:{impersonationLevel=impersonate,(Shutdown)}\\" & _ strComputer & "\root\cimv2") Set colOperatingSystems = objWMIService.ExecQuery _ ("Select * from Win32_OperatingSystem") For Each objOperatingSystem in colOperatingSystems objOperatingSystem.Win32Shutdown(1) Next Next If none of these are helpful, check out PsTools, specifically PsExec. VBScript can launch a new process with the Run method. Good luck. Woah, thanks. The only VBS I EVER heard of it .vbs or VBScriptWhat?Quote from: DFND-jimjim1 on December 29, 2008, 07:39:08 AM The only VBS I ever heard of it .vbs or VBScript Can the second script above be used to restart the PC instead of shutdown...?I've never used WMI myself, but you might be able to change: Code: [Select]For Each objOperatingSystem in colOperatingSystems objOperatingSystem.Win32Shutdown(1) Next into: Code: [Select]For Each objOperatingSystem in colOperatingSystems objOperatingSystem.Win32Restart(1) Next Or, it could require simply changing the parameter to Win32Shutdown from 1 to something else... Yup, I'd imagine it's something like that. I'm just starting with VBS... I don't think there is a restart method to the Win32_OperatingSystem class. Try using the REBOOT method. Code: [Select]For Each objOperatingSystem in colOperatingSystems objOperatingSystem.Reboot(2) Next Good luck. Thanks again, I'll test it tomorrow...Quote from: Sidewinder on December 31, 2008, 11:59:23 AM I don't think there is a restart method to the Win32_OperatingSystem class. Try using the reboot method. well, if this darn notepad had intellisense like the vb6 IDE...Quote from: BC_Programmer on December 31, 2008, 01:31:51 PM well, if this darn notepad had intellisense like the vb6 IDE... Excuses, excuses.... Quote from: kpac on January 01, 2009, 06:40:18 AM Quote from: BC_Programmer on December 31, 2008, 01:31:51 PMwell, if this darn notepad had intellisense like the vb6 IDE... I'm not sure the VB6 IDE would be helpful here. For the WMI CLASSES I've always used WbemTest which gets installed on systems with WMI. The program itself is a quagmire, but if you're looking for classes with their methods and properties, this is the place to go. Before getting involved with this utility, a stop at Don's is suggested. actually, I shouldn't of said Intellisense, but rather the BUILT in object browser. Besides, using WMI to shutdown windows via VB6 would be silly, since it would be far easier to make a simple API call to ShutdownWindowsEx(). |
|
| 1295. |
Solve : Asm through packet? |
|
Answer» I need to know if its possible to send asm through packet small enough but still ABLE to relay information back to a remote server, and execute itself on delivery?Yes, it's called a 'virus'. Please explain why you want to know this. What do you mean by 'asm'? Yes, it's called a 'virus'. I'd say a worm, since there doesn't appear to be any duplication ocurring. although I doubt they're going to go, "Well, now I have control of this persons COMPUTER, I'll fix up these security holes, back up their data, and install a better security solution for them."Quote I'd say a worm, since there doesn't appear to be any duplication ocurring. Yes, quite right. The OP asked about sending "asm". Well, this is what assembler source code looks like: unless the recipient machine has a program already running waiting for some source code, which it will assemble, link and then execute (an extremely unlikely state of affairs) then what would be the POINT? Now, sending machine code, that's another thing. .model small .stack .data message db "Hello world, I'm learning Assembly !!!", "$" .code main proc mov ax,SEG message mov ds,ax mov ah,09 lea dx,message int 21h mov ax,4c00h int 21h main endp end main Quote from: Dias de verano on December 31, 2008, 11:42:07 AM Now, sending machine code, that's another thing. somewhat, but we still would have to jump over this hurdle: Quote from: BC_Programmer on December 31, 2008, 11:13:27 AM This may come as a surprise, but computers don't unconditionally execute any foreign code that throws itself at any random port. |
|
| 1296. |
Solve : Typedef used in function protype...? |
|
Answer» I am working on this program to calculate arithmetic questions but I seem to be havin some problem, I used typedefine to define an array and then when I use it as a function prototype it keeps on telling me that it is an illegal expression. I am posting the problematic part only the whole code is tooooooooo long like 600 lines!!! |
|
| 1297. |
Solve : VBScript? |
|
Answer» I think this is in the right section. I used VBScritp before and I was wondering if there is any way to make it so if you hit a BUTTON it can open a batch file or another program?VBScript can run an external APPLICATION through the Script Shell OBJECT: |
|
| 1298. |
Solve : ACTIONSCRIPT HELP NEEDED? |
|
Answer» okay, so the thing is i'm fairly experienced with Macromedia Flash... except for the actionscript. i have only the faintest skills of its syntax and application. |
|
| 1299. |
Solve : c++ winapi - file reading? |
|
Answer» If i were to PARSE a file multiple times at one TIME, or multiple times THROUGHOUT a SESSION, what would be the most efficient WAY? |
|
| 1300. |
Solve : Visual Basic WaitForExit Problem? |
|
Answer» ..and another hurdle to overcome! |
|