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

Mint 15 Stopped connecting to new wireless networks [on hold]

Mint 15 Stopped connecting to new wireless networks [on hold]

I know this is Ubuntu forums, but I'm not receiving any answers from the
Mint community... I am a fresh migrant from Ubuntu 12.04 to Mint 15, and I
am having a wifi problem. I have two saved networks that I connected to
within the first couple of days of having mint, but upon trying to connect
to new networks in the following days, I'm having problems. In the network
manager screen, I can click on a network all day, but it never brings up
the password prompt or anything. On the network I'm on right now, I can go
to details, then when I click settings it says "error initializing editor:
insufficient privileges." This tells me I probably chmod'd something along
the way that no longer allows me to edit my wireless networks. I have
internet on the two that are saved, and I can connect to wired networks no
problem. I'm at a loss here and have found no similar problems on google.
Here is the output of mintwifi:
[code]* I. scanning WIFI PCI devices...
-- Atheros Communications Inc. AR928X Wireless Network Adapter
(PCI-Express) (rev 01)
==> PCI ID = 168c:002a (rev 01)
-------------------------
* II. querying ndiswrapper...
-------------------------
* III. querying iwconfig...
eth0 no wireless extensions.
lo no wireless extensions.
wlan0 IEEE 802.11abgn ESSID:"java"
Mode:Managed Frequency:2.437 GHz Access Point: 00:18:39:4A:2A:54
Bit Rate=54 Mb/s Tx-Power=16 dBm
Retry long limit:7 RTS thr:off Fragment thr:off
Power Management:on
Link Quality=70/70 Signal level=-35 dBm
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:4 Invalid misc:283 Missed beacon:0
-------------------------
* IV. querying ifconfig...
eth0 Link encap:Ethernet HWaddr c8:0a:a9:84:af:71
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:1210 errors:0 dropped:0 overruns:0 frame:0
TX packets:1210 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:253047 (253.0 KB) TX bytes:253047 (253.0 KB)
wlan0 Link encap:Ethernet HWaddr 70:f1:a1:7f:92:85
inet addr:192.168.1.107 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::72f1:a1ff:fe7f:9285/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:13482 errors:0 dropped:0 overruns:0 frame:0
TX packets:12584 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:12190123 (12.1 MB) TX bytes:2188578 (2.1 MB)
-------------------------
* V. querying DHCP...
[sudo] password for hollis:
Rather than invoking init scripts through /etc/init.d, use the service(8)
utility, e.g. service smbd reload
/etc/init.d/smbd: 58: /etc/init.d/smbd: awk: not found
Since the script you are attempting to invoke has been converted to an
Upstart job, you may also use the reload(8) utility, e.g. reload smbd
RTNETLINK answers: File exists
-------------------------
* VI. querying nslookup google.com...
Server: 138.47.18.130
Address: 138.47.18.130#53
Non-authoritative answer:
Name: google.com
Address: 173.227.93.123
Name: google.com
Address: 173.227.93.84
Name: google.com
Address: 173.227.93.88
Name: google.com
Address: 173.227.93.89
Name: google.com
Address: 173.227.93.93
Name: google.com
Address: 173.227.93.94
Name: google.com
Address: 173.227.93.98
Name: google.com
Address: 173.227.93.99
Name: google.com
Address: 173.227.93.103
Name: google.com
Address: 173.227.93.104
Name: google.com
Address: 173.227.93.108
Name: google.com
Address: 173.227.93.109
Name: google.com
Address: 173.227.93.113
Name: google.com
Address: 173.227.93.114
Name: google.com
Address: 173.227.93.118
Name: google.com
Address: 173.227.93.119[/code]
I don't know if that does any good since I'm connected to java, but it's
there. Thanks for any help!