Thursday, 3 October 2013

Basecamp Email Attachment Not Working Properly

Basecamp Email Attachment Not Working Properly

It's quite hard to explain but I have a support form that allows users to
submit a request and attach a file, the request gets sent straight to
Basecamp, as well as sending various confirmation emails to my team, here
we can view all details the user submitted in the form as well as download
the attachements. However, on Basecamp it shows the file attachment in the
heading/title but does not let you download it:
Code:
$subject3 = "Todo list: WRS ID: $theData - $subject - $country - $name -
$now - file: $fileatt_name";
$subject5 = "Files";
Output:
WRS ID: 1361 - minor change on category page - UK - Karina M - Wednesday
October 02nd, 2013, 12:37 pm - file: matress_category_sept_2013.docx
Although it does upload it in Basecamp as a seperate task, where you can
download the attachment? Is there something im missing from my code above
to allow the attachment to be downloaded from here also?

Wednesday, 2 October 2013

need to convert char to cell array

need to convert char to cell array

Hi I have the following object in matlab:
class(data{1}) =
char
which is stored in
class(data) =
cell
however I am trying to call:
[estt,este] = hmmtrain(data{1},e,t);
and get an error:
??? Error using ==> hmmtrain at 209
Seqs must be cell array or numerical array.
Is there a way to make each element of data compatible with the hmmtrain
function?
thanks very much

C# Parse through XML

C# Parse through XML

I've been reading through many tutorials and examples, but I'm lost. I
have an XML file with this type of data:
<?xml version="1.0"?>
<properties>
<property>
<name>Client Property A</name>
<phone>Client Property A Phone Number</phone>
</property>
<property>
<name>Client Property B</name>
<phone>Client Property B Phone Number</phone>
</property>
<property>
<name>Client Property C</name>
<phone>Client Property C Phone Number</phone>
</property>
</properties>
I'm trying to parse through this data in C# but having no luck at all. I
have this:
XmlTextReader xmldata = new XmlTextReader("http://url.to/xml");
XmlNodeList xmllist = doc.GetElementsByTagName("property");
processList( xmllist );
public void processList(XmlNodeList xmllist)
{
// Loop through each property node and list the information
foreach (XmlNode node in xmllist)
{
XmlElement nodeElement = (XmlElement)node;
txtBox.AppendText(nodeElement.GetElementsByTagName("name")[0].InnerText);
txtBox.AppendText(nodeElement.GetElementsByTagName("phone")[0].InnerText);
}
}
But nothing gets output in to my text box. :(

How to change python launch command in PyCharm

How to change python launch command in PyCharm

If I directly run start.py, I get:
Symbol not found: _OCIAttrGet
Referenced from: /Library/Python/2.7/site-packages/cx_Oracle.so
After some googling, I found that its because Oracle client arch issues. I
now run my script like this and it works:
arch -i386 python2.7 start.py
Now with a free edition of PyCharm available (thank you JetBrains), I
imported my projects but how do I set the "Run Configuration" to launch my
script the way I do it from terminal.
I tried:
Run -> Edit Configuration -> Python Interpreter but it is already
populated with the known python paths
Run -> Edit Configuration -> Interpreter Options but throws an error
saying unknown file "arch"
Any workarounds?

Tuesday, 1 October 2013

Having problems with webbrowser control in visual studio 2010

Having problems with webbrowser control in visual studio 2010

I have been trying to write a program (instead of a script) for
www.gifthulk.com mostly for data collection. The only problem i run into
with the program is that the web browser control wont load the log-in page
for the user so that i can have them sign in using the program.
The reason why i don't want to do this in a script is that i can't save
the data to a local file or connect to a custom built tcp server that
would store the data for me. The script would have to be a Grease-monkey
user-script, i don't know how to implement any other kind.
If there is a way to either fix the loading log-in popup page problem or
let a script connect remotely to my computers custom server and send data
the help would be very much appreciated.

Video Tag of HTML5 (default image)

Video Tag of HTML5 (default image)

I am using video tag of HTML5
(http://www.w3schools.com/html/tryit.asp?filename=tryhtml5_video_all). But
before playing the video it shows the very first second of the video as
the image; however, that image is solid black for my case; so I would like
to know if I can have the default image (before hitting the play button)
from somewhere of the middle of the video?
I hope my question is clear, if it is not clear please ask me what part is
ambiguous and I will provide more clarification
Appreciate it in advance.

Apache - Return 404 for all execept selected

Apache - Return 404 for all execept selected

I am seeking for method to prevent access to Wordpress admin folder
"wp-admin", but also i need apache to generate 404 error (Not found) for
all, but not selected IPs. I found this post Returning 404 code for
unauthorized attempts and tried Rewrite solution, but does not work for
me.
So i keeping all websites in /usr/local/www/apache22/data and tried to use
such config in httpd.conf (Apache2.2 FreeBSD 9.1)
<Directory "/usr/local/www/apache22/data>
RewriteEngine on
RewriteCond %{REMOTE_ADDR} !=77.120.9.3 [OR]
RewriteCond %{REMOTE_ADDR} !=77.120.9.5
RewriteRule ^wp-admin($|/) - [L,R=404]
</Directory>
For example, location of wp-admin for website is:
/usr/local/www/apache22/data/doman.com/wp-admin