Ive got a task in C to sort a struct by using qsort
struct user {
enum SEX{m, f} sex;
char name[32];
char phonenr[32];
};
typedef struct user User;
the users will be stored in a array of 25 elements
but how do i sort them on something like name ?
...
Suppose I have a C++ class with an attribute that is a reference:
class ClassB {
ClassA &ref;
public:
ClassB(ClassA &_ref);
}
Of course, the constructor is defined this way:
ClassB::ClassB(ClassA &_ref) : ref(_ref) { /* ... */ }
My question is: When an instance of class 'ClassB' is destroyed, is the object referenced by 'Cl...
I wish to have the following:
<span title="This is a "good" title.">Catch me in the rice.</span>
It is obvious that this is not rendered well by the browsers. Please provide me with information of what escape sequence or encoding like " I must use?
...
Hello,
I have a little vb.net script that will copy a file, set its attributes to Normal, update the file time, and then set back the attributes to match those of the source file.
If IO.File.Exists(Destination) Then IO.File.SetAttributes(Destination, IO.FileAttributes.Normal)
IO.File.Copy(Source, Destination, True)
IO.File.SetAttribut...
I have an issue in asp.net 4.
When I add an attribute on controls, then the render it encoded.
For example, when I type this code
txtQuestion.Attributes["onfocus"] =
"if(this.value == this.title)
{
this.value = '';
this.style.backgroundColor='#FEFDE0';
this.style.color='#000000';
}";
I get render
onfocus="if(this.val...
I would like to know if it was possible using Javascript to find an image tag by its alt text. For instance I have this tag: <img src="Myimage.jpg" alt="Myimage"> would there be a way to obtain the tag by looking for the "Myimage" alt attribute?
...
Given this POCO class that was automatically generated by an EntityFramework T4 template (has not and can not be manually edited in any way):
public partial class Customer
{
[Required]
[StringLength(20, ErrorMessage = "Customer Number - Please enter no more than 20 characters.")]
[DisplayName("Customer Number")]
public v...
Hi, i have a question about class attribute in python.
class base :
def __init__ (self):
pass
derived_val = 1
t1 = base()
t2 = base ()
t2.derived_val +=1
t2.__class__.derived_val +=2
print t2.derived_val # its value is 2
print t2.__class__.derived_val # its value is 3
The results are different. I also u...
Before you say "oh no, not again" here I'm stating my case. I'm parsing part of HTML output and the only thing I'm interested in is name and value attributes of each <input/> tag. HTML is actually HTML fragment, may not be well-formed. I don't have DOM or HTML parser and I don't try to parse nested elements anyway. The problem is that I ...
Hi,
I wonder that the obsolete attribute is checked at only runtime?
Think that you have two assemblies. Assembly A uses a method from Assembly B. After that we mark the method in Assembly B as obsolete which causes a compile time error when compiling assembly A.
No problem so far but the question is whether the older assembly A cont...
I'm trying to make use of attribute value type in a BizTalk XSL transformation to dynamically setting attribute or other element names.
Read more here: http://www.w3.org/TR/xslt#dt-attribute-value-template
The following code is an example of an XSL template to add an attribute optionally.
<xsl:template name="AttributeOptional">
...
So I have this php script that output an html table with data about some files (like filename, filesize, etc...)
I have this javascript function that displays the picture when you hover a tag belonging to the class "preview". For example, if a filename is: somePic.jpg, when you hover somePic.jpg in the table, the picture will appear nex...
I want to pass value to servlet but I keep get null value.
<jsp:useBean id="Helper" class="model.Registration" scope="request"/>
<form action="/Project/Registration" method="post" enctype="multipart/form-data">
<input type="text" size="20" name="name" value="<%=Helper.getName()%>">
<input type="submit">
</form>
protected void d...
Hi,
I'm trying to generate C# code classes with SvcUtil.exe instead of Xsd.exe. The latter is giving me some problems.
Command line:
SvcUtil.exe myschema.xsd /dconly /ser:XmlSerializer
Several SvcUtil problems are described and solved here:
http://blog.shutupandcode.net/?p=761
One problem I can't solve is this one: Error: Type 'Dat...
I have an IncomingEmail model with an attachments virtual attribute:
class IncomingEmail < ActiveRecord::Base
attr_accessor :attachments
end
I want the attachments virtual attribute to be initialized to [] rather than nil so that I can do:
>> i = IncomingEmail.new
=> #<IncomingEmail id: nil,...)
>> i.attachments << "whatever"
W...
Hi,
I have a sample xml as;
<?xml version="1.0" encoding="iso-8859-9"?>
<DropDownControl id="dd1" name="ShowValues" choices="choice1,choice2,choice3,choice4">
</DropDownControl >
I need to create a UI representation of this XML using XSL. I want to fill the drop down list with values specified in choices attribute.
Does anyone ...
I am completely new to web services, but not new to Delphi.
I am importing a WSDL file into Delphi 2010 with the "WSDL Importer" wizard. The WSDL file contains some "attributeGroup" tags which Delphi completely ignores, which is presumably a bug, although I haven't yet found an entry on Quality Central for this issue, only mentions in ...
I recently upgraded a C# project from .NET 3.5 to .NET 4. I have a method that extracts all MSTest test methods from a given list of MethodBase instances. Its body looks like this:
return null == methods || methods.Count() == 0
? null
: from method in methods
let testAttribute = Attribute.GetCustomAttribute(method,
...
I have two attributes - MigrationAttribute and TestDataMigrationAttribute : MigrationAttribute. How can I assert that a class has applied TestDataMigrationAttribute but not MigrationAttribute (which is the parent attribute class)?
...
Basically i'm trying to grap the text from the title attribute in a link and show it in a paragaph in another div when a user hovers of the item, and then hide it when the user moves away. so far what i've got is
(function($) {
$.fn.showText = function() {
$(this).hover(
function() {
$(this)
...