₦airaland Forum

Welcome, Guest: RegisterLoginWith GoogleTrendingRecentNew

Stats: 3,325,001 members, 8,419,875 topics. Date: Thursday, 04 June 2026 at 05:54 AM

Toggle theme

Sleepingdemon's Posts

Nairaland ForumSleepingdemon's ProfileSleepingdemon's Posts

1 2 3 4 5 6 (of 6 pages)

ProgrammingRe: .NET Is A Dead & Useless Language - .NET programmers come and defend yourselves by sleepingdemon: 10:01pm On Jul 16, 2016
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?
ProgrammingRe: .NET Is A Dead & Useless Language - .NET programmers come and defend yourselves by sleepingdemon:
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()

ProgrammingRe: I Can Code In 75 Languages!!! by sleepingdemon: 8:24pm On Jul 14, 2016
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.
ProgrammingRe: Why PHP Should Not Be Your Primary Language by sleepingdemon: 6:01pm On Jul 13, 2016
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
Tech JobsRe: Mobile/web Developer (immediate Hire) by sleepingdemon: 12:40pm On Jul 13, 2016
ehen, i for send cv, but cv don fade off, na only account number dey show
ProgrammingRe: Why PHP Should Not Be Your Primary Language by sleepingdemon: 12:57am On Jul 13, 2016
danidee10:
Most of those benchmarks are bias....if you throw in some numpy or cython and 'cheat' grin. Python will smoke php in speed

Not hating on php though....but as a language python has a wider domain.

Php machine learninghuh.....Nope smiley
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
ProgrammingRe: #K-CON16: Kongapay Hosts Developer Conference At Cchub by sleepingdemon: 6:07pm On Jul 11, 2016
dhtml18:
Arrant nonsense
of all things ill want to integrate into a standard web app, kongapay? trully arrant nonsense
ProgrammingRe: Submitting PHP Form And Receiving Instant Response Asynchronously Using Ajax by sleepingdemon: 11:45pm On Jul 10, 2016
Laolballs:
Men, with jquery you hlcan reduce the line of code to letsay 8 or leass, i mean jquery ajax is far way better than this, it handles all the browser compatibility issues for ya... Lets embrace technology, let use libraries, it makes live easy and gets the job done faster, i would suggest doing this with jquery, it helps beginners build something meanigul in the shortest possible time, and hey the new html5 server sent event , is as cool as websocket, and not as painful to implement as websocket.......
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
ProgrammingRe: PYTHON: Please If You've Used The Python Sqlite3 Module Successfully, Help Me by sleepingdemon: 10:20pm On Jul 09, 2016
logicalhumour:
Umm.. I think I have thesame problem with OP. now with test.db how do you store maybe a name and password there?
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
ProgrammingRe: PYTHON: Please If You've Used The Python Sqlite3 Module Successfully, Help Me by sleepingdemon: 1:11pm On Jul 09, 2016
badthinds:
I hav'nt considered sqlite, but now I think I will be needing it for some of my android apps. There is this our family computer (windows xp ) with python 3.3.3 running on it.

I import sqlite3, and try to create a simple database but not working... so please if you've ever created any successfully drop the code here. In otherwords, drop a working code for creating a simple database with the sqlite3 module.

Thanks.
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')
ProgrammingRe: Perl, Python, Ruby, PHP, Which Is The Best For Web Design And Development? by sleepingdemon: 1:50pm On Jul 08, 2016
virus05:
nairaland na pure php. wetin dey here wey php no fit do
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
ProgrammingRe: Perl, Python, Ruby, PHP, Which Is The Best For Web Design And Development? by sleepingdemon: 11:53pm On Jul 07, 2016
Seun:
PHP is the easiest to get started with, but on the long run Python could serve you better in some cases.
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
ProgrammingRe: Programmers Needed For A Major Telecom Project by sleepingdemon: 12:44pm On Jul 06, 2016
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.
ProgrammingRe: What PHP Framework Do You Consider As The Best by sleepingdemon: 10:10am On Jul 02, 2016
dhtml18:
This your question is tough, I shall leave it for the other e-trolls to answer.
lool, even the people in charge of php zend, wouldnt advice you to ditch a framework and code from scratch
ProgrammingRe: What PHP Framework Do You Consider As The Best by sleepingdemon: 8:46am On Jul 02, 2016
jidez007:
The arguments are unfair because you made a framework like Laravel and gave someone who was already used to Laravel. Well that wasn't fair to the person too. Even Laravel doesn't try to recreate the wheel that much. It was built on Symphony and it tries to use other open source packages as well. So there was no way you could have made a cmf that would par with Laravel.

