I just read a pretty interesting article on how android (and i assume other OSs) work when low on memory. How is this done theoretically? Is it similar to Java's object serialization?
I've got a list of names which some code checks against to see if the person exists, and if so do some stuff..
My issue is that I want to handle the case of the name being entered incorrectly.. I.e. I have a list of names
Bob
Frank
Tom
Tim
John
If I type in Joohn, I want it to ask me if I meant John. If I type Tm, I get asked if I meant Tim,…
Need some help I've got lots of code and i want to make it shorter i know there's a way but I can't remember it this is code example:
<?xml version="1.0" encoding="ISO-8859-1"?>
<bookstore>
<book category="cooking">
<title lang="en">Everyday Italian</title>
<author>Giada De…
I am outputting a textbox to the page using the Html helpers. I want to add the disabled attribute dynamically based on whether or not a boolean value in my model is true or false.
My model has a method that returns a boolean value:
<% =Model.IsMyTextboxEnabled() %>
I currently render the textbox like follows, but…
I'm trying to select all fields in two separate tables as long as they're sharing a common ID.
//mysql query
$result = mysql_query("SELECT * FROM project, links
WHERE project.id = links.id and project.id = $clientID")
//displaying the link
if ($row['url'] != null){
echo "<div class='clientsection'…
I'm not sure if there is a way to do this in Velocity or not:
I have a User POJO which a property named Status, which looks like an enum (but it is not, since I am stuck on Java 1.4), the definition looks something like this:
public class User {
// default status to User
private Status status =…
Hey all,
I've had a question that I've been wondering for a while. I'm making a templating system for front-ends where tags are interpretted (like Smarty). I was wondering if there is value in having the tags be able to communicate with the HTML document and other "Smartyish" tags. I was hoping that the…
I'm trying to select a number of fields, one of which needs to be an array with each element of the array containing two values. Each array item needs to contain a name (character varying) and an ID (numeric). I know how to return an array of single values (using the ARRAY keyword) but I'm unsure of how…
Hi guys.
I'm trying to add some columns to an existing table, so I generated a migration that did so. When I run db:migrate the new migration isn't run and the table isn't updated. I've had this problem many times before, and it's getting bloody annoying.
Output from rake db:migrate
$ rake db:migrate…
I am trying to declare a class B in a namespace A using Luabind (from the Lua side). I figure that if Luabind has a clean way to do this, it would look something like this:
class 'A.B' (Super)
function A.B:__init()
Super.__init(self)
end
Notice that the B class is defined in the A table. I…
Hi,
I have some PHP code that sends a section of html code including some inline Javascript code by curl to google. When i get it back from Google translated into the language that i chose, the Javascript code has been translated too.
Any ideas as to how i can stop Google translating my inline…
I have a traditional ASP.NET GridView. Inside of it I have a Template Field with edit capabilities. I need to use a jQuery autocomplete plugin on the edit piece. It works anywhere but inside of this GridView. In other words, I know the plugin works.
Here is the ASP.NET stuff (yes, I'm using a…
I'm new to iPhone dev and am using sqlite3 but there seem to be two different sqlite libraries available: libsqlite3.0.dylib and libsqlite3.dylib
Which is the best to use? What's the difference?
Any help appreciated.
If I have an object that lazy loads an association with very large objects, is there a way I can do processing at the time the lazy load occurs? I thought I could use AssociateWith or LoadWith from DataLoadOptions, but there are very, very specific restrictions on what you can do in those.…
There are a lot different media queries for mobile screen sizes. It can be overwhelming to accomodate all of them when designing a responsive mobile site. Which are the most important ones to use when designing for mobile? I found this article that does a pretty good job of outlining the…
I am trying to understand blocks and yields and how they work in Ruby. How is a yield used and most of the rails applications use yields in a weird way. Can someone explain to me or show me where to go to understand them.
I'm 99+% still using python 2.x, but I'm trying to think ahead to the day when I switch.
So, I know that using comparison operators (less/greater than, or equal to) on heterogeneous types that don't have a natural ordering is no longer supported in python3.x -- instead of some…
I am having trouble figuring out the if statement code for changing the color of a UI label based on the current color of the label. For instance, if the label color is currently red and the correct button is pressed, I want the label color to change to black. If the label…
Why does this code fail to compile, but compiles successfully when I uncomment the indicated line? (I'm using Scala 2.8 nightly). It seems that explicitly calling string2Wrapper allows it to be used implicitly from that point on.
class A {
import Implicits.string2Wrapper
…
I have two .NET libraries: "Foo.Bar" and "Foo.Baz".
"Foo.Bar" is self-contained, while "Foo.Baz" references "Foo.Bar".
Assuming I do the following:
Use ILMerge to merge "Foo.Bar.dll" with "Foo.Baz.dll" into "Foo1.dll".
Create a new solution containing the entirity of both…
I would like to create a text box which loads xml files and let users edit them. However, I cannot use XmlDocument to load since the files can be very large. I am looking for options to stream/load the xml document in chunks so that I do not get out of memory errors -- at…
I'd like to do a webkit transformation (rotate an image, specifically) after the page loads rather than getting it pre-rotated at load. I'm guessing I need to use some sort of "onload" event to apply it or something, but I'm not a javascript guy.
What behavior should I expect if I delete a DOM element that was used to start an event bubble, or whose child started the event bubble - will it continue to bubble if the element is removed?
For example - lets say you have a table, and want to detect click events on the…