Anyone care to guess what currentIndex is at the end of execution?
int[] ints = new int[] { -1, 12, 26, 41, 52, -1, -1 };
int currentIndex = ints.Min();
It's 110. Does anyone know why?
Is there a quick and easy way to backup both MS SQL 2008 and MySQL, all their databases?
Right now I have a batch script that runs, but I have to manually add a database each and every time, and I'm sick of maintaining it. So I want to set it up to backup all MS SQL and then all MySQL, I dont care if its two different solutions, just want the ability to backup all the databases without having to type them in.
Thank you.
hi,
I'm getting crazy with some browsers fixes to do everytime I'm doing a new website. For example, lately I've built my own Flash Video Player and I lost hours to fix some problems such as aligning it in IE and Firefox and Safari.
Would be so cool to have a intermediary layer, I could use to design my website, without taking care of all browsers fixes...
I guess I'm a dreamer
Hi,
I know that nested functions are not part of the standard C, but since they're present in gcc (and the fact that gcc is the only compiler i care about), i tend to use them quite often.
Is this a bad thing ? If so, could you show me some nasty examples ?
What's the status of nested functions in gcc ? Are they going to be removed ?
thanks
I'm using an MVC framework to develop a web site, I've to care about the design in the sense of look and feel (views) and the code (models, controllers).
I don't know what is the best way to proceed:
code and design iteratively by small chunks?
design first ?
you've got the point
I am drawing an grid-work of objects in a Panel. when I scroll the the panel quickly I get a flicker. I thought that enabling the double buffering may take care of this but what I find is that it does not completely draw everything and I am left with blank sections.
could anyone give me suggestions as to what may be happening and how I might correct it.
UPDATE:
I found that I was creating the graphics object with Creategraphics() rather than using the Parameter in the paint method
Dear All,
I am a real newbie in programming and now I have to combine Google Maps and Dojo. Both alone are fine but when I try to implement a Google Map into a Dojo content pane which is embedded in a border-container it simply does not work. I think there is a problem with the naming of the divs but perhaps there is something else to take care of?
Could someone post the simplest possible solution?
many thanks
The default output of File.toURL() is
file:/c:/foo/bar
These don't appear to work on windows, and need to be changed to
file:///c:/foo/bar
Does the format
file:/c:/foo/bar
work correctly on Unix (I don't have a Unix machine to test on)? Is there a library that can take care of generating a URL from a File that is in the correct format for the current environment?
I have a hidden asp Button in a Repeater. In the VB.NET code behind I use the Rerpeater_ItemCommand to get the click event within the Repeater. There's a check if user is already recording a project. If yes and he wants to start a new one, a confirm box should appear asking "Are you sure?" How can I access the click value from confirm?
<asp:Repeater ID="Repeater1" runat="server" OnItemCommand="Repeater1_ItemCommand">
<ItemTemplate>
<div class="tile user_view user_<%# Eval("employeeName") %>">
<div class="tilesheight"></div>
<div class="element">
<asp:Button ID="Button1" CssClass="hiddenbutton" runat="server" />
Index:
<asp:Label ID="Label1" runat="server"
Text='<%# Eval("index") %>' /><br />
<hr class="hr" />
customer:
<asp:Label ID="CustomerLabel" runat="server"
Text='<%# Eval("customer") %>' /><br />
<hr class ="hr" />
order:
<asp:Label ID="OrderNoLabel" runat="server"
Text='<%# Eval("orderNo") %>' /><br />
<asp:Label ID="DescriptionLabel" runat="server"
Text='<%# Eval("description") %>' /><br />
<hr class="hr" />
</div>
</div>
</ItemTemplate>
</asp:Repeater>
code behind:
If empRecs.Contains(projects.Item(index.Text).employeeID) Then
'Catch index of recording order
i = empRecs.IndexOf(projects.Item(index.Text).employeeID)
Page.ClientScript.RegisterStartupScript(Me.GetType, "confirm", "confirm('Order " & empRecs(i + 2) & " already recording. Would you like to start a new one?')",True)
'If users clicks ok insertData()
End If
Other solutions are using the Click Event and a hidden field. But the problem is, I don't want the confirmbox to appear every time the button is clicked. Only when empRecs conatins an employee.
Thanks for helping
Hi all,i want to ask. I'm intending to make custom build computer page with virtuemart. As example,customer can choose the processor,mainboard,optical drive,etc then sum the prices and display it.Is it possible to do it? How to do it? Thanks..
java.util.zip sucks for stream compression. The longer you leave an Inflator/Deflator open without calling end(), the more native memory it uses up. This is a known issue: http://bugs.sun.com/view_bug.do?bug_id=4797189 which nobody seems to care about fixing.
What is a good alternative? Preferably one that is free and is still actively supported by its developers.
I have a to-many relationship in my data model, and I'd like to get all the objects that have no corresponding objects in the relationship. For example:
Customer - Purchases
I want to get all Customers that have 0 Purchases.
I've read somewhere that I could use "Purchases[SIZE] = 0", but this gives me an unsupported function expression error, which I think means it doesn't work with a SQLite backing store (which I don't want to switch from, due to some performance constraints).
Any ideas?
I want to start using Python for small projects but the fact that a misplaced tab or indent can throw a compile error is really getting on my nerves. Is there some type of setting to turn this off?
I'm currently using NotePad++. Is there maybe an IDE that would take care of the tabs and indenting?
I understand the restrictions of rollback and the care required in its use (for example, http://www.selenic.com/mercurial/hg.1.html#rollback), but I just wondered why there is only 1 level of rollback.
My guess it's a design decision and that the hassle of storing multiple previous transactional states to handle multiple levels of rollback is more trouble than its worth.
Hi!
I have been developing in .NET for quite some time now. But now I have customer who wants me to develop an application for them in .NET for Windows CE.
I have done some embedded system programming in C before, but never in .NET.
Please share any tips or tricks that would make my life easier when taking this assignment, or perhaps knowledge about any pitfalls to watch out for.
I wrote a little WPF app that when 'closed' minimizes to the system tray (customer requirement). Double clicking pops it back up, or right click gives a context menu to exit.
But if the app is minimized, and the users navigate to Start-All Programs-The Application it starts a new instance.
What (in C#) do I need to do to get the app to maximize the running instance if the user does this rather than fire up a new instance?
Thanks!
Say that I have two CSV files (file1 and file2) with contents as shown below:
file1:
fred,43,Male,"23,45",blue,"1, bedrock avenue"
file2:
fred,39,Male,"23,45",blue,"1, bedrock avenue"
I would like to compare these two CSV records to see if columns 0,2,3,4, and 5 are the same. I don't care about column 1.
What's the most pythonic way of doing this?
EDIT:
Some example code would be appreciated.
I'am a newbie n interest to leaarn aspnet mvc (vb) but there's too much application sample that using C#..
i just want to know how to wrote this code in VB
<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master"
Inherits="System.Web.Mvc.ViewPage<MvcGridSample
.ViewModels.Shared.Grid<Customer, CustomerSearchForm>>" %>
do you have any idea??
thx before
-dix-
What is the best way to confirm that these consumed services are actually up and running before I actually try to invoke its operation contracts? I want to do this so that I can gracefully display some message to the customer to give him/her a more pleasant user experience. Thanks.
It seems a good and clean thing to ensure that your deployed files appear on the target system with a consistent time/date. Many Applications seem to do this but other than for care of overwriting Users' existing data I guess it has no real significance. I'm having a purge on my installer packaging and I'd like to know if there any good reasons for specific date/time handling.
I want to select data from one table (T1, in DB1) in one server (Data.Old.S1) into data in another table (T2, in DB2) in another server (Data.Latest.S2). How can I do this ?
Please note the way the servers are named. The query should take care of that too. That is,
SQL server should not be confused about fully qualified table names. For example - this could confuse SQL server - Data.Old.S1.DB1.dbo.T1.
If you don't care about minifying your code, is there a way to get started using the Google Closure library without having to set up a subversion client and use the compiler? The Notepad sample program on Google's website refers to
<script src="closure-library/base.js" > </script >
Can you simply download closure-library/base.js somewhere and start playing with the UI examples? The Closure Lite quick-start version doesn't appear to include goog.ui
Hello,
first this is no rant although its worth alone to put it on a blog...
When I type very fast - having roughly 260 chars/minute - WPF`s RichTextBox starts swallowing chars and I have to stop writing that fast a = a.IsAnnoying = true;
The same in a VB 5.0 RichTextBox fast as hell.
Why is WPF again so great for? Customer satisfactory ?
Seriously, is there something I can tweak to make RichTextBox better responding?
Hi,
I understand that it's not a programming question, but still maybe someone here knows how comes that www.ipage.com is offering $115.00 to affiliates for every new customer ( that would buy, say, a $36 hosting plan ) ? Where's the catch?
I'm developing a website that uses some complex computations (NLP-related). My customer wants to have "debugging" webpages for some of these computations where he can run them with arbitrary input and see all the intermediate results that occur during computation.
Before this request all of the computations were encapsulated in beans and intermediate results were logged into general log.
What is the best way to capture all these results on Java level to render them as webpage?