Chai, I hate arguments, I don't want to reply any longer.
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
ProgrammingRe: What PHP Framework Do You Consider As The Best by sleepingdemon: 7:18am On Jul 02, 2016
Jregz:
THe question is why would you use 5.2 or any other unsupported version.. http://php.net/supported-versions.php . Even 5.5 would die in the next few days
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.
ProgrammingRe: What PHP Framework Do You Consider As The Best by sleepingdemon: 12:17pm On Jul 01, 2016
dhtml18:
I dont quite understand please? API for what specifically?
to authenticate users. so we wont need to go the jidez way to do it.
and probably draw user questions and thier answers.
ProgrammingRe: What PHP Framework Do You Consider As The Best by sleepingdemon: 11:52am On Jul 01, 2016
we hope to get api so we can create chrome plugins and Firefox plugins to extend the functionality.
ProgrammingRe: What Antivirus Do You Use? by sleepingdemon: 10:32am On Jul 01, 2016
on my ubuntu 16.04 lts, i say no to antivirus.
ProgrammingRe: What PHP Framework Do You Consider As The Best by sleepingdemon: 10:18am On Jul 01, 2016
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.
ProgrammingRe: What PHP Framework Do You Consider As The Best by sleepingdemon: 8:27am On Jul 01, 2016
dhtml18:
^^^^I shall do my upgrade with codigniter. The current Nairaland is built on my own personal framework which is very much like codigniter - it is faster for me to use codigniter for this upgrade.
If i were doing a new project all together, I might have considered python flask or even laravel.
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
ProgrammingRe: What's Your Favourite Text Editor? by sleepingdemon: 7:27am On Jul 01, 2016
KazukiIto:
What's Aptana Mr Troll?
ill just agree ure not a php developer
ProgrammingRe: What's Your Favourite Text Editor? by sleepingdemon: 7:26am On Jul 01, 2016
dhtml18:
Aptana studio (Abi no be text editor)?
hahaha, that aptana wey heavy pass 7 editors join together
ProgrammingRe: Urgent! Software Developer/server Expert by sleepingdemon: 7:01am On Jul 01, 2016
im guessing he needs a 2 in one combo of server admin + software developer.
ProgrammingRe: What PHP Framework Do You Consider As The Best by sleepingdemon: 6:33am On Jul 01, 2016
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.
ProgrammingRe: See The Javascript Code That Is Turning My Brain by sleepingdemon: 3:55pm On Jun 26, 2016
lillylove2:
Tnx. If I do it this way, it would truly alert the id. But I would like to put the id inside a Variable. How do I do that.

Tanx
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
ProgrammingRe: Meet Nairachat - Nigeria's New Phenomenon by sleepingdemon: 11:22pm On Jun 24, 2016
jidez007:
@sleepingdemon your code is not complete. it's not as if nairaland will return a different status code when you enter an incorrect password.
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
ProgrammingRe: Meet Nairachat - Nigeria's New Phenomenon by sleepingdemon: 9:20pm On Jun 24, 2016
dhtml18:
O yeah, oya bring on the code now? Too much talks on this technical matter, just write a simple code - you dont need mouth to say it.
You know me i use to say - talk is cheap.
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"wink;
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);
ProgrammingRe: Meet Nairachat - Nigeria's New Phenomenon by sleepingdemon: 6:28pm On Jun 24, 2016
dhtml18:
Ehm, ehm, anwering that question will get me banned permanently. Just let the past be past, I dont want any wahala again, especially as I have my own platform to promote.
im guessing he used curl and used status code to verify if it was a succesful login
Tech JobsRe: Developers And Designers Needed by sleepingdemon: 3:05pm On Jun 17, 2016
dhtml18:
Hahaha, google suppose pay more than that now. . . .that dude was just trollin' jare
lool, abeg i was not trolling jare, in case someone is willing to offer, before yin say i be troll
Tech JobsRe: Developers And Designers Needed by sleepingdemon: 1:06pm On Jun 17, 2016
The poster above me does not understand that tomorrow morning dollar can be N10,000 for 1 dollar
Tech JobsRe: Developers And Designers Needed by sleepingdemon: 12:22pm On Jun 17, 2016
if the basic salary is in the range of 400k per month, i might be intrested

1 2 3 4 5 6 (of 6 pages)