Hi,
I need a random object generator in JavaScript that generates a variety of objects with different fields and values. Any ideas where I can find such tool?
Thanks,
Gjorgji.
I'm reading a book about DI that always talks about DI frameworks "instantiating an object graph". Why say it this way rather than "instantiating objects"?
I read your matter and I wonder did you resolve it? If you found out, let me know and give mail for me. My mail is [email protected]. Thanks much!
http://stackoverflow.com/questions/2298908/advanceddatagrid-does-not-displays-object-properties
I need the behaviour of sql2005 where function OBJECT_NAME takes two arguments obj id and db id, while sql2000 takes only obj id so the execution must be in the context of the database to which inspected object belongs to. Solution must be possible to implement in a function, so it can be used in a select query.
i'm getting an error 'Object expected' for some odd reason due to jquery, and this does not 'submit' the form or enter the data into database.
without jquery, the data could be entered into the database. but now it doesn't.
i've used jquery mainly for validating asp.net controls.
I'm looking for an object database for .NET that is open source and free for commercial use. I need something that is available as assemblies and/or source code to embed into a project, i.e. not a stand alone database in its own process.
I am aware of db4o, and it would be perfect except for the commercial license coming at a price.
Hello Guys,
How will I use an instance of an object that is initially loaded throughout the whole site?
I want $myinstance to be used everywhere.
$myinstance = new TestClass();
Thanks!
I've tried implementing various methods from around the internet, all seem to be providing the same solution. But it just won't work and I'm unsure why, it creates the file, however, it's blank and if I try loading that file, it has an error.
Main.java contains the code to save and load the file: 190-224.
Rooms.java contains the object.
Code
Any help is greatly appreciated, I've been trying for almost a week now! Thanks in advanced!
So I have a class like this:
def Word
end
and im looping thru an array like this
array.each do |value|
end
And inside that loop I want to instantiate an object, with a handle of the var
value = Word.new
Im sure there is an easy way to do this - I just dont know what it is!
Thanks!
i code some configuration setting. And need those values to be load, everytime my webapp start. yes, it's somekind autoload setting.
But, right now, i have to choose between save it as object or array. is there any different between them when we save them in database ? which one is faster or maintainable or other pro and cons
thanks
I have a Persons object. It has a variable name accessible by saying
$p = new Person('John');
echo $p->name;
Now I have a string.
$name = 'name';
I need to get $p->name using $p and $name. Something like
echo $p->[$name];
Is there a way to tell the .NET to allocate a new object in generation 2 heap. I have a problem where I need to allocate approximately 200 MB of objects, do something with them, and throw them away. What happens here is that all the data gets copied two times (from gen0 to gen1 and then from gen1 to gen2).
So i'm trying to render a template with trimpath in IE8, but when passing the template (a jquery object) there is nothing in it. This all works in chrome,safari,firefox.
So to give an example:
var $flickrImageGalleryPreviewTemplate =$('#flickr_image_gallery_preview_template',rootel);
$flickrImageGalleryPreviewTemplate.length)
will result in 0 in IE8 and 1 in FF,Chrome,Safari
Hi All
SaveNotes *saveNotes = [[SaveNotes alloc]initWithTitleString:title descrString:descr];
[titleDescrObjects addObject:saveNotes];
[saveNotes release];
from the above code i have saved title,descr to a class SaveNotes , and then i have stored that object in my NSMutableArray - titleDescrObjects,
Its working fine,
i need to get particular objects "descr" alone,
how to get the descr from objectAtIndex:i
i am trying
for (int i=0; i<[titleDescrObjects count]; i++)
{
NSLog(@"\n ((%@))\n",[titleDescrObjects objectAtIndex:i].descr);
}
Thanks in advance,
Recently I've studied about objectorientedanalysis and design and I liked a lot about it. In every place I've read people say that the idea is to start with the minimum set of requirements and go improving along the way, revisiting this each iteration and making it better as we contiuously develop and contact the customer interested in the software. In particular, one course from Lynda.com said a lot of that: we don't want to spend a lot of time planing everything upfront, we just want to have the minimum to get started and then improve this each iteration.
Now, I've also seem a course from the same guy about database design, and there he says differently. He says that although when working with object orientation he likes the agile iterative approach, for database design we should really spend a lot of time planing things upfront instead of just going along the way with the minimum.
But this confuses me a little. Indeed, the database will persist important data from our domain model and perhaps configurations of the software and so on. Now, if I'm going to continuously revist the analysis and design of the model, it seems the database design should change also. In the same way, if we plan all the database upfront it seems we are also planing all the model upfront, so the two ideas seems to be incompatible.
I really like agile iterative approach, but I'm also looking at getting better design for the database also, so when working with agile iterative approach, how should we deal with the database design?
I've just read an excerpt of "Growing Object-Oriented Software" book which explains some reasons why mocking concrete class is not recommended.
Here some sample code of a unit-test for the MusicCentre class:
public class MusicCentreTest {
@Test public void startsCdPlayerAtTimeRequested() {
final MutableTime scheduledTime = new MutableTime();
CdPlayer player = new CdPlayer() {
@Override
public void scheduleToStartAt(Time startTime) {
scheduledTime.set(startTime);
}
}
MusicCentre centre = new MusicCentre(player);
centre.startMediaAt(LATER);
assertEquals(LATER, scheduledTime.get());
}
}
And his first explanation:
The problem with this approach is that it leaves the relationship
between the objects implicit. I hope we've made clear by now that the
intention of Test-Driven Development with Mock Objects is to discover
relationships between objects. If I subclass, there's nothing in the
domain code to make such a relationship visible, just methods on an
object. This makes it harder to see if the service that supports this
relationship might be relevant elsewhere and I'll have to do the
analysis again next time I work with the class.
I can't figure out exactly what he means when he says:
This makes it harder to see if the service that supports this
relationship might be relevant elsewhere and I'll have to do the
analysis again next time I work with the class.
I understand that the service corresponds to MusicCentre's method called startMediaAt.
What does he mean by "elsewhere"?
The complete excerpt is here:
http://www.mockobjects.com/2007/04/test-smell-mocking-concrete-classes.html
In an answer to this question (written by Pete) there are some considerations about OOP versus FP. In particular, it is suggested that FP languages are not very suitable for modelling (persistent) objects that have an identity and a mutable state.
I was wondering if this is true or, in other words, how one would model objects in a functional programming language. From my basic knowledge of Haskell I thought that one could use monads in some way, but I really do not know enough on this topic to come up with a clear answer.
So, how are entities with an identity and a mutable persistent state normally modelled in a functional language?
EDIT
Here are some further details to clarify what I have in mind. Take a typical Java application in which I can (1) read a record from a database table into a Java object, (2) modify the object in different ways, (3) save the modified object to the database.
How would this be implemented e.g. in Haskell? I would initially read the record into a record value (defined by a data definition), perform different transformations by applying functions to this initial value (each intermediate value is a new, modified copy of the original record) and then write the final record value to the database.
Is this all there is to it? How can I ensure that at each moment in time only one copy of the record is valid / accessible? One does not want to have different immutable values representing different snapshots of the same object to be accessible at the same time.
In this tutorial we demonstrate how to use Skin Object Tokens in DotNetNuke v5 and above. Skin Object tokens are a new skinning method introduced in DotNetNuke 5 for adding tokens into a DotNetNuke skin.
A Skin Object Token is a web user control, it covers skin elements such as the logo, menu, search, login links, date, copyright, languages, links, banners, privacy, terms of use etc.
This new Object token method has been introduced into DotNetNuke with the idea of making it simpler to add a skin object into a DotNetNuke skin.
The videos contain:
Video 1 - Introduction to HTML Object Token Skinning
Video 2 - Basic Styling of a Skin and Creating Multiple Content Panes
Video 3 - Styling, Control Panel, Login and Register Skin Object Tokens
Video 4 - Packaging, Installing, Testing and Viewing the ASCX Version of the Skin
Video 5 - Viewing the Attributes for Skin Object Tokens, Logo Token, Search Token
Video 6 - Breadcrumb Token, Text Token and Localization, Links Token
Video 7 - More Skin Tokens and Token Replacement
Video 8 - Demonstration of the Object Tokens and Bug Fixing
Did you know that DotNetSlackers also publishes .net articles written by top known .net Authors? We already have over 80 articles in several categories including Silverlight. Take a look: here.
I have some c# projects in visual studio 2008, and I want to get graph (map? table?) of all methods calls. I want it static, not runtime (like "call stack"); any function - who calls it, and how many times, etc.
I can Find All References method after method, and copy each call to table or Graphviz file, but it will take few hours. Is there an automatic tool or plugin that can help?
I am working on VS C# on the following code, which converts an user input
math expression and computes it.
MSScriptControl.ScriptControl sc = new MSScriptControl.ScriptControl();
sc.Language = "VBScript";
sc.ExecuteStatement(
"function pi\n"
+ "pi = 3.14159265\n"
+ "end function");
sc.ExecuteStatement(
"function e\n"
+ "e = exp(1)\n"
+ "end function");
expression = textBox1.Text.ToString();
expression = expression.Replace("x", i.ToString());
object y = sc.Eval(expression);
string k = y.ToString();
double result = double.Parse(k);
While this outputs onto the console with the correct result, I want
to use the values to make a graph of the function user inputs and it's
not doing it correctly.
Thank you for your help.
Hello,
I'm using Sharepoint 2010 Object Model. I'm trying to retrive the content of a Custom List. Everything works fine except if when I try to retrieve a Choice Field.
When I try to retrieve the choice field, I got an PropertyOrFieldNotInitializedException exception...
Here is the code I'm using:
ClientContext clientContext = new ClientContext("https://mysite");
clientContext.FormsAuthenticationLoginInfo = new FormsAuthenticationLoginInfo("aaa", bbb");
clientContext.AuthenticationMode = ClientAuthenticationMode.FormsAuthentication;
List list = clientContext.Web.Lists.GetByTitle("mylist");
CamlQuery camlQuery = new CamlQuery();
camlQuery.ViewXml = "<View/>";
ListItemCollection listItems = list.GetItems(camlQuery);
clientContext.Load(listItems);
clientContext.ExecuteQuery();
foreach (ListItem listItem in listItems)
{
listBoxControl1.Items.Add(listItem["Assigned_x0020_Company"]);
}
Thank you for you help!
Eric
Which is the right/best tag to use in my HTML file when I want to display the Adobe PDF viewer? Right now I'm using the code below, but there are weird side effects (e.g. it seems to steal the starting focus that I've set to another INPUT text box; it doesn't seem to play real well with the jQueryUI Resizeable class; etc.)
<embed src="abc.pdf" type="application/pdf" />
Could I even do the same thing with the OBJECT tag? Are there advantages/disadvantages to using one tag vs. the other?
I am developing a C# VS 2008 / SQL Server website application. I am a newbie to ASP.NET. I am getting the above error, however, on the last line of the following code. Can you give me advice on how to fix this? This compiles correctly, but I encounter this error after running it.
DataTable dt;
Hashtable ht;
string[] SingleRow;
...
SqlConnection conn2 = new SqlConnection(connString);
SqlCommand cmd = conn2.CreateCommand();
cmd.CommandText = "dbo.AppendDataCT";
cmd.Connection = conn2;
SingleRow = (string[])dt.Rows[1].ItemArray;
My error:
System.InvalidCastException was caught
Message="Unable to cast object of type 'System.Object[]' to type 'System.String[]'."
Source="App_Code.g68pyuml"
StackTrace:
at ADONET_namespace.ADONET_methods.AppendDataCT(DataTable dt, Hashtable ht) in c:\Documents and Settings\Admin\My Documents\Visual Studio 2008\WebSites\Jerry\App_Code\ADONET methods.cs:line 88
InnerException:
I have a "plain" XmlDocument loaded like so:
<root>
<element1 />
<element2></element2>
</root>
and want to qualify the elements with namespaces like so while the object model is loaded
<root xmlns:abc="urn:something">
<abc:element1 />
<abc:element2></abc:element2>
</root>
before writing it out.
I am looking for good recommendations for scalable and/or parallel large graph analysis libraries in various languages. The problems I am working on involve significant computational analysis of graphs/networks with 1-100 million nodes and 10 million to 1+ billion edges. The largest SMP computer I am using has 256 GB memory, but I also have access to an HPC cluster with 1000 cores, 2 TB aggregate memory, and MPI for communication.
I am primarily looking for scalable, high-performance graph libraries that could be used in either single or multi-threaded scenarios, but parallel analysis libraries based on MPI or a similar protocol for communication and/or distributed memory are also of interest for high-end problems. Target programming languages include C++, C, Java, and Python.
My research to-date has come up with the following possible solutions for these languages:
C++ -- The most viable solutions appear to be the Boost Graph Library and Parallel Boost Graph Library. I have looked briefly at MTGL, but it is currently slanted more toward massively multithreaded hardware architectures like the Cray XMT.
C - igraph and SNAP (Small-world Network
Analysis and Partitioning); latter uses OpenMP for parallelism on SMP systems.
Java - I have found no parallel libraries here yet, but JGraphT and perhaps JUNG are leading contenders in the non-parallel space.
Python - igraph and NetworkX look like the most solid options, though neither is parallel. There used to be Python bindings for BGL, but these are now unsupported; last release in 2005 looks stale now.
Other topics here on SO that I've looked at have discussed graph libraries in C++, Java, Python, and other languages. However, none of these topics focused significantly on scalability.
Does anyone have recommendations they can offer based on experience with any of the above or other library packages when applied to large graph analysis problems? Performance, scalability, and code stability/maturity are my primary concerns. Most of the specialized algorithms will be developed by my team with the exception of any graph-oriented parallel communication or distributed memory frameworks (where the graph state is distributed across a cluster).