In Ruby 1.9.1 strings are no longer enumerable and string.each is undefined. This causes a problem when parsing values for an array of generated checkboxes since the field value, when submitted, becomes an array of strings. For example:
<% for map in Map.find(:all) %>
<%= check_box_tag "listing[map_ids][]", map.id %>
<%= map.title…
Hi
I have an XML column in my table which contains this xsd snippet:
<xsd:element name="Postcode" minOccurs="0">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:pattern value="^[0-9]{4}$" />
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
The…
I've got a Mac OS X 10.6 Snow Leopard Server Open Directory Master with a user who's getting Mobility & Application managed preferences from a group (the only group they're a member of). The workstation is also running Mac OS X 10.6 Snow Leopard, when the user logs in and tries to run our primary application which they're explicitly…
I am sending an object with some primitive fields using Restlet with Jackson converter. Up until now it worked great.
But then I needed my object to implement Serializable, because I need to store it in memcache of GAE.
For some reason - when the class implements Serializable, things stop working.
Restlet sends a different string…
Hi, I am here to seek some help with my code which i am facing a dead end road with. I'm trying to pass values from screen1.java using Intent to screen2.java. Passing the values is fine and I managed to get through it; however, when I check using if statement the program crash down. Here are my files, plzzzzzzzzzzz help
…
Why does this code get an access error on the Result := Buffer line in D2010, but not D7?
Something, I'd guess, involving UniCode, but the compiler doesn't generate any warnings.
Any suggestions on an elegant workaround?
function GetTempPathAndFileName( const aExtension: string): string;
var
Buffer:…
I have xml wherein i have xml within it again, like:
<?xml version=\"1.0\" encoding=\"UTF-8\"?>
<Tag>
<Value1> </Value1>
<Value2><?xml version=\"1.0\" encoding=\"UTF-8\"?>... </Value2>
</Tag>
Deserializing doesnt work on this string in c#. I construct this string in…
I am pretty darned new to android, and VERY new to Parse. I have created a class, StudentInformation, that includes columns for name, address, phone, etc.
I would like to create a listview that contains the names of all students added to the class.
How do I do this? I have got it to the point that I can Toast out…
Hi,
I'm performing a little database optimisation at the moment and would like to set the column lengths in my table through JPA. So far I have no problem setting the String (varchar) lengths using JPA as follows:
@Column(unique=true, nullable=false, length=99)
public String getEmail() {
return email;
}
…
Wondering how to deserialize the following string in c#:
"[{\"access_token\":\"thisistheaccesstoken\"}]"
I know how to do it if the json was:
"{array=[{\"access_token\":\"thisistheaccesstoken\"}]}"
I'd do it like this:
public class AccessToken
{
public string access_token {get;set;}
public…
Hi,
I'm trying to create a really simple templated control. I've never done it before, but I know a lot of my controls I have created in the past would have greatly benefited if I included templating ability - so I'm learning now.
The problem I have is that my template is outputted on the page but my…
Can I do this without reference to the object in the constructor?
In other words, any class inherited from FrmTaoChild when creating must to add the button on the toolbar of the main window
public class FrmTaoMain extends JFrame {
JToolBar tbTask = new JToolBar();
public FrmTaoMain(String Caption)…
I am adding images to a JPanel but the images are getting cut off. I was originally trying BorderLayout but that only worked for one image and adding others added image cut-off. So I switched to other layouts and the best and closest I could get was BoxLayout however that adds a very large cut-off…
I'm using the below code to receive the messages using serial port event handler. But it dosent receives any.I am not getting errors. The code breaks in "string msg = comport.Readline()" Am i doing something wrong ?
public partial class SerialPortScanner : Form
{
private SerialPort comPort =…
per my client request I have been requested to return a dataset. basically it's an arraylist that i convert to dataset as follow
DataSet ds = new DataSet();
DataTable tbl = new DataTable("Table");
DataRow drow;
tbl.Columns.Add("ID", Type.GetType("System.String"));
tbl.Columns.Add("Name",…
Hi,
I am using the EntityFramework POCO adapter and since there are limitations to what microsoft gives access to with regards to the meta data, i am manually extracting the information i need out of the xml. The only problem is i want to get the ssdl, msl, csdl file names to load without…
I have a Java application sending HTTP requests to a C# application. The C# app uses HTTPListener to listen for requests and respond. On the Java side I'm encoding the URL using UTF-8.
When I send a \ character it gets encoded as %5C as expected but on the C# side it becomes a /…
I'm overriding the onrowcreated to add sort images to the header row of a gridview. This works, but actually adding a sortexpression doesn't. What I want to do is set the images as imagebuttons and set their commandarguments to the sort expression of the column they are sorting…
Let's say I have this:
public class Foo {
private String value;
// <snip> getters and setters, constructors etc
}
And I also have this:
public class Bar extends Foo {
private String anotherValue;
// <snip> getters and setters, constructors etc
}
I…
What are some reasons for choosing a case sensitive collation over a case insensitive one? I can see perhaps a modest performance gain for the DB engine in doing string comparisons. Is that it? If your data is set to all lower or uppercase then case sensitive could be…
The code below works great. If the Get and Use methods are in different assemblies, the code fails with a RuntimeBinderException. This is because the .Net runtime system only guarantees commonality of anonymous types (<string, int> in this case) within assemblies.…
I was searching online for a solution to passing a string array to a stored procedure in Oracle. The "easy" but messy way was using a comma delimited string.
I had found a sample based on which I created my own type of TABLE of VARCHAR2(200).
I understood that I could…