What is the minimum number of bits needed to represent a single character of encrypted text.
eg, if I wanted to encrypt the letter 'a', how many bits would I require. (assume there are many singly encrypted characters using the same key.)
Am I right in thinking that it would be the size of the key. eg 256 bits?
I am trying to find words starts with a specific character like:
Lorem ipsum #text Second lorem ipsum.
How #are You. It's ok. Done.
Something #else now.
I need to get all words starts with "#". so my expected results are #text, #are, #else
Any ideas?
Is there a character sequence recognized as a newline that's defined by the C standard and/or recognized by GCC? How can newlines be simulated after preprocessor macros to have them and C code share the same line?
#include <stdlib.h> [NEWLINE] int main() { exit(EXIT_SUCCESS); }
I have an application that uses a tab bar and whenever it launches it crashes and gives me the following error and stack trace:
2010-04-22 16:15:03.390 iCrushCans[59858:207] *** Terminating app due to uncaught
exception 'NSUnknownKeyException', reason: '[<UIWindow 0x3e051a0>
setValue:forUndefinedKey:]: this class is not key value coding-compliant for the
key rootViewController.'
2010-04-22 16:15:03.392 iCrushCans[59858:207] Stack: (
29680731,
2425423113,
29839809,
305768,
304309,
2957847,
4641908,
29583663,
4636459,
4644727,
2805842,
2844630,
2833204,
2815615,
2842721,
37776729,
29465472,
29461576,
2809365,
2846639
)
Thanks in advance!
I encounter this error (warning: unmappable character for encoding ASCII)
when compiling the files using apache-ant-1.7.0 through hudson build server can anyone advise on how to resolve this? I am able to build successfully using windows machine.
I have the following code :
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package helloworld;
import com.thoughtworks.xstream.XStream;
import java.io.File;
import java.io.FileOutputStream;
import java.io.InputStream;
import java.io.OutputStream;
import javax.swing.JOptionPane;
/**
*
* @author yccheok
*/
public class Test {
@SuppressWarnings("unchecked")
public static <A> A fromXML(Class c, File file) {
XStream xStream = new XStream();
InputStream inputStream = null;
try {
inputStream = new java.io.FileInputStream(file);
Object object = xStream.fromXML(inputStream);
if (c.isInstance(object)) {
return (A)object;
}
}
catch (Exception exp) {
exp.printStackTrace();
}
finally {
if (inputStream != null) {
try {
inputStream.close();
inputStream = null;
}
catch (java.io.IOException exp) {
exp.printStackTrace();
return null;
}
}
}
return null;
}
@SuppressWarnings("unchecked")
public static <A> A fromXML(Class c, String filePath) {
return (A)fromXML(c, new File(filePath));
}
public static boolean toXML(Object object, File file) {
XStream xStream = new XStream();
OutputStream outputStream = null;
try {
outputStream = new FileOutputStream(file);
xStream.toXML(object, outputStream);
}
catch (Exception exp) {
exp.printStackTrace();
return false;
}
finally {
if (outputStream != null) {
try {
outputStream.close();
outputStream = null;
}
catch (java.io.IOException exp) {
exp.printStackTrace();
return false;
}
}
}
return true;
}
public static boolean toXML(Object object, String filePath) {
return toXML(object, new File(filePath));
}
public static void main(String args[]) {
String s = "\u6210\u4EA4\u91CF";
// print ???
System.out.println(s);
// fine! show ???
JOptionPane.showMessageDialog(null, s);
toXML(s, "C:\\A.XML");
String o = fromXML(String.class, "C:\\A.XML");
// show ???
JOptionPane.showMessageDialog(null, o);
}
}
I run the following code through command prompt in Windows Vista.
1) May I know why System.out.println unable to print out Chinese Character in console?
2) I open up the xstream file. The saved value is
<string>???</string>
How can I make xstream save Chinese Character correctly?
Thanks.
I'm using zend frame work zend form and zend db for my project.
The problem I have is, when the user enter some special characters in the text field (i.e "I'm"), it is saved in the database with the "\" character (i.e. "I\'"). I need to know how to fix this so it just saved as whatever the user entered.
hi,
How can I make upper-case the first character of each word in a string accept a couple of words which I don't want to transform them, like - and, to, etc?
For instance, I want this - ucwords('art and design') to output the string below,
'Art and Design'
is it possible to be like - strip_tags($text, '<p><a>') which we allow and in the string?
or I should use something else? please advise!
thanks.
I have to create an SQL Query to get all rows starting with a specific character, except if the parameter passed to the (PHP) function is 0, in that case it should get every row that does not start with A - Z (like #0-9.,$ etc).
What is the easiest and fastest way to get those rows?
DB: MySQL 5.1
Column: title
As can be seen in the screenshot the editor in xcode has started to show linefeeds and tab characters, normally invisible characters. I can't for the life of me find a way to hide them again and i have no idea why they started to show. Any ideas?
Hi,
During my file upload process, I found illegal character getting saved in Table. zurück.pdf, C _Word.doc were the file names. Here ü, space between C and _Word was found as ? in the Table Column. I have validate the filename in client side by replacing non-alpha numeric values by _ (underscore), but still it escapes and persist into DB. How can these handled in Client side?
Hi,
i have this page.
login: [email protected] password: m
You can see two selects in the filter for which i have this rule in gente.css:
td.select label{
margin-left:12px;
}
The problem: the rule is applied but doesn't appear in the Style tab of Firebug.
Any idea?
Regards
Javi
Hi,
I write a little ruby script, which sends me an email when a new commit added to our svn.
I get the log with this code:
log = `/usr/bin/svnlook log #{ARGV[0]}`
When I run my script from bash I get good encoded character in the email, but when I try it and create a new commit I get wrong hungarian characters.
I commited this:
tes
oéá
I get this in the email:
Log: tes
?\197?\145?\195?\169?\195?\161
How can I solve this issue?
I am using mysql_fetch_assoc($query), one of the bit field returns out to be , which is supposedly to be true.
The problem is that I also need to output this to xml and it's an illegal xml character.
the charset for the db table is utf-8. why does this happen?
I am currently investigating replacing the tabs provided by a Struts 1 tag library with the tabs provided by jQuery UI. I have successfully managed to get the tabs integrated with the existing application but I am struggling on how to set the selected tab using a parameter on the incoming URL i.e. myurl.com/action.do?selectedTab=SecondTab
As a new comer to javascript and jQuery, I was wondering could give me some pointers on where to start?
Thanks In Advance
David
If I try this statement:
INSERT INTO TerminalEventChild (id,stringValue) VALUES
(64,'version123|');
MySQL fail with :
Error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''version123' at line 1
SQLState: 42000
ErrorCode: 1064
If I remove the | character, everything works fine. Any idea?
hi,
when i try to convert form utf-8 string to NSString like so:
NSString *s = [NSString stringWithUTF8String:"\U0627\U0644\U0641\U0631\U0646"];
NSLog(@"%@", s);
i get the compile error:
incomplete universal character name
note that it sometime just works fine:
NSString *UAE = [NSString stringWithUTF8String:"\U0627\U0644\U0641\U0631\U0646"];
NSLog(@"%@", UAE);
and the output:
????????
so why is that happening? please help.
Hi all,
I want to know how to work on a single data grid which has tab controls in it.Tabs will be selected depending on the dropdown which is in the header.
Thanks,
Brenda
I'm developing a twitter app, and when I submit a new tweet from php with abrahams twitteroauth and with any special character it submits it to twitter as the HTML identity. I've tried all the html_entity_decode() and the htmlspecialchars_decode() but nothings working. Thank you :)
hi i have pattern like below
hi
hello
hallo
greetings
salutations
no more hello for you
i am trying to replace all new lines with tab spaces using the following command
sed -e "s_/\n_/\t_g"
but its not working .
could nybody pls help?
i need the solution in sed /awk.
I know that there has been a similar question asked here very recently, but I was wondering if it was possible to tab between buttons on default OSX dialog boxes?
I already have the "All Controls" option enabled in System Preferences-Keyboard and mouse-keyboard shortcuts, but no joy.
Thanks
hi,
how to get in python from string not one character, but two?
I have:
long_str = 'abcd'
for c in long_str:
print c
and it gives me like
a
b
c
d
but i need to get
ab
cd
I'm new in python.. is there any way?
hi,
I've noticed there is one more tab in my edit-content pages in Drupal.
Could you tell me which plugin added it ?
See picture: http://dl.dropbox.com/u/72686/TrackTab.png
thanks