|
simplify by using UNICODE():
DECLARE @nstring nchar(12)
SET @nstring = N'ü'
SELECT UNICODE(@nstring), NCHAR(UNICODE(@nstring))
252 ü
And the best xample is in BOL on UNICODE function:
DECLARE @posit int, @nstring nchar(12)
SET @posit = 1
SET @nstring = N'Münster'
PRINT 'Character #' + ' ' + 'Unicode Character' + ' ' + 'UNICODE Value'
WHILE @posit <= DATALENGTH(@nstring)
BEGIN
SELECT @posit,
CONVERT(char(17), SUBSTRING(@nstring, @posit, 1)),
UNICODE(SUBSTRING(@nstring, @posit, 1))
SELECT @posit = @posit + 1
END
Results:
1 M 77
2 ü 252
3 n 110
4 s 115
5 t 116
6 e 101
7 r 114
|
|
|
|
|
Thanks for looking at my question.
The problem seems to be more to do with what character is passed through from the ADO request to SQL Server - the ü in Münster is being changed to something else - not even u. I need to do something at the code end, rather than the SQL Server end, I think.
|
|
|
|
|
Hi,
In many website, I see a <select> for skills for example and below the <select> there is [Add More] link which will show new <select> below the existing one to add additional skills.
How can I implement such thing using JQuery and PHP?
Thanks,
Jassim[^]
Technology News @ www.JassimRahma.com
|
|
|
|
|
i'm still worried about that there is old browser that doesn't support html 5
|
|
|
|
|
And?
Veni, vidi, abiit domum
|
|
|
|
|
i'm Afraid of my website does not function Correctly in old browser when using html5 what shall i do
|
|
|
|
|
|
It's only going to be old versions of IE. If you need to support them, use html5shiv[^] or Modernizr[^].
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
Hi,
When we deployed out project to the QA server, all of a sudden we keep getting an error message:
A network-related or instance-specific error occurred
while establishing a connection to SQL Server.
The server was not found or was not accessible.
The code works fine in my development environment. We copy over all the related dlls, as our deployment process.
WE make sure not include any web.config files.
And I checked the web.config file to make sure there is no reference to any other server.
The code and database for our QA is on the same server. So, there is no way it can not find it!
Any ideas?
Thanks!!
|
|
|
|
|
Either SQL isn't running (or isn't accepting connections) on your QA server, or you've got the wrong connection string somewhere in your config file or code.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
first,I need to sorry about my poor English,but i'll trying to explane my question clearly.
I want doing some client side DataMapping. We have some solution has try out.but the performance is not Good.
For example, i wrote a JSON2Form Parser,in small Data Sample, it works OK,but in Large,It's Become a NightMarely Slow.
the Original Idea is let .net (Nested or Master-Detail ) DataSet XML String dataMapping(or parsing) to a nested Html form. the Html form is tag by Attribute Like 'fieldName','tableName'
Something like a InfoPath Form, For example,
<form>
Order No. <input dataMapping="order.billNO"/>
Order Date. <input dataMapping="order.date"/>
<TABLE dynamic="1,1">
<tr>
<td> desc</td>
<td> amt</td>
<td> unit</td>
<td> price</td>
<td> SUM</td>
</tr>
<tr>
<td> <input dataMapping="orderDetail.desc"/></td>
<td> <input dataMapping="orderDetail.amt"/></td>
<td> <input dataMapping="orderDetail.unit"/></td>
<td> <input dataMapping="orderDetail.price"/></td>
<td> <input dataMapping="orderDetail.SUM"
calc="orderDetail.amt*orderDetail.price"/></td>
</tr>
</TABLE>
</form>
I want parsing a XML into That HTML.
is There Any Good Idea.
|
|
|
|
|
I Do Has Some Work been Done.
I've try the HTML-DOM,JSON-Parse. The performance is Very Slow(100 RepeatData in 4 Sec).
Then I've Try the XML-Xslt Translate in client Side.
But I can't Use the Content in side a HTML File.
Is There Any Idea,Can Make Html content like bolow,
translate to a xsl object.
<head runat="server">
<title>TEST</title>
<style type="text/css">
.style1
{
width: 800px;
border-collapse: collapse;
}
.style2
{
width: 337px;
}
</style>
<script type="text/javascript">
function loadXMLDoc(dname) {
if (window.ActiveXObject) {
xhttp = new ActiveXObject("Msxml2.XMLHTTP.3.0");
}
else {
xhttp = new XMLHttpRequest();
}
xhttp.open("GET", dname, false);
xhttp.send("");
return xhttp.responseText;
}
function StringtoXML(text) {
if (window.ActiveXObject) {
var doc = new ActiveXObject('Microsoft.XMLDOM');
doc.async = 'false';
doc.loadXML(text);
} else {
var parser = new DOMParser();
var doc = parser.parseFromString(text, 'text/xml');
}
return doc;
}
function Write(input1) {
var fso = new ActiveXObject("Scripting.FileSystemObject");
var s = fso.CreateTextFile("C:\\test.txt", true);
s.WriteLine(input1);
s.Close();
}
function displayResult() {
xmlH = loadXMLDoc("DataProvider.aspx");
xml = StringtoXML(xmlH);
el = document.getElementById("form1");
el.removeChild(document.getElementsByTagName("div")[0]);
xslH = document.getElementById("form1").innerHTML.toLowerCase();
alert($("#form1").html());
var el = (document.getElementById("form1"));
xslH = "<?xml version=\"1.0\"?>\n<xsl:stylesheet version=\"1.0\" xmlns:xsl=\"http://www.w3.org/1999/XSL/Transform\">\n<xsl:template match=\"NewDataSet\">\n" + xslH;
xslH += "\n</xsl:template>\n</xsl:stylesheet>"
xslH = xslH.replace(/XSL/ig, "xsl")
.replace(/VALUE-OF/ig, "value-of")
.replace(/FOR-EACH/ig, "for-each")
.replace(/newdataset/ig, "NewDataSet");
xsl = StringtoXML(xslH);
if (window.ActiveXObject) {
ex = xml.transformNode(xsl);
document.getElementsByTagName("form").innerHTML = ex;
}
else if (document.implementation && document.implementation.createDocument) {
xsltProcessor = new XSLTProcessor();
xsltProcessor.importStylesheet(xsl);
resultDocument = xsltProcessor.transformToFragment(xml, document);
document.getElementById("example").appendChild(resultDocument);
}
}
function getRightInnerHTML(elm) {
var content = elm.innerHTML;
if (!document.all) return content;
var regOne = /(\s+\w+)\s*=\s*([^<>"\s]+)(?=[^<>]*\/>)/ig; var regTwo = /"'([^'"]*)'"/ig;
content = content.replace(regOne, '$1="$2"').replace(regTwo, '\"$1\"');
var okText = content.replace(/<(\/?)(\w+)([^>]*)>/g, function(match, $1, $2, $3) {
if ($1) { return "</" + $2.toLowerCase() + ">"; }
return ("<" + $2.toLowerCase() + $3 + ">").replace(/=(("[^"]*?")|('[^']*?')|([\w\-\.]+))([\s>])/g,
function(match2, $1, $2, $3, $4, $5, position, all) {
if ($4) {
return '="' + $4 + '"' + $5;
} return match2;
});
});
okText = okText.replace(/<\/?([^>]+)>/g, function(lele) { return lele; })
return okText.replace(/VALUE-OF/ig,"value-of"); }
</script>
</head>
<body onload="displayResult();">
<form id="form1" runat="server">
<div>
<table cellpadding="0">
<tr>
<td>
傳票編號</td>
<td>
傳票日期</td>
</tr>
<tr>
<td>
<xsl:value-of select="帳款模組/帳款編號" /></td>
<td>
<xsl:value-of select="帳款模組/填寫日期" /></td>
</tr>
</table>
<table cellpadding="0" class="style1">
<tbody>
<xsl:for-each select="帳款模組明細">
<tr>
<td><xsl:value-of select="主目" /></td>
<td><xsl:value-of select="子目" /></td>
<td><xsl:value-of select="科目名稱" /></td>
<td><xsl:value-of select="摘要" /></td>
<td><xsl:value-of select="借方金額" /></td>
<td><xsl:value-of select="貸方金額" /></td>
<td><xsl:value-of select="部門編號" /></td>
<td><xsl:value-of select="部門名稱" /></td>
<td><xsl:value-of select="廠商物件類別" /></td>
<td><xsl:value-of select="廠商編號" /></td>
<td><xsl:value-of select="廠商名稱" /></td>
<td><xsl:value-of select="工程案號" /></td>
<td><xsl:value-of select="外部物件主編號" /></td>
<td><xsl:value-of select="外部物件子編號" /></td>
</tr>
</xsl:for-each>
</tbody>
</table>
</div>
</form>
<div id="example"></div>
</body>
</html>
|
|
|
|
|
Hi,
Have a look at this page:
http://www.xoompage.com/ticket?id=034abd84-47fd-11e3-bea0-782bcb3e3838[^]
you'll see the value returned is string(1) "" but it's actually a bit value from MySQL and I am using this to read it:
SELECT * FROM support_ticket_messages WHERE support_ticket_id = param_ticket_id ORDER BY support_ticket_message_id DESC;
I am getting the correct value when running it on my localhost and I am also getting the correct value when running the stored procedure on the database.
Then why the PHP is not showing it when I try:
if ($is_support_reply)
{
echo "<div style='background-color: #eee9e9; padding: 10px;'>";
echo "XoomPage Replies :<br><br>";
}
or
if ($mysql_row["is_support_reply"])
{
echo "<div style='background-color: #eee9e9; padding: 10px;'>";
echo "XoomPage Replies :<br><br>";
}
Please help..
Thanks[^]
Technology News @ www.JassimRahma.com
|
|
|
|
|
Hi,
can anyone suggest a free tool for PHP to manage ad rotation and provide a report for banners to the clients?
Thanks,
Jassim
Technology News @ www.JassimRahma.com
|
|
|
|
|
I am working on a page that allows a user some control over layout and formatting. I want the user to be able to align the heading of a page just like the Windows Forms ContentAlignment property.
For example: TopLeft, MiddleLeft, BottomLeft, MiddleTop, and so on.
Thanks,
Mark
|
|
|
|
|
And your question is?
The difficult we do right away...
...the impossible takes slightly longer.
|
|
|
|
|
I'm not sure what you want. Let me guess. If what you want is web page styling, then that is this web styling language called Cascading Style Sheet or CSS in short. If you want user control over elements on a web page, then you can look to HTML5. If you want more dynamic contents then jQuery is what you are looking for. You can get some good tutorials at the W3C site.
|
|
|
|
|
Sorry for the ambiguity. Windows has a ContentAlignment property that aligns the text in a control from TopLeft to BottomRight, and also middles. I know that using CSS you can align textual content using the div as a container.
I was wondering if there is a way to use the ContentAligment property values from a Windows form to set the div container css. So if the user selects MiddleLeft the text is aligned that way in the html markup.
Mark
|
|
|
|
|
|
Thanks for the link. I used a label control for the heading. That way I could change the alignment and the font. Works fine.
|
|
|
|
|
Hi,
I have a field called is_closed in MySQL table. It's a bit datatype which means it's 0 or 1
I want to know how to deal with it in PHP, like how can I (IF) it?
and is there any way to deal with it as if (is_closed == true)?
Thanks
Jassim[^]
Technology News @ www.JassimRahma.com
|
|
|
|
|
Is an ActiveX control that I include in my web application allowed by the browser to contact and download info from sites other than the one hosting my web application?
I understand that JavaScript is barred from contacting third-party sites, but is the ActiveX control also barred?
The difficult we do right away...
...the impossible takes slightly longer.
|
|
|
|
|
Yes, ActiveX control also barred by 3rd party website.
|
|
|
|
|
Hi,
I am trying to insert email_header from include file but it's not inserting anything. How can I fix it please?
here is my file:
include 'includes/email_header.php';
$body .= "<h1>Dear Customer</h1><br>";
$body .= "<p>this is a test email.</p>";
$body = nl2br($body);
and this is the email_header.php:
$body = "hello.......";
$body .= "<br>";
$body .= "here is website logo";
Technology News @ www.JassimRahma.com
|
|
|
|
|
Hi,
Why I am getting the above error! it's making me crazy!
the url shown for this error on chrome is memberhome.php
I am not getting this error on my localhost but only getting it when I upload my website to the host
here is the code for it:
include 'includes/php_header.php';
require 'includes/connect2db.php';
if (!isset($_SESSION["member_loggedOn"])) { exit(header("Location: signin")); }
$mysql_command = "CALL sp_get_member_personal_information(:param_member_guid)";
$mysql_query = $mysql_connection->prepare($mysql_command);
$mysql_query->bindParam(':param_member_guid', $_SESSION["member_guid"], PDO::PARAM_STR);
$mysql_query->execute();
$mysql_row_count = $mysql_query->rowCount();
if ($mysql_row_count <= 0) { exit(header("Location: signin")); }
while ($mysql_row = $mysql_query->fetch())
{
$member_title = $mysql_row["member_title_name"];
$member_full_name = $mysql_row["first_name"] . ' ' . $mysql_row["middle_name"] . ' ' . $mysql_row["last_name"];
$member_brief_introduction = $mysql_row["brief_introduction"];
}
Technology News @ www.JassimRahma.com
|
|
|
|