|
Aye...I do not envy you at all here. Some things that might be going on and to help you get a 'handle' on this...
The StringWriter -- make sure it is UTF-8 and about Firefox -- when all you have been told is that an encoding is Unicode -- it is usually UTF-16 by default (At least that is the case for VisualStudio here in the US, perhaps for FF it is UTF-8, but who knows? Maybe look deeper in the settings for FF to see if it is specified somewhere.) For example I have encountered a case where a TextWriter defaults to UTF-16 and you have to make that UTF-8 if you want to write valid XML for a schema that is already UTF-8. The class that your StringWriter is derived from might need to be coerced to be UTF-8, for example.
Could there be BOMs in the text? What are the NUMERIC values of the bytes in that string? BOMs in documents usually get interpreted as strange sequences, like this one:  . The values for a BOM would be 0xef 0xbb 0xbf and they would be the first 3 bytes of a document.
Java uses modified UTF-8 for some things (object serialization and literal strings in classes) and was that string serialized using Java? If so, it is not UTF-8 -- it is modified UTF-8. Modified UTF-8 does not use 0x00 as the null terminator -- it uses 0xc0 0x80. UTF-8 can be guaranteed by using an OutputStreamWriter for serialization into your request stream.
|
|
|
|
|
I am generating a number of images in javascript using canvas elements, then using the canvas.toDataURL function to set the source on image elements that are displayed to the client. I am using image elements since I want the user to be able to save the image (only available in Firefox on canvas elements, currently). The problem is that, when the user clicks "Save Image As", the name of the file comes up as "download.png" (Chrome 35), "index.png" (FF 30), "untitled.png" (IE 11), or "Unknown" (Safari 5.1.7). I have attempted to set the id, name, alt, and title attributes on the img tag, all of which appear to have no effect on the save as name. Is there any way in any of the major browsers to set a file name when the user attempts to save an image who's source is an inline data url? Thanks,
Sounds like somebody's got a case of the Mondays
-Jeff
|
|
|
|
|
There's nothing in the RFC[^], and Wikipedia[^] explicitly states:
Data URIs do not carry a file name as a normal linked file would. When saving, a default file name for the specified MIME type is generally used.
The only suggestion I've seen is to use an <a> tag with the download attribute[^], but this won't work in any version of IE[^].
<a href="data:image/png;base64,..." download="ImageFileName.png">download the image</a>
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
I wrote this WebService in C#:
public class Service : IService
{
TestClass testObject = new TestClass();
public string GetData()
{
testObject.Counter++;
return string.Format("Test Value: {0}", testObject.Counter);
}
}
public class TestClass
{
public int Counter { get; set; }
public TestClass()
{
Counter = 0;
}
}
It's a WebService and each time I invoke my WebService it recreates everthing. So my counter never increase and each time I invoke GetData() the WebService return "1".
What are the solutions to persist my data between each WebService invoke. I don't want to use a database. Do you know articles than explain how to persist data with WebService?
|
|
|
|
|
please help me to solve this problem
upload magento from your local source to live/demo server and getting 404 page while accessing admin panel.
|
|
|
|
|
login your database and find table "config".
then you can see 2 variables and change the url as to your domain.
|
|
|
|
|
Hello everyone...
i am new to PHP... so can anyone explain the use of $THIS variable in PHP to me. i dont have any concept regarding this...... so please explain it in simple way...
please reply.....
M2SOFT SOLUTIONS PVT. LTD.
|
|
|
|
|
|
True, but it is a simple straightforward question and should be answered.
There are only 10 types of people in the world, those who understand binary and those who don't.
|
|
|
|
|
|
I've this production site that's performing very slow for every action.
We've checked database side and database is tuned and queries, when they reach the SQL Server - performs fine. There's little bit of time difference when it runs in query analyzer and when it comes from the web - say 2 seconds.
But that doesn't explain why it takes 30 seconds just to login.
So we are trying to troubleshoot it.
Is Fiddler or any other tool might be helpful here?
Thanks.
|
|
|
|
|
What technology? ASP.NET? Java? Php? Ruby?
When asking questions like this, always furnish all the available and relevant information.
|
|
|
|
|
Hello Shameel,
It's ASP .NET (.NET Framework 4.0) and Entity Framework V5 in combination with WCF web services.
SQL Server 2008 R2 back end.
Hope that helps.
Thanks.
|
|
|
|
|
Still relevant code & query is missing
|
|
|
|
|
It happens for every action. So it is a general problem, not related with any specific query or code.
Same code performs much faster in development environment.
So - what I'm looking for is any tool(s) that can help investigate the issue.
Thanks.
|
|
|
|
|
|
I'll check them, thanks raja.
|
|
|
|
|
I'm having trouble getting my media queries to work.
No matter what media query I write in the CSS file, it just seems to be ignored. An example is as follows:
@media only screen and (min-width: 320){
header nav ul li{
display:block;
}
}
I've got lots of other CSS code in the file but not in media queries. Does everything need to be in a media query?
|
|
|
|
|
Shouldn't your min-width value have a px appended?
min-width: 320px
|
|
|
|
|
Thank you. That solved it.
Another problem that I'm finding is that I can't get my menu items centered in the middle of the
header nav and be consistently centered for popular device types. It looks fine of the iPad, but on a Macbook Pro Retina it's more left justified. My base code centers it up nicely on an older LCD DELL 1024 x 768 monitor but the base code has no effect on the Retina. I've coded media queries for iPad min and iPad portrait and landscape and it's all good.
Can't figure out what I'm doing wrong.
|
|
|
|
|
Hello, first time poster. Total newbie.
It's a fairly specific question, but if you could look it over I would really appreiate it. I'm having trouble getting a really solid answer from web designers or video animation guys on odesk.
My problem is this:
I am using this theme:
http://www.cssvillain.com/chimera/
- I need it customized with an animation
- Where the car goes, I will add a, roughly, 30 second animation, of two models (15 secs per model, not 1 min total). The models are basically just one color with lights for buttons, and some textures.
- Background, ideally, would be clear - but I can work around this if it can't be done.
- Image quality must be very high
What file format do I need? I googled the pros cons but I'm not sure what will apply to this template, and video length.
I lean toward GIF because I can have a clear background, and it looks pretty universal -- but it looks like image quality/video length could be limited. Will my high quality, but only 30 second animation be limited by GIF? Will this template support any format, and how would I know? We need a format that will be very universal, does that limit my choices?
Just tell me what to pick. Maybe add why.
Thanks,
Kyla
|
|
|
|
|
I need to display a child html page inside the main html page using HTML Import.
I tried a sample but it seems to be failing on link.import.querySelector().
The sample code I tried is mentioned below:
Can you help me to resolve the problem.
Main.html
<!DOCTYPE html>
<html>
<head>
<link rel="import" href="Child.html">
</head>
<body>
<button id="button1" onclick="onclick">Button1</button>
<div id="ChildContainer" />
</body>
<script>
button1.onclick = function ()
{
alert("Before reading imported files.");
var link = document.querySelector('link[rel="import"]');
alert("Before importing Child.");
var template = link.import.querySelector('Child');
alert("Before cloning contents of Child.");
var clone = document.importNode(Child.content, true);
alert("Before setting the child to ChildContainer.");
document.querySelector('#ChildContainer').appendChild(clone);
};
</script>
</html>
Child.html
<!DOCTYPE html>
<html>
<head>
</head>
<body>
<div id="Child">
<h3>Sample Text</h3>
</div>
</body>
</html>
aks
|
|
|
|
|
I'm sorry to tell you but you have to start to learn HTML/JavaScript from the very beginning, as the place here is to small to explain you all the mistakes (logical and technical) you did in this code...
Some probably can write you the proper code, but that will take you nowhere as you clearly do not understand HTML...
I'm not questioning your powers of observation; I'm merely remarking upon the paradox of asking a masked man who he is. (V)
|
|
|
|
|
Can any one help me to solve this issue?
aks
|
|
|
|
|
I am newbie to web & HTML5.
Can you please help me to load an ocx file to an html(5) page.
aks
|
|
|
|