Daily Archives

Articles indexed Thursday May 6 2010

Page 8/118 | < Previous Page | 4 5 6 7 8 9 10 11 12 13 14 15  | Next Page >

  • Deterministic Annealing Code

    - by wade
    I would like to find an open source example of a code for deterministic annealing. It can be in almost any language: C, C++, MatLab/Octave, Fortran. I have already found a MatLab code for simulated annealing, so MatLab would be best. Here is a paper that describes the algorithm: http://www.google.com/url?sa=t&source=web&ct=res&cd=1&ved=0CB8QFjAA&url=http%3A%2F%2Fvandamteaching.googlepages.com%2FABriefIntroductionToDeterministicAnn.pdf&ei=DiLiS8qZFI7AMozB1JED&usg=AFQjCNHLps7HRWXLNN5rAX5aJ5BsJbcHuQ&sig2=YSokUTOs0UszAFZ9TDiJgQ

    Read the article

  • How does Java handle ArrayList refrerences and assignments?

    - by Jonathan
    Hey all- I mostly write in C but am using Java for this project. I want to know what Java is doing here under the hood. ArrayList<Integer> prevRow, currRow; currRow = new ArrayList<Integer>(); for(i =0; i < numRows; i++){ prevRow = currRow; currRow.clear(); currRow.addAll(aBunchOfItems); } Is the prevRow = currRow line copying the list or does prevRow now point to the same list as currRow? If prevRow points to the same list as currRow, I should create a new ArrayList instead of clearing.... private ArrayList<Integer> someFunction(ArrayList<Integer> l){ Collections.sort(l); return l; } main(){ ArrayList<Integer> list = new ArrayList<Integer>(Integer(3), Integer(2), Integer(1)); list = someFunction(list); //Option 1 someFunction(list); //Option 2 } In a similar question, do Option 1 and Option 2 do the same thing in the above code? Thanks- Jonathan

    Read the article

  • How to superpose two GwtCanvas ?

    - by Jeep314
    Hi, I'm trying to superpose two GwtCanvas (which use an Html5 canvas). I am able to get this effect by using an absolute panel. But by doing this, I can't get my object to fill my panel. I would like to this so I can do a whiteboard in GWT. So far, I'm pretty advance but I would like to have multiple canvas overlay to support undo or preview. For example, if we draw a rectangle, it would be good to preview it as we move the mouse. I have found a javascript tutorial to do this : ex: http://dev.opera.com/articles/view/html5-canvas-painting/ There is a javascript example, but I'm not sure how to do the bridge between GWT and JavaScript. Any ideas ?

    Read the article

  • LAMP stack on home computer as a public web server

    - by Scott
    So I'm using this website: http://www.howtoforge.com/ubuntu_debian_lamp_server to setup LAMP on my Ubuntu Virtual Machine. Here is my question though, This will enable me to program and test through localhost. How can I set this up so anyone on the web can access my .php pages from any Internet capable device, and they will still interact with my local database, etc?

    Read the article

  • Textarea overflow-x when a user copy-pastes into it?

    - by Logan
    Hi, I have a textarea with overflow-x: auto; attributed to it. It works great when a user is typing text into the box by hand. When a user copy pastes a line from a file, however, that is bigger than my textarea, the overflow-x property does not work, instead the textarea wordwraps the long line. Is there a way (maybe javascript) to make overflow-x work on copy-paste? Thanks.

    Read the article

  • revoked client certificate

    - by Michael
    Hi guys, I have little problem. I used certificate authority in windows server 2003 and revoked client certificate. The client certificate is in revoked certificate. I try verify this client certificate on revocation in winform app in windows server 2003. Code is here : private bool VefiryCert(X509Certificate2 cert) { X509Chain chain = new X509Chain(); chain.ChainPolicy.RevocationFlag = X509RevocationFlag.EntireChain; chain.ChainPolicy.RevocationMode = X509RevocationMode.Online; chain.ChainPolicy.UrlRetrievalTimeout = new TimeSpan(0, 0, 1000); chain.ChainPolicy.VerificationFlags = X509VerificationFlags.AllFlags; X509VerificationFlags.AllowUnknownCertificateAuthority; return chain.Build(cert); } But this client certificate is verify as true. I am confuse, where can be problem ? How can I check revocation list, which is loaded in winform application and used on verification this client certificate? So the problem is I verify client certificate, which is in revoked list (in certification authority) with method VefiryCert, an the certificate is verify as TRUE. Can somebody help me ?

    Read the article

  • Can't access my files in ASP.NET web site

    - by jumbojs
    I'm having a very difficult time. I am running windows 2008 server, I have an Able Commerce site using ASP.NET with C#. I'm writing an automated task that will ftp some xml files down into a local directory on our web server and then the program parses the xml file and saves information to our database. The problem, once I save the files to our local directory, my program has no access to the files. The NETWORK SERVICE user permissions isn't being inherited by the xml files so my program can't do anything with them. I can manually change the permissions, but this wouldn't be automated and won't work. How can I get this to work? help please, it's very frustrating.

    Read the article

  • Problems with word completion on Windows Mobile

    - by Rowland Shaw
    For "some reason" the word completion function on my windows mobile phone (HTC Diamond, rebadged as a T-Mobile MDA Compact IV (UK) running WM6.1 with HTC Touch Flo 3D) hasn't worked since one of my firends was taking a look at the phone (I remember him bitching about it being too obtrusive for him, as an iPhone fanboy). I've checked all the obvious settings ( Start Input Word Completion ) and everything looks set there; I tried a hard reset, to no avail and even tried upgrading the ROM t the latest from my network provider. I even tried walking into the store where I bought the phone, and the staff couldn't fix the issue. I still have my old handset, which also runs WM6.1 (a T-Mobile MDA Compact III (UK), albeit without Touch Flo 3D), and the word completion works on there, so I'm a little confused as to why I can't get it to work again on my new handset. Can anybody identify why this might not be working, or help me fix it? Edit: Even "Touch Input Settings" has both "Word Completion in T9 mode" and "Word Completion in ABC mode" checked. The full qwerty keyboard option is in T9 mode, and word completion works for this input method; It still does not work for my preferred, "Letter Recogniser" method.

    Read the article

  • Malicious Software

    - by Bb
    I had a program created for me recently and didn't really think about it being executable posing a threat since I pretty much trust the source but not completely. I then thought about the fact that a keylogger, or any kind of spyware or malicious software could've been possibly binded to it. This made me wonder about all the other stuff I download daily from places or people (torrents) I don't think twice about. My question is, how can someone find out if there has been some sort of keylogger binded to the software you're running or other things binded? What are some good ways to find out and stop these things?

    Read the article

  • Most efficient way to randomly "sort" (Shuffle) a list of integers in C#

    - by Carl
    I need to randomly 'sort' a list of integers (0-1999) in the most efficient way possible. Any ideas? Currently, I am doing something like this: bool[] bIndexSet = new bool[iItemCount]; for (int iCurIndex = 0; iCurIndex < iItemCount; iCurIndex++) { int iSwapIndex = random.Next(iItemCount); if (!bIndexSet[iSwapIndex] && iSwapIndex != iCurIndex) { int iTemp = values[iSwapIndex]; values[iSwapIndex] = values[iCurIndex]; values[iCurIndex] = values[iSwapIndex]; bIndexSet[iCurIndex] = true; bIndexSet[iSwapIndex] = true; } }

    Read the article

  • background image for jquery ui dialog buttons

    - by mcgrailm
    is it possible to give a button a background image really i have an image that I want to use for a button and would be nice if they stayed in place like the default buttons. right now I just have them inside the dialog but the rest of the content is dynamic and I don't want them to disappear when the scroll bar appears

    Read the article

  • Silverlight and Unexpected Font Sizes

    - by Eric J.
    Someone please teach me to fish here... I'm just learning Silverlight and have ran into a few situations where the font size actually used is drastically different than I would expect. There's probably something conceptual that I'm missing. Case A In one instance, I have defined a user control that presents a Label to show text. If one clicks on the label, the label (that is in a stack panel, in the user control) is replaced with a TextBox. When used at the top of a page (as in the example below with lblName) the label text is very small (around 8 points). When clicked on, the text box that replaces the label uses the specified fonts size. That same user control, used in different parts of the app, uses the same font for Label and TextBox. <Grid x:Name="LayoutRoot" Background="White"> <Grid.RowDefinitions> <RowDefinition Height="33" /> <RowDefinition Height="267*" /> </Grid.RowDefinitions> <StackPanel Height="Auto" HorizontalAlignment="Left" Name="stackPanel" VerticalAlignment="Top" Width="Auto" Grid.Row="1" /> <my:EditLabel Height="33" HorizontalAlignment="Left" x:Name="lblName" VerticalAlignment="Top" Width="Auto" FlexText="{Binding Name, Mode=TwoWay}" FontSize="20" MinHeight="24" /> </Grid> Case B I'm using the LiquidMenu.Menu control to pop up a menu when a button is pressed. The font looks huge compared to the rest of my page (maybe 36 points?). I tried forcing it to a very small by explicitly setting it to 8pt, but that had no effect. <Grid x:Name="LayoutRoot" Background="{x:Null}"> <StackPanel x:Name="labelStackPanel" Orientation="Horizontal"> <TextBlock Height="24" HorizontalAlignment="Left" Name="labelText" VerticalAlignment="Top" Width="200" Text="(Value Goes Here)" /> </StackPanel> <liquidMenu:Menu x:Name="popupMenu" Canvas.Left="40" Canvas.Top="40" ItemSelected="MenuList_ItemSelected" Visibility="Collapsed" Height="Auto" FontSize="8"> <liquidMenu:MenuItem ID="delete" Icon="Images/Delete10.png" Text="Delete" Shortcut="Del" /> <liquidMenu:MenuItem ID="exclusive" Icon="" Text="Exclusive" Shortcut="Ctrl+E" /> <liquidMenu:MenuItem ID="properties" Icon="" Text="Properties" Shortcut="Ctrl+P" /> </liquidMenu:Menu> </Grid> Answers to these specific issues are great, a new way to think about this type of issue so that I understand how to control font size is better.

    Read the article

  • Host ::1 resolves to remote IP

    - by thebuckst0p
    /etc/hosts files usually have this line, ::1 localhost. I thought ::1 was the equivalent of 127.0.0.1/localhost, and from my reading it seems to be the IPv6 version. So I was using it in Apache for firewalling, "Allow from ::1" and it only allowed local. Then suddenly that stopped working, so I pinged ::1 and got a remote IP address. I tracerouted it and it went through my ISP, through some Microsoft server, then another half dozen steps of asterisks... I'm not sure why this would be (the remote IP), but it doesn't seem good. I grep'd my hard drive for the remote IP and it doesn't appear anywhere. Is this some indicator that I'm being hacked, or normal behavior? Maybe my IPv6 settings are wrong? (This is a brand new MacBookPro with Snow Leopard.) Any ideas about this would be great - what is ::1 supposed to be, why would it be remote, should I be worried, how do I get it back to localhost? Thank you!

    Read the article

  • How to initialize a web app?

    - by Gatis
    My Web App will be deployed as a WAR package in a Jetty instance. It needs to perform a lot of caching before serving requests. How do I call the caching method before anything else? is the a static void main() in the web app standard?

    Read the article

  • Fabfile with support for sqlalchemy-migrate deployments?

    - by Chris Reid
    I have database migrations (with sqlalchemy-migrate) working well in my dev environment. However, I'm a little stumped about how to integrate this into my deployment process. I'm using fabric for deployment but having some trouble scripting the migrations part. The path to the to migrations directory in site-packages is dynamic (due to changing egg version number) and I'd rather not hard code my db password into the fabfile. Does anyone have a fabfile that plays nicely with sqlalchemy-migrate?

    Read the article

  • Get a list of members of a WinNT group (C#)

    - by Keith Moore
    There are a couple of questions similar to this on stack overflow but not quite the same. I want to open, or create, a local group on a win xp computer and add members to it, domain, local and well known accounts. I also want to check whether a user is already a member so that I don't add the same account twice, and presumably get an exception. So far I started using the DirectoryEntry object with the WinNT:// provider. This is going ok but I'm stuck on how to get a list of members of a group? Anyone know how to do this? Or provide a better solution than using DirectoryEntry?

    Read the article

  • time difference on heroku server

    - by railsnew
    There seems to be a time difference on heroku server. >> Customer.last.id => 584 >> Customer.last.created_at => Thu, 06 May 2010 01:43:20 UTC +00:00 >> Time.zone => #<ActiveSupport::TimeZone:0x2b1dec47e5c0 @utc_offset=0, @tzinfo=#<TZInfo::DataTimezone: Etc/UTC>, @name="UTC"> >> Time.now => Wed May 05 19:05:15 -0700 2010 >> Time.now.zone => "PDT" Notice that current time is May 05 19...however, created_at date for last record is May 06 01:43. This does not make any sense. What can be causing this and how would I go about fixing this?

    Read the article

  • Numeric Order By In Transact SQL (Ordering As String Instead Of Int)

    - by Pyronaut
    I have an issue where I am trying to order a result set by what I believe to be a numberic column in my database. However when I get the result set, It has sorted the column as if it was a string (So alphabetically), instead of sorting it as an int. As an example. I have these numbers, 1 , 2, 3, 4, 5, 10, 11 When I order by in Transact SQL, I get back : 1, 10, 11, 2, 3, 4, 5 I had the same issue with Datagridview's a while back, And the issue was because of the sorting being done as if it was a string. I assume the same thing is happening here. My full SQL code is : SELECT TOP (12) DATEPART(YEAR, [OrderDate]) AS 'Year', DATEPART(MONTH, [OrderDate]) AS 'Month' , COUNT(OrderRef) AS 'OrderCount' FROM [Order] WHERE [Status] LIKE('PaymentReceived') OR [Status] LIKE ('Shipped') GROUP BY DATEPART(MONTH, [OrderDate]), DATEPART(YEAR, [OrderDate]) ORDER BY DATEPART(YEAR, OrderDate) DESC, DATEPART(MONTH, OrderDate) desc DO NOTE The wrong sorting only happens when I cam calling the function from Visual Studio. As in my code is : using (SqlConnection conn = GetConnection()) { string query = @"SELECT TOP (12) DATEPART(YEAR, [OrderDate]) AS 'Year', DATEPART(MONTH, [OrderDate]) AS 'Month' , COUNT(OrderRef) AS 'OrderCount' FROM [Order] WHERE [Status] LIKE('PaymentReceived') OR [Status] LIKE ('Shipped') GROUP BY DATEPART(MONTH, [OrderDate]), DATEPART(YEAR, [OrderDate]) ORDER BY DATEPART(YEAR, OrderDate) DESC, DATEPART(MONTH, OrderDate) desc"; SqlCommand command = new SqlCommand(query, conn); command.CommandType = CommandType.Text; using (SqlDataReader reader = command.ExecuteReader()) etc. When I run the statement in MSSQL server, there is no issues. I am currently using MSSQL 2005 express edition, And Visual Studio 2005. I have tried numerous things that are strewn across the web. Including using Convert() and ABS() to no avail. Any help would be much appreciated.

    Read the article

  • my realtime network receiving time differs a lot, anyone can help?

    - by sguox002
    I wrote a program using tcpip sockets to send commands to a device and receive the data from the device. The data size would be around 200kB to 600KB. The computer is directly connected to the device using a 100MB network. I found that the sending packets always arrive at the computer at 100MB/s speed (I have debugging information on the unit and I also verified this using some network monitoring software), but the receiving time differs a lot from 40ms to 250ms, even if the size is the same (I have a receiving buffer about 700K and the receiving window of 8092 bytes and changing the window size does not change anything). The phenomena differs also on different computers, but on the same computer the problem is very stable. For example, receiving 300k bytes on computer a would be 40ms, but it may cost 200ms on another computer. I have disabled firewall, antivirus, all other network protocol except the TCP/IP. Any experts on this can give me some hints?

    Read the article

  • Adobe dévoile une tablette sous Android supportant Flash, un pied de nez technologique à Steve Jobs

    Adobe dévoile une tablette sous Android supportant Flash, un pied de nez technologique à Steve Jobs Il semblerait qu'au final, Adobe se fiche pas mal que l'iPad refuse Flash. La compagnie vient en effet de présenter une tablette tournant sous Android (l'OS de Google), et prenant Flash et Air en charge de manière on ne peut plus fluide. L'objet permet de lire des vidéos YouTube en natif dans le navigateur intégré. Sur les vidéos de l'objet (voir plus bas), on le voit aussi afficher une version bêta de l'application du magazine Wired, qui a été conçue avec Air d'Adobe. D'après une source anonyme, il devrait y avoir plusieurs tablettes Android sur le marché d'ici à la fin de l'année. En to...

    Read the article

  • How do I set up derby in eclipse on Ubuntu?

    - by Everett
    The question basically says it all. I'm trying setup up JavaDB on my virtualbox running Ubuntu 9.10. I have the package downloaded and installed through the package manager, which I believe is the right to go about it. I have also installed the Eclipse's Data Platform Tools. I've been following this tutorial here: http://www.vogella.de/articles/EclipseDataToolsPlatform/article.html. I'm stuck at the driver definition step. When I select the driver template from the Name/Type tab and the jar file in the Jar List tab, the OK button is never enabled. At the top of the New Driver Definition dialog it says 'Unable to locate Jar/zip in the file system as specified by the driver definition: derby.jar.' I assume this is the problem. Any help or links to a better tutorial would be much appreciated.

    Read the article

< Previous Page | 4 5 6 7 8 9 10 11 12 13 14 15  | Next Page >