boolean variable have only two specified values ,"true" or "false"
How does it stored in VM?
Hmm...This is my first question here.Thank you all for answering me.
:)
Q:
I have the following case :
set of letters (grades)
A,A+,A-,B,B+,B- stored as strings in
the database i wanna to order these
grades logically from the small
one to the big one ,, but this not
what happen in real.. because these
are strings the order is:
A,A+,A- i wanna
ASC
A-,A,A+
DESC
A+,A,A-
i bind those grades in drop down list
and i wanna these grades with this
logical order in it..
is there any idea how to do something
like this..
Hi All,
Does any body know how to defragment windows registry.
We googled and found several free tools doing the same.But no tool is having open source. One tool is there - 'UltraDefrag' which is open source tool written in 'C' for file defragmentation.
Please provide help in searching open source/ sample code to defragment windows registry...or any windows API functions or libraries for doing the same.
Regards.
I have a some of html strings that my application generates. Each html 'snippet' is stored as a collection of strings. I need to display some of these according to the user query. What is the usual way to display html stylized texts in Windows Forms.
I'm working with a data model stored in XML files. I want to create some metadata for the model and store it alongside, but would like to be able to distinguish between the two. The data model is imported into some software from time to time and we don't want it to try to import the meta data files.
To get round this, I've been thinking of creating a new extension for the metadata xml files (say .mdml). Is this good practice?
I have a list of computers (stored in a database) and I want to find out the localadmins on those computers programmatically so that I can store that information in the database too.
I understand this can be done using powershell. But looking for a way to do the same thing using C#
how do I do that
Hi,
I'm learning cocoa/objective-c. Right now I'm dealing with key/value coding. After reading Aaron's book and other sources, I thought that I was able to left the simple examples and try a complex one...
I'm trying read iTunes property list (iTunes Music Library.xml). I would like to retrieve the tracks held by an specific playlist.
Probably everybody knows it, but bellow I put a piece of the xml:
<plist version="1.0">
<dict>
<key>Major Version</key><integer>1</integer>
...
<key>Playlists</key>
<array>
<dict>
<key>Name</key><string>Library</string>
...
<key>Playlist Items</key>
<array>
<dict>
<key>Track ID</key><integer>10281</integer>
</dict>
...
</array>
</dict>
<dict>
...
</dict>
</array>
</dict>
</plist>
As you can see, the playlists are stored as dictionaries inside an array, and the key that identifies it is inside it, not as a <key> preceding it.
The problem is that I'm not able to figure out how to search for a key that is inside another one.
With the following code I can find the the array in which the playlists are stored, but how to find an specific <dict>?
NSDictionary *rootDict = [[NSDictionary alloc] initWithContentsOfFile:file];
NSArray *playlists = [rootDict objectForKey:@"Playlists"];
Here at Stackoverflow I found this post, but I'm not sure if iterate over the array and test it is a good idea.
I'm quite sure that I could use valueForKeyPath, but I'm unable to figure out how to do it.
Any help is welcome.
TIA,
Bob
Hi,
What constitutes a good implementation of the GetHashCode method? I did some googling, and found some goodlines (MSDN) but it seems like the logic just manipulates two numbers stored as fields in the class. Is the actual logic this simple to implement this method?
UPDATE polls_options SET `votes`=`votes`+1, `percent`=ROUND((`votes`+1) / (SELECT voters FROM polls WHERE poll_id=? LIMIT 1) * 100,1)
WHERE option_id=?
AND poll_id=?
Don't have table data yet, to test it properly. :)
And by the way, in what type % integers should be stored in database?
Thanks for the help!
Hi All
Visual studio allow you to create "inlined" classes (if I am not mistaken with the name).
So class header and implementation all in one file.
H. file contain definitions and declarations of the class and functions, there is no .cpp file at all.
So I was wondering if there is any penalty for doing it that way? any disadvantages ?
Thanks a lot
<script ID="clientEventHandlersVBS" LANGUAGE="vbscript">
s=pass()
y=s
</script>
<%
session("password")=y
Response.write(session("password"))
Response.write(y)
%>
i have this code. but nothing is getting stored inside the session variable neither anything is getting printed. cant i access the variables declared outside the asp code or is their any syntax mistake. any help is really appreciated
I have a stored procedure that will return xml. I have delared a variable of type xml and trying to execute the following code
declare @v xml
set @v = execute get_xml @id, 33
whereas id is returned by another query. now it keeps compalinng about the following error
Incorrect syntax near the keyword 'execute'.
In Haskell, there is a function "take n list" which returns the first n elements from a list. For example "sum (take 3 xs)" sums up the first three elements in the list xs. Does F# have an equivalent? I expected it to be one of the List-functions, but I can't spot anything that seems to match.
Can I pass arrays to functions just as I would do with primitives such as int and bool?
Can I pass them by value?
How does the function know of the size of the array it is passed?
Hi I wanted to write something basic in assembly under windows, I'm using nasm, but I can't get anything working.
How to write and compile hello world without help of c functions on windows?
thx
It starts to bore me that I always have to ask questions about trifles.
I simply need a list of all plugged in USB devices and have the user select one to let the console application receive any data the USB device sends.
I can then start playing around with the data in my program.
I don't want to use library's, only standard C++ functions, and the program should work in Windows 98.
I'm doing a C# project and I want to call next_permutation from the algorithm library in C++. I found the way to call c++ functions in c# but i dont know how to get vectors from c++ and use it in c# (cause next_permutation require a int vector...)
this is what I'm trying at the moment:
extern void NextPermutation(vector<int>& permutation)
{
next_permutation (permutation.begin(),permutation.end());
}
[DllImport("PEDLL.dll", CallingConvention = CallingConvention.Cdecl)]
private static extern void NextPermutation(IntPtr test);
I am using mysql stored procedure; I need to assign query retuned value to local variable.
And i have to check the condition using the local variable.....
or
It my query
Select Meterial_Id from hemaepdb.transaction where CustId=1;
Instead of Meterial_Id i need to get the Meterial_name from Material table.....
I'm writing a program in .NET that will need to utilize the statistical and data analysis functions of R or MATLAB. I have used R but am now contemplating moving to MATLAB since it has a .Net compiler while R can only interface via COM objects. Can anyone recommend going either way? I know MATLAB is infinitely more expensive than R (since R is free) but I'm thinking that may translate to an easier development cycle?
I have a iphone game that i am creating and wanted to know a couple limitations
once the person downloads the game and they sign in with a user name i want them to be able to download new content maps packs etc. What is the limit in size these downloads can be?
where can this content be stored?
thank you!
I can't believe it, but this is really happening. I ran out of available quote symbols using jquery and javascript native functions together. Can somebody help? Maybe there is yet another symbol?
var t=setTimeout('$("#popupChange").html('<img src="http://servername/pdf/picture/genericThrobber.gif" />');',2000);
hi
i'm using serialize/unserialize functions in php 5.2. the text to be stored is POSTed via a form. btw, no white-space before or after. if text contains " or ' it serializes successfully. the problem is it does not unserialize back. what i'm doing wrong?
Hi,
I am interested in getting the profiling of some number crunching program. I compiled it with -g and -pg options and linked it and got it gmon.out. After reading the info (plain text) it looks a bit ugly. I wonder if there are some open source tools for getting a graphical representation of the 10 functions where the program spends the most of the time as well as a flux diagram.
Thanks
Hay, i have a simple model
class Manufacturer(models.Model):
name = models.CharField()
car_count = models.IntegerField()
class Car(models.Model):
maker = ForeignKey(Manufacturer)
I want to update the car_count field when a car is added to a manufacturer, I'm aware i could just count the Manufacturer.car_set() to get the value, but i want the value to be stored within that car_count field.
How would i do this?
EDIT
Would something like this work?
def save(self):
if self.id:
car_count = self.car_set.count()
self.save()
In an app I'm profiling, I found that in some scenarios this functions are able to take over 10% of total execution time.
I've seen discussion over the years of faster sqrt implementations using sneaky floating-point trickery, but I don't know if such things are outdated on modern CPUs.
MSVC++ 2008 compiler is being used, for reference... though I'd assume sqrt is not going to add much overhead though.