₦airaland Forum

Welcome, Guest: Register • Login • With Google • Trending • Recent • New

Stats: 3,345,741 members, 8,519,168 topics. Date: Sunday, 15 November 2026 at 06:46 PM

Toggle theme

Paranorman's Posts

Nairaland Forum › Paranorman's Profile › Paranorman's Posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 (of 43 pages)

Programming › Http Request/response Testing by paranorman(op): 9:24am On Apr 01, 2017
Hello all.

Can anyone recommend a simple application that I can use to test http request/response messages?
Programming › Re: Need Help With These: $_SERVER["PHP_AUTH_USER"] And $_SERVER["PHP_AUTH_PW"] by paranorman(op):
Olyboy16:
it doesnt work like that sir.
i cant type much code here on mobile, but i'll give you some pseudocode to follow.

when you send these headers to the browser.

header('WWW-Authenticate: Basic realm="some info text"');
header('HTTP/1.0 401 Uauthorized');


The browser prompts for a auth key.

then on submission to the server, you can check those $SERVER indexes.
Thanks, figured it out.
Programming › Need Help With These: $_SERVER["PHP_AUTH_USER"] And $_SERVER["PHP_AUTH_PW"] by paranorman(op): 3:50pm On Mar 19, 2017
xampp 7.0.1 is what I use for executing my PHP scripts.

the $_SERVER[] superglobal appears not to have these indexes when I print_r() it.

What am I missing? do I have to modify something in the config files?
Programming › SQL Dump For Nigerian/lagos Roads And Their Class by paranorman(op): 11:52am On Feb 21, 2017
Hello Coders,

Was wondering if I can get some SQL dump or any other data format of Nigerian/Lagos roads and their class(private drive path, two lane highway, dual carriageway, express ways, etc.). if I can't get it in data format, can I - at least - get a link to view the thing?

can anyone post a link or so? Thanks.
Travel › Help With A List Of All Roads In Lagos/nigeria by paranorman(op): 11:14am On Feb 21, 2017
Hello all,

Can anyone provide me with a link where i can get list of all roads in Lagos/Nigeria, this list should come with the class/type of road too, i.e., Expressway, Private drive pathways, Two-lane highways, Dual carriageways, Expressway etc.
Thank you in anticipation of your replies.

huh huh
Programming › Re: . by paranorman(m): 6:29pm On Feb 17, 2017
Notepad ++/vs code/code writer

Simple, lightweight and dies the job for now.

Notepad++ taking the first spot for its ease to customize.
Politics › Re: Customs Hands Over Seized Helicopters To NAF At Lagos Airport by paranorman(m): 6:43pm On Jan 27, 2017
9.7 billion?! Some very powerful people bought these!
Crime › Re: Mtn Are Scam...... by paranorman(m): 7:21pm On Jan 19, 2017
Chai!
Programming › Re: Please How Do I Print This Data From MY Database. MYSQL, PHP by paranorman(m): 2:00pm On Jan 01, 2017
I don't know if your tables are properly normalized,
But if you wanna extract data from four tables, you needa use Sql joins.

If you can't post the tables' structures here, post the tables and how the are related, I mean the primary keys in a table and the corresponding foreign key in a related table.


I will check out your code when I get on PC
Programming › Re: Please How Do I Print This Data From MY Database. MYSQL, PHP by paranorman(m): 4:18am On Dec 29, 2016
MySQL joins will solve your problem. Take your time and learn simple join examples from W3school website.
Programming › Re: Math/programming Puzzle - Finding All Expressions That Evaluates To Some Value by paranorman(m): 8:29pm On Dec 28, 2016
You mean the statement to executed should only contain unique operands(the numbers) that cannot be repeated, but the set (1, 3, 4, 6) may not be exhausted. You may use all operators, combine or just a single one?
Programming › Re: A Little Javascript Problem by paranorman(m): 2:03pm On Dec 27, 2016
Craigston:
Your approach might take more time to run. Figure out the cause.
Hint: recursive guessing.
Sure bro. I've only scratched javascript's surface, ain't pro. Still learning.

My approach will work fine for a small range, but if the range spans accross thousands of data one will grow white beards, especially for a not-so-patient person like me. Besides, it just a challenge anyway.
Programming › Re: A Little Javascript Problem by paranorman(m): 12:24pm On Dec 27, 2016
Craigston:
Someday these guys are gonna hatch monsters...
Hahahahaha, I pray so Bros. I am still a rookie sha.

the op was going on about using range, functions bla, bla, bla...

I just solved his problem using a single function, the second function wasn't even necessary.
Programming › Re: A Little Javascript Problem by paranorman(m): 6:15pm On Dec 26, 2016
Kodejuice:
huhhuh (WTF)
What the problem? grin
I sha solved the problem my own way with php.
Programming › Re: A Little Javascript Problem by paranorman(m):
i did PHP, using a recursive function, Mr. kodejuice
function jarvis(&$i, &$j, &$count) {
//$j = 10, by default, equivalent to the max number
//of the range;

$rand = rand(1, 10);
if ($j > 0) {
//is the first instance of the generated random number = 10 ? (print the number) : (keep looping through);
if (($rand == max(range(1, 10))) && ($count == 0)) {
print pow($rand, 2) . '<br />';
$j--;
$i = $rand;
$count++;
jarvis($i, $j, $count);
} else if ($rand == $j) {
//check if it's the next instance whose product
//should be printed; is instance consecutive?

print pow($rand, 2) . '<br />';
$j--;
$i = $rand;
jarvis($i, $j, $count);
} else {
//keep loopin through if the nth instance is not consecutive
//wrt to the previous

jarvis($i, $j, $count);
}
}
}

