What actually happens when you target the .NET 3.5 framework in Visual Studio? What does that actually do? Does it somehow "flag" any of the output files and associate them with the framework version?
Using Access Database
Table
ID Time
001 100000
001 100005
001 103000
001 102500
001 110000
001 120000
001 113000
...,
From the above table, i want to take first four time
Query like
Select id, min(time) from table group by id
I want to take first four min(time) for each person
Expected Output
ID Time
001 100000
001 100005
001 102500
001 103000
002
...,
How to make a query for this condition?
I have an object file, which I'd like to make into a Mach-O binary(I'm on Mac OS 10.6). Running ld source.o produces the following output:
Undefined symbols:
"_printf", referenced from:
_main in source.o
ld: symbol(s) not found for inferred architecture x86_64
How can I reference libSystem(or whatever library includes printf) using ld?
Hello world,
I'm new to xslt, and have a task that I'm not really sure where to go with. I want to rename nodes, but maintain the format all node declarations. In the actual context I'll be applying this to, I'll be doing a series of renames like this, but for the sake of brevity, the sample I've written up only involves renaming one node. I am using XSL 1.0.
Input:
<variables>
<var>
<RENAME> a </RENAME>
</var>
<var RENAME='b'/>
<var>
<DO_NOT_TOUCH> c </DO_NOT_TOUCH>
</var>
<var DO_NOT_TOUCH='d'/>
</variables>
Desired Output:
<variables>
<var>
<DONE> a </DONE>
</var>
<var DONE='b'/>
<var>
<DO_NOT_TOUCH> c </DO_NOT_TOUCH>
</var>
<var DO_NOT_TOUCH='d'/>
</variables>
My xslt:
<xsl:template match="RENAME">
<RENAMED>
<xsl:apply-templates select="@*|node()"/>
</RENAMED>
</xsl:template>
<xsl:template match="@*|node()">
<xsl:copy>
<xsl:apply-templates select="@*|node()"/>
</xsl:copy>
</xsl:template>
Current Output
<variables>
<var>
<RENAMED> a </RENAMED>
</var>
<var RENAME="b">
</var>
<var>
<DO_NOT_TOUCH> c </DO_NOT_TOUCH>
</var>
<var DO_NOT_TOUCH="d">
</var>
</variables>
I'm working with .NET (specifically Boo, but answers would work in C# too) and I want to know how I could create an editable box inside the command line, such that I could display a section of output in the top part of the command line, and have a one line box at the bottom for input, much like the program irssi (the IRC client) does.
I assume this is possible with .NET, how would I approach this?
Hello, I want to use either http://onehackoranother.com/projects/jquery/tipsy/ or http://bassistance.de/jquery-plugins/jquery-plugin-tooltip/ and I was wondering if lets say I have a div on my page that has a class 'item_info'.
Can I have my tooltip that is created output the div inside the tooltip and formatted properly according to my css?
Is there another plugin I should be looking into?
Thanks. I hope this is clear enough.
I want to create my own RSS/XML feed. I fetch data from the database to display, but keep getting invalid character errors. If the string has an ampersand or other strange characters in it, the XML will be invalid.
I tried using urlencode and htmlentities, but these don't capture all possible characters which need to be escaped. Does anyone know of a PHP function which will prepare a string for XML output?
Hi
I have a list of dates for an event in the following format
13/04/2010 10:30:00
13/04/2010 13:30:00
14/04/2010 10:30:00
14/04/2010 13:30:00
15/04/2010 10:30:00
15/04/2010 13:30:00
16/04/2010 10:30:00
17/04/2010 11:00:00
17/04/2010 13:30:00
17/04/2010 15:30:00
How can i have the list be output, so that the date is only displayed once followed by the times for that date, so the above list would look like something like this:
13/04/2010
10:30:00
13:30:00
14/04/2010
10:30:00
13:30:00
15/04/2010
10:30:00
13:30:00
16/04/2010
10:30:00
17/04/2010
11:00:00
13:30:00
15:30:00
I have two tables as given below
Table A Table B Table C
============= ============== =========
Id Name Id AId CId Id Name
1 A 1 1 1 1 x
2 B 2 1 1 2 y
3 C 3 2 1 3 z
4 D 4 2 3 4 w
5 E 5 3 2 5 v
Now I want all the records of Table A with matching Id column CId from Table B where CId = 1.
So the output should be like below :
Id Name CId
1 A 1
2 B 1
3 C 1
4 D Null
5 E Null
Can anyone help me please?
I wonder if it's possible to detect that the user has an external headset plugged into the iPhone's 3.5mm connector or the 30-pin connector. I want to output audio only to an external audio device, and keep silent if nothing is connected.
Ari.
I'm trying to select an id that changes on different posts of same page. So the they have been given an id="show_posts_{PostID}" - on the final output the {PostID} is replaced with a number. In the function I need to call $('show_posts_XXXXXX') - XXXXXX being the generated ID. I have stored this ID in a variable called postId.
But I can't seem to do this $("'" + "show_posts_" + postId + "'")
Can anyone tell me how I can add a string to the end of a selector?
I made a heap. I am curious if there's something subtley wrong with my remove function:
int Heap::remove() {
if (n == 0)
exit(1);
int temp = arr[0];
arr[0] = arr[--n];
heapDown(0);
arr[n] = 0;
return temp;
}
void Heap::heapDown(int i)
{
int l = left(i);
int r = right(i);
// comparing parent to left/right child
// each has an inner if to handle if the first swap causes a second swap
// ie 1 -> 3 -> 5
// 3 5 1 5 1 3
if (l < n && arr[i] < arr[l])
{
swap(arr[i], arr[l]);
heapDown(l);
if (r < n && arr[i] < arr[r])
{
swap(arr[i], arr[r]);
heapDown(r);
}
}
else if (r < n && arr[i] < arr[r])
{
swap(arr[i], arr[r]);
heapDown(r);
if (l < n && arr[i] < arr[l])
{
swap(arr[i], arr[l]);
heapDown(l);
}
}
}
Here's my output
i1i2i3i4i5i6i7
p
Active heap: 7 4 6 1 3 2 5
r
Removed 7
r
Removed 6
p
Active heap: 5 3 4 1 2
Here's my teacher's sample output:
p
Active heap : 7 4 6 1 3 2 5
r
Removed 7
r
Removed 6
p
Active heap : 5 4 2 1 3
s
Heapsorted : 1 2 3 4 5
While our outputs are completely different, I do seem to hold maxheap principle of having everything left oriented and for all nodes parent child(in every case I tried). I try to do algs like this from scratch, so maybe I'm just doing something really weird and wrong (I would only consider it "wrong" if it's O(lg n), as removes are intended to be for heaps). Is there anything in particular "wrong" about my remove? Thanks,
http://ideone.com/PPh4eQ
How to remove a special character(#) from a big file and insert that character to a particular line for example
input.tsv
$22 23 24 25 26
33 33 34 35 36
44 45 46 47 48
ID ID1 ID2 ID3 ID4
Output.tsv
22 23 24 25 26
33 33 34 35 36
44 45 46 47 48
$ID ID1 ID2 ID3 ID4
I've used the sed -e 's/#//g' input.tsv file to remove the '$' then how can I include '$' to the line starting with ID
Is it possible to replace the following with a list comprehension?
res = []
for a, _, c in myList:
for i in c:
res.append((a, i))
For example:
# Input
myList = [("Foo", None, [1, 2, 3]), ("Bar", None, ["i", "j"])]
# Output
res = [("Foo", 1), ("Foo", 2), ("Foo", 3), ("Bar", "i"), ("Bar", "j")]
I have two files
1st file is like this:
www.example.com
www.domain.com
www.otherexample.com
www.other-domain.com
www.other-example.com
www.exa-ample.com
2nd file is like this (numbers after ;;; are between 0-10):
www.example.com;;;2
www.domain.com;;;5
www.other-domain;;;0
www.exa-ample.com;;;4
and i want compare these two files and output to third file like this:
www.otherexample.com www.other-example.com
Both files have large size (over 500mb)
If I want to produce a Base64-encoded output, how would I do that in .NET?
I know that since .NET 2.0, there is the ICryptoTransform interface, and the
ToBase64Transform() and FromBase64Transform() implementations of that interface.
But those classes are embedded into the System.Security namespace, and require the use of a TransformBlock, TransformFinalBlock, and so on.
Is there an easier way to base64 encode a stream of data in .NET?
With Rails, If I have a variable with HTML content, how do I output it, unencoded in my view file?
This code, for example:
<% my_variable = "<b>Some Bolded Text</b>" %>
<%= my_variable %>
Outputs:
<b>Some Bolded Text</b>
Here's my test code:
String foo = new String();
System.out.println(foo);
The output is blank and a new line is written. Since I'm new to Java, I don't know whether it made a " " string, or nulls are handled as blank lines.
I'm using the following to render the_tags() in Wordpress 2.9.2, currently developing a theme on localhost:
<?php the_tags('<ul class="postmetadata"><li>','</li><li>','</li></ul>'); ?>
and would like to have same -near-semantic- output from the_category(), which doesn't seem obviously attainable (having looked at the relevant codex page).
I have created a custom JiBX marshaller and verified it works. It works by doing something like the following:
<binding xmlns:tns="http://foobar.com/foo" direction="output">
<namespace uri="http://foobar.com/foo" default="elements"/>
<mapping class="java.util.HashMap" marshaller="com.foobar.Marshaller1"/>
<mapping name="context" class="com.foobar.Context">
<structure field="configuration"/>
</mapping>
</binding>
However I need to create multiple marshallers for different HashMaps. So I tried to reference it with abstract mapping like this:
<binding xmlns:tns="http://foobar.com/foo" direction="output">
<namespace uri="http://foobar.com/foo" default="elements"/>
<mapping abstract="true" type-name="configuration" class="java.util.HashMap" marshaller="com.foobar.Marshaller1"/>
<mapping abstract="true" type-name="overrides" class="java.util.HashMap" marshaller="com.foobar.Marshaller2"/>
<mapping name="context" class="com.foobar.Context">
<structure map-as="configuration" field="configuration"/>
<structure map-as="overrides" field="overrides"/>
</mapping>
</binding>
However when doing so, when I attempt to build the binding, I receive the following:
Error during code generation for file "E:\project\src\main\jibx\foo.jibx" - this may be due to an error in your binding or classpath, or to an error in the JiBX code
My guess is that either I'm missing something I need to implement to enable my custom marshaller for abstract mapping, or custom marshallers do not support abstract mapping.
I have found the IAbstractMarshaller interface in the JiBX API (http://jibx.sourceforge.net/api/org/jibx/runtime/IAbstractMarshaller.html), however the documentation seems unclear to me on if this is what I need to implement, as well as how it works if so. I have not been able to find an implementation of this interface to work off of as an example.
My question is, how do you do abstract mapping with custom marshallers (if it's possible)? If it is done via the IAbstractMarshaller interface, how does it work and/or how should I implement it?
Hi,
How to get file name from these lines using groovy .
File file = new File(SOURCE_FILE_NAME).eachLine{line-
println line
}
getting line like this :
/usr/local/testing.groovy
/usr/local/picture.jpg
expecting output:
testing.groovy
picture.jpg
Can any one help me using any if regex needed .
thanks
I have an application on my server that is called leaf.exe, that haves two arguments needed to run, they are: inputfile and outputfile, that will be like this example:
leaf.exe input.jpg output.leaf
They are all on the same directory as my home page file(the executable and the input file). But I need that a VBScript could run the application like that, then I want to know how could I do this.
Hello,
I have:
$page_file_temp = $_SERVER["PHP_SELF"];
which will output: /templates/somename/index.php
I want to extract from that path only "/templates/somename/"
How can I do it?
Thanks!
Hi,
I want to compile a project (with CruiseControl) not only if its source changes, but also if some dependencies change.
example:
I got 3 folders:
c:\myProject\src (my source folder)
c:\dependency1\src (source code of dependency 1)
c:\dependency2\output (dll of dependency 2)
I want to compile my project in cruisecontrol if anything in one of these folders change.
How can I configure this in my ccnet.config?
bye and thanks
juergen