ToheebDOTcom's Posts
Nairaland Forum › ToheebDOTcom's Profile › ToheebDOTcom's Posts
I'm enjoying your questions. But I need to do something now. I will be back to answer those not yet answered. For the sake of knowledge! Nice one! |
DanielTheGeek:I modified my answer. I will explain now |
DanielTheGeek:var_dump returns bool. Modify your question correctly. Did you mean... $foo = 'true and false'; or $foo = true; $foo = false; If it is the first case var_dump returns string Answer to your modified question.. it returns false.. since it is not in quotes, then 'and'is evaluated as a logical operator. by truth table, truth and false results to false... Chikena! |
I don put code oo danielthegeek. @franklampard Yea!. That is the only reason |
Where is my 5 points danielthegeek? |
@danielthegeek Its because the return value is 0 which is interpreted as false by the if condition. To correct that, you will check the TYPE as well using === if (strpos(...) !== false) { echo 'contain' ; } else { echo 'does not contain' ; } |
paranorman:PHP. Some months now... |
@DanielTheGeek, If I dump PHP now, I will be almost practically useless. So don't let me dump it. However, I use python for data analysis, same as JaqL, pig, hive but there's a level of proficiency. I intend on learning Java in a month or two from now. I should grab it easily based on my knowledge of OOP and design patterns if that's enough. I guess am not dull, am I Hearing scaler, and Co ehn, una wan lost me... |
No major answer here, so I will post this.. In some language, exceptions are errors you can catch. it means they won't halt the execution of your script. Errors can happen at different stages, during compilation (eg when you forget a ';') or Runtime (eg when you call an undefined function or you require a non existing file) . Such errors that happen at Runtime triggers a RuntimeException Class. This class generates the appropriate exception be it a memory, underflow, overflow, range ET cetera... tag: paranorman |
directonpc:Yea, I tend to have my answer but I wanted to see other people's view. I dey feel you. But you no fit owe Google, Bing or any of them #0.1 or 10kobo sha |
paranorman:I feel you bro! As for the statistics, hala me anytime. Thanks for contributing.. |
DanielTheGeek:If you were to go by the SOLID principles, you wouldn't write up to that per file gansef |
DanielTheGeek:If you were to go by the SOLID principles, you wouldn't write up to that per file gansef |
directonpc: na you know oo. |
@danielthegeek, @seunthomas In addition to what you've said, coming from php var_dump(1.0) //float var_dump(1) // int No args about the above! When it comes to validation, depending on which function you used, if it were to be php's filter_var(1.0, FILTER_VALIDATE_INT) // true but var_dump(1.0) // float So it is Validated as int, which is mathematically right. However, filter_var('1.1‘, FILTER_VALIDATE_INT) // false Did you notice that interesting part? I know there is probably no HOLY GRAIL answer, and I know you might not want to use that validation in all cases, but it's one of those moment you laugh over how a programming language might not be perfect or accurate at all cost. Like I said, the question popd up and I think it will be interesting to talk about it. Thanks for your input.. |
directonpc:A programmer dealing with money. |
paranorman:Hehehe... **one of those moments you will be happy you used the right word** I quote myself again... toheebDOTcom:Notice the 'a' not 'the' as you wrote... Programmatically, 1.0 is evaluated to be 1, an integer.Coming from PHP, not really php alone since all programming Langs tend to use the same binary computation when comparing number. I agree with you on "by evaluation", but on comparison, Programmatically 1.0 !== 1. It won't! because computers sees decimal numbers as an approximate number. For such comparison, PHP has this function called bccomp that can be used in such case. Again it is not a bug but how it works... you can read more at floating-point-gui.de (I'm not sure if I get the address correctly, just google it). So is 1.00000000. So I say 1.0, tecnically, is a float.Hmm, Oga, Calm down! Mbanu! *what that means?* He no reach this level na... You dey confuse yourself gansef... Anyways, commenting on what makes sense to me, Programmatically, as you mostly said ,1.0 is not evaluated as 1.0. Computers compares numbers in a different way than we were both taught. As for you basing my dear Statistics on Assumption, what if I told you that randomization is not random? Please sir, don't eever say such besides we 'gods' of Statistics, it makes us pity your ignorance/navity in a disconcerting way. Seriously is worrying. That's another topic for another day. Let's not derail.I get you, blindly defending your course. Yes, Randomization is not random. And let me tell you, Randomization is a major topic under Optimisation Theory. As Changes is to Calculus. Are you calling yourself 'gods'? And you are such adamant? Have you done statistical inference? statistical hypothesis? Normal Distribution,...? Those are core of statistics, and if you are telling me there is no big deal of assumption, go and revisit your course again. Okay, lemme come straight to you, whenever you are told to take a sample distribution, study it and come up with a conclusion to summarise the whole distribution, then you've made an assumption based on a little distribution. I hope that is clear? Computer Science might have been drafted out of mathematics but it doesn't always work like it does in mathematics. Thank you for your contribution though. |
seunthomas:Nice assumption!! But you do agree with me that 1 is an integer, right? and 1.0 = 1 So are we in the position to validate 1.0 as an integer? ************* Concerning your statement about having a '.' implies it is not a whole number or integer is NOT really true. The simple answer is 1.0 = 1 + 0× 1/10 = 1 + 0 = 1 Which is a whole number. I know we were taught that when we see a point, then it is a decimal number. na na because of the point above. |
talk2hb1:I know where you are going to... Good to hear you say Statistically, Assumption is a major backbone of Statistics. This time around, statistics can't be used because we don't want an assumption but fact! Real analysis comes in here... ![]() |
As a programmer, is 1.0 - an integer? - a float? - both integer and float? As a mathematician, is 1.0 - An integer? - A whole number? - A decimal number? - or a combination of what and what? I came by this question some minutes ago, I studied mathematics as a course, now in a programming field and I must confess, it took some reasonings before I made a conclusion. 98% of Google Searches doesn't support my assertion, but the 2% is enough to back me up, at least some people reason like I did. Without influencing your own thoughts, I won't say my own conclusion yet... I'm not going to mention some gurus in the section, it's for everyone to answer. So, What is really 1.0? |
To those looking at the last line, remember that the lines of the docblock of a getter/setter method is at least times two of the method itself! ![]() Diaries God ooo. Anyways, for me, I sha know that it is 'something' thaaasand. 1 or 999, stories that touch. I remember that night, feeling like say I be one guru... E red for me when d tin no gree work |
Open source, Shey? No need for the 'secret' repo. If it's in interest of any developer, sure, contributions will come forth. Could you prep us with what makes it different to other frameworks? I can't wrap my head around that from the threads you've already talked about it. ![]() |
Another Reasonable Thread (A.R.T) Nicely said. It happens not just here only. I'm also surprised when I see some gigs on some freelancing sites. |
You have your points. However, you should know php did not start out as a programming language. It was just for Personal Home Page. It wasn't planned to be a programming language, hence some inconsistency. To add more salt, $_SERVER['HTTP_REFERER'] did you noticed referer? Instead of the correct spelling of referrer. What about HELO in smtp? Those are not php. While the first was certainly an error but people are already used to it for it to be changed. So, yes, shit happens. I read a quote of Rasmus Lerdorf where he confessed of being a coder that poorly writes code that works perfectly. Bottom line, php has come to stay. With php 7, it is the fastest scripting language. I don't need to tell you that you can harness it for a world class app. Php may suck to you but that doesn't mean a language that sucks! |
ireneony:You said it all! No pressing issues... |
Registered... Nice job |
Nice job here... A few contributions... The developer should as well identify where data flows in and out of his app. - data going into / out of the db - data from external source like url - data going to the ui as well *validate against what you need; NOT what you do not need. *treat every data not coming from you as invalid, sanitize and validate as appropriate... hope this helps as well |
Bold 5. I can bank on my former Nokia 6070 than that pretty looking phone. |
@ Abdelkabir, Contact17 Thank You, Best replies to clear most of my doubts. If it's okay, can I make one or two comments? |
May the peace and blessings of God be upon us all. I will like to air my view on this topic, and, of course, you can correct me if I am wrong but try to understand the angle I am coming from... My main point of comment will be centered on intention, and logic I believe one of the greatest tool we have is our sense of reasoning, logic, to understand what has been written. . . . One thing is certain here, for the fact that both genders are on this planet earth, there will always be an interaction. We were given the sense of reasoning to differentiate Black from White... That's easy. But the degree of Grey is what we have to be cautious of... Because it is hard to say visually, not only by Color experts nor her teachers. What are we left to do? Thread carefully! Contact17: 2. There should be no softening of the voice by either party.I agree that most times this is done to the opposite sex as a means to flirt around the her. But not all times! Psychologically, I guess, we tend to soften our voice when making a request. Shouldn't this be normal? A student-lectural conversation will not be same as that of your peers... Softening of the voice can also be an act of respect, especially from the Yoruba tradition. 3. Lowering of the gazeOn reading the above I asked myself Is a girl's face forbidden? My answer is No. Looking with lustful desires? My answer is morally, it is not right. So yes, IT IS WRONG, so as to help ourselves. So, I am throwing this question to ourselves, is AVOID the best way to explain this? Lower doesn't mean take away (I'm Not a linguistic but does it?) These days, the girl's face seems to be the only thing you look at to avoid looking her body exposure especially during conversation. And again, I ask myself, how do I marry someone of my choice is if I don't get to look at her couple of times? I think I read somewhere that "marrying a beautiful lady is part of choosing a wife religiously". Just quote me wrong only if you know better. The truth is, as a guy/girl, there's a significant part of consideration,if not the first, on the beauty /handsomeness of a girl/boy when we opt for marriage, This may be overpowered by morals, brilliance of the girl/guy. Is AVOID not too big of a word to use? Moreover, I am guy, a bachelor, I do have lustful desires not because of looking at a girl, it also happens when you even decide not to look at her. Acting on them should be the sin here. it's more like this idiom, "when you fail to learn, you learn to fail". Either way, you are LEARNING. So not looking at the opposite sex doesn't guarantee you not having lustful desires. Either way you will. Let's ask ourselves of the truth. We should only pray and thread carefully to avoid the sins behind it. 4. Avoiding joking and laughing as it is not part of etiquette and dignity.Not part of etiquette? Dignity? I will only agree if it's an expensive joke. A joke can ease sadness. It's normal. Don't tell me you and I doesn't like to smile or laugh. Medically and Religiously, we should smile, be happy. A joke can solve some problems... My point here, AVOIDING is too big of a word to use here... 6. Not going to extremes in embellishing one’s speech.Movements of the hand, face or poetry, proverbs are ways to express your opinions. Quoting a scripture is also a way of expressing the word of God for someone to understand better.. Please, aren't you reasoning with me that we take this too far? The context of use is what we should preach against! Online interactionsLike I said, Smiley, emoji can be a way of expressing one self. Have I committed a son using this or . Ask yourself, what do you think those Smiley were? 'laughing' and 'question'... isn't it? Answer me please because it's confusing me that someone could advocate to avoid it when it's not an actor committing a sin. Is there something I am not thinking about here? come forth with an open mind, reader. ...These concepts are specific to other religions and using them would be imitatingIs that the reason why we shouldn't use them? If that is, I am sorry that it is not a good reason from my perspective and I think someone else's too. I once argued about having 'Obama style haircut' with a friend from the opposite religion. He was saying it is not morally right to have such cut because it does not portray you as a good 'so so so' religion. Is that true? Maybe. What about 'gallas hairstyle'? Probably bad from a tradition perspective as well. I won't advocate for that but I won't preach against it because it can be the hairstyle of anybody. good / rugged/bad/evil/i-dont-care people. What if those set of people start having 'low cut'. Will you say low cut is a bad hairstyle as well? Please answer me! Because the 'bad' people are doing 'this' doesn't mean 'this' is bad and the good people shouldn't do 'this' anymore. Let's preach for the correct usage not avoidance. If we keep on avoiding harmless or sinless things because they are used by 'bad' people, am sorry, it will get to a stage that there will be nothing to avoid! nothing to preach against. It is more like avoiding people of the opposite religion because you think they are people of hellfire. How will you help them if not by getting close to them? I believe that RELIGION is too big of a concept to express as Black / White, Yes / No, Good / Bad. God guide us all. |
Hey guys, I'm an IBM certified data analyst. I'v worked with Hadoop, hive, bigsql, pig, jaql... And that was with the virtual servers they provided for us while studying. Ever since then, I haven't worked on those languages because of the environment. I taught IBM will be recruiting us after the exam, I did pretty well as far as my own school is concerned, 2nd best actually with 80% to 81% (of the first ). I did had some interviews with IBM HR department while I was serving from UAE, Nigeria, and Egypt... But my NYSC certificate delayed me (or I taught). Anyways, I was told by my handler that the cert is required and I should forward it when available. I guess when it was available, the position wasn't available any longer. still waiting, still hoping, though. Recently, with my leisure time, I use python for data science. I fell in love with data science when it was introduced to us a year ago. I just wish there are places around to exercise these disciplines. I do enjoy it probably because I studied mathematics. |
na you know oo.