This page is a NO-INDEX summary of comments posted in this blog.

Total 849 Comments (25/34 Pages) - Newer Comments - Older Comments

601. 2016-06-03 16:09:08 Milescoder Comments on Tutorial 8 – C Programming in 6502 – Sprites:

As in put your chr file on screen


602. 2016-06-03 16:08:18 Milescoder Comments on Tutorial 8 – C Programming in 6502 – Sprites:
Hey dude how would you do that with chr files for your character?


603. 2016-06-02 22:36:19 ACMer Comments on Simple Javascript Unit Testing:
I know, this just demonstrates the basis, the prototyping.


604. 2016-06-02 21:24:01 Xiaoming Comments on Simple Javascript Unit Testing:
You could also use some assertion libraries like 'should', 'expect' and 'assert'. For unit test, you can use Chai or Mocha.


605. 2016-05-31 08:19:44 rieeez Comments on How to Find Intersection of Two Arrays in C++?:
how i want to move code using phyton to c++.....please help me......this is my code using phyton....and i wan to move from phyton to c++... print "Welcome To The Resistor Calculator" print "Our Group Members\nMuhammad Harith Bin Kamlyzan\nMuhammad Hisyam Bin Harmizon\nIkhwan Hakim Bin Mohd Asri\nShahrul Izwan Bin Kamal Akhball\nMuhammad Shahzlan Bin Mohd Nizam" start = raw_input("Press Enter To Start") first_colours = {"Black","Brown","Red","Orange","Yellow","Green","Blue","Purple","Grey","White"} while True: first_colour = raw_input("\nPlease State The First Colour Band\nBlack\nBrown\nRed\nOrange\nYellow\nGreen\nBlue\nPurple\nGrey\nWhite\nYour Choice?\n") if first_colour == "Black": first_colour = 0 break elif first_colour == "Brown": first_colour = 1 break elif first_colour == "Red": first_colour = 2 break elif first_colour == "Orange": first_colour = 3 break elif first_colour == "Yellow": first_colour = 4 break elif first_colour == "Green": first_colour = 5 break elif first_colour == "Blue": first_colour = 6 break elif first_colour == "Purple": first_colour = 7 break elif first_colour == "Grey": first_colour = 8 break elif first_colour == "White": first_colour = 9 break else: print "Invalid colour name" second_colours = {"Black","Brown","Red","Orange","Yellow","Green","Blue","Purple","Grey","White"} while True: second_colour = raw_input("\nPlease State The Second Colour Band\nBlack\nBrown\nRed\nOrange\nYellow\nGreen\nBlue\nPurple\nGrey\nWhite\nYour Choice?\n") if second_colour == "Black": second_colour = 0 break elif second_colour == "Brown": second_colour = 1 break elif second_colour == "Red": second_colour = 2 break elif second_colour == "Orange": second_colour = 3 break elif second_colour == "Yellow": second_colour = 4 break elif second_colour == "Green": second_colour = 5 break elif second_colour == "Blue": second_colour = 6 break elif second_colour == "Purple": second_colour = 7 break elif second_colour == "Grey": second_colour = 8 break elif second_colour == "White": second_colour = 9 break else: print "Invalid colour name" third_colours = {"Black","Brown","Red","Orange","Yellow","Green","Blue","Purple","Grey","White"} while True: third_colour = raw_input("\nPlease State The Third Colour Band\nBlack\nBrown\nRed\nOrange\nYellow\nGreen\nBlue\nPurple\nGrey\nWhite\nYour Choice?\n") if third_colour == "Black": third_colour = 1 break elif third_colour == "Brown": third_colour = 10 break elif third_colour == "Red": third_colour = 100 break elif third_colour == "Orange": third_colour = 1000 break elif third_colour == "Yellow": third_colour = 10000 break elif third_colour == "Green": third_colour = 100000 break elif third_colour == "Blue": third_colour = 1000000 break elif third_colour == "Purple": third_colour = 10000000 break elif third_colour == "Grey": third_colour = 100000000 break elif third_colour == "White": third_colour = 1000000000 break else: print "Invalid colour name" fourth_colours = {"Gold","Silver","None"} while True: fourth_colour = raw_input("\nPlease State The Fourth Colour Band\nGold\nSilver\nNone\nYour Choice?\n") if fourth_colour == "Gold": fourth_colour = 5 break elif fourth_colour == "Silver": fourth_colour = 10 break elif fourth_colour == "None": fourth_colour = 20 break else: print "Invalid colour name" total = second_colour*third_colour print "The Total Value Of Your Resistor Is : " + str(first_colour) + str(total) + " +-" + str(fourth_colour) + '%\n' exitprogram = raw_input ("\nPress Enter To Exit")


606. 2016-05-30 10:40:53 ACMer Comments on Algorithms to Find Kth Largest/Smallest Element in an Array/List:
Yes, solution with nth_element added, so simple. class Solution { public: int findKthLargest(vector& nums, int k) { nth_element(nums.begin(), nums.end() - k, nums.end()); return nums[nums.size() - k]; } };


607. 2016-05-28 20:10:37 ACMer Comments on Creating Sitemap Generator for PHPBB3.1 using PHP:
no problem. Glad it helps


608. 2016-05-28 20:09:17 Md Nurullah Comments on Creating Sitemap Generator for PHPBB3.1 using PHP:
Great... it works!!!! Thanks for your quick help


609. 2016-05-28 20:04:11 ACMer Comments on Creating Sitemap Generator for PHPBB3.1 using PHP:
in conn.php, you have to define your DB constants details such as


610. 2016-05-28 20:02:14 Md Nurullah Comments on Creating Sitemap Generator for PHPBB3.1 using PHP:
Oh! i did not found conn.php file in my PHPBB script.. where it is? mysql_connect('MY DB NAME', 'DB USER NAME', 'DB USER PASS'); mysql_select_db('androidsma_v2'); There i used my real db information


