Foldl's Posts
Nairaland Forum › Foldl's Profile › Foldl's Posts
1 2 (of 2 pages)
ladiguy:C# is a powerful language in it's right but basing your choice on Microsoft alone is not wise. Behemoth corporations do fall and smaller startups rise to take their place every now and then. You might be surprised to find that Microsoft isn't as popular as you think, especially as a deployment platform. More enterprise services, cloud platforms and applications are built and hosted on open source technologies than on windows. |
DonSegmond:@DonSegmond I didn't say a chroot jail is the same as a container. The word I used was 'similar'. This is in the sense that both essentially create an isolated environment. With respect to networking I daresay a chroot can provide networking separate from the host OS. Basically, a chroot is how Linux OSes are installed. If you have installed Arch Linux for example, you'll see that after booting from the installation media and setting up your disk partitions you mount your partitions and create a chroot in the mount point of the root partition using the arch-root command. While in the chroot you can install and configure your system as you like. Rebooting without the installation media boots you into the newly installed system. I am not in anyway claiming to be an expert on this subject but what I've written above is how I understood the process after several runs with Arch installation. PS: - The odoo instance I mentioned was for production though it was internal. - Give me a shinny new PC with any OS and if it ain't already on Linux it'll be in less than an hour! I've been using Linux for a decade, I can't bear to use anything else. |
DonSegmond:+1 for Postgres. I recently discovered you can't even create an index on a mysql VARCHAR/CHAR column if the length of the column is longer than 200 characters. Full text search in mysql is also not nearly as advanced as in Postgres. Your applications can also natively query data stored in other databases (eg oracle, mysql, mssql etc) through Postgres as if the data was stored in Postgres using Postgres' foreign data wrapper feature. Mysql/mariadb is no way near Postgres in features and performance. |
Use docker. I once deployed an odoo instance using docker containers. They are also useful for isolating development environments without bloating your system. Sadly, there isn't much advantage in using docker if you're on Windows. You'd be better off with Vagrant in that case. Docker containers are light because they reuse the kernel of the host OS and since you can't reuse the Windows kernel for a Linux container you'd have to use virtualization (virtualbox, VMware etc). Containers are very similar to creating a chroot jail. |
Umu101:I can't take it (Add meme here)! You are friggin hilarious! |
Umu101:Guy dey way you dey mek me scatter laugh if I bust my bele I go invoke Amadioha for your head oO! |
nicolas247:Because they can't read your code! Always use tools like hastebin.com or github gists when you want to share snippets of code. I don't want to strain my eyes reading through lengthy code without the benefit of proper syntax highlighting just because I want to be helpful. |
logicalhumour:Depending on your server configuration (Apache, NginX, lighttpd, iis) only files in your webroot or the document root specified in you virtual host configuration are served on port 80 (or any port that your web server has been configured to use). If your site's config file is located outside those locations it can still be accessed (ie required or included) by your php scripts. |
@logicalhumour I suspect you're trolling but I'll answer your question in the off chance that you're not. That is how you create a user in mysql but not quite in the same sense as creating a user account for users on your site. Creating a user in this manner is similar to creating a Windows user (I.e. the type you use to login to your laptop after booting) for every user of your site. So, in reality you only need just one (or a couple for things like replication, backup etc) such mysql user. Your website will then use this one mysql user to connect to the mysql server. In addition to having this mysql user you must create a database in mysql and explicitly grant access to that database to this user. Within this database you also must create a table in which the actual login credentials of users of your site will be stored. To recap, use the mysql user account to connect to a specific database on your mysql server. When connected create a record in a table with username and password for your site's user. PS: For one who claims to have 'years as a programmer' and given your username it is hard to believe that you're not just trolling with this question. However, am glad to be punked. |
logicalhumour:1. Store your connection parameters as environment variables and read them in with the getenv function. 2. Store your connection parameters in a php file outside your server's webroot (not in www or any sub folder inside www), i.e. the file containing the parameters should not be accessible to anyone visiting your site in the browser. Require this file in the source file where you need to use the parameters. |
Please read about Python's DB API specification at https://www.python.org/dev/peps/pep-0249/ . It is a uniform API for all standards compliant database adapters for Python. |
pythonkid:C# is fast compared to python... Really? Do you have any data/benchmarks to back this up? I am not saying Python is faster but I am not accepting your claims without hard data either. I do know that C# programs are compiled into MSIL (Microsoft Intermediate Language) and then interpreted at runtime but so also is Python compiled to byte code and then interpreted. Secondly, C# runs just as well on Unix/Linux as it does on windows. Microsoft recently open sourced the core .NET framework on which C# is based which means you'll be using exactly the same libraries on other platforms. Even before that the mono runtime (now developed by Xamarin) provided an almost feature complete replacement for .NET. Thirdly, even C# requires frameworks for GUI development (WinForms, WPF). By far the best framework I have used for GUI development is QT which has excellent bindings for Python (PyQt, PySide). Other frameworks like Gtk, Tkinter, Wx can also be used with Python. If you need drag and drop you can always use QT Creator, Glade or Wx Builder. Which is easier? Depends on who is using it. Final words... Language X is better than language Y is usually a beginners argument and is wont to cause flame wars. When you've built software professionally for some time you get to a point when you don't care about which language is better but which one gets the job done in the most efficient and timely manner, most times it will be the language you're most competent in but not always. |
When in doubt try Python! |
KazukiIto:You have backslided bro. You must go to father Richard Stallman (St. IGNUcious) to confess your sins and perhaps receive a fresh baptism into the Church of Emacs. Anything other than that is blasphemy! |
KazukiIto:A well configured Emacs is actually the best IDE (I mean IDE not editor). The best thing is you can use it for any programming language without having to change your IDE or workflow. If you love to have the best IDE and you love Emacs then give your Emacs super powers by installing spacemacs (http://spacemacs.org). Remember to enable your preferred layers in ~/.spaceman's and thank me later. |
When you extend \yii\rest\ActiveController you do not need to render your result but return it directly. In your example change '$this->render($model);' to 'return $model;'. Also note that since you are using findOne it will return the first record in that table only. In general, you should return any value or object instead of rendering when using rest controllers. You don't need to serialize the data into json as that is done implicitly by the \yii\rest\ActiveController class. When in doubt read the source code! I built a production system with yii2 when it was still in beta. I even found and fixed a bug and sent a pull request which was merged. But I haven't written any code in months so I might be a bit rusty. ![]() |
CaptainECole:In that case the blame should rest squarely on the NUC for allowing them operate. No other agency of the government can decide the health of any university in Nigeria but NUC. If the NUC gives any institution a clean bill of health nobody has the power to say otherwise. Let p1 and p2 be two kinds of label (say Mimee and Indomie) of a particular product (eg noodles). Given that the actual product bearing those labels are made from the same factory line with more or less the same ingredients. Will you say the products bearing the label p1 are better than those bearing p2? Support your answer with some evidence. The professors that teach in public universities are the same that lecture in private ones. Even those other lecturers in private universities who are not professors are products of public universities. Unless you are telling me that people who receive education at public universities are not good teachers then you don't have a case. |
CaptainECole:One condition for accreditation of any department by the NUC is having at least two professors in the department. Also, the fact that it is the same NUC that accredits both private and public universities and bearing in mind that such accreditation is based on the same benchmarks it will not be correct to say that one is significantly better than the other. Moreover, most private universities are owned by big churches with quite deep pockets and can afford to attract world class academics with fat salaries and research grants. I am a product of the public university system and currently teach at a federal polytechnic so I am just posting this to correct some wrong assumptions rather than defend private universities. |
nubian999:OK, RIP to Prince! |
nubian999:Trust me those are also celebs in their own right. SPJ and Wadler are world renowned computer scientists and mathematicians. SPJ created the Haskell programming language in which Facebook's haxl library and project sigma are implemented. Both SPJ and Wadler have made significant contributions to math and computer science. The other two names are celebs in your sense of the word but just not in your radar. |
RIP to the legend! ... I be bad boy but I get loyalty, I no want hear story when marketer go pay me royalty... Naija's very own Lil Wayne. |
tommychow:Do you know Simon Peyton Jones or Philip Wadler? Do you even know Nicodemus Mbatsavtampu or Gbia Dyege? If you don't know any of these people without googling then you are just as ignorant as everyone else. In fact, even Google can't help you with the last two names! The so called village ignoramuses you are calling out will probably teach you a thing or two. People know more about events and people associated with their interests and as interests differ it is foolish to think less of people simply because they have different interests than you. You had exactly zero reason to call a whole swarth of people villagers and ignorant just because they don't know who some inconsequential fellow is. Inconsequential is used here not to belittle your Prince but to state that knowing who he is doesn't add any value to my life one way or another. |
lum1:This sounds very much like Machine Learning to me. |
Elose11:Am I the only one to notice that MTN proposes to pay a debt by making an investment of #80 billion for which it will fully receive a return of its capital with interest? By the way sovereign debt is another name for government bonds or treasury bills, which are by far the safest investment with guaranteed returns. What MTN is proposing can be compared to the following: I owe you 100 naira but decide I'll pay you only 40 naira. Out of the 40 I've decided to pay, you must agree to accept 10 naira worth of goods from me whether you need them or not. After that I'll pay you 18 naira in cash and then I'll use the remaining 12 naira to buy goods from you which I'll resell at a profit! This really means I've only paid you 28 naira out of the 100 while at the same time making great profit. But I got F9 in economics sha, so any clarification by the economists here will be appreciated. |
The question is not a very clear one. Your question is akin to asking for the similarities between a dog and an Alsatian. A dog is a category of animals while an Alsatian is a kind of dog, but we also have Rottweilers, spaniels etc. An algorithm is a finite set of instructions that, if followed, accomplishes a particular task (Ellis Horowitz et al, 2014). Algorithms being a set of instructions must necessarily be conveyed (or represented) in a way that is clearly understandable. One of the ways in which algorithms are expressed is by use of pseudocode. Algorithms can also be expressed using flowcharts, Gantt charts etc. So there is no similarity per se in algorithms and pseudocode. The relationship between the two is that one is a representation of the other. |
I can suggest two people that shouldn't be ministers in this administration. The first is that old man from Oyo who said he didn't want to speak ill of Boko Haram because he was scared for his life and the other one whose name rhymes with lie. That doesn't mean I don't believe that Buhari was the lesser evil and so the best choice in the last elections. |
Every abstraction in functional programming was a hit back to back, from type classes to monads, from higher kinded types to higher order functions, from lazy evaluation to currying, from applicative functors to Control.Monad.Cont, from MVars/TVars to STM (Software Transactional Memory). Iyalaya anybody FP ati take over, f^ck that shít! **drops mic Go Haskell or go home!!! ![]() |
aitoehigie:dis wan dis pikin jus dey tro amazon around like say im jus learn about am yesterday. Egbon Seun abeg no mind am na small pikin dey worry am. him never go live e dey yarn panya. Wetin original for e-payment wen interswitch, pay4me, remitta, netpostpay, gtpay etc full ground, mek I no mention stripe dem. No worry, sebi u think say na to write code dem dey tek create e-payment for naija, wen the cbn and other policy huddles hit u u go begin look for pesin wey you go dash the code sef. BTW, upon d mouth wey u dey mek I doubt say you fit mek wetin Seun dey mek for 1 month in adverts for 2 years. Seun code na cut and paste but e dey pay wella! |
aitoehigie:For one whose intent was not to start a flame war you sure picked a controversial title for your post. |
Have you read any interesting blog posts lately? What's that shiny new tool or framework you've fallen in love with and wished others knew just how awesome it is? Where is your favorite place to find news about your favorite language or platform? Please share it! Here are a couple to set the ball rolling: www.reddit.com/r/haskell www.andrewhfarmer.com/getting-started-tutorials/ PS: Keep it as strictly programming as possible. |
Hey devs, come share your GitHub/bitbucket URL! Mine is https://github.com/abrahamy?tab=repositories |
proxy20:+1 for parse.com, it makes it possible to build a mobile app without worrying about building the back end from scratch. A similar approach to parse.com would be to use CouchDB as your back end leveraging its restful interface and a tool like PouchDB for the client. However, this assumes that your mobile app will be written in JavaScript using something like react-native or ionic. If you wish to follow this approach you can setup free CouchDB instances on www.iriscouch.com |
1 2 (of 2 pages)
