Sleepingdemon's Posts
Nairaland Forum › Sleepingdemon's Profile › Sleepingdemon's Posts
even if we use pythread, it wont complete as fast as it did in python using 5 seconds. This was why i shifted my base to python for this solution. and to think .net used a min plus, what else was that processor doing? |
about the c# code, this is its equivalent in python (i guess) and its runtime is attached below: import locale locale.setlocale(locale.LC_ALL, '') from datetime import datetime from joblib import * class Test(object): def Main(): with Parallel(n_jobs=2) as parallel: nums = range(0,1000000) total = 0 x = 0 startTime = datetime.now() for one in nums: total += one x=x+1 print x print("The total from Parallel.ForEach is "+ str(locale.format("%d", total, grouping=True))) print("Time taken = "+str(datetime.now() - startTime)) Main() test = Test()
|
looking at larosift's comment, im sure 90% of programmers including me that i claimed to have ported from c# cant write windows form from scratch with notepad... That said, i wholehaterdly support your comment for the first time publicly. about that, yes some of us are bad with gui/html interfaces, it never looks fine without the input of a front end designer. talking about knowing 75 or 100 languages, leave all those jokers alone, they are the real trolls. but like dhtml18 said, the key is being productive with whatsoever language you are using. a very productive person in vb.net beats someone who claims to write c and has not even a calculator to boast of. although i understand some of us cannot boast of most of this projects we do as they are for organizations/clients who do want it disclosed. anyone who honestly writes more than 4 languages in his cv as expert is honestly joking. |
intrestingly, im one of those ppl who ditched c# and vb.net to follow the unix like languages like php, python, node.js microsoft languages at the end of the day are a fatal bunch of lies that these people make u believe are actually better, but alas, its worse. ask all these .net developers, they know it, but wont concur |
ehen, i for send cv, but cv don fade off, na only account number dey show |
danidee10:haba, that one is cheat with seriodz now, for ordinary webapp youre using cython to convert to c, even facebook with thier hack stopped at c++, are you building the worlds webapp that youve decided to carry cython + numpy for webapp |
dhtml18:of all things ill want to integrate into a standard web app, kongapay? trully arrant nonsense |
Laolballs:if yiu understand server sent events well, you should know that unlike websockets, headers are sent alongside the events. also, server sent events are not exactly exactly real time, as they would need to sleep while indirectly polling your database, collect the reply and deliver to your web page, but looking at the nature of websockets, expecially those done with node.js or tornado (python) because of its asynchronous nature, even if you are inserting to database immediately the message is passed through the socket, your reply is gotten instantly as it dosent wait for the request to complete before replying you with another thread. i hope you understand |
logicalhumour:to store a username or password, you would have to first of all create a database table inside the test.db with coloums username and password using the create table if not exist command as you would do in normal mysql |
badthinds:i dont see why there should be a problem comnecting python with sqlite, although i havnt tried it in python 3, im sure of 2.7. however, you cannot just ask to be helped without showing the code you have actually tried, while we go through it and tell you your errors . however, the normal syntax should be #!/usr/bin/python import sqlite3 conn = sqlite3.connect('test.db') |
virus05:nairaland used to run on php... smf (simple machine forums) to be specific, but it has since been rewritten with python and currently runs on python |
Seun:well, in the real sense of it, none of this language is better than the other on web development. while php is easy and most recommended for web apps due to avalabilty of hosting service, python is however going to serve you better when your application would need to do lots of mathematical operations and data science alogrithm. also looking at the fact that learning python gives you an upper hand as u can delve from software development to web development and even recently to mobile development (andriod), it is relatively simpler to learn than php in the real sense. note: i am a core php developer (codeigniter to be precise), but i just feel python is a better option asides hosting. and you won't get many script kiddies trying to mess with your site by uploading php codes as images |
ermm, i passed all the requirements and add extra sef, but before i send cv, can one work remotely? i.e i wont need to be in your office to work. |
dhtml18:lool, even the people in charge of php zend, wouldnt advice you to ditch a framework and code from scratch |
jidez007:i never made a framework like laravel. this is why i made emphasis that my post should be re-read. i made mention of creating a framework that follows codeigniter routing system, uses namespaces, composer's autoloader and pdo as the default database driver, and the person complained of the routing system not being like that of laravel. i really dont know if you dint read my post at all or ure just trying to be mischievous. Anyway, its of no point explaining myself to you, each man to his own thoughts. cheers |
Jregz:i never said i was using 5.2, everything i currently use php for is on 7.0, i was just making that refrence to its backward compability. i hope you understand my point here. if u read my post well, i wasnt arguing within any of the frameworks, i was only saying the arguments between the frameworks have been unfair. Cheers. |
dhtml18:to authenticate users. so we wont need to go the jidez way to do it. and probably draw user questions and thier answers. |
we hope to get api so we can create chrome plugins and Firefox plugins to extend the functionality. |
on my ubuntu 16.04 lts, i say no to antivirus. |
kindly check this link below, see a list of large extensions you can pick from once you go down. github.com/codeigniter-id/awesome-codeigniter in addition, ill recommend phill sturgeons api library for api, so we can directly extends applications based on Nairaland. |
dhtml18:No problem, if you do need help with codeigniter at any point, feel free to contact me. im one of those people who love codeigniter more than php itself |
KazukiIto:ill just agree ure not a php developer |
dhtml18:hahaha, that aptana wey heavy pass 7 editors join together |
im guessing he needs a 2 in one combo of server admin + software developer. |
well if you ask me, ill say go with codeigniter. reason being that its very flexible, and learning curve is as simple as just know the basis of oop. intresting people who i have enganged in why they prefer laravel to codeigniter would say because it dosent use namespaces features and so on. but then its about the only framework that works on php 5.2 till 7.0 without throwing one single error. i made a go to create a framework just like codeigniter, then used namespaces, composer's autoloader and pdo instead of default mysqli for database driver and then the same person who complained of codeigniter not using namespaces and all said the routing method isnt like laravel. so in all of this i would conclude that the battle between codeigniter and laravel is unfair and based on opinion of what other people have said on the net and not necessarily based on individual experiences. back to your question. how about using python flask for your upgrade. |
lillylove2:what u hate to do is simple in your onclick function, you would do onclick=getID(this.id) them in your script its like this function grtID(myid){ } the variable myid automatically holds the value of the id passed in the onclick function |
jidez007:true. just tried it and the status codr is always 302. so i guess at this point. instead of checking status code, ill just check for incorrect username or pass string in the result like jidez did |
dhtml18:something like thos, although im yet to test it <?php $username="nairaland"; $password="mypassword"; $url="https://www.nairaland.com/do_login"; $cookie="cookie.txt"; $postdata = "name=".$username."&password=".$password; $ch = curl_init(); curl_setopt ($ch, CURLOPT_URL, $url); curl_setopt ($ch, CURLOPT_SSL_VERIFYPEER, FALSE); curl_setopt ($ch, CURLOPT_USERAGENT, "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:47.0) Gecko/20100101 Firefox/47.0" ; curl_setopt ($ch, CURLOPT_TIMEOUT, 60); curl_setopt ($ch, CURLOPT_FOLLOWLOCATION, 0); curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt ($ch, CURLOPT_COOKIEJAR, $cookie); curl_setopt ($ch, CURLOPT_REFERER, $url); curl_setopt ($ch, CURLOPT_POSTFIELDS, $postdata); curl_setopt ($ch, CURLOPT_POST, 1); curl_exec ($ch); $http_status_code = curl_getinfo($ch, CURLINFO_HTTP_CODE); if($http_status_code == 200){ echo "login succesfull"; }else{ echo "login failed"; } curl_close($ch); |
dhtml18:im guessing he used curl and used status code to verify if it was a succesful login |
dhtml18:lool, abeg i was not trolling jare, in case someone is willing to offer, before yin say i be troll |
The poster above me does not understand that tomorrow morning dollar can be N10,000 for 1 dollar |
if the basic salary is in the range of 400k per month, i might be intrested |
. Python will smoke php in speed
.....Nope 
;