Questions tagged [instances]

An instance is a specific realization of any object.

516 questions
2
votes
4 answers

Defining your own Functor

I've been trying to understand what a Functor is in Haskell, and for that I've want an example of a Functor, without any other properties. The working example I came up with was data MyFunctor a b = MyFunctor a b deriving Show instance Functor…
2
votes
1 answer

List of Postgres Instances running on a Server

I am working as a Postgres DBA at my organization. We are currently working on Postgres 9.5 on SUSE Linux servers. I wanted a specific solution. We have multiple SUSE Linux servers and each server can host one or more Postgres database. My…
Praveen
  • 31
  • 2
  • 3
2
votes
1 answer

nextSyncToken is always empty in the list responce

I'm trying to make a google sync method from PHP, and i need to receive the nextSyncToken for the initial sync to make it work. And for some reason it's empty. The connection is made using a access token: public function __construct() { …
C. Vlad
  • 31
  • 1
2
votes
3 answers

Use same jQuery function in multiple instances

I have this function and it needs to work in 54 different buttons on a page, what am I missing to make it work ONLY in the corresponding FLIP? $(document).ready(function() { $(".flip").mouseenter(function() { …
2
votes
3 answers

Applicative and Monad instances for a function type?

I have a data type that resembles Blah below but because of a quirk with the type I cannot automatically derive Functor, Applicative, and Monad. So I must do it manually, but I'm not sure how. I tried to take inspiration from the instances for…
David McHealy
  • 2,471
  • 18
  • 34
2
votes
1 answer

Understanding execution flow of this Java programme

I'm new at learning Java can anyone explain me the execution flow of the following code? I'm quite confused with the output. This is the code: public class MainClass { public static void main(String[] args) { car c = new car(); …
Konark
  • 59
  • 6
2
votes
1 answer

C++: Why do these functions use different copies of the vector?

I have the problem of class functions making changes on different copies of a vector rather than the one saved in an instance of the corresponding object. Description of the Main function: This is the main function. It first creates an object Menno…
EE-Student
  • 85
  • 1
  • 10
2
votes
4 answers

Is there an API call I can make to get the number of App Engine Instances I'm running?

It's a pretty simple question, really. I want to report the number of running instances to datadog, along with a bunch of my other stats. There's an irony to the fact that I search Google Web Search for how to do something in Google App Engine and…
Sniggerfardimungus
  • 11,583
  • 10
  • 52
  • 97
2
votes
3 answers

Instance member cannot be used on type of custom class

I have a classe named "whisky builder" which only initiates the new Whisky. Now i would like to add the new added whiskies in my "WhiskyOverViewController". But I face the following problem: class WhiskyOverViewController: UIViewController,…
Mikey
  • 131
  • 1
  • 2
  • 10
2
votes
1 answer

How to detect nullification of an object from a working thread inside it

I'm working on a ReloadableCollection that reloads once per second on a background thread inside of it. The problem is that when I nullify an instance of the collection, the thread doesn't stop (because it doesn't know that the instance in which it…
2
votes
1 answer

t-sql how to create a trigger that joins 2 servers

I am trying to complete a trigger on 2 instances of SQL Server. I am running MS Dynamics ERP set CRM & GP. I need to remove data from one server once an update happens to another table. I have written a script that will complete this task if I have…
TrayS
  • 135
  • 2
  • 7
2
votes
1 answer

GHC complains about overlapping instances when in fact they are not

I have the function toAVector defined like this: class Elt a => ToAVector v a where toAVector :: v a -> A.Array DIM1 a instance Elt a => ToAVector [] a where toAVector l = A.fromList (Z :. P.length l) l instance (Elt a, G.Vector v a) =>…
yong
  • 3,583
  • 16
  • 32
2
votes
4 answers

How do you distinguish your EC2 instances?

The ec2-describe-instances command is not very helpful in distinguishing the instances. Are there command line tools that give a better overview? Perhaps somewhat like http://github.com/newbamboo/manec2 but with support for different regions etc.
Erik
  • 4,268
  • 5
  • 33
  • 49
2
votes
1 answer

Instance errors in Hackage's GenProg example

So, I'm trying to get an example of GenProg working, a Haskell genetic programming library. However, I'm getting various instance errors. My guess is that the example is written in slightly out-dated Haskell and just has to be minorly tweaked. The…
2
votes
2 answers

Use of Java constructors in persistent entities

I'm new to JPA and using persistence in Java anyway and I have two questions I can't quite work out: I have generated tags as: @JoinColumn(name = "UserName", referencedColumnName = "UserName") @ManyToOne(optional = false) private User…
Mr Morgan
  • 71
  • 1
  • 2
  • 4