if have multiples object, how to arrange it so that each number of object in row x column will form a near square?
exp:14 objects arrange to something like this:
0 0 0 0
0 0 0 0
0 0 0 0
0 0
I have an NSArray filled with bool objects (expressed as a number), and I need to test to see if any object within the array is equal to 1. How can I do it?
I need to draw several simple objects (polygons composed by lines and arcs, eventually placed on different layers) inside a form (or any other container) and then handle events like:
right click on object
zoom
pan
Is there a library/framework that can handle my need or do I need to create my own?
I have a collection of book objects in a HashMap. The book has book_title, book_author, book_year_published, etc. I want to sort them based on the book_title which is a String, in both ascending and descending order, and display them on the screen.
I wish someone can help me - I have been doing this for hours and still havent come up with a solution. Thanks in advance.
I have a mainscreen which currently scrolls (and I have the arrows on the right) but the scrolling seems to be focused on the ButtonField objects that I have on the page. Is there any way to set the scrolling to be non-focused scrolling (moving a few pixels each time). Is there a way to set this?
Other ideas I have had (which sound hacky so I want to avoid):
- Placing NullFields around to scroll
- Manually listening to the trackwheelRoll event and moving appropriately
hello all , I am trying to create url routing with strongly typed objects for pages but I keep getting null object on the first line so it's crashing
//Getting the suitable executing Page
var display = BuildManager.CreateInstanceFromVirtualPath(_virtualPath,typeof(Page)) as IProfileHandler;
//Setting Page Parameters
display.MemberId = Convert.ToInt32(requestContext.RouteData.Values["ID"]);
//Return Page
return display;
public interface IProfileHandler : IHttpHandler
{
int MemberId
{
get;
set;
}
}
I have an application on a client's site that processes data each night, last night SQL Server 2005 gave the error "Could not find stored procedure 'xxxx'". The stored procedure does exist in the database, has the right permission as far as I can tell, the application runs fine in other nights as well.
In previous occasions, the SQL Server has also gave error saying 'database object not found', and refers to a table in the database that does exists.
So, on rare occasions, the server thinks certain stored procedures and tables does not exist in the database. The objects it refers to are often ones that are frequently used.
Is the database somehow corrupted, is there some sort of repair/health check I can do?
Hi.
I'm a newbie to WCF, trying to perform relatively simple task.
I'm trying to return list of objects read from the database but cannot overcome some really annoying exceptions.
The question is very simple? What's wrong with the picture?
[ServiceContract]
public interface IDBService
{
[OperationContract]
string Ping(string name);
[OperationContract]
InitBDResult InitBD();
}
public InitBDResult InitBD()
{
_dc = new CentralDC();
InitBDResult result = new InitBDResult();
result.ord = _dc.Orders.First();
return result;
}
[DataContract]
public class InitBDResult
{
//[DataMember]
//public List<Order> Orders { get; set; }
[DataMember]
public Order ord { get; set; }
}
Is there a tool which could be used to analyse the objects being created between two separate garbage collection run (= number of objects created and their type) ?
Heapdumps dont really work here as they perform a GC when they're invoked (or at least that's what I observed everytime so far), and I want to see which objects are collected by the GC, not which objects are left after the GC run, if that makes sense.
...or is it possible somehow to inspect the nature and size of objects being collected by the garbage collector ?
I have created a UISplitViewController based iOS app in XCode 3.2.5
Below is a screen shot of Interface builder showing the rootviewcontroller and how it is linked to other objects.
Being a beginner myself, I do not understand:
1) What is the role of the rootviewcontroller? Searched the documentation but what I found did not answer this question.
2) I thought a IBOutlet should only link to one corresponding object. Why in this case the rootviewcontroller is linked to two?
Is it possible? I'm learning canvas at the moment, and while it's fun to position objects programmatically, it would be most interesting to come up with a way to align them to a curve.
E.g. align a series of squares back to back along a wavy line or a circle.
Hey Guys
I got some question about nested javascript objects (is it me, google or is javascript quite poorly documented?). Now, I got the following (nested) object:
obj: { subObj: { 'hello world' } };
next thing I do is to reference the subobject like this:
var s = obj.subObj;
now what I would like to do, is to get a reference to the object obj out of the variable s.
Something like:
var o = s.parent;
Is this somehow possible?
What is the delay load equivalent in unix based system.
I have a code foo.cpp, While compiling with gcc I link it to shared objects(totally three .so files are there.).Each of the .so file for different option.
./foo -v needs libversion.so
./foo -update needs libupdate.so
I need the symbol for those libraries should be resolved only at the run time.
./foo -v should not break even if libupdate.so library is not there.
It is working in windows using the delay load option(in properties of dll). What is its equivalent in unix systems.
Will '-lazy' option does the same in UNIX?.
If so,Where to include this option? (in makefile or with linker ld).
I am not good in unix.
Please help me.. Thanks in advance.
Is it possible to create objects at runtime based on it's type by calling a method.
What I am trying to achieve is
var
lForm1 : TForm;
lForm2 : TForm;
begin
CreateObjects([lForm1, lForm2]);
// After this call I have the variables initialized and I can use them.
end;
Can Richfaces (de)serialize objects? Say for instance, I have a row of data being displayed in a richfaces table. Can I serialize the row of data to a string and later deserialize it back into a row?
Hi everybody,
I have tried to find a good introduction on chainable OOP objects in PHP, but without any good result yet.
How can something like this be done?
$this->className->add('1','value');
$this->className->type('string');
$this->classname->doStuff();
Or even: $this->className->add('1','value')->type('string')->doStuff();
Thanks a lot!
I have a class that has an list<Book> in it, and those Book objects has many many properties.
How can I remove from that list every Book that his level value is different than, for example, 5?
Hi,
Please clarify, how to deal with returned objects from methods?
Below, I get employee details from GeEmployeetData function with autorelease,
1. Do I have to retain the returned object in Process method?
2. Can I release *emp in Process fucntion?
-(void) Process
{
Employee *emp = [self GeEmployeetData]
}
+(Employee*) GeEmployeetData{
Employee *emp = [[Employee alloc]init];
//fill entity
return [emp autorelease];
}
I am using malloc_stats() function to display the amount of "system bytes" and "in use" bytes used by the process. I wanted to know if the in use bytes also include the memory used by STL C++ Objects like map, vector, sets?
If yes, is it safe to assume that this is only amount of memory that will be used by the process?
Let's say I have a custom object of Foo
Is there anyway I can sort through a list of these objects, like
list<of foo>.sort()
and also be able to sort this list with a passable parameter. which will influence the sort?
list<of foo>.sort(pValue)
I'm guessing I'll need to define two separate sorts, but I am not sure.
Accesing array objects in javascript
OBJ_ARRAY[j][i] = {
"x1": w * i,
"y1": h * j,
"x2": w * (i + 1),
"cell_color": "blue",
"y2": h * (j + 1),
"name": (i + 1 * (j * 10)) + 1,
"z-index": 10,
"status":isnotactive
}
I have this cell array and all its x1,y1 x2,y2 are generated dynamically.
for eg. if want to compare OBJ_ARRAY[5][5].x110 then alert
if(( OBJ_ARRAY[5][5].x1) > 10)) ;
{
alert("Done");
}
It does not work any idea how it can be fixed?
Hi, is it posible to have callable objects on ActionScript? For example:
class Foo extends EventDispatcher
{
Foo() { super(); }
call(world:String):String
{
return "Hello, " + world;
}
}
And later...
var foo:Foo = new Foo();
trace( foo("World!") ); // Will NOT work
I'm working on my high-school matriculation asp.net project, and I wish to make a website of a bookstore.
I want to create two classes,Book and BookStore, and save the data created in XML files and not in a database.
How can I save objects as XML files, and how can I load them afterwards?
Thank you very much.
I have two objects of Zend_Date class and I want to calculate the difference between them in full calendar months.. How can I do this?
<?php
$d1 = new Zend_Date('1 Jan 2008');
$d2 = new Zend_Date('1 Feb 2010');
$months = $d1->sub($d2)->get(Zend_Date::MONTH);
assert($months == -25); // failure here
Thanks in advance!
Hi!
I have the following code:
Criteria crit = sess.createCriteria(Product.class);
ProjectionList proList = Projections.projectionList();
proList.add(Projections.property("name"));
proList.add(Projections.property("price"));
crit.setProjection(proList);
But I also have User.class and I would like the name to be restricted on User.class and price from Product class.
How can I restrict different columns on different objects in Hibernate Search?