Let's say I need to save a matrix(each line corresponds one row) that could be loaded from fortran later. What method should I prefer? Is converting everything to string is the only one approach?
We have serialized value of some objects persisted. Now we want to make substantial changes to some objects.
So what i want to do is load older version of object using old assembly then deserialize and serialize again with newer version of the object. I can have convert method which can transform old object to new one.
i have been converting object on fly on deserializer but in this case it's almost new object with same name.
i'm using the xinha wysiwyg editor and would like to enable the clipboard (for using the menu icons: copy, cut, paste)
i've googled but couldn't find a working method - only for adding some settings capability.policy.allowclipboard.Clipboard to the user.js
unfortunately my firefox portable has no user.js :(
can someone tell me where to add those settings?
thx,
fuxi
Hi,
how can i check the current status of the GPS receiver?
I already checked the LocationListener onStatusChanged method but somehow it seems that is not working, or just the wrong possibility.
So basically i just need to know if the gps icon at the top of the screen is blinking (no actual fix) or solid (fix is available)
thx!
Hi, I have a service that contains a map:
static Map cargosMap = ['1':'item1','2':'item 2','3':'item 3']
that is returned via a method in the service:
static Map getCargos() {
[cargosMap]
}
A controller calls it like this:
def mform = {
Map cargos = empService.getCargos()
[cargos:cargos]
}
In the gsp, I have the select:
<g:select name="cg1" from="${cargos}" />
But I'm getting the exception:
Error 500: Executing action ....caused exception:
org.codehaus.groovy.runtime.typehandling.GroovyCastException: Cannot cast object
...
with class 'java.util.ArrayList' to class
'java.util.Map'
Any clues ? Thanks
Why MS Access adodb in .NET returns 34 in fieldcount when table has 42 fields ?
I see 42 fields in table of my MS Access mdb database. But ADODB layer in .NET sees only 34 fields. The Outofrange exception occures when I am calling method getOrdinal("FieldName") of reader class.
Is it something I am missing in setting up connection, license or anything?
Thank you
Hello,
I have a UINavigationController with two UITableViewControllers pushed onto its stack. Is there any way to reference a property on the first TableViewController that is under the second? I would like to do this in the second controller's viewWillAppear method.
Thank you for any help you can give....
What I want to do is provide some public static fields that will be used as instances of an interface implementation and have intellisense pick them up when the interface is a method argument.
The idea is to have it look like an enum to the developer. I reference Color because basically this is the behavior I want, I just don't know how to replicate it.
I know that it's not possible to style any given PHP but I do know that it is possible to style the output HTML that the PHP provides you with. I was wondering if there was any method available for me to use that would enable me to style the output from my IF ELSE statement.
if ($result != false) {
print "Your entry has successfully been entered into the blog.";
}
I'm trying to find the exact height and width of a browser's viewport, but I suspect that either Mozilla or IE is giving me the wrong number. Here's my method for height:
var viewportHeight = window.innerHeight ||
document.documentElement.clientHeight ||
document.body.clientHeight;
I haven't started on width yet but I'm guessing it's going to be something similar.
Is there a more correct way of getting this information? Ideally, I'd like the solution to work with Safari/Chrome/other browsers as well.
I am stuck - I have a macro in a workbook which I can call quite easily using the run method on MSDN
The problem is that if the workbook has a password protecting the code then this becomes much more difficult and forces a dialog box to appear..
Does anyone know how to run a macro from C# which has a password on it??
function checkLength(obj,url){
//alert("URL="+url+" OBJ="+obj);
if(obj) {
var params = 'query='+obj;
var myAjax = new Ajax.Request(url, {
method: 'post', parameters: params, onComplete: loadResponse
});
}
}
is nor working why
i think there is requirement of include some files in it.which is that??/
Ignore spaces, punctuation and anything else that is not a letter. Ignore the case of the incoming letters (so e.g. 'A' and 'a' should be counted together). The results of analysing this string should be added to any analysis performed by previous calls to this method.
I'm using nested routes and I want to provide some sort of a shortcut method. (I'm using RoR 3.0)
The routes look like this.
resources :countries do
resources :regions do
resources :wineries
end
end
To access a winery route I want to be able to define a function that removes the need to specify a country and region each time. Like:
def winery_path(winery)
country_region_winery_path (winery.country, winery.region, winery)
end
Where should I do this? How can I get that to be available whereever url_for is available?
I am getting the following error.
game.rb:46:in `play': undefined method `[]' for nil:NilClass (NoMethodError)
from game.rb:45:in each'
from game.rb:45:inplay'
from game.rb:56
with this code,
def play()
currentTile = nil
@tiles.each do |tile|
if(tile['Name'] == 'Starting Square')
currentTile = tile
end
puts("#{currentTile['Desciption']}")
end
end
This is part of a text adventure game, I am playing with @tiles is an array of tiles that was read from a file. Each tile is a dictionary.
Thanks for any help, I cant figure this out
I have a class like below:
class Foo
{
public Foo(int x) { ... }
}
and I need to pass to a certain method a delegate like this:
delegate Foo FooGenerator(int x);
Is it possible to pass the constructor directly as a FooGenerator value, without having to type:
delegate(int x) { return new Foo(x); }
?
EDIT: For my personal use, the question refers to .NET 2.0, but hints/responses for 3.0+ are welcome as well.
Hi ,
Am not worked on extream level of oops in my projects ,
So i have little doubts ,
In which situation should i use abstract method or classes ,
Basically i know about abstract class definition and flow,
I got details from this URL
Doubt is which situation should i use abstract class and methods ,
I have to test a web app and its API for UTF-8 strings.
Webapp has a text field and its API has corresponding getter method, I have to make sure UTF-8 will work, how do I do that?
In infopath script (J), how do I generate a GUID?
This is my current and comletely hacked (and horrid) method.
var getGuid = new ActiveXObject("ADODB.Recordset");
getGuid.Open("SELECT NewId()", mySqlConn);
var guid = getGuid.Fields(0).Value;
There has to be a better way...
how can i transform a method (that performs a+b and returns the result) from add(a,b) to a.add(b)?
i read this somewhere and i can't remember what is the technique called...
does it depends on the language?
is this possible in javascript?
println args
println args.size()
println args.each{arg-> println arg}
println args.class
if (args.contains("Hello"))
println "Found Hello"
when ran give following error:
[hello, somethingelse]
2
hello
somethingelse
[hello, somethingelse]
class [Ljava.lang.String;
Caught: groovy.lang.MissingMethodException: No signature of method: [Ljava.lang.
String;.contains() is applicable for argument types: (java.lang.String) values:
[Hello]
why can I not do contains?
Is it possible to change or assign new parent to the Model instance that already in datastore? For example I need something like this
task = db.get(db.Key(task_key))
project = db.get(db.Key(project_key))
task.parent = project
task.put()
but it doesn't works this way because task.parent is built-in method. I was thinking about creating a new Key instance for the task but there is no way to change key as well.
Any thoughts?
I know this is not a hell of an useful question but I can't help being bugged by it.
So,
Why said method (in *Command classes) is called
ExecuteNonQuery instead of ExecuteQuery?
Aren't those SQL statements we throw at DBs, queries?
function checkLength(obj,url){
//alert("URL="+url+" OBJ="+obj);
if(obj) {
var params = 'query='+obj;
var myAjax = new Ajax.Request(url, {
method: 'post', parameters: params, onComplete: loadResponse
});
}
}
The code isn't working, but I don't know why. I think I need to include other files, but I don't know which