Quantcast
Browsing all 31 articles
Browse latest View live

Comment by luke on How can I optimise this C++?

When compiling under g++ -O3 this actually seems to be slower when running time ./reverse < in > /dev/null as it takes about 4.5 seconds.

View Article


Comment by luke on how to redirect with apache

does this work RedirectMatch /issues/([0-9]+) /dashboard/issues/$1

View Article


Comment by luke on How can I optimise this C++?

When attempting to compile your code I get: ` error: ‘ss’ was not declared in this scope.

View Article

Comment by luke on Python reading unicode file names

This seems to work fine in python for me. However i am running linux. This may be platform dependant (e.g. only affect windows). So i apologize as i can not help with this. However I would recommend...

View Article

Comment by luke on How can I optimise this C++?

WOW! 1.2 seconds. That's fast! I was unaware of std::strtok, but it certainly performs well for this. Thanks. Also, I thought my C++ and Python code did the same thing how exactly do they differ?

View Article


Comment by luke on Use php to post blogpost

Have you already written any PHP for the blog or is this totally from scratch (except for the static content) ?

View Article

Comment by luke on How to access remote Object

TestAgentData eded = new TestAgentData().getTad();

View Article

Comment by luke on Dump All Python Interpreter Errors into a Log?

Sorry, I thought as they were two different solutions they should be two different answers.

View Article


Comment by luke on Retrieving a string using REGEX in Python 2.7.2

@Floris yes this regex accepts all links, even ones with URL encoded queries, given their protocol is either http or https.

View Article


Comment by luke on Reading space delimited file in Python/Pandas with missing...

You say there is uneven spacing between columns but is there not always more space between values when one is missing then when one is not.

View Article

Comment by luke on "Free heap block modified after it was freed" when...

I know this is late but I would just like to add in case of any future viewers that snprintf is c99 and sprintf is specified in c90. Due to portability I was required to use c89 and hence did not use...

View Article

Comment by luke on Launching flask server from __main__.py

But if I add the parent dir to sys.path in __main__.py it works. Surely meaning it's not a circular import issue

View Article

Comment by luke on Haskell abbreviating multiple parameters to a single variable

That's what I was thinking. I didn't make the design decision for f but have to work with it. Was just hoping there was a way to select all the arguments like in other languages or formulate a function...

View Article


Comment by luke on How to emulate a do-while loop?

A better solution would be: do = True; while do: ; something(); if (do := condition()): complain();

View Article

php function returning 0?

ok, so i am creating a php login system and wanted a simple way to get the link to the logout page by calling a function but it keeps returning 0. He's my function:function logout_link()...

View Article


stop php adding new line

i am trying to add the posts from my word press blog to a javascript array however it keeps adding a new line and causing errors in the javascript. here is the code<?php $num = 0 ;...

View Article

include unused full function or many includes

I am in the process of creating a PHP authorization framework which aims to be simple yet fast. My problem is being simple I hope to only have one include needed to use it , however when only having...

View Article


Answer by luke for Should we be using (HTML5) rel attributes within site...

Good Question ! To be honest i'm no expert with the rel attribute (so someone correct me if i'm wrong) but from what i can find Google can verify an identity on a web page via the attribute. Such...

View Article

Answer by luke for How can I add the facebook like button inside my...

This may work

View Article

Answer by luke for Why doesn't stopping animations and then starting a new...

I had this problem earlier today but with fadeTo not fadeIn. I just used this code$(news_controls).hover(function(){ $(this).stop().fadeTo("fast", 1);},function(){ $(this).stop().fadeTo("slow",...

View Article
Browsing all 31 articles
Browse latest View live