₦airaland Forum

Welcome, Guest: RegisterLoginWith GoogleTrendingRecentNew

Stats: 3,324,993 members, 8,419,843 topics. Date: Thursday, 04 June 2026 at 02:02 AM

Toggle theme

Codemarshal08's Posts

Nairaland ForumCodemarshal08's ProfileCodemarshal08's Posts

1 2 3 4 5 6 7 (of 7 pages)

ProgrammingRe: Please Where Can I Download Programming Files by codemarshal08(m): 1:38pm On Oct 09, 2018
Adeoye11:
Hello! Am new to nairaland and I love to program but new to it have been trying to learn c++ but need a good tutor..
Welcome. Learning c++ as a first language is possible but not easy.
For learning resources, I do have some videos & PDFs that can be of help. I can share them with you for FREE.
Please where do you reside ?
ProgrammingRe: Please Help Me Solve These C# Questions by codemarshal08(m): 8:27am On Oct 08, 2018
Legolast:
I need someone to please help me solve these questions in c#. I am a c# beginner [self learning]

Scenario 2-1: Creating Properties
You need to create a class named Product that represents a product. The class has a single
property named Name. Users of the Product class should be able to get as well as set the value
of the Name property. However, any attempt to set the value of Name to an empty string or
a null value should raise an exception. Also, users of the Product class should not be able to
access any other data members of the Product class. How will you create such a class?

Scenario 2-2: Creating a Struct
You are developing a game that needs to represent the location of a target in three-dimensional
space. The location is identified by the three integer values denoted x, y, and z. You will create
thousands of these data structures in your program, and you need a lightweight, efficient way
to store this data in memory. Also, it is unlikely that you will need to inherit any other types
from this location type. How should you represent the location in your program?

Scenario 2-3: Overriding the ToString Method
Say you are writing code for a Product class. The Product class contains the name and price
of a product. You need to override the base class (System.Object) method ToString to provide
information about the objects of the product class to the calling code. What code do you
need to write for the Product class in order to meet this requirement?

Scenario 2-4: Creating and Handling Events
Imagine that you are writing code for creating and handling events in your program. The
class SampleClass needs to implement the following interface:

public delegate void SampleDelegate();
public interface ISampleEvents
{
event SampleDelegate SampleEvent;
void Invoke();
}

You need to write code for the SampleClass and for a test method that creates an instance of
the SampleClass and invokes the event. What code should you write?
Show what (some codes) you have tried and indicate where exactly you are finding hard to get.
ProgrammingRe: It Gurus In The House. Please Help Me by codemarshal08(m): 5:12pm On Oct 04, 2018
obytex:
YES TP LINK link router tl-mr3420
How is the Network setup ?
PC -> Switch -> Router ?
PC -> Router ?

How are the 10 Routers interconnected ?
ProgrammingRe: It Gurus In The House. Please Help Me by codemarshal08(m): 3:48pm On Oct 04, 2018
obytex:
pls help me sort this issues. i'm working in a hotel we have up to ten desktop computer and ten TP Link routers. recently i deploy another routers. but i noticed whenever i put it on (cos the router is in the conference hall) all the desktop computer will stop browsing and when i trouble shoot, i will be seeing DNS NOT RESPONDING. but if i off it all will start browsing. i also notice that this happens to only desktop computers while the wifi is working well. please what can i do.
You have ten(10) ROUTERS ? Do you mean SWITCHES?
ProgrammingRe: Javascript Or PHP, Which One Should I Go For? by codemarshal08(m): 5:42pm On Sep 12, 2018
Abdulnur:
Hi everyone,

I learnt JavaScript is (mainly) for front end development.
Can't it be used as a server side language thereby replacing PHP?

and

PHP, I learnt is for back end development.
Cant it be used for front end ? There replacing JavaScript?
[hr/]

You may wonder why I'm looking forward to learning one only.

I have a very little time with me(3 months) and I need to, at least, be a full stack developer to understand (not to create) how web apps work.


If any of my pre mentioned ways through won't work, what is the best way possible?

Thank you, Abdulnur.
I will suggest you go with the PHP route. it is easy enough to grab the basis within that time frame.
ProgrammingRe: Where To Download Free Visual Studio 2017. by codemarshal08(m): 10:54pm On Sep 11, 2018
imadiyi:
Hello Nairalanders, please where can I download Visual Studio 2017 for free or a cracked version? Please help a brother!
Visual studio 2017 Community edition is free
ProgrammingRe: Can Someone Explain This Line Of Code To Me by codemarshal08(m): 8:44am On Sep 11, 2018
BabyApple:
what is the value of arr?
40, 100, 1, 5, 25, 10


View
Math.max.apply(null, arr);
as
Math.max.apply(40, 100, 1, 5, 25, 10)
ComputersRe: Am In Need Of A Qualified Printer Technician ! by codemarshal08(op): 5:16am On Sep 11, 2018
BabyApple:
i still dont understand your explanation in my post.
ok. please go to that post and reply my comment. Thanks.
ProgrammingRe: Can Someone Explain This Line Of Code To Me by codemarshal08(m): 7:03pm On Sep 10, 2018
BabyApple:
<!DOCTYPE html>
<html>
<body>