function ironMan() {
$i = 0;
$j = 10;
$count = 0;
//the $i parameter is not necessary, just included in function construct in case
//you wanna track the random number

jarvis($i, $j, $count);
}
ironMan();
Programming › Re: A Little Javascript Problem by paranorman(m): 9:17pm On Dec 24, 2016
I will post my solution tomorrow. I like challenges.
Properties › Re: ... by paranorman(m): 6:44pm On Dec 23, 2016
I don't have an idea of the rent of flats in the island, never cared for such. Rent can be quite expensive on the mainland, but choose where you can easily get straight buses to the island. Traffic situation after work hours is also something to consider.
For me, I lcan do with Berger, Iyana-Ipaja, Ikeda, Oshodi.
Programming › Re: I'm Having A Problem With This Qbasic. Who Can Help? by paranorman(m): 7:13pm On Dec 20, 2016
francollimasso:
should I use c# or javascript to solve it, it's been a while in qbasic
please do and post the solution here.
Programming › Re: I'm Having A Problem With This Qbasic. Who Can Help? by paranorman(m): 7:12pm On Dec 20, 2016
francollimasso:
should I use c# or javascript to solve it, it's been a while in qbasic
Properties › Re: Specially For Lagos Landlords Who Want To Sell Their Properties by paranorman(m): 9:56am On Dec 17, 2016
'sale' is a noun, used in the wrong grammertical context in your topic. It should be 'sell'. Make corrections, pal.
What is 'spacially'? You meant 'especially'?
Programming › Re: Frameworks Dont Make Sense by paranorman(m):
grin grin
I thought I was the only one that felt this way. I once was offered a position in an app/software development company; I was gonna be trained in few languages, especially good o' PHP. When I was told I wan gonna be starting with ZEND, lost interest. I specifically told the HR dude I don't like to be get started with frameworks. I just don't like building skills/foundation on frameworks.
Programming › Re: Is Node.js A Future??? by paranorman(m): 7:09pm On Dec 08, 2016
For the umpteenth time, programming languages are tools, they have their strengths and weaknesses.
Phones › Re: Best War Games For Android by paranorman(m): 2:58pm On Dec 04, 2016
Gbemishile1:
there are some war games on android phones and i must say that brother in arms 3 is the best one have played so far.
or which war games have u played that u think its better.
Been looking for such games a for a while now. From which site do you download yours for free?
Business › Re: Brand New Thermocool Generator by paranorman(m): 1:55pm On Dec 03, 2016
It's 'brand' new, not 'brown'. Make the due correction pal.
Education › Re: My Name Is "OR" My Names Are; Which Is More Correct? by paranorman(m):
The surname, firstname and other-names are a pair that makes up your full name.
So, "my name is" is the correct form. wink
Programming › Re: SQL Table Problem by paranorman(m):
Template of the view code:


CREATE VIEW viewNoServiceYear  AS
SELECT
firstname AS 'first name',
Lastname AS 'last name',
Department,
YEAR(FROM_DAYS(DATEDIFF(NOW(), employmentYear))) AS 'yearsOfService'
FROM
tblEmployeeDetails;


After the view as been saved in your employee database,
Query the view thus:

SELECT FROM viewNoServiceYear 
WHERE yearsOfService = 20;


When creating the view, include the fields/columns of your target from their respective tables from your database. This should solve your problem.

Remember views are 'read only'. Content of your database cannot be modified from a view. So, views are safe and are updated automatically.
Programming › Re: SQL Table Problem by paranorman(m): 9:58am On Nov 30, 2016
Bro, if you want to sacrifice performance for flexibility, then you can create another column for the current date and/or time. MySQL has a function for that.
Alternatively, you can create a View using the query I wrote up there.
Sql views are saved and updated automatically,they are 'read only' too.
Programming › Re: SQL Table Problem by paranorman(m): 4:10pm On Nov 29, 2016
oga OP, all you need is a calculated field in your SQL query.
for a table to be well normalized, calculated fields must not be part of the original design. so your column 'C' should not be part of your DB table, instead, you generate it using a query - calculated virtual fields

your table only need a column containing info about each employee's employment year, say 'employmentYear'; then query your db thus:
SELECT
YEAR(FROM_DAYS(DATEDIFF(NOW(), employmentYear))) AS 'number of years spent'
FROM
tblEmployeeDetails;
study the following mysql functions
CONCAT(A, B)
FORMAT(X, D)
CURRDATE(), CURRTIME()
NOW()
MONTH(), DAY(), YEAR(),
WEEK(), WEEKDAY()
HOUR(), MINUTE(),
SECOND()
DATEDIFF(A, B)
SUBTIMES(A, B)
FROMDAYS(INT)

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 (of 43 pages)