How do I enter Unicode characters in LaTeX? What packages do I need to install and what escape sequence do I type to specify Unicode characters in an ASCII source file?
I had created entity in google app engie datastore using JPA.I set the id as follows
@Id
@GeneratedValue(strategy=GenerationType.SEQUENCE)
private Long s;
After i deployed my applicaiton it give identity (i.e) unique value.but igive 1001,1002,1003 ....as id.But i wnat 1,2,3,4,5 like that.how to achive this?
Thanks in advance
is there a built in function in php that would combine 2 strings into 1?
example: $string1 = abcde, $tring2 = cdefg
combine to get: abcdefg
if the exact overlapping sequence and the position are known, then it is possible to write a code to merge them.
TIA
Here is a typical sequence of events that occur :
Host device opens a service ( Host device accepts and opens all incoming connections)
A remote device connects to host device.
Now, we have a slave connection open at host device.
At host device, I want to know the bluetooth address of remote device.
I can always pass it as data from remote to host device, but
can I extract it from connection object somehow without any data transfer?
Thanks in advance...
i get errors when i try to open a file using the file path
out_stream5.open("C:pathshowitems.txt", ios::out);
warning C4129: 'o' : unrecognized character escape sequence
error C2100: illegal indirection
The most egregiously redundant code construct I often see involves using the code sequence
if (condition)
return true;
else
return false;
instead of simply writing
return (condition);
I've seen this beginner error in all sorts of languages: from Pascal and C to PHP and Java. What other such constructs would you flag in a code review?
I have a generator (numbers) and a value (number). I would like to iterate over these as if they were one sequence:
i for i in tuple(my_generator) + (my_value,)
The problem is, as far as I undestand, this creates 3 tuples only to immediately discard them and also copies items in "my_generator" once.
Better approch would be:
def con(seq, item):
for i in seq:
yield seq
yield item
i for i in con(my_generator, my_value)
But I was wondering whether it is possible to do it without that function definition
I have an item in which has two states, best described as open and closed, and they look like this:
and
And what I'd like to do is is smooth the transition between one state and the other, effectively by interpolating between the two points in a smooth manner (sine) to move the footer/button-block and then fade in the pie chart.
However this is apparently beyond me and after wrestling with my inability to do so for an hour+ I'm posting it here :D
So my transition block looks as follows
<s:transitions>
<s:Transition id="TrayTrans" fromState="*" toState="*">
<s:Sequence>
<s:Move duration="400" target="{footer}" interpolator="{Sine}"/>
<s:Fade duration="300" targets="{body}"/>
</s:Sequence>
</s:Transition>
<s:Transition>
<s:Rotate duration="3000" />
</s:Transition>
</s:transitions>
where {body} refers to the pie chart and {footer} refers to the footer/button-block.
However this doesn't work so I don't really know what to do...
Additional information which may be beneficial:
The body block is always of fixed height (perhaps of use for the Xby variables in some effects?).
It needs to work in both directions.
Oh and the Sine block is defined above in declarations just as <s:Sine id="Sine">.
Additionally! How would I go about setting the pie chart to rotate continually using these transition blocks? (this would occur without the labels on) Or is that the wrong way to go about it as it's not a transition as such?
The effect I'm after is one where the pie chart rotates slowly without labels prior to a selection of a button below, but on selection the rotation stops and labels appear...
Thanks a lot in advance!
And apologies on greyscale, but I can't really decide on a colour scheme. Any suggestions welcome.
I have a ByteBuffer containing bytes that were derived by String.getBytes(charsetName), where "containing" means that the string comprises the entire sequence of bytes between the ByteBuffer's position() and limit().
What's the best way for me to get the string back? (assuming I know the encoding charset) Is there anything better than the following (which seems a little clunky)
byte[] ba = new byte[bbuf.remaining()];
bbuf.get(ba);
try {
String s = new String(ba, charsetName);
}
catch (UnsupportedEncodingException e) {
/* take appropriate action */
}
Hi,
I was browsing and found good articles about encryption. However, none of them described why the key lenght is important and what exactly the key is used for. My guess is that could work this way:
0101001101010101010
Key: 01010010101010010101 //the longer the key, the longer unique sequence
XOR or smth: //result
Is this at least a bit how it works or I am missing something? Thanks
I'm looking for a random number generator that I can run in PHP, C and Java that will always return the same sequence of numbers for a given seed.
Here's the Java implementation I would use: java.util.random source
Whilst this would be fairly straightforward to port to C and PHP, there is potentially a lot of work to get all the edge cases correct and handle differences in number representation. I'd be extremely happy to just copy and paste a fully tested version should it exist.
hi,
what's the easiest way to cut string in Flex ?
I mean, I have a sequence of urls, I want them at most 60 characters length. If they are longer they should be cut and "..." should be added at the end.
<mx:LinkButton label="{bookmarksRepeater.currentItem.name}" click="navigateToURL(new URLRequest(event.currentTarget.label.toString()))" />
thanks
I need to open a file for reading and writing. If the file is not found, it should be created. It should also be treated as a binary for Windows. Can you tell me the file mode sequence I need to use for this?
I tried 'r+ab' but that doesn't create the files if they are not found.
Thanks
I have a postgres table and a schema that creates a primary id (sequence) that auto increments by 1. How do I specify the starting value? I am happy with the increment value. Here is my schema migration:
create_table "ServiceProvider", {:primary_key => :ID} do |t|
t.integer "ID", :null => false
end
Thank you
I wish to have the following:
<span title="This is a "good" title.">Catch me in the rise.</span>
It is obvious that this is not rendered well by the browsers. Please provide me with information of what escape sequence or encoding like " I must use?
I have a sequence of images (PNG format) in my iphone app. It is saved in the app's sandbox doc folder. How do I create animation file from these images?
I would prefer animated gif, but other types like video (mov/avi/etc) is ok too. I don't need audio. Just images. Thanks.
Sometimes I want a filename instead of what zsh guesses for me. For example, I have a PNG file without a proper .png suffix, which makes zsh think it isn't a picture and won't list it when I type Tab to complete arguments of display.
I am wondering if there is a key sequence that completes for a filename wherever the context is, like ^XC for _correct_filename, or how to configure zsh to do the thing?
I need to tag the current state of my source tree in svn. My problem is I don't care what the name is, I just need to mark the current revision in an immutable* manner. (*subject to malicious behavior)
What's the best way to do this?
branches/
tags/
???
trunk/
should ??? be the date, an incrementing sequence, the repository rev # ...?
When I run the following program:
public static void main(String args[]) throws Exception
{
byte str[] = {(byte)0xEC, (byte)0x96, (byte)0xB4};
String s = new String(str, "UTF-8");
}
on Linux and inspect the value of s in jdb, I correctly get:
s = "ì–´"
on Windows, I incorrectly get:
s = "?"
My byte sequence is a valid UTF-8 character in Korean, why would it be producing two very different results?
Hi,
I want to extract android 1.6 calendar fields and put them into a vcalendar file
my problem is that i can't find some fields in the database like: DTSTAMP UID LAST-MODIFIED SEQUENCE
does anyone have a clue on how to find them?
thanks!
How can I use randomize and rnd to get a repeating list of random variables?
By repeating list, I mean if you run a loop to get 10 random numbers, each random number in the list will be unique. In addition, if you were to run this sequence again, you would get the same 10 random numbers as before.
Hi all:
I am working on a C# application that involves using XML schema file as databases for message definitions and XML file as databases for message data.
I was following the example I found:http://msdn.microsoft.com/en-us/library/system.xml.xmldatadocument.dataset%28v=VS.100%29.aspx
I wrote my own xsd and XML file. I used the same approach in the example, read the xsd file and then load
the xml file. But I don't have any "Rows" created for my DataTable. I used debugger to step through my codes. When I am get my DataTable use xmlDataDocument.DataSet.Tables["name of the table"], the Rows property of that tables is 0.
Does anybody know what might cause the DataSet tables not get populated after I loaded the xmlDataDocument with XML file?
Here is a fragment of XSD file:
<?xml version="1.0" encoding="utf-8"?>
<xs:schema id="test"
targetNamespace="http://tempuri.org/test.xsd"
elementFormDefault="qualified"
xmlns="http://tempuri.org/test.xsd"
xmlns:mstns="http://tempuri.org/test.xsd"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
>
<xs:element name="reboot_msg">
<xs:complexType>
<xs:complexContent>
<xs:extension base="header_s">
<xs:sequence>
<xs:element name="que_name">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:minLength value="4"/>
<xs:maxLength value="8"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="priority" type="xs:unsignedShort"/>
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>
</xs:element>
and here is a fragment of the XML file:
<?xml version="1.0" standalone="yes"?>
<test xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" >
<reboot_msg>
<message_length>16</message_length>
<message_type>7</message_type>
<message_sequence>0</message_sequence>
<que_name>NONE</que_name>
<priority>5</priority>
</reboot_msg>
It could be the XML and XSD file I created missed something. Please help.
Thanks
Hi,
in C++, using printf I want to print a sequence of number, so I get, from a "for" loop;
1
2
...
9
10
11
and I create files from those numbers. But when I list them using "ls" I get
10
11
1
2
..
so instead of trying to solve the problem using bash, I wonder how could I print;
0001
0002
...
0009
0010
0011
and so on
Thanks