₦airaland Forum

Welcome, Guest: RegisterLoginWith GoogleTrendingRecentNew

Stats: 3,329,084 members, 8,438,762 topics. Date: Friday, 03 July 2026 at 09:43 PM

Toggle theme

Paranorman's Posts

Nairaland ForumParanorman's ProfileParanorman's Posts

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

CrimeRe: Mtn Are Scam...... by paranorman(m): 7:21pm On Jan 19, 2017
Chai!
ProgrammingRe: 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
ProgrammingRe: 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.
ProgrammingRe: 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?
ProgrammingRe: 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.
ProgrammingRe: 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.
ProgrammingRe: 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.
ProgrammingRe: 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();
ProgrammingRe: A Little Javascript Problem by paranorman(m): 9:17pm On Dec 24, 2016
I will post my solution tomorrow. I like challenges.
PropertiesRe: ... 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.
ProgrammingRe: 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.
ProgrammingRe: 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
PropertiesRe: 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'?
ProgrammingRe: 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.
ProgrammingRe: 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.
PhonesRe: 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?
BusinessRe: Brand New Thermocool Generator by paranorman(m): 1:55pm On Dec 03, 2016
It's 'brand' new, not 'brown'. Make the due correction pal.
EducationRe: 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
ProgrammingRe: 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.
ProgrammingRe: 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.
ProgrammingRe: 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)
PoliticsRe: How Is The 'black Race' Seen In Today's Time? by paranorman(m): 3:18pm On Nov 28, 2016
This is serious.
ProgrammingRe: How To Learn Programming In 30minutes by paranorman(m): 1:37pm On Nov 28, 2016
Yeah. Just like how to be a pilot in 30 minutes.
grin grin
EducationRe: The Ancient Pyramids - I Know How It Was Built, Why It Was Built, Who Built It. by paranorman(m): 9:58am On Nov 28, 2016
Ishilove:
2010
2011
EducationRe: The Ancient Pyramids - I Know How It Was Built, Why It Was Built, Who Built It. by paranorman(m): 8:52pm On Nov 26, 2016
freecocoa:
How is that relevant to the discourse? huh
None I suppose, but I read your comments in this trend. So, what do you believe in?
EducationRe: The Ancient Pyramids - I Know How It Was Built, Why It Was Built, Who Built It. by paranorman(m): 8:42pm On Nov 26, 2016
freecocoa:
Really? You believe he has the answers? grin grin grin
What do you believe in freecocoa?
EducationRe: The Ancient Pyramids - I Know How It Was Built, Why It Was Built, Who Built It. by paranorman(m): 8:33pm On Nov 26, 2016
Billyonaire:
You wanna share ? OR You want us to share ?
You guys to share. I know nothing about it.
EducationRe: The Ancient Pyramids - I Know How It Was Built, Why It Was Built, Who Built It. by paranorman(m):
profstar:
Which one is "immortal dimension" again
grin grin grin
Bro, current laws and equation in physics forbits time travel. This is another topic for another day. But time travel is real.

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