I'm referring to http://www.codinghorror.com/blog/2005/10/equipping-our-ascii-armor.html but I'm getting drastically different results.
Does anyone know how to duplicate his blog post examples in Ruby?
I've got a database in MSSQL that I'm porting to SQLite/Django. I'm using pymssql to connect to the database and save a text field to the local SQLite database.
However for some characters, it explodes. I get complaints like this:
UnicodeDecodeError: 'ascii' codec can't decode byte 0x97 in position 1916: ordinal not in range(128)
Is there some way I can convert the chars to proper unicode versions? Or strip them out?
What value is hashCode() method is returning in java?. i read that it is an memory reference of an object. when i print hascode value for new Integer(1), its 1. for String(a) - 97. so i confused. is it ascii or what type of value is?
Many of the methods in scalaz have symbolic equivalents, such as forever and 8 (of course, I have this the wrong way round, the symbolic methods really have ASCII equivalents).
The project contains a live templates XML file for IDEA so these can be auto-completed, I believe by using the forever+TAB shortcut (in the above instance).
I can't figure out how to import this live template into IDEA and actually use it, though. How can I do that?
Extended Backus–Naur Form: EBNF
I'm very new to parsing concepts. Where can I get sufficiently easy to read and follow material for writing a grammar for the boost::spirit library, which uses a grammar similar to EBNF?
Currently I am looking into EBNF from Wikipedia.
Can somebody please provide some sample code to strip diacritical marks (i.e., replace characters having accents, umlauts, etc., with their unaccented, unumlauted, etc., character equivalents, e.g., every accented é would become a plain ASCII e) from a UnicodeString using the ICU library in C++? E.g.:
UnicodeString strip_diacritics( UnicodeString const &s ) {
UnicodeString result;
// ...
return result;
}
Assume that s has already been normalized. Thanks.
Looking for a flash p2p (RTMFP) packaged solution, that includes the following features
Time limited sessions: at confrence start, there is a set time limit, when this expires the session ends.
Session extension: Sessions can be extended, but require authorization from the server via some sort of REST or Ajaxy response.
Generally customizable theme
Any suggestions?
There was a C program written for a contest that was formatted in ASCII art as a Japanese character. When compiled and ran it printed out another program formatted in a different Japanese character, then another, then finally it printed out the first again.
I was looking for the code to that and could not find it on the internet. I dont remember what contest nor what the name of the program was.
Thanks.
Why is the setContextClassLoader() method placed on thread ?
What different thread have different classloaders?
The question is what if i extended a classloader , loaded there some new classes. to the my custom classloader.
Now , I want it to be the context classloader , so I call the method (Thread.currentThread().setContextClassLoader(loader)).
Are these new classes awailable only in the context of the current Thread ? ( or how does it work ?)
Thanks
Normally, a Java p'rogram starts from an object, then that object will create some GUI objects (window) and call the "Show" method
So, is there any way to do the same thing in Android, since, by default in Android, a program runs from an object created by a class which extended from Activity class?
I have a textfield and a label.
When you touch the textfield, the keyboard appears
In IB, the textfield's properties are
Keyboard: ASCII Capable
Return Key: Done
I wired the IBOutlet to the label and the textfield.
How do I get the keyboard to go away when I'm done entering text.
How do I get to copy the text to the UIlabel?
thanks
Hi,
my code is below:
private string connectionstring = @"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\myexcel.xls; Extended Properties=""Excel 8.0;HDR=YES;""";
this is my connection string, the excel file is created writable (not readonly)
either my command to insert any data is :
string commandstring = "insert into [mus$] (name, surname) values('mickey', 'mouse')";
But my commandstring does not work and gives the error:
"number of query values and destination fields are not the same"
Where I do mistake ?
I need to send a SOAP message (with Python SUDS) with strings encoded in 'iso-8859-2'.
Does anybody know how to do it?
SUDS raises the following exception when I invoke a method on a client with parameters encoded in 'iso-8859-2':
File "/home/bartek/myenv/lib/python2.5/site-packages/suds/sax/text.py", line 43, in __new__
result = super(Text, cls).__new__(cls, *args, **kwargs)
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc5 in position 10: ordinal not in range(128)
Hi all!
I am coding a custom view, extended from RelativeLayout, and I want to resize it programmatically, How can I do?
the custom view Class is something like:
public ActiveSlideView(Context context, AttributeSet attr){
super(context, attr);
LayoutInflater inflater = (LayoutInflater)context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
if(inflater != null){
inflater.inflate(R.layout.active_slide, this);
}
Hi,
I've recently upgraded Polish from 2.0.7 to 2.4.2, which causes a problem with the extended toolbar.
Before everything works fine. But now, if the menubar doesn't contain an item/command, the menubar is partially rendered:
http://img263.imageshack.us/img263/457/bugi.jpg
Is that a known issue? Or has anything changed in the css definition?
Thanks.
i tried to extend the listbox control and override its RenderEndTag method.
everything works well if i used the control directly in a webapage. ie, the RenderEndTag is called.
but when i try to put the control in a WebUserControl and use the webusercontorl in a webpage, the RenderEndTag of the extended control is not called. this is strange because the constructor is being called but the RenderEndTag method is not!
any ideas about fixing the issue?
I know the user needs to give the application "extended permission" for access to the email address. I went through the Facebooker documentation (I am using it for an iFrame app for whatever it's worth) but can't find any related stuff in the documentation or any sample code.
Hello,
I am interested in theory to scale web applications in a distributed nature, i.e. when there is some platform/stack can be extended by others applications running on different servers, etc.
I am researching this field and feels the lack of the right keywords :)
Interesting concepts found so far:
opensocial
through API, like shopify does (shopify it's a hosted ecommerce solution)
semantic web not quite sure about this one
Am I on the right way or am I lost anything? :)
Thanks.
I tried to use Oledb to open Excel 2003. Looks like I can read most of data, but for some cells (such as number), the value returned is Null. Any suggestion?
My connection string:
ConnectionString="Provider=Microsoft.Jet.OLEDB.4.0;Extended Properties=Excel 8.0;"
I am taking an XML document and creating a word document using XSLT and OpenXML. The problem is that when I create the word document, all of the HTML that is within the CDATA tags are not escaped and look like this:
GET /recipe/recipe/cat.php/>"><script>alert(document.domain)</script>
I have tried defining "cdata-section-elements" in my xsl:output; however I receive an error stating that p tag doesn't match the w:t tag.(the p tag is apart of the CDATA HTML).
Here is what one of my xsl templates looks like:
<xsl:template match="SECTION">
<w:p w:rsidR="00272D24" w:rsidRPr="00272D24" w:rsidRDefault="00272D24">
<w:pPr>
<w:rPr>
<w:rFonts w:ascii="Arial" w:hAnsi="Arial" w:cs="Arial"/>
</w:rPr>
</w:pPr>
</xsl:template>
<w:r w:rsidRPr="00272D24">
<w:rPr>
<w:rFonts w:ascii="Arial" w:hAnsi="Arial" w:cs="Arial"/>
</w:rPr>
<w:t>
<xsl:value-of select="INFORMATION"/>
</w:t>
</w:r>
</w:p>
Here is what the xml looks like:
<INFORMATION>
<![CDATA[
<P> line 1 of information
<P> line 2 of information.......]]>
</INFORMATION>
Here is what the word output looks like: (white space and poor formatting)
DIAGNOSIS:
<P> line 1 of information. <P> line 2 of information
I need to be able to somehow render the HTML or strip out the HTML. If I strip out the HTML then I would have to search for every possible HTML element, which is madness! Any help at all would be appreciated...
Thanks.
Did I missed anything during this?
I am running a this command from command prompt in Windows 7 to create a certificate but it is showing a syntax error.
Command I ran:
makecert.exe "c:\1\Test.cer" -a sha1 -n "CN=AppGuid" -sr LocalMachine -ss My -sky signature -pe -len 2048
Output I got:
Usage: MakeCert [ basic|extended options] [outputCertificateFile]
Basic Options
-sk
-ss
-sr
.
.
.
Did I missed anything during this?
Hi All,
I am looking after fixing a bug and there I find this expression:-
directoryPath = Regex.Replace(directoryPath, "[^\\w\\.@-]", "");
but as a result of the expression all the high ascii characters in directory path are messed up, I am not good at regex and dont know about it but for now I have to fix the issue .
Can someone please explain me what this regular expression does?
What's the simplest, but efficient compression algorithm?
Deflate, lzma, etc. aren't valid options. I need something that compiles really small, like: RLE, LZX, Huffman, etc..
Note: The data is 95% ASCII text
I've created a JPanel canvas that holds all graphics; namely JLabel. To get animated sprites to work you have to over ride the paintComponent of the extended JLabel class. I've successfully implemented animated sprites this way.
Is it bad practice to have a Graphics2D canvas and then have multiple 'images' in their own Graphics2D?