611. 2016-05-28 20:00:56 ACMer Comments on Creating Sitemap Generator for PHPBB3.1 using PHP:
have you put DB details correctly in conn.php? require_once('conn.php'); mysql_connect(DB_HOST, DB_USER, DB_PASSWORD); and, if it is 500 ERR, it usually means you need to check the apache2/nginx server log to find out the exact errors.


612. 2016-05-28 19:58:05 Md Nurullah Comments on Creating Sitemap Generator for PHPBB3.1 using PHP:
HTTP ERROR 500 That error


613. 2016-05-28 19:50:02 ACMer Comments on Creating Sitemap Generator for PHPBB3.1 using PHP:
of course it is working. what errors did you get?


614. 2016-05-28 19:47:25 Md Nurullah Comments on Creating Sitemap Generator for PHPBB3.1 using PHP:
Its not working.. i got error... Did you test it ?


615. 2016-05-28 08:09:12 riez Comments on How to Find Intersection of Two Arrays in C++?:
#include #include #include #include const char * colors[10] = { "black", "brown", "red", "orange", "yellow", "green", "blue", "violet", "grey", "white" }; int get_band (int n) { char input[10]; printf ("Enter color of band# %d: " , n+1); scanf ("%s", input); for (int i=0; i<10; i++) { if (strcmp(input, colors[i]) == 0) return i; } printf ("Invalid input\n"); exit (1); } int main() { int band[3]; long value; for (int i=0; i<3; i++) band[i] = get_band(i); value = band[0] * 10 + band[1]; value *= (long)pow(10.0, (double)band[2]); printf ("The value of that resistor is %ld ohms\n", value); system("pause"); return 0; } i don't know how to put a tolerance


616. 2016-05-28 08:04:23 ACMer Comments on How to Find Intersection of Two Arrays in C++?:
what have you done so far?


617. 2016-05-28 07:54:46 riez Comments on How to Find Intersection of Two Arrays in C++?:
Project Title: Resistor Calculator Resistor is an electrical component that reduces an electric current. The resistor's ability to reduce current is called resistance and is measured in units of ohms, Ω. The resistance of a resistor and its tolerance are marked on the resistor by color bands that denotes the resistance value as shown in Figure 1. Table 1 shows the value of each colour band. Figure 1: Resistor colour band. Table 1: Digit, multiplier and tolerance band chart. Colour 1st Band 2nd Band 3rd Band (Multiplier) 4th Band (Tolerance) Black 0 0 1 Brown 1 1 10 Red 2 2 100 Orange 3 3 1 000 Yellow 4 4 10 000 Green 5 5 100 000 Blue 6 6 1 000 000 Violet 7 7 10 000 000 Grey 8 8 100 000 000 White 9 9 1 000 000 000 Gold ±5% Silver ±10% None ±20% You are required to design a program to determine the value of a resistor based on resistor colour code. The program should prompt users to request the 4 bands colour marked on the resistor. The result should be display along with its tolerance. The user then asked whether he/she want to continue to determine the value of other resistor or not. If the user enter “Y” or “y”, the program will continue, otherwise enter “N”or “n” the program will stop. The program also should prompt an error message if the user enter an invalid colour code. Bonus marks will be given to any group that can show the correct error message in each selection of colour code. Example calculation By referring to Figure 1, the colour band of the resistor is as follow: 1st band : Red --------> 2 2nd band : Yellow ----> 4 3rd band : Green -----> 100 000 4th band : Silver ------> ±10% Thus, its resistance value is : Formula : [( 10 x 1st band ) + 2nd band ] x 3rd band ) ± 4th band % Resistance = [ (10 x 2 + 4) x 100 000] ±10% = 2 400 000 Ω ±10% please help me to finish this code


618. 2016-05-27 22:50:31 ACMer Comments on Algorithms to Find Kth Largest/Smallest Element in an Array/List:
yes, you are right.


619. 2016-05-27 20:49:44 Anon Comments on Algorithms to Find Kth Largest/Smallest Element in an Array/List:
It can be done in O(N) . Use nth_element() or the divide and conquer approach.


620. 2016-05-22 15:52:23 ACMer Comments on How to Find Intersection of Two Arrays in C++?:
Is this an assignment? 🙂 send it to my address, and I will have a look, but no promise. dr.zhihua.lai [AT] gmail.com


621. 2016-05-22 15:33:10 fariez Comments on How to Find Intersection of Two Arrays in C++?:
can you help me to do a programing using c++ to determine the colour code of resistor


622. 2016-05-21 12:12:47 ACMer Comments on Constructor and Destructor in Python Classes:
I see no reason why it cannot


623. 2016-05-21 11:21:33 John Comments on Constructor and Destructor in Python Classes:
That is interesting. Can users implement destructors in file handling? In other words, can users perform destructive copy in Python?


624. 2016-05-19 08:22:18 ACMer Comments on C/C++ Coding Exercise - Find the Duplicate Number:
I now understand your solution, however, according to https://leetcode.com/problems/find-the-duplicate-number/ it has only one duplicate number, but the duplicate number may appear multiple times. int findDuplicate(vector& nums) { int x = 0; for (int i = 0; i < nums.size(); i ++) { x ^= nums[i]; } int y = 0; for (int i = 0; i


625. 2016-05-19 08:16:52 Xiaoming Tu Comments on Dynamic Programming - How many ways to connect the pipes?:
I just want to see how narrow of this comment can be.


Newer Comments - Older Comments

–EOF (The Ultimate Computing & Technology Blog) —

46 words

The Permanent URL is: List of Comments