2014年03月

Question

fighting


My girl friend and I have A house togeather if I want to sell what do I have to do if she does not



Answer

Re: fighting


If you, both are on title to the house, unless you both agree to sell, it may be necessary to file a court action known as a partition. This can be a lengthy and costly process. Although you do not mention it, there may also be mortgage issues.



Answer

Re: fighting


File a case in the circuit court for partition of the property (quite expensive)or agree to have girl friend buy out your interest.







Code:

:Blocks Can't compile application

This is my hello world code:



#include <stdio.h>
#include <stdlib.h>

int main()
{
printf("Hello world!\n");
return 0;
}


When I'm trying to run application I'm getting an error:



Target uses an invalid compiler; run aborted


So I went to Settings->Compiler->Toolchain Executables, and I selected C:\MinGW\bin, I have also tried C:\MinGW and I still get the same error.



I have installed

Code:

:Blocks with mingw from the official

Code:

:Blocks site.



Please help, I want start learning C but I can't...



Answers

You either have the wrong compiler selected in your project's build options OR you don't have executables set in your compiler settings.



To select your compiler in your project:

First, go to the Project menu and select Build options:





Then, in the Build options dialog, select the compiler you have set up as described in your question:





To change your compiler's executables:

Go to Settings and then Compiler:





Then select Toolchain Executables:





and fill in your executable names:







Can we pass generic object using object class

public class Sample1
{
public void setdata(Object obj)
{
//...Do the logic based on object type
}
}


i want this method (setdata) to be reusable across.i.e. I want to pass object of different types/classes



public class Sample2 : Sample1
{
public void dosomething()
{
Sample1 a = new Sample1();
Sample2 b= new Sample2();
a.setdata(b);
}
}


.Is this simply possible with Object class or is it compulsory to use generics //to get it done . if yes , how?please help.Thanks !



Answers

Yes, you can do that:



public static class ObjectExtensions
{
public static void SetData(this object that, object other)
{
// now here it gets tricky and probably really bad OOD
}
}


This would result in every object and class derived from object (that covers all reference types) to expose a public method called SetData.



string s = new string();
Window w = new Window();

s.SetData(w);


However, whatever you do inside that method is probably extremly bad software design and should probably be solved differently based on what you actually want to do.





Order query by id and column

i have a table where shows the jobs offers, and im querying by latest jobs and the recommend jobs first, but its not working.



All the job ads that are marked has recommend are "1" and the ones are not "0", but for some reason the column recommend isnt Ordering.



The datatype of recommend column is int.



Here is my query:



SELECT * 
FROM jobs
WHERE active = '1'
ORDER BY id_job DESC , recommend DESC


Answers

As it is now, it'll order by the job id first, and only by the recommend field if there are duplicates. I assume those ids are unique, which would mean the second "order by" part is essentially never used.



Try just swapping that.



SELECT * 
FROM jobs
WHERE active = '1'
ORDER BY recommend DESC, id_job DESC


Answers

When you order by more than one columns, the ordering is done on the first column, and then the second column is used to break ties among rows where the first column is identical; the third column is used for tie breaking when values in the first and the second column are identical, and so on.



In your case it means that the ordering is on id_job, which is probably unique, so there are no ties to break.



Changing the order of columns should help:



SELECT * 
FROM jobs
WHERE active = '1'
ORDER BY recommend DESC , id_job DESC




Question

If I only have one child do I need to have the living trust.



Answer

Maybe, maybe not. Whether or not a living trust is a good idea has nothing to do with how many children or other beneficiaries you might have. Living trusts are all about assets, taxes and avoiding probate.





↑このページのトップヘ