

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.
2401. |
Solve : hi, im wondering if theres something wrong with python? |
Answer» This is a first attempt at using a programming language. Ok okay here goes... |
|
2402. |
Solve : DOS Command %? |
Answer» How is this command used?The percent sign (%) is not a "command". I do not care if I did the set wrong. Then you are a fool. Percent signs are used to indicate EXPANDABLE tokens to the command interpreter such as.. Variables set var=rasputin echo %var% Metavariables used by FOR FOR %%A in (A B C D) DO echo %%A Passed parameters @echo off echo parameter 1 is %1 echo parameter 2 is %2 echo all parameters %* The name of a batch script echo this batch file is %0 |
|
2403. |
Solve : covert a text file into csv using awk? |
Answer» hi...... thanks for allowing me to start a discussion |
|
2404. |
Solve : I have an assignment? |
Answer» Quote from: ghostdog74 on September 13, 2010, 10:00:00 AM "how did you do" will be printed, since nothing in the if/else match 100. I appear to have missed that. Quote from: Salmon Trout on September 13, 2010, 10:19:25 AM It might be a kind of "educational pseudocode". my first thought was C++, but with macros that change things- macros for and to be &&, endif = }, cin >> = input, cout << = input, etc. Sadly, you see that type of thing all the time, and it doesn't make a whole lot of sense. If you want to teach a language that uses, for example, endif, then use such a language, don't just hodgepodge a bunch of C++ macros to do it that way. Oh well. The only problem is that there is no starting brace for the if blocks if that was the case. I'd definitely have to say it's some sort of psuedocode as well. Quote from: Salmon Trout on September 13, 2010, 10:19:25 AM A Google search showed that very same assignment was posted on justanswer.com's "Ask a Homework Question, Get an Answer ASAP!" service, "790 DAYS and 19 hours ago.". (You have to pay to see the answer - 3 UK pounds) I would have suspected as much. It's not like it's particularly difficult- it involves more math concepts then it does programming concepts. Although it's a lot better then the trivia-related questions both in classes as well as as interview question. Stupid, retarded questions that essentially test ones knowledge of a few language corner cases, like "Is it possible for a function to RETURN more often than it is called?" or how does the XXX keyword WORK, or other nonsense. It's pointless to ask such questions- you're trying to make/find programmers, not people who read and memorize language references. You want to find somebody who won't sit around testing out a certain programming construct or modifier to see what it does and will instead actually defer to the language reference to find out; a question like: Quote what is the output fromIs a completely stupid question. First off, is it really that important that they know how to deal with such trivial corner cases? Sure, it proves they have a handle on pointers, but it also proves that they are willing to make "clever" code when it's not necessary, and their code is probably strewn with ternary conditionals. "clever" code is bad and difficult to read. Clever interview questions are bad because they encourage clever code. Do you think Big is Billrich? And MichelleCarrothers? Quote from: Salmon Trout on September 13, 2010, 10:25:32 AM I don't think Big should have posted what he did, but then he seems to do what he likes, even after being told what forum policy is. Don't like the competition, eh?Quote -1 wouldn't be an operand, since the - is a unary minus operatorI GUESS One's Complement doesn't count here (signed bit)? Quote from: Big on September 15, 2010, 06:31:22 AM I guess One's Complement doesn't count here (signed bit)? No, because even if that was the case, it would be in the form of an operator (such as C's ~) Although I imagine there are languages out there that may actually not represent NEGATIVE numbers via unary operators. Don't know any off the top of my head though.Quote from: CBMatt on September 15, 2010, 06:23:58 AM Don't like the competition, eh? I resent that. What a stupid remark. Idiotic even. I don't do people's homework for them. Locked |
|
2405. |
Solve : programmer plzz help!!!? |
Answer» PLEASE WRITE A PROGRAM TO PRINT TRIANGLE AS SHOWN BELOW IN PROGRAM OF C++ LANGUAGE |
|
2406. |
Solve : Visual C++ .NET 2005 Bitmap Problem? |
Answer» I'm trying to learn how to modify Bitmaps programatically. |
|
2407. |
Solve : Create variable whose name is stored in a variable - VB.NET? |
Answer» Hi, |
|
2408. |
Solve : Questions need solving please ?? |
Answer» 1. Design a class to represent a geometric rectangle with a given length and width, such that it is capable of calculating the AREA and the perimeter of the rectangle. 2. Define a class that represents a TEMPERATURE object. It should store the CURRENT temperature in an instance variable of type double, and it should have two public methods, setTemp(double t), which assigns t to the instance variable, and getTemp(), which returns the value of the instance variable. 3. Define a class named TaxWhiz that computes the sales TAX for a purchase. It should store the current tax RATE as an instance variable. You can initialize the rate using a TaxWhiz() method. This class should have one public method, calcTax(double purchase), which returns a double, whose value is purchases times the tax rate. For example, if the tax rate is 4 percent, 0.04, and the purchase is $100, the calcTax() should return 4.0 Many thanks to all of you. Figure 1.8.Sorry, we don't do homework. |
|
2409. |
Solve : log in bot?? |
Answer» i hope i do this right XD thanks but there seems to be an error in the script >> Could you be more specific. What is the exact error message you're getting? If it's a logic error please EXPLAIN. The logincounter is the i variable which iterates sequentially from ONE to three and controls how may TIMES the loop is executed (3). It is also displayed in the msgbox while the loop is active. I cannot reproduce any errors, but perhaps if we knew the URL, it would help determine how the site is navigated. There is a VBScript object alternative to using IE. Let us know. |
|
2410. |
Solve : PHP - how to send/receive multiple select boxes?? |
Answer» HEY guys, I'm in NEED of URGENT PHP help. I have a table displaying hockey players from a database (no fixed number of players) and the last column allows the user to change/update player's status. There are three choices in each select box, the user can select only one for each player displayed in the table. I added a hidden field with player's id to know who to update, I'm stuck as to how to setup select boxes. Will they all have the same name? is there some kind of array I should be using? How do I receive this data on another page to process and update the database. Thanks to all in advance. ultimatum.Nvm, just figured it out. For those interested here is how you set it up: Hidden field: Code: [Select]<input type='hidden' name='playerId[]' value='someValue' /> Select boxes: Code: [Select]<select name='rStatus[]'> <option value='xyz'>xyz</option> <option value='xyz'>xyz</option> <option value='xyz'>xyz</option> <option value='xyz'>xyz</option></td> </select> This is just to check if SELECT BOXes work because actual processing is a little different but you can use your imagination: Code: [Select]foreach($_POST['rStatus'] as $new_status) { //$query = "UPDATE players SET status= '$new_status' WHERE id = $new_id"; echo $new_status."<br />"; } Same applies to the hidden values, just change the name in $_POST['here'] area. Cheers. Thanks for posting the code. You may want to htmlentities() and strip_tags() before adding to the database THOUGH, to prevent XSS.Very good point. I excluded that mainly because the project is kind of small (20 users) and log-in to the page is already secure. Thanks for the tip kpac. |
|
2411. |
Solve : MSN Client in java - MSNP18 help.? |
Answer» Hello all! |
|
2412. |
Solve : Corrupt MSWSOCK.dll? |
Answer» In trying to learn Winsock2 programming with Visual C++ 2005 Pro on Windows XP Pro SP3, I've run into a problem with an apparently corrupt MSWSOCK.dll. |
|
2413. |
Solve : QUESTION PAPER u give me a answer of one day? |
Answer» Mr. Yuganda is an astrologer. To impress people, he asks people their |
|
2414. |
Solve : Help with Flowchart...? |
Answer» I'm new to this. And my tutor at my college was no help. I'm lost....I'm hoping I can get some assistance....I'm trying to draw a flowchart that WOULD provide a workable solution to the following problem... |
|
2415. |
Solve : how can I change label and change it to the textbox in C Sharp??? |
Answer» Sir thank you for, as a one computer beginner to ask a question here in C Sharp !! Sir thank you for, as a one computer beginner to ask a question here in C Sharp !! Copy the code you mistakenly placed in the Label's event, and place it in the textbox event. |
|
2416. |
Solve : give me a answer of this ques? |
Answer» Mr. Yuganda is an ASTROLOGER. To impress PEOPLE, he asks people their |
|
2417. |
Solve : Batch file for remote desktop? |
Answer» HELLO dear users, I have Windows XP. And every morning i need to connect to 63 PC's via RDC. I just need to know, if connections OK i'll close it. Maybe you have some batch file, where i can put with delay all my ip's ? Batch file need to check if connection (ip respond) that all ok. Without any users names and pwd. Or maybe i need some batch file which will ping all ip's and make a report ? Best Regards, MikeI don't fully understand what your trying to do But there is a way to ping the COMPUTERS using a batch file, like this one: CODE: [Select]@echo off ping 192.168.24.56 pause exitBut can i add there several IPs with name ? And after this action view some result ? for example: 159.152.152.152 Boss-1 159.125.124.478 Boss-2 and so on. And after all i can SEE that Boss-1 didn't reply. Couse it is very hard to connect at one time to 60 PC-s every day. Thanks, Mike |
|
2418. |
Solve : Is there a way to read Ajax return results on a page?? |
Answer» HEY guys, Does anyone know if there is a WAY to read these OPTIONS from a pop-up which uses Ajax? Site: http://www.cisco-servicefinder.com/ Try inputting this model into By Product SKU: ASR1000 (you'll see a pop-up which will set the VALUE of the product based on your selection). My QUESTION, is there a way to select a choice programatically using PHP or C#? Thank you in advance, ultimatum |
|
2419. |
Solve : File path in Visual Studio? |
Answer» I been storing my image and other files in "bin" folder ever since, because is easy to write file path. |
|
2420. |
Solve : gawk help? |
Answer» Someone help PLEASE. I tried to do it with FINDSTR but I couldn't, so now I'm trying to OUTPUT the following numbers from this text file with gawk (what I need is in bold down below): |
|
2421. |
Solve : Delphi/pascal transparent TImages or objects? |
Answer» Hi, Hi,The word you are looking for is Translucency, (transparent=fully see through, translucent means it's partially see-through, as you want). Word semantics aside, a google turned up this thread: http://stackoverflow.com/questions/2998069/delphi-image-with-alpha-blending-capabilities Quote The basic TImage is capable of displaying a PNG image and alpha-blend-it to whatever is BEHIND it. You just need to add the "pngimage" unit to the uses clause of your form. You didn't mention the version of Delphi you're on: Delphi 2010 has this unit, but I have no idea with what version of Delphi they started shipping it. For Delphi 7 I know for sure you'll need to FIND the open source "pngimage". I believe they are referring to PNGDelphi. The information that you gave me was GOOD but it was more based around making forms alpha blend not images or objects, if you have anymore ideas it would be greatly welcomed.. Regards, Tan_ZaQuote from: Tan_Za on September 28, 2010, 01:53:24 AM The information that you gave me was good but it was more based around making forms alpha blend not images or objects No it wasn't. Both links discuss Alpha-blendable Images, not forms. Although some of the responses on the stackoverflow thread are incorrect and offer such assistance re: forms. |
|
2422. |
Solve : C++ linked list HELP!!!? |
Answer» Hi. I'm having trouble understanding how to write a linked list in c++. I have to create one for a school assignment but I cannot figure out how to access certain nodes from the list. I know how a linked list WORKS, but I just get so confused over all the pointer usage and stuff. If someone, anyone, can provide a simple, clear, and easy to understand example of how to implement a linked list, it will be GREATLY appreciated. Thank you I know how a linked list works, but I just get so confused over all the pointer usage and stuff.I also don't understand everything about linked lists, but I can give a good example of how to use them. Probably better than most of the things you may have searched up on google. Quote I cannot figure out how to access certain nodesA linked list is designed to be accessed sequentially, not randomly. If you need to be accessing specific nodes, then an array would be best. Quote If someone, anyone, can provide a simple, clear, and easy to understand exampleI am designing a programming language and it uses a linked list to store the tokens (words/commands). Here is how I implemented it: This part creates a structure called program to hold the commands. It has two pointers so that the list can be read forwards and backwards. Code: [Select]//Double linked list for program typedef struct program { struct program* prev; struct program* next; char* data; //CHANGE THIS TO DATA TYPE REQUIRED }; program *node, *head = 0, *tail = 0; This part opens a text file and stores the "words" into the linked list. Code: [Select]//Remove newline char void choppy(char *s) { s[strcspn(s,"\n")] = '\0'; } int main(int argc, char *argv[]) { char iobuf[255]; char* ptr; FILE* fp = fopen(argv[1],"r"); if(fp != NULL) { while(fgets(iobuf,sizeof(iobuf),fp) != NULL) { choppy(iobuf); ptr = strtok(iobuf,STR_TAB_SPACE); while(ptr != NULL) { node = (program*)malloc(sizeof(program)); node->next = NULL; node->prev = NULL; node->data = (char*)malloc(strlen(ptr)+1); strcpy(node->data,ptr); if(head == NULL) { head = tail = node; } else { tail->next = node; node->prev = tail; tail = node; } ptr = strtok(NULL,STR_TAB_SPACE); } } fclose(fp); node = head; //displaylogo(); //interpret(); } } Now the following methods can be used to TRAVERSE the linked list. You will have to change the data type from char to whatever the datatype of your linked list is. Code: [Select]//Movement functions char* str_forward() { if(node) { node = node->next; return node->data; } else return NULL; } char* str_backward() { if(node) { node = node->prev; return node->data; } else return NULL; } char* str_stationary() { return node->data; } I just realized that aparently returning NULL is bad, you probably should use return 0;A few mistakes I just noticed: In the method str_forward: if(node) should be if(node != tail) In the method str_backward: if(node) should be if(node != head) In the main method: The constant STR_TAB_SPACE should be INITIALIZED like so... const char STR_TAB_SPACE[3] = {32, 9, 0};the big "mistake" being that your code is pure C, and he wanted C++. Not hugely different aside from the fact that a C++ solution would probably use a class. That being said, rather the critique I think I will try my hand. The most common method to create a LinkedList via C++ (or any class-oriented approach, really) is to make a "main" LinkedList class, and then have it hold a reference to a single "Node" class, which acts as the list "head". The Node classes hold references to their Next (and in the case of a doubly-linked-list, Previous) items, and would provide all manner if methods to manipulate and access the contents. First, the header files: LinkedListNode.h: Code: [Select]#pragma once class LinkedListNode { private: LinkedListNode* Next; LinkedListNode* Prev; void* Value; public: LinkedListNode(LinkedListNode* pPrev,LinkedListNode* pNext,void* pValue); ~LinkedListNode(); LinkedListNode* getNext(); LinkedListNode* getPrev(); void setNext(LinkedListNode* newnext); void setPrev(LinkedListNode* newprev); void* getValue(); void setValue(void* value); }; BCLinkedList.h Code: [Select]#pragma once #include "LinkedListNode.h" class BCLinkedList { private: LinkedListNode* listhead; public: BCLinkedList(void); ~BCLinkedList(void); void setHead(LinkedListNode* newhead); LinkedListNode* getHead(); LinkedListNode* getItem(int index); }; Now, to flesh out the definitions with some actual code! LinkedListNode.cpp: Code: [Select]#include "StdAfx.h" #include "LinkedListNode.h" LinkedListNode::LinkedListNode(LinkedListNode* pPrev,LinkedListNode* pNext,void* pValue) { Next=pNext; Prev=pPrev; Value=pValue; } void LinkedListNode::setValue(void *value) { Value=value; } void* LinkedListNode::getValue() { return Value; } LinkedListNode* LinkedListNode::getNext() { return Next; } LinkedListNode* LinkedListNode::getPrev() { return Prev; } void LinkedListNode::setNext(LinkedListNode *newnext) { Next = newnext; } void LinkedListNode::setPrev(LinkedListNode *newprev) { Prev = newprev; } and the linkedList class itself: Code: [Select]#include "StdAfx.h" #include "BCLinkedList.h" BCLinkedList::BCLinkedList(void) { } BCLinkedList::~BCLinkedList(void) { } // void setHead(LinkedListNode* newhead); //LinkedListNode* getHead(); LinkedListNode* BCLinkedList::getHead() { return listhead; } void BCLinkedList::setHead(LinkedListNode *newhead) { listhead = newhead; } LinkedListNode* BCLinkedList::getItem(int index) { LinkedListNode* usenode = this->listhead; for(int i=0;i<index;i++) { if(usenode!=NULL) { usenode=usenode->getNext(); } else { return NULL; } } return usenode; } And finally, the main routine that is going to run the above. Code: [Select] #include "stdafx.h" #include "BCLinkedList.h" #include <iostream> using namespace std; int _tmain(int argc, _TCHAR* argv[]) { BCLinkedList ll; int i=1; LinkedListNode* firstnode= new LinkedListNode(NULL,NULL,(void*)i); LinkedListNode* currnode = firstnode; for(int i=1;i<10;i++) { currnode->setNext(new LinkedListNode(currnode,NULL,(void*)i)); currnode=currnode->getNext(); } ll.setHead(firstnode); currnode = ll.getHead(); while(currnode!=NULL) { cout << ((int)currnode->getValue()) << endl; currnode=currnode->getNext(); } LinkedListNode* indexednode = ll.getItem(3); cout << ((int)indexednode->getValue()); int p=0; cin >> p; return 0; } First and foremost: do not use this code! I just created it in around 15 minutes. I say don't use it, because I'm ALMOST positive that I should be performing some sort of deallocation- but I'm not. For this short test it's not that important, but if you were to use any of this in an assignment you would probably lose marks. The original question of course was how to access a particular node of the list. this is somewhat vague, but I assume that you mean something like the "getItem()" method I created in my example: Code: [Select]LinkedListNode* BCLinkedList::getItem(int index) { LinkedListNode* usenode = this->listhead; for(int i=0;i<index;i++) { if(usenode!=NULL) { usenode=usenode->getNext(); } else { return NULL; } } return usenode; } The basic idea is simply to iterate from 0 to the passed index, and in each iteration MOVE forward in the list. There is of course a null check (in case somebody tries to access element 40 of a 10 item list or something). I don't believe it's insulated from corner cases (passing in 1 would probably give the same results as 0, I think, I didn't test it extensively). The main point here is to show the method used- basically, you use the passed index as an upper bound on a loop you use to go through each item. Note that an optimization method used by double-headed lists (that is, the LinkedList has references to the head tail nodes) is to iterate from the closer side, but that's a special case scenario (also, my implementation is not a two-headed list). I imagine this same little "indexer" could be used on Linux711's C code. Also I didn't feel like toying with mine to make it an actual indexer (so that one could say linkedlistvalue[3] and get back a LinkedListNode*, this was because to be frank I don't really like C++. Also the name "BCLinkedList" was chosen because I didn't want to see if LinkedList would conflict with an existing stl class or something. |
|
2423. |
Solve : findstr vs. For /f? |
Answer» What should i use to strip a text file like: What should I use to strip a text file? C:\test>findstr "Secure-ID Secure-Spam-Reason" val.txt X-Secure-ID:XXXXXXXXXXXXXXXXX X-Secure-Spam-Reason: XXXXXXXXXXXXXXXXXXXXXXXX C:\test>Quote from: marvinengland on July 07, 2010, 12:20:24 PM
that you sir. you are a master mind. This just made my job a *censored* of a lot easier when i put it in a batch. Quote from: The_Valkyrie on July 06, 2010, 09:37:20 PM What should i use to strip a text file like:you use a good text PROCESSING tool, or a language that does this job well for you. For example, you can use gawk for Windows (or Perl/Python/Vbscript etc). Code: [Select]C:\test>gawk -F":" "/X-Secure-ID|X-Secure-Spam-Reason/{print $2}" file XXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXX Note, the one liner above gets you the actual ID and reason, excluding X-Secure-ID and X-Secure-Spam-Reason. If you need the words "X-Secure-ID" and "X-Secure-Spam-Reason", Code: [Select]C:\test>gawk -F":" "/X-Secure-ID|X-Secure-Spam-Reason/" file X-Secure-ID:XXXXXXXXXXXXXXXXX X-Secure-Spam-Reason: XXXXXXXXXXXXXXXXXXXXXXXX ghostdog74, thanks for the brilliant reference to Gawk. I was wondering if you or anyone could help with this issue, I'm trying to output the following numbers from this text file: Analyzing pool.ntp.org (1 of 1)... delayoffset from local clock Stratum: 2 Warning: Reverse name resolution is best effort. It may not be correct since RefID field in time packets differs across NTP implementations and may not be using IP addresses. pool.ntp.org[155.101.3.115:123]: ICMP: 73ms NTP: +0.0162516s RefID: 127-67-113-92.pool.ukrtel.net [92.113.67.127] What I want is in bold. How can I do this with Gawk? With my limited knowledge I can only output: +0.0162516s RefID But I would like to have just the numbers after + Please and thanks in advance.. |
|
2424. |
Solve : Extracting simple BAT code from EXE?? |
Answer» Hi, all... |
|
2425. |
Solve : help with batch pls? |
Answer» this is PART of a long-*censored* batch file tht im making: |
|
2426. |
Solve : Move mouse to active button or push it? |
Answer» I am trying to find code to allow me to move the mouse to the next button on an external program.. |
|
2427. |
Solve : how can I extract data and put it into a weblink using a batch file.? |
Answer» Hello all, Hello all, First, I have no idea how to parse something with eols using for/f (as wmic does for it's output), so, I created a small VBS script that makes that parsing easier: getserial.vbs Code: [Select]Dim objWMI : Set objWMI = GetObject("winmgmts:") Dim colSettingsComp : Set colSettings = objWMI.ExecQuery("Select * from Win32_ComputerSystem") Dim colSettingsBios : Set colSettingsBios = objWMI.ExecQuery("Select * from Win32_BIOS") Dim objComputer, strModel, strSerial For Each objComputer in colSettings strModel = objComputer.Model Next For Each objComputer in colSettingsBios strSerial = objComputer.SerialNumber Next wscript.echo strSerial batch file that uses the above and shells iexplore: Code: [Select]for /f "tokens=*" %%P in ('cscript /nologo getserial.vbs') do set Serial=%%P start iexplore "http://www.mysite.com/index.php?serial_number=%Serial%&computer_name=%computername%" and then of course in the PHP you would access them via the $_GET array: Code: [Select]$Serial=$_GET["serial_number"]; $compname=$_GET["computer_name"]; you would place the batch and the VBSCRIPT in the same folder, and run the batch to execute this. |
|
2428. |
Solve : votes program? |
Answer» can any ONE post me a program for votes where you find four PEOPLE TOBE voted and if you SELECT 5 the program read as defauld |
|
2429. |
Solve : What can't batch files do?? |
Answer» PARSING is a PREREQUISITE for LANGUAGE FEATURES... |
|
2430. |
Solve : Importance Of Assembler? |
Answer» Quote someone needs Assembler to create base for others to use. That's part of why so many other programming languages exist. They are the "higher-level" languages which are easier for people to understand. Once the CODE is written, it's then "compiled" into a language easier for the hardware to understand.need to know how will i start to canvas the tools that i will use to a student computer plz give me TIPS Need to know how to start to canvas the tools for a student computer. What does that mean? Aizen, please start a NEW TOPIC. Explain your question clearly and give as much information as possible. |
|
2431. |
Solve : Buffer Overflow help? |
Answer» Hi all, here is some c++ code that has 3 or 4 overflow issues. Could you help me identify them?? |
|
2432. |
Solve : question about programming in genral? |
Answer» QUOTE from: mat123 on February 12, 2011, 03:48:17 PMthe point is that the if is REDUNDANT i get annoyed when people do that when the result of the CONDITIONAL statement is determined at compile time rather then RUN time. Agreed, but most code LIKE that is only used for tutorials, rather than real life applications. |
|
2433. |
Solve : Please explain the class,delegate,enum and interface or struct in C Sharp..??? |
Answer» Sir can you explain to me in details what is class,delegate,enum and interface or struct and please can you give me the examples?? now it is no replied messages in my inbox.So how it is Sir like that? Contents of this post deleted by Allan |
|
2434. |
Solve : Visual C++ 2010 Express - Force Logoff? |
Answer» Would someone please tell me how to force the current user to logoff? I'm using VISUAL C++ 2010.The ExitWindowsEx() function should do it. MAKE sure you include windows.h |
|
2435. |
Solve : run as in VBS? |
Answer» I am trying to make a VBS that will prompt for a password and use the run-as command for a specific exe. so far I have this but it keeps giving me issues. |
|
2436. |
Solve : What software to use to start a forum?? |
Answer» I am going to start a forum so my friends and family have a place to talk online. Is there any recommendations for a free html software that can be used to build a good forum. I have always heard to have full control of your website you have to design using html progaming and not web creation software. I havent messed with html very much but I am extremely persistent when it come to stuff I cant figure out, so maybe it will be ok. Thank for any tipsThee are many options. Somebody has led him to believe that you have to know HTML to control the website. Actually, it seems more like he's confusing HTML with PHP. HTML isn't programming at all, it's just a markup language. PHP is the actual programming used for forums, blogs, login systems, etc. Programming your own forum software out of PHP doesn't give you full control. It gives you understanding, allowing you to fix your own bugs and problems WITHOUT having to wait for the premade forum's maintainers to do it for you. In the past, I've had trouble trying to get premade CMS's to behave exactly as I wanted it to, and ended up writing my own CMS (Content Management System). However, in this CASE, I had experienced knowledge of HTML, CSS, and PHP before hand. Even thought it worked out well for me, I would strongly recommend using a premade forum for a person trying to set up a simple forum, just for simplicity and ease of use. |
|
2437. |
Solve : WEb Guestbook - Taking my next steps into web Programming? |
Answer» Hey all I have a site here jimbo8098.agilityhoster.com . As you can see I have TAKES some steps into web design and programming but now I really want to go further. For my next stps I want to make a guestbook. People give a name and a short message and it is recorded. Late i will be adding more funtions. |
|
2438. |
Solve : WHY WONT THIS BATCH FILE WORK!!!!!!!!!? |
Answer» Why wont this BATCH FILE work??? The point of it is to convert png FILES to jpg in a certain directory. It finds files in the directory that are named like this: 1.png 2.png 3.png ect... It EXITS as soon as you input the directory!!!!! Code: [Select]@ECHO off :d cd C:/Users/%USERNAME% pause set /p start=Starting Number: set /a start2=%start% - 1 set /p dir=Directory if not exist %dir% ( echo %dir% has not been found! pause cls goto :d ) if exist %dir% ( goto a ) :a set /a next=start2 + 1 if exist %dir%/%next% ( ren %dir%/%next% %next%.jpg set /a per=100/%next% cls echo %per%% cls goto a echo. echo. echo Done! pause cls goto dWelcome to CH. Please do not shout. May I assume you are a beginner? Suggestions. 1. do not use echo off until you got it right. 2. beak you code into little parts and stubs. 3. avoid indirection until you have it right. Like Code: [Select]cd C:/Users/%USERNAME%Is not needed until you have tested the thing. You start in the test directory manually. Less likely to mess things up.It appears that you are simply renaming from png to jpg. Do you understand that you need to actually CONVERT the file format, not just change the extension?goto :d should just be goto d. No need for the semicolon. |
|
2439. |
Solve : oracle? |
Answer» hi |
|
2440. |
Solve : A backup batch, to save as time and date.? |
Answer» Hello all, |
|
2441. |
Solve : Java program issues? |
Answer» I made this program for a class. Its purpose is to convert sequences of numbers from the keyboard to text strings based on the usual multi-tap coding used with cell phones. For EXAMPLE, 4433555 555666 = "hello". |
|
2442. |
Solve : Visual Basic Express 2010? |
Answer» I am taking a class in VB. When I build a form and code the BUTTONS, etc, then do a save all, I am missing files in |
|
2443. |
Solve : change a code set up? |
||
Answer» is it possible to change a code from script to html
Nope.Quote from: kpac on October 24, 2010, 04:07:17 PM Nope. oh right , you seem to be very sure on that point anyway , i just have to think of something else then Yes I am. BTW, http://www.mywot.com/en/scorecard/widgeo.net Actually, there is a way with this script, as it only outputs plain HTML. Code: [Select]<table><tr><td> <OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" WIDTH="157" HEIGHT="203"> <PARAM NAME="movie" VALUE="http://www.widgeo.net/geocompteur/swf/geocity_blue2.swf?idm=1590014&jour=4&online=2&total=5"> <PARAM NAME="quality" VALUE="high"> <PARAM NAME="wmode" VALUE="transparent"> <embed wmode="transparent" width="157" height="203" src="http://www.widgeo.net/geocompteur/swf/geocity_blue2.swf?idm=1590014&jour=4&online=2&total=5" pluginspage="http://www.macromedia.com/shockwave/download/" type="application/x-shockwave-flash" quality="high"></embed> </OBJECT> </td></tr></table> If you're using that on wordpress I'm not sure if it will work because they strip a lot of HTML tags.you see , i knew you would know something from your memory banks , thanks patio i'll let you know and then you can store that information as well Quote from: HARRY 48 on October 24, 2010, 04:36:56 PM thanks patio wha?Quote from: BC_Programmer on October 25, 2010, 11:06:44 AM wha? oh dear me , we oldies thank you kpac Quote from: BC_Programmer on October 25, 2010, 11:06:44 AM wha?I was wondering that too. hi kpac , it did not work , so this is what an expert told me on the forum , i think i may just give up =================================================================== @harry [java]script and shockwave flash are stripped out by the software. See here > http://en.support.wordpress.com/code/ Long story short - you cannot use that widget on a wordpress.com blog. It's a shockwave Flash widget and the software will strip the code out. =================================================================== WordPress.com is a type of shared environment, where all users are running off of the same software. This is great because it allows us at Automattic to update millions of blogs at the same time with a single click. It means we can fix bugs or offer new features very quickly, which is a WIN for you as users. Having all users running on the same software can also be dangerous. If we aren’t careful, one user has the potential to take down the entire site. So this is why we need to limit some of the things you post on your blog. If you wrote some code or PASTED it in from another web site and then it disappeared after publishing the post, the code is likely being stripped out. If you feel it’s being stripped out improperly or if you would like to suggest additional types of code we should allow, please contact support. HTML Tags WordPress.com allows the following HTML code in your posts, pages, and widgets: address, a, abbr, acronym, area, b, big, blockquote, br, caption, cite, CLASS, code, col, del, dd, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, img, ins, kbd, li, map, ol, p, pre, q, s, span, strike, strong, sub, sup, table, tbody, td, tfoot, tr, tt, ul, var Check out W3 Schools for more information about what each of these HTML codes are used for. If you are familiar with HTML, you’ll notice that codes such as embed, frame, iframe, form, input, object, textarea and others are missing from the above list. Those codes are not allowed on WordPress.com for security reasons. Javascript Users are not allowed to post JavaScript on WordPress.com blogs. JavaScript can be used for malicious purposes. As an example, JavaScript has taken down sites such as MySpace.com and LiveJournal offline in the past. The security of all the blogs is a top priority and until we can guarantee scripting languages will not be harmful they will not be permitted. JavaScript from trusted partners, such as YouTube and Google Video, is converted into a WordPress shortcode when a post is saved. Flash and Other Embeds Flash and all other embeds are not allowed in WordPress.com posts, pages, or text widgets. For security reasons, we remove the tags needed for these to work. Your intentions may be innocent, but someone somewhere would try to damage the site, affecting all of our users. There are several safe ways to post Videos, Audio, and other items to your WordPress.com blog. a bit more information from the wordpress forum Well, the shortcode version of this code is the one I pasted above. But as you can see, the code says "jour=4&online=2&total=5" (5 total visitors, 4 today, 2 online): if you put the shortcode in a text widget, the widget will keep showing the same NUMBERS day in day out. So, as I already pointed out, this is not a counter: you need to find a flash equivalent of this widget, this is just the output for one particular site on one particular day. |
|||
2444. |
Solve : Problem in Duplication of data and onenter key? |
Answer» Good day! Let me pull out xampp. I still don't understand exactly what you are trying to do. I'll give you a better explanation. I echo this query Code: [Select] $query = "SELECT t.operation_name, t.input_unit, t.output_unit FROM trace_operations t WHERE t.plt_typeno = '" . $_POST["plt_typeno"] . "' AND t.operation_name IN('02 Oper','03 Oper','04 Oper') ORDER BY t.operation_name"; And the output is: RESOURCE id #9 What is the meaning of that?it's a MySQL resultset. you need to use something like mysql_fetch_array() to get at the rows in the resultset. |
|
2445. |
Solve : Simple batch file question? |
Answer» HI, I am EXTREMELY new to batch files but need to create one for a class. I have had success with it and it does what it is supposed to do...with one problem. It needs to run from ANY directory on the system but I can only get it to go from the one I created it under. Can anyone please explain? My brain is fried! Thanks! Any program, including a batch file, can be run two or three waysways. A fully qualified path and file name. - OR- The directory of the program must be in the PATH variable. But if you are already in the directory the the file name is enough. For example, I am Jack, I have a batch file NAMED MyBatch.BAT and it is in the directory named D:\JACK\BATCH this would work: D:\JACK\BATCH\MyBatch.BAT Now if the PATH variable CONTAINS D:\JACK\BATCH I would only need the file name MyBatch And yes, you can even leave off the BAT part of the name. Are you asking us to do your homework? Did you read you materiel over well? Do you know what happens to people who get others to do their work? Do you want to end up LIKE them? Thanks for the guidance. And no, I don't expect others to do my work...I have been working on this thing since monday and just got stuck. But thanks for the CONCERN lol |
|
2446. |
Solve : Having issues with Java...? |
Answer» I am not sure if my computer drivers are up to date. I am having issues with yahoo game rooms/ games. When in a card game or dominoes when I click on a card or domino - my screen flickers/ FLASHES or GOES to the bottom of my screen. I constantly get kicked out of the game rooms SEVERAL times while in a game. Anybody know why this is happening and what I can do to fix it? I have cc cleaner and have ran it. Also I have ad-aware and avg. Someone please help. I have not had my computer but LIKE 3 months now. It's a toshiba laptop. |
|
2447. |
Solve : Java programming help? |
Answer» I used to teach the Data Processing Class at the local Community College. Part of the curriculum was How to write java programs. We started with a blank page, wrote every line, compiled it, and tested the program. My question is what do I need to download in order to be able to waste a little time writing programs to REVERSE the order of a sentence and such. I used to spend a lot of free time playing with java. also where do I get it I think I have already downloaded a bunch of stuff from sun java but the blank page with a compiler button at the side just don't come up, I get a bunch of HTTP stuff that I don't understand and have no desire to work with. Maybe I need an old Java program. Any help will be appreciated, thanks.you could try netbeans IDE; or eclipse. Can u plaese give me some programming codes for java?You need to start your own thread to get help. Before you do start a thread though, try to consider what you want to ACCOMPLISH. We can't help you with something that vague.Java programming very simple to write when you use netbeans IDE. It is made by japnies people and the java language used for this. It contain all the functions and many applications which is used to make the software. Quote from: wilbert99eaton on November 03, 2010, 12:21:03 AM Quote removed japnies? Isn't that a kind of pepper? |
|
2448. |
Solve : can you remove "white" from this code? |
Answer» is it possible to remove the transparent ( which turns out to be a white box) in the code below , but leave the clock intect , you can see the clock on my site thank you bcp , i was going to try that but would that be the back ground for the clock maybe the meaning of the number is only known to whoever made the widget, probably. you'd have to experiment. It probably changes all the colours. i'll have a try , thank youi CHANGED it all and also one at a time nothing worked i'll just leave it as is the quote also said; it is EXPLORER not understanding transparent that is the reason it turns out white |
|
2449. |
Solve : Unable to use message forum? |
Answer» I have a message FORUM that everyone is able to respond or POST on and I have nothing to CLICK on to do so. I did something recently and have no IDEA what it is. Any suggestions appreciated. |
|
2450. |
Solve : Return array from ActiveX exe? |
Answer» I have an activex exe written in vb6 that I am accessing using vbscript. I have a sub in this activex exe with a parameter that needs to return an array. I tried using a function to return a variant type array, but it would not allow access to the array in vbscript. Basically, I just need to figure out a way to pass an array or a collection from my vb6 exe to my vbscript. I have seen examples, but none of them will work for me probably because most of them are talking about ASP. and use Redim() to turn it into an array in the routine. That fixed it ReDim Preserve aparently doesn't work the first time. I had to start it out by using ReDim keyNames(0) to make the variant into an array. I also decided to make it into a function instead of a sub. I removed the msgboxes because they don't ever display, I even made a new sub with a msgbox in it and it didn't work. There's only one small problem left with the "keyName = Space(KEY_LENGTH)". In the console, it shows all the extra spaces after the key name. I figure that's because there is no null termination CHARACTER, but it's weird because it displays fine in a msgbox (no extra spaces). So I have two final questions. Why won't msgboxes display from the activex exe? And how do I get rid of the trailing spaces in the console? Thanks so much for your help I was at this for three hours. Code: [Select]Public Function EnumKeys(strSection As String, keyName As String) As Variant Dim hKey As Long Dim keyNames As Variant Dim section As Long Dim i As Long 'FORCE IT TO TURN VARIANT INTO ARRAY ReDim keyNames(0) ' Convert from string to the section code section = GetSection(strSection) ' Open the key. If RegOpenKeyEx(section, keyName, 0, KEY_ALL_ACCESS, hKey) <> ERROR_SUCCESS Then Exit Function End If ' Enumerate keyName = Space(KEY_LENGTH) While RegEnumKey(hKey, i, keyName, KEY_LENGTH) = ERROR_SUCCESS ReDim Preserve keyNames(i) '<---- NOT GOOD ENOUGH. WON'T FORCE IT TO BE ARRAY FIRST TIME keyNames(i) = keyName keyName = Space(KEY_LENGTH) i = i + 1 Wend ' Close the key. RegCloseKey (hKey) EnumKeys = keyNames End Function Here is the vbscript: Code: [Select]Option Explicit Dim reg Dim keys Dim values Dim i Dim io Set io = CreateObject("wshshell.IO") Set reg = CreateObject("wshshell.Registry") keys = reg.EnumKeys("HKLM", "SYSTEM\CurrentControlSet\Services") values = reg.EnumValues("HKLM", "SYSTEM\CurrentControlSet\Services\Tcpip") For i = 0 to Ubound(keys) wscript.stdout.writeline keys(i) Next AnyKey For i = 0 to Ubound(values) wscript.stdout.writeline values(i) Next AnyKey Set io = Nothing Set reg = Nothing Sub AnyKey() wscript.stdout.writeline "Press any key to continue. . ." wscript.sleep 200 While io.GetKeysASCII = 0 wscript.sleep 50 Wend End Sub Quote from: Linux711 on November 04, 2010, 08:01:45 AM There's only one small problem left with the "keyName = Space(KEY_LENGTH)". In the console, it shows all the extra spaces after the key name. I figure that's because there is no null termination character, but it's weird because it displays fine in a msgbox (no extra spaces).The MsgBox() Function Calls MessageBoxA(), As I'm sure you are aware. When VB passes the String to MessageBoxA, it (converts it to ASCII from the native VB Unicode) and then tacks a null character on the end. Since your string probably have a null character (as returned from the Registry function) Messagebox only displays up to that first null character. The Console, However, does not work this way. The Console is written to using WriteFile(), which basically takes a data block, a size, and then writes it to the handle. In this case, WScript.Echo() passes in the string, and the string length; so ALL of the string gets written. (Note that null characters usually just appear as spaces in the console). The solution? Use something like: Code: [Select]Struse = Left$(struse,instr(struse,vbnullchar)-1) before returning it from the EXE. Quote Why won't msgboxes display from the activex exe?Don't know. It works fine for me. Make sure "unattended Execution" isn't checked in the Project properties, Msgbox is ignored if that option is set on compilation. [/quote] Quote Thanks so much for your help I was at this for three hours.You're Welcome EDIT: Actually, now that I think about it, you may find this class useful. As you can see from the comments, I wasn't the original author; however, It is heavily modified from the original version, I fixed several bugs, made it independent of a Module that was originally required, and probably most interesting, I switched the APIs from using the ANSI version (RegReadKeyExA, for example) to using the Wide (Unicode) versions (RegReadKeyExW) when it detects it's running on a NT platform. Essentially, it wraps almost all the Registry manipulation functions. I've found it quite useful. That being said, I'm not sure how well it would work with VBScript, since there is a lot of strong typing and ByRef Arguments as well in the various public methods. It might make creating your versions easier I guess. Example- Code: [Select]'Declarations: Private mReg as cRegistry '------------------------------------------------------------------- 'Class Initialize should have this: Private Sub Class_Initialize() Set mReg = new cRegistry End Sub 'and then your EnumKeys Function could be changed as well: Public Function EnumKeys(strSection As String, keyName As String) As Variant Dim returnvar as Variant Dim sCount as Long,sKeys() as String if mReg.EnumerateSections(sKeys, sCount) Then Redim returnvar(0 to sCount-1) 'only problem is the fact that it now has to be "CONVERTED" to the variant array... For I = 1 to sCount returnvar(I-1) = sKeys(I) Next I End If EnumKeys = returnvar End Function It's far from perfect; the strong typing of byRef Arguments means it wouldn't work directly with VBScript, at least not without helper functions, and 1 based arrays? what was I thinking.... Actually, no, I'll just blame the original author for that . But it might be helpful. |
|