Hello,
If i use
\begin{itemize}
\item asdasd
\item dsfsdf
\end{itemize}
, then the items are with a bullet. Bot how can i itemize these two with a "-" (a small line) ?
Thanks!
Hi
We have a few flash files f1.swf, f2.swf .... fn.swf.
We would like to be able to display a slide show of these different files in c# using winforms.
Each flash file is a slideshow by itself. At the end of slideshow for f1 we need to display a message and ask the user to repeat it or continue. Just wondering if anyone has any suggestions how to achieve this.
Thanks
N
In VB.NET I often Catch ... When ...
Try
' Some code'
Catch e As ArgumentNullException When e.ParamName.ToUpper() = "SAMPLES"
' Handle the error'
End Try
Is there a C# equivalent to Catch ... When?
I don't want to resort to using an if statement inside a catch if possible.
I wrote this code in VB to label columns in a table but now im writting a python script to automate the process and i can't make it work. Any thoughts??
Static v1 as variant
Static v2 as variant
Dim Output as double
Dim Start as double
Start = 1
If v2 = [XMIN] Then
Output = v1
Else
Output = v1 + 1
End If
v1 = Output
v2 = [XMIN]
I want to know the differences/similarities between Hibernate and simple persistence in J5EE?
I'm not clear if Hibernate implements J5EE persistence implementation or if it is a totally different approach to data representation over back-end systems.
Also, I want to know other approaches (frameworks) like JPA or Spring...
Thanks
Hi,
i don't understand this little thing:
Suppose, we have "Person" model
class Person < ActiveRecord::Base
end
Why Person.all works ?
Person.all.each { |p| do_something }
This syntax tells us, that we have Person class-object instanciated somewhere ?
Or is it some convention over configuration case ?
i have set my navigationbar background with this code in my App delegate:
@implementation UINavigationBar (UINavigationBarCategory)
- (void)drawRect:(CGRect)rect {
UIImage *backgroundImage = [UIImage imageNamed: @"Nav-rightpane.png"];
CGContextDrawImage(UIGraphicsGetCurrentContext(),
CGRectMake(0, 0, self.frame.size.width, self.frame.size.height),
backgroundImage.CGImage);
}
@end
This works perfect but now i must change the background to the default at UIPopoverController. Any idea for this?
Thanks
I just started using C# and I've got a couple of issues.
Is there any way to code the C# equivalent of the VB.NET Select statement like the following?
Select Object.Name.ToString()
Case "Name1"
'Do something
Case "Name2"
'Do something else
Case Else
'Do the default action
End Select
Any help would be greatly appreciated.
I have been given the task of devising a custom forms manager that has a mysql backend.
The problem I have now encountered after setting up all the front end, is how to process a form that is dynamic.
For E.G
Form one could contain 6 fields all with different name attributes in the input tag.
Form two could contain 20 fields all with different name attributes in the input tag.
How would i process the forms without using up oodles of resource.
I want to get use of dictionary items like I do in List generic class,
e.g;
foreach(item in ItemList)
{
item.BlaBla;
}
but in dictionary there s no chance, like e method above...
Dictionary<string, HtmlInputImage> smartPenImageDictionary;
I mean I got to know the key item for the dictionary item.. but what I want, I want to travel from beginning of the list till the end..
In Clearcase:
I'm trying to find the names of all files in the current view without a specific label. So far I've come up with the following:
cleartool find -cview -all -version '\!lbtype(LABEL_1)' -print
But this ends up displaying the filenames with the "@@/main/BRANCH1/SUBBRANCH" appended to the end, and I really want just the filename.
I've tried adding a -short, but the find command doesn't like that option, and I can't find an option in the manuals to change the behavior.
Is there any technique or tool available to detect this kind of a deadlock during runtime?
picture this in a worker thread (one of several, normally 4-6)
try
WaitForSingleObject(myMutex);
DoSTuffThatMightCauseAnException;
Except
ReleaseMutex(myMutex);
end;
or more generally is there a design-pattern to avoid these kind of bugs?
I coded the above code in the little hous after a longer hacking run
Valgrind tells me function xxx allocated memory which was not freed. Fine. It's proving more difficult than usual to trace however.
To this end I have created numerous:
#ifdef DEBUG
fprintf(stderr, "something happening:%lx\n", (unsigned long)ptr);
#endif
So I just need to match these ptr addresses that are displayed with the addresses of non-freed memory.
How can I get valgrind to tell me the address of each non-freed block of memory?
I came accross this:
t = Clamp(t/d, 0, 1)
but I'm not sure how to perform this operation on a vector. What are the steps to clamp a vector if one was writing their own vector implementation?
Thanks
clamp clamping a vector to a minimum and a maximum
ex:
pc = # the point you are coloring now
p0 = # start point
p1 = # end point
v = p1 - p0
d = Length(v)
v = Normalize(v) # or Scale(v, 1/d)
v0 = pc - p0
t = Dot(v0, v)
t = Clamp(t/d, 0, 1)
color = (start_color * t) + (end_color * (1 - t))
How can I automatically execute an Excel macro each time a value in a particular cell changes?
Right now, my working code is:
Private Sub Worksheet_Change(ByVal Target As Range)
If Not Intersect(Target, Range("H5")) Is Nothing Then Macro
End Sub
where "H5" is the particular cell being monitored and Macro is the name of the macro.
Is there a better way?
Hello,
I'm creating a java web application runing on a Tomcat server.
One of the functions fill in a StringBuffer variable with data.
At the end, I would like to propose the user to download the generated content packaged in a text file. This without having to store the file on the server.
I've been searching for a code snippet but couldn't find anything corresponding ...
I hope I've been clear enough on my problem.
Thanks in advance,
i am using twitterizer to have a web front endto twitter data. I'm trying to figure out how i can test on a localmachine when you have to put in a valid public callback url in your application registration.
any suggestions?
how to implement a counter in label which decrements every time page is loaded in asp.net(vb)?
It would be better if that counter value is accessed from and updated into database..
I've tried this on buttonclick but the value is reset automatically to intial value everytime
as the button is insert and page is reloaded
Protected Sub InsertButton_Click(ByVal sender As Object, ByVal e As System.EventArgs)
Dim entries As Label = FindControl("label1")
entries.Text = entries.Text - 1
End Sub
What is the right/recommended way to develop against of PayPal platform:
Use the New PayPal SDK (https://www.x.com/developers/paypal/documentation-tools/paypal-sdk-index)
Use the legacy PayPal SDK (which is quite old right now)
Just send raw HTTPS requests following NVP protocol (in the end they are just REST-like API), and do not depend on any official API (just depend on the official NVP protocol description)
Which one is considered the right way to go?
Hello,
Could anyone point exactly where MSDN says thet every user stored procedure returns 0 by default if no error happens? In other words, could I be sure that example code given below when being a stored procedure
IF someStatement
BEGIN
RETURN 1
END
should always return zero if someStatement is false and no error occurs?
I know that it actually works this way, but I failed to find any explicit statement about this from Microsoft.
Please help me!
How i can output character that moves around the perimeter of a rectangle (10*5 or 15*7) in console with TASM?
.MODEL small
.STACK 100h
.CODE
start:
mov ah,03
int 10h
mov cx,10
A:
push cx
mov ah,03
int 10h
mov ah,02h
inc dl
int 10h
mov al,42
int 29h
pop cx
LOOP A
mov ah,4ch
int 21h
end start
I do not know how to solve the problem...
Are the "modify" operators like +=, |=, &= etc atomic?
I know ++ is atomic (if you perform x++; in two different threads "simultaneously", you will always end up with x increased by 2, as opposed to x=x+1 with optimization switched off.)
What I wonder is whether variable |= constant, and the likes are thread-safe or do I have to protect them with a mutex?
(...or is it CPU-dependent? In this case, how is it on ARM?)
I've got an old flex builder 3 project that I imported into Flash Builder 4, and I want this project to run its web applications in my web browser. However, the apps persistently run in the Flash Player instead. This is causing no end of problems because of the flash player bug documented at https://bugs.adobe.com/jira/browse/FP-209.
How can I make a project's apps run in the browser instead of the player?
I'm brand new to Ruby testing and Google isn't helping.
Using Test/Unit, how can I print an instance variable, like
test "thing to happen" do
do_stuff
assert_equal "foo", @variable
p @varible
end