<h2>JavaScript Array Sort</h2>

<p>The highest number is <span id="demo"></span>.</p>

<script>
var points = [40, 100, 1, 5, 25, 10];
document.getElementById("demo"wink.innerHTML = myArrayMax(points);

function myArrayMax(arr) {
return Math.max.apply(null, arr);
}
</script>

</body>
</html>


My question is where does (null, arr); comes from
null is built in Javascript . it is used to represent "nothing"
Javascript apply function accepts two (2) parameters. The first parameter is optional . passing null to it means no value.
The arr is used as a parameter in the myArrayMax function definition. parameters are used to pass data to a function.
In your code, the arr is used to pass the values in your point arrays to the myArrayMax function
parameters are defined by programmers.
ProgrammingRe: Someone Explain This Javascript Snippet by codemarshal08(m): 11:22am On Jan 31, 2018
NaHiim:
Please house, forgive my ignorance but I've been trying to wrap my head around the bolded code.
I need someone to please explain.



var bricks = [];
for (var c=0 ; c<column ; c++)
{
bricks[c] = [];
for (r=0 ; r<row ; r++)
{
bricks[c][r] = {x:0, y:0};
}
}
bricks[c][r] = {x:0, y:0}; => this line is assigning an object literal to the cell in cth column, rth row in the bricks multidimensional arrays
ProgrammingRe: Learn C++ Programming Language In Few Days by codemarshal08(m): 4:30am On Jul 16, 2017
Nicolars:
I understand this method well

I'm talking of using two return statements in a function
Ok. it is not possible to return multiple values using two return values.
Your code is valid but it will only return a because return b is never reached b4 the function exits.
ProgrammingRe: Learn C++ Programming Language In Few Days by codemarshal08(m): 9:15pm On Jul 15, 2017
Nicolars:
Sylvseter,or anyone else who's good in c++ I have a question

How do you return two values in a function..... Not using pointers..

Example a function like this
Int var () {
Int a,b
cin>>a;
cin>>b;


return a;
return b;
}


Is this function valid... If it is, what would be stored in the main function... If its not valid.... How can it become valid
To return more than one value from a function, you could use references

Below is One Way to do it using passing by references:


void var(int &a, int &b)
{
std::cin >> a;
std::cin >> b;
}

int main()
{
int a, b;
var(a, b);

std::cout << "A is = " << a << " and B is = " << b;
return 0;
}

ProgrammingRe: What Markups does Nairaland use??? by codemarshal08(m): 9:42am On Sep 05, 2016
VictorR1:
What markup language does nairaland use for styling it's posts & comments? eg: the smiley's, bold, quotes, etc. I would have thought they were HTML but HTML comes in angled brackets: "<element></element>" while this nairaland ones are in square brackets: "[element][/element]".
read this: https://en.wikipedia.org/wiki/BBCode
ProgrammingRe: C++ In Programming by codemarshal08(m): 4:51pm On Aug 10, 2016
Sofiyyah01:
PLEASE I NEED HELP ON CODE TO CREATE GAME GIVING USER OPTION AND TELLING THE USER IF THE ANSWER GIVEN IS CORRECT, ALSO TELLING THE RIGHT ANSWER WITH FLOWCHART.
can we see what you have tried ?
ProgrammingRe: C++: This Tiny Thing Is Still Puzzlin Me. Here Is My Code by codemarshal08(m): 5:38am On Jul 05, 2016
#include <iostream>
#include <string>
#include <fstream>
#define NL '\n'

using namespace std;
int main()
{
....ofsream ofstream myfile;
........

NB : you can make the work less tedious for us by providing the errors messages!
ProgrammingRe: C's And C++ Base by codemarshal08(m): 6:44pm On May 30, 2016
KazukiIto:
Cc BlueMagnificent
Cc CodeMarshal. I am very loyal Sirs...
Respect Boss !!!
ProgrammingRe: C's And C++ Base by codemarshal08(m): 6:03pm On May 27, 2016
Euroadams:
Pls I need coding gurus
What for ?
Forum GamesRe: Can You Spot The 6 Hidden Words From This Picture? by codemarshal08(m): 7:28pm On May 22, 2016
NOVEL, PAGE , STORY
ProgrammingRe: Skills Needed By Computer Science Undergrate To Boast Their CV by codemarshal08(m): 2:30pm On May 15, 2016
gidimasters:
yea, i know i'm into java but lets take for example, as a networker u need ccna, cisco certification.... buh as my area is mainly web and prog, what/which certifications can make my cv sweet... maybe online certification sha
Your degree is enough for now. Work more on your programming skills (have a portfolio).
ProgrammingRe: Skills Needed By Computer Science Undergrate To Boast Their CV by codemarshal08(m): 2:14pm On May 15, 2016
gidimasters:
Tho my concentration area is basically Web Design&Development and little of programming(java).
The Area marked red in the above Quote is one skill you will need.
ProgrammingRe: Learning To Program With Java by the Fulaman by codemarshal08(m): 9:35pm On May 08, 2016
Sugarhugs:
I will jus learn ruby python is too confusing for now
Calm down and check my Edit.
ProgrammingRe: Learning To Program With Java by the Fulaman by codemarshal08(m): 5:53pm On May 08, 2016
Sugarhugs:
Abeg I understand am jor, don type Monty tire e no gree work cry cry
Don't give up ok. Do check my Edit.
ProgrammingRe: Learning To Program With Java by the Fulaman by codemarshal08(m):
Sugarhugs:
Have been tryna pass the python place at codeacedamy for over 30 mins now and I can't so frustrating with all ther maths equations agh ! I feel like I'm taking maths class check this out below

+---+---+---+---+---+
| M | O | N |T | Y |
+---+---+---+---+---+
0 1 2 3 4

--When working with strings, you start counting from 0.
--- The Question is asking you to assign the fifth letter in MONTY (i.e "Y"wink to variable "fifth_letter"
Something like this: fifth_letter = the fifth letter in MONTY , which is "Y". below is how to do it in code


fifth_letter = MONTH[4] use fifth_letter = "MONTY"[4] // i am sorry for the mistake! 

// 4 is the index of the letter "Y" , which is the fifth letter in "MONTY"
ProgrammingRe: Java: Can I Create A Java App Without Ide by codemarshal08(m): 3:58am On Apr 27, 2016
emmanuelatas:
Which one will be more profiting? IDE or Text Editor.
IDE
ProgrammingRe: Programming Challenge: Convert String to Json with a Loop by codemarshal08(m): 3:56am On Apr 27, 2016
dhtml18:
codemarshal, them don epp you ni? this no be your original id now? by the way, this your code long like River Niger.
Meanwhile, Kudos to all you guys that have been writing codes o, i have only been contributing to this thread with my mouth.
Master I sight you !. This is the Id I have been using. Your contribution was useful. Thanks.
ProgrammingRe: Programming Challenge: Convert String to Json with a Loop by codemarshal08(m): 10:10pm On Apr 26, 2016
C++ Qt:

#include <QStringList>
#include <iostream>
QString parseString(QString data);

int main(int argc, char *argv[])
{
QString data = "Country\tState\tTown\r\nNigeria\tLagos State\tLagos\r\nUSA\tTexas\tDallas\r\n";

std::cout << parseString(data).toStdString() << std::endl;

return 0;
}

QString parseString(QString data)
{
QStringList rows = data.split("\r\n"wink;
/*rows contains
* 0 1
* [Country\tState\tTown][Nigeria\tLagos State\tLaogs\t]....
*
*/
QStringList columnHeader = rows[0].split("\t"wink;
/*CoulumnHeader Contains
* 0 1 2
* [Country][State][Town]
*/

data = "[";
for(int x =1; x < rows.size()-1; ++x)
{
data += "{";
QStringList column = rows[x].split("\t"wink;
/*column[0] cotains
* 0 1 2
* [Nigeria][Lagos Sate][Lagos]
*
*/
for(int j =0; j < column.size(); ++j)
{
data += "\n\"" + columnHeader[j] + "\": \"" + column[j] + "\"";
/*
* columnHeader[0] + column[0] ==> Country Nigeria
* coumnHeader[1] + column[1] ==> State Lagos State
*/

//dont add comma to the last column
if( j < column.size()-1) data += ",";
}
data += "\n}";

//dont add comma After the last row
if(x < rows.size()-2) data += ",";
}
data += "]";

return data;

}



OutPut:


[{
"Country": "Nigeria",
"State": "Lagos State",
"Town": "Lagos"
},{
"Country": "USA",
"State": "Texas",
"Town": "Dallas"
}]
Tech JobsRe: Any Programmer Wants To Earn A Quick 30,000 Naira To Write A Very Easy Program by codemarshal08(m): 1:41pm On Apr 24, 2016
AlphaCentauri:
so basically what Is the purpose of this program ? i want to be able to type in stuff like 5 degrees 29 minutes 5 seconds CAPRICORN and then it tells me what time this corresponds to on the 24 hour clock assigned to the 12 houses
Please, are you adding CAPRICORN(a house name) to the data you intend to input ?
ProgrammingRe: Problem With Insert Statement Mysql by codemarshal08(m): 9:28am On Apr 05, 2016
@ paranorman
noordean:
Post your real code
Let us see the code that is not working properly.
ProgrammingRe: Problem With Insert Statement Mysql by codemarshal08(m): 9:01am On Apr 05, 2016
Silverman42:
The correct syntax should be:
"INSERT INTO table_name (column1, column2, column3) VALUES (value1, value2, value3)"
Where value1, value2 and value3 = integer or character.
His syntax is valid. You are not always required to specify the column names.
ProgrammingRe: Help Me Keep My Brain In My Skull! Solve This Logic! by codemarshal08(m): 8:59pm On Mar 29, 2016
paranorman:
Oga codemarshall08, how do one check if a number is odd or even or multiple of a particular number or if a number is a factor or so?
Are you requesting logic or codes ?

1 2 3 4 5 6 7 (of 7 pages)