Converting html to word doc with all the formatting
I have to read following html from this XML file in C#.
<?xml version="1.0" encoding="utf-8"?>
<?mso-infoPathSolution
name="urn:schemas-microsoft-com:office:infopath:TestCRForm:-myXSD-2013-01-09T15-23-27"
solutionVersion="1.0.0.285" productVersion="14.0.0.0" PIVersion="1.0.0.0"
href="http://win-rskupn6mf2b:2331/TestCRForm/Forms/template.xsn"?>
<?mso-application progid="InfoPath.Document"
versionProgid="InfoPath.Document.3"?>
<my:myFields xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:pc="http://schemas.microsoft.com/office/infopath/2007/PartnerControls"
xmlns:ma="http://schemas.microsoft.com/office/2009/metadata/properties/metaAttributes"
xmlns:d="http://schemas.microsoft.com/office/infopath/2009/WSSList/dataFields"
xmlns:q="http://schemas.microsoft.com/office/infopath/2009/WSSList/queryFields"
xmlns:dfs="http://schemas.microsoft.com/office/infopath/2003/dataFormSolution"
xmlns:dms="http://schemas.microsoft.com/office/2009/documentManagement/types"
xmlns:xhtml="http://www.w3.org/1999/xhtml"
xmlns:tns="http://microsoft.com/webservices/SharePointPortalServer/UserProfileService"
xmlns:s1="http://microsoft.com/wsdl/types/"
xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:my="http://schemas.microsoft.com/office/infopath/2003/myXSD/2013-01-09T15:23:27"
xmlns:xd="http://schemas.microsoft.com/office/infopath/2003"
xml:lang="en-US">
<my:VendorName>Vendor Name1</my:VendorName>
<my:Assignedto>Asigner</my:Assignedto>
<my:SOWNumber></my:SOWNumber>
<my:DraftStarted xsi:nil="true"></my:DraftStarted>
<my:DateComplete xsi:nil="true"></my:DateComplete>
<my:GLCode>Material No1</my:GLCode>
<my:LogID>2013-09-05T22:44:09</my:LogID>
<my:Status>New</my:Status>
<my:ProjectDescription>
<html xmlns="http://www.w3.org/1999/xhtml"
xml:space="preserve"><div><em>This is Project Deliverable
Info</em></div><div><span id="ms-rterangepaste-start"></span><span
id="ms-rterangepaste-end"></span><div><em>Whjoa</em></div><div><strong><em>Dude</em></strong></div></div></html>
</my:ProjectDescription>
</my:myFields>
After reading the html under "my:ProjectDescription" tag I have to put it
into a word document with all the formatting retained.
This html is fetched by following :
XmlNodeList nodelist3 =
xml.SelectNodes("my:myFields/my:ProjectDeliverables", nsm);
foreach (XmlNode node in nodelist3)
tc.key_deliverables = node.InnerXml;
tc.key_deliverables then contains the html as string.
Please suggest me how to proceed with this.
Thursday, 3 October 2013
Wednesday, 2 October 2013
IE10 caches page
IE10 caches page
I have a website that shows a preview of an image when the user add some
caption to it.
The flow is:
User see the /new page
It submits the caption (create), User is redirected to the /edit page (to
see the preview)
If there are changes it submits again (update), User is redirected to the
/edit page
When he is satisfied, he closes the page.
Everything works fine except in IE10, it creates the image with the
caption on the server, but it shows the old image when he is redirected to
/edit, even the inputs show the old text, after a F5 it shows the data
from the server.
So, I think it is caching the page. Chrome, Safari and Firefox work fine.
I'm working on Ruby on Rails.
Anyone knows a workfix?
I have a website that shows a preview of an image when the user add some
caption to it.
The flow is:
User see the /new page
It submits the caption (create), User is redirected to the /edit page (to
see the preview)
If there are changes it submits again (update), User is redirected to the
/edit page
When he is satisfied, he closes the page.
Everything works fine except in IE10, it creates the image with the
caption on the server, but it shows the old image when he is redirected to
/edit, even the inputs show the old text, after a F5 it shows the data
from the server.
So, I think it is caching the page. Chrome, Safari and Firefox work fine.
I'm working on Ruby on Rails.
Anyone knows a workfix?
Count matching accross two tables
Count matching accross two tables
I have two tables. The 'submissions' table holds details about the submission
The 'judging' table holds other details.
The judging table has a 'rel_id' field which links the two tables
together. (Holds the row ID number from the submissions table that it has
a relationship with).
In the judging table there are multiple rows with the same rel_id.
I want to count how many single rows there are in the judging table that
meets the criteria below, and only 1 of each rel_id.
This is as far as I have managed to get, but I can't get it working.
SELECT COUNT(*) AS count_result
FROM exp_judging AS jud
LEFT JOIN exp_submissions AS sub ON jud.rel_id = sub.id
WHERE jud.pre = 1
AND sub.member_group = $member_group
GROUP BY jud.rel_id
Any help would be great.
I have two tables. The 'submissions' table holds details about the submission
The 'judging' table holds other details.
The judging table has a 'rel_id' field which links the two tables
together. (Holds the row ID number from the submissions table that it has
a relationship with).
In the judging table there are multiple rows with the same rel_id.
I want to count how many single rows there are in the judging table that
meets the criteria below, and only 1 of each rel_id.
This is as far as I have managed to get, but I can't get it working.
SELECT COUNT(*) AS count_result
FROM exp_judging AS jud
LEFT JOIN exp_submissions AS sub ON jud.rel_id = sub.id
WHERE jud.pre = 1
AND sub.member_group = $member_group
GROUP BY jud.rel_id
Any help would be great.
How to change/mask ip address with Eclipse
How to change/mask ip address with Eclipse
this is a bit tricky as question, what I'm trying to do is basically
change my IP address inside my Eclipse application.
The reason is because I'm grabbing some content from web pages
automatically using jsoup and parsing links like a crawler, but some
website I crawl just block me after 3 request saying "you requested too
much specific pages for today, pay for more or wait 24h", so I change my
identity using TOR and I can grab (manually) 3 more pages.
I'm searching for something that will help me to grab those datas
automatically from a Java application. Now I'm using jsoup library but I
can use everything that let me just change my ip, for example using a
proxy or using VIDALIA/TOR api to get every 3 request a new identity as
application.
Do anyone have advices about this task? It's not very common but I think
it can help a lot of people.
PS: That's an idea, I think that IPV6 addresses are filtered as IPV4, so
as I can easly switch and request IPV6 addresses, probably I can solve
using IPV6, but I still don't know some library or some software that let
me use a proxy and change IP when I want inside my Java App.
Thanks a lot!
this is a bit tricky as question, what I'm trying to do is basically
change my IP address inside my Eclipse application.
The reason is because I'm grabbing some content from web pages
automatically using jsoup and parsing links like a crawler, but some
website I crawl just block me after 3 request saying "you requested too
much specific pages for today, pay for more or wait 24h", so I change my
identity using TOR and I can grab (manually) 3 more pages.
I'm searching for something that will help me to grab those datas
automatically from a Java application. Now I'm using jsoup library but I
can use everything that let me just change my ip, for example using a
proxy or using VIDALIA/TOR api to get every 3 request a new identity as
application.
Do anyone have advices about this task? It's not very common but I think
it can help a lot of people.
PS: That's an idea, I think that IPV6 addresses are filtered as IPV4, so
as I can easly switch and request IPV6 addresses, probably I can solve
using IPV6, but I still don't know some library or some software that let
me use a proxy and change IP when I want inside my Java App.
Thanks a lot!
Tuesday, 1 October 2013
Jquery Show and Hide Functions
Jquery Show and Hide Functions
I am trying to get this to work where when they select the search between
dates it will show the second date search field.
I know that the jquery is pulling in that value for the select menu bc I
can put an alert for it and when I click on the search between dates it
throws the alert at me, my only problem is getting it to show that hidden
input.
HTML:
<select name='filter' class='input-large' id="select_field">
<option value=''>Select One</option>
<option value='dateonly'>Search by Date Only</option>
<option value='search_between_dates'>Search Between Dates</option>
</select>
<input type='text' placeholder="Date">
<input type="text" placeholder="Date 2" id="date2_hiddden" class="hidden">
Javascript:
function getSelect() {
var selectValue = $("#select_field").val();
if(selectValue === 'search_between_dates') {
$("#date2_hidden").show(function() {
$("#date2_hidden");
})
} else {
$("#date2_hidden").hide();
}
}
$("#select_field").change(getSelect);
getSelect();
Neither of these work and putting the id instead of class for the second
still doesn't work.
function getSelect() {
var selectValue = $("#select_field").val();
if(selectValue === 'search_between_dates') {
$(".hidden").show();
} else {
$("#date2_hidden").hide();
}
}
$("#select_field").change(getSelect);
getSelect();
I am trying to get this to work where when they select the search between
dates it will show the second date search field.
I know that the jquery is pulling in that value for the select menu bc I
can put an alert for it and when I click on the search between dates it
throws the alert at me, my only problem is getting it to show that hidden
input.
HTML:
<select name='filter' class='input-large' id="select_field">
<option value=''>Select One</option>
<option value='dateonly'>Search by Date Only</option>
<option value='search_between_dates'>Search Between Dates</option>
</select>
<input type='text' placeholder="Date">
<input type="text" placeholder="Date 2" id="date2_hiddden" class="hidden">
Javascript:
function getSelect() {
var selectValue = $("#select_field").val();
if(selectValue === 'search_between_dates') {
$("#date2_hidden").show(function() {
$("#date2_hidden");
})
} else {
$("#date2_hidden").hide();
}
}
$("#select_field").change(getSelect);
getSelect();
Neither of these work and putting the id instead of class for the second
still doesn't work.
function getSelect() {
var selectValue = $("#select_field").val();
if(selectValue === 'search_between_dates') {
$(".hidden").show();
} else {
$("#date2_hidden").hide();
}
}
$("#select_field").change(getSelect);
getSelect();
Get hyper link from a SharePoint list column
Get hyper link from a SharePoint list column
I want to get the hyperlinks from a column of a SharePoint 2010 List.
Right now the code gives me the hyperlink and the description concatenated
together. `
$(xData.responseXML).SPFilterNode("z:row").each(function () {
content = new Object(); //get new object
content.title = $(this).attr("ows_Title");
content.url= $(this).attr("ows_Url");`
The content.url gives me "http://www.example. ca,%20http://www.example.
ca". I have tried split and then the URL doesn't work.
Any help will be greatly appreciated.
Thanks
I want to get the hyperlinks from a column of a SharePoint 2010 List.
Right now the code gives me the hyperlink and the description concatenated
together. `
$(xData.responseXML).SPFilterNode("z:row").each(function () {
content = new Object(); //get new object
content.title = $(this).attr("ows_Title");
content.url= $(this).attr("ows_Url");`
The content.url gives me "http://www.example. ca,%20http://www.example.
ca". I have tried split and then the URL doesn't work.
Any help will be greatly appreciated.
Thanks
Why do I need to press and hold the keys on my keyboard for a second for it to work?
Why do I need to press and hold the keys on my keyboard for a second for
it to work?
This is one of the wackiest and weirdest problems I have ever encountered.
My keyboard was working absolutely fine till yesterday on Ubuntu 13.04.
However, when I boot to Ubuntu today, I suddenly find that all the keys
work, but I have to press and keep on holding them for about a second for
them to work.
This behavior is true for all the keys except for Num Lock, Caps Lock and
Scroll Lock keys, the indicator for them on my keyboard lights up as soon
as I press those keys.
I have not done any key-remappings and using the standard English (US)
keyboard layout. I have fiddled around with the settings for Keyboard in
System Settings, but to no avail.
I have Windows 7 as dual-boot and the keyboard works perfectly well on it.
Why am I facing such a behavior and how to normalize this?
PS - Using Logitech Classic Keyboard K100 (USB Model).
it to work?
This is one of the wackiest and weirdest problems I have ever encountered.
My keyboard was working absolutely fine till yesterday on Ubuntu 13.04.
However, when I boot to Ubuntu today, I suddenly find that all the keys
work, but I have to press and keep on holding them for about a second for
them to work.
This behavior is true for all the keys except for Num Lock, Caps Lock and
Scroll Lock keys, the indicator for them on my keyboard lights up as soon
as I press those keys.
I have not done any key-remappings and using the standard English (US)
keyboard layout. I have fiddled around with the settings for Keyboard in
System Settings, but to no avail.
I have Windows 7 as dual-boot and the keyboard works perfectly well on it.
Why am I facing such a behavior and how to normalize this?
PS - Using Logitech Classic Keyboard K100 (USB Model).
3G Mobile Internet setup on Raspberry Pi
3G Mobile Internet setup on Raspberry Pi
So I've been struggling to setup my 3G dongle on my raspberry pi (running
Raspbian).
I've installed network-manager and network-manager-gnome since that seems
to be the common solution, but when running the Mobile Broadband wizard to
setup a new device, my stick isn't listed. It just says "Any Device" and
it's grayed out.
I've already installed usb-modeswitch as well and my device is listed
(using lsusb) as:
Bus 001 Device 004: ID 12d1:1446 Huawei Technologies Co., Ltd.
E1552/E1800/E173 (HSPA Modem)
What can I try?
So I've been struggling to setup my 3G dongle on my raspberry pi (running
Raspbian).
I've installed network-manager and network-manager-gnome since that seems
to be the common solution, but when running the Mobile Broadband wizard to
setup a new device, my stick isn't listed. It just says "Any Device" and
it's grayed out.
I've already installed usb-modeswitch as well and my device is listed
(using lsusb) as:
Bus 001 Device 004: ID 12d1:1446 Huawei Technologies Co., Ltd.
E1552/E1800/E173 (HSPA Modem)
What can I try?
Subscribe to:
Posts (Atom)