I need to write a string (URL) to the file system in the install override method in my Setup project custom action, and be able to read it at Uninstall. How can achieve this?
Thanks.
How can I write the below HQL query using the Criteria API?
select s.Name, sum(q.PointsObtained), sum(q.TotalPoints)
from Student s join s.Quizzes
order by sum(q.PointsObtained) / sum(q.TotalPoints) desc
Hello, I'm looking for any pointers on how to write a rails web app without ActiveRecord.
A doc or an example of a (not too complex) web app using storage backends other than a relational database would be greatly appreciated.
It's not clear on what should be implemented in the model classes in order to make the rails app work without the ActiveRecord layer.
Thanks,
Hello everyone,
Assume that notepad.exe is opening and the it's window is inactive. I will write an application to activate it. How to make?
My application is Winform C# 2.0. Thanks.
I have a table which is some thing like below..
Date ID
2009-07-01 1
2009-07-01 2
2009-07-01 3
2009-08-01 4
2009-08-01 5
2009-08-01 6
2009-09-01 7
2009-09-01 8
2009-10-01 9
2009-10-01 10
2009-11-01 11
....
Now I need to write a query which will show a output like below.
Date Start End
2009-07 1 3
2009-08 4 6
2009-09 7 8
...
How can I do this..
Any help would be highly appreciated
Thanking In Advance
Johnny
When I try to use java.lang.System.console(), I get a null pointer. I can still write to out and read from in, but this only works when I run straight from my IDE. When I run the .jar file directly, nothing happens. How can I create a console like I'd see using std::cout for use in Java?
So I am writing a Java code to represent a heap sort and to represent the operation I need to have a waiting function which will wait between different operation but I am not sure if there is a function in Java that does that or do I need to write the function by myself and how would i do that.
Representing heap sport is a homework but writing the waiting function isn't so I appreciate your help
I would like to write a counter that shows how many seconds an app has be running for. (textView) and the counter should be cumulative and starts from where it left off. Im new to iphone sdk.
The following script returns 20 instead of 21!
var d = new Date("2010/03/21");
document.write(d.getDate());
What am I doing wrong? Is this a JavaScript bug?
Some of my C programs are not working as expected. For example, pass by reference is not possible in C, but when I write a C program which uses that and compile it with gcc it works fine.
Is gcc a C++ compiler? How do I make it behave like a C compiler?
model.py:
class Tribes(Group):
members = models.ManyToManyField(User, related_name='tribes', verbose_name=_('members'))
i want to store a number in a int field ,and a user can has many this number.
how to write this model ??
thanks
(i hate sql :( )
folderBrowserDialog1.Reset();
folderBrowserDialog1.ShowDialog();
if (folderBrowserDialog1.SelectedPath != "")
{
sourcetxt.Text = folderBrowserDialog1.SelectedPath;
string[] path = Directory.GetDirectories(folderBrowserDialog1.SelectedPath);
}
i am write this code.i have get all folder with hidden folder of this array name of path .But i trying to get only hidden folder of this array (array name path).please please solve this problem any one.
Thankig You.
Is there any protection provided by kernel? Because when we tried to allocate memory using an
malloc() from user space, the kernel allowed to allocated around 124
MB of memory, and when we try to write into it, the kernel crashed. If there
was protection of kernel memory area, this wouldn't have happened
Suppose you have a web application, no specific stack (Java/.NET/LAMP/Django/Rails, all good).
How would you decide on which hardware to deploy it? What rules of thumb exist when determining how many machines you need?
How would you formulate parameters such as concurrent users, simultaneous connections and DB read/write ratio to a decision on how much, and which, hardware you need?
Any resources on this issue would be very helpful...
I have an entry.rb model and I'm trying to make a semi-complicated validation. I want it to require one or more of the following fields: phone, phone2, mobile, fax, email or website. How would you write the intended code? Would something like this work?
validates_presence_of :phone and or :phone2 and or :mobile and or :fax and or :email and or :website
I am basically making a video library where you download videos and I then write them to the applications documents folder. This all works fine and if i stream the video from online it plays fine. Or indeed I can stream it from the resource folder fine.
However, after downloading it and saving to the documents folder then attempting to stream I get the error 'movie format not supported' any ideas?
thanks very much
Well, in a non-static method I could use this.GetType() and it would return the Type. How can I get the same Type in a static method? Of course, I can't just write typeof(ThisTypeName) because ThisTypeName is known only in the runtime. Thanks!
i have database table like this
+-------+--------------+----------+
| id | ip | date |
+-------+--------------+----------+
| 505 |192.168.100.1 |2010-04-03|
| 252 |192.168.100.5 |2010-03-03|
| 426 |192.168.100.6 |2010-03-03|
| 201 |192.168.100.7 |2010-04-03|
| 211 |192.168.100.10|2010-04-03|
+-------+--------------+----------+
how can i retirive data from this table where month=03 how to write sql to do that .
select * from table where month=03
something like that .
How do I write the following in MYSQL?
SELECT SUBSTRING(value - (1 TRAILING CHARACTER)) FROM table;
Basically substring(value, 2) trims the first letters. But I need to trim the last letters. I can't use substring(value, -4, 3) because I don't know the length of the value.
Here's another example:
SELECT * FROM table WHERE SUBSTRING(value - (4 TRAILING CHARACTER)) in (SELECT SUBSTRING(value - (1 TRAILING CHARACTER)) FROM table);
I'm a php developer from last 3-4 months. I used to write direct applications. Now i've decided to use a php framework. Which is the best suitable framework for me?
Currently i'm developing a application side by side i want to learn framework by doing some simple stuff and to use it in next project.
hi all,
we were maintaining an MS Access application. Person who actually developed the application used copyrighted code. Now we want to remove that code and re-write that logic.
Problem is we dont know what is the copyrighted code and what is not.
Is there any way or tool that can be used to scan through the existing code and flag the code that was directly got from internet and used?
Thanks in advance.
I have a function in powershell 2.0 named getip which gets the IP address(es) of a remote system.
function getip {
$strComputer = "computername"
$colItems = GWMI -cl "Win32_NetworkAdapterConfiguration" -name "root\CimV2" -comp $strComputer -filter "IpEnabled = TRUE"
ForEach ($objItem in $colItems)
{Write-Host $objItem.IpAddress}
}
The problem I'm having is with getting the output of this function to a variable. The folowing doesn't work...
$ipaddress = (getip)
$ipaddress = getip
set-variable -name ipaddress -value (getip)
any help with this problem would be greatly appreciated.
Is there a cleaner way to write this:
for w in [w for w in words if w != '']:
I want to loop over a dictionary words, but only words that aren't whitespace. Thanks!