Daily Archives

Articles indexed Sunday April 11 2010

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

  • How to keep an old VB6 application running in Windows Vista and Windows 7?

    - by MusiGenesis
    I have an old VB6 app which I'm still trying to support. A few users have reported weird crashes when running the app in Vista or Windows 7. The log files don't show anything after one of these crashes, but the customers report that the error message said "OLE something ...", if they saw anything at all. I've never been able to reproduce these crashes while running the program on my own Vista or Windows 7 boxes, so I have essentially no information on what the problem is. My suspicion is that it's a problem with their versions of one or more of the umpteen billion DLLs that a VB6 application is dependent on. The app also uses lame_enc.dll, which introduces a few more dependencies. I'm guessing this is a common problem with VB6 apps (although it's possible that I just sucked as a programmer 10 years ago). Is there some magical installer/updater out there that makes sure all the VB6 dependencies are what they need to be for a VB6 app to function properly?

    Read the article

  • Java: 2-assignments-2-initializations inside for-loop not allowed?

    - by HH
    $ javac MatchTest.java MatchTest.java:7: ')' expected for((int i=-1 && String match="hello"); (i=text.indexOf(match)+1);) ^ MatchTest.java:7: ';' expected for((int i=-1 && String match="hello"); (i=text.indexOf(match)+1);) ^ MatchTest.java:7: ';' expected for((int i=-1 && String match="hello"); (i=text.indexOf(match)+1);) ^ MatchTest.java:7: not a statement for((int i=-1 && String match="hello"); (i=text.indexOf(match)+1);) ^ MatchTest.java:7: illegal start of expression for((int i=-1 && String match="hello"); (i=text.indexOf(match)+1);) ^ 5 errors $ cat MatchTest.java import java.util.*; import java.io.*; public class MatchTest { public static void main(String[] args){ String text = "hello0123456789hello0123456789hello1234567890hello3423243423232"; for((int i=-1 && String match="hello"); (i=text.indexOf(match)+1);) System.out.println(i); } }

    Read the article

  • Using PHP to display button with hyperlink or greyed out button if no URL in database

    - by Diane
    I've got a webpage that I'm working on where you click on a letter or category and it displays records matching that query from a database. One of the things I want to display is a hyperlinked button that says "Website" if the database record contains a URL in the 'URL' field, and if there is no value in that field, it will display a greyed out version of that button. I tried using an if...else statement, but was absolutely unable to get the syntax correct trying to get php to call up the 'URL' value in the middle of an "echo " So here's what I did: <?php if($row_rsmemalpha['URL'] != NULL) ?><a href="http://<?php echo ($row_rsmemalpha['URL']);?>"><target ="_blank"><img src="web_button_on.gif" alt="Website" border="0" height="18" width="103" /></target></a> <?php if($row_rsmemalpha['URL'] == NULL) echo "<img src=\"web_button_off.gif\" alt=\"No Website Available\" height=\"18\" width=\"103\" />"; ?> If there is a URL available it shows the button properly. But if there isn't a URL in the database it shows both buttons. I have spent a few days studying examples and tutorials on the web, but haven't found too much that helps. The buttons were completely non-functional when I started, so I'm pretty proud of getting this far with it! I've just run out of time and patience for more trial-and-error experimenting. Any help is appreciated... Diane

    Read the article

  • How to install mod_wsgi 3.1 on Ubuntu 9.10

    - by pthulin
    I have a Python 3 web app so mod_wsgi < 3.1 doesn't cut it for me. However, on my Ubuntu 9.10 installation there doesn't seem to be a package for mod_wsgi 3.1. Is there an alternative repository that has a package for mod_wsgi 3.1? There's a new Ubuntu release not so long from now, will it contain mod_wsgi 3.1? Some other distro ready with mod_wsgi 3.1 to recommend? Maybe my best bet is to compile it myself? From a quick google it looks like I only need the python and apache dev packages installed. Thanks!

    Read the article

  • java compiler error: Can't open input server /Library/InputManagers/Inquisitor

    - by unknown (yahoo)
    Hi I am trying to compile helloWorld in java under snow leopard and I get this compiler error: java[51692:903] Can't open input server /Library/InputManagers/Inquisitor It happens when I am using terminal command javac and when I am trying do this in NetBeans. I was trying to open folder "Inquisitor" but I have no access to folder , even if I login as root user. Any clue what is going on? thanks.

    Read the article

  • How do I activate Window 7 for a different computer?

    - by Abdullah BaMusa
    I bought Windows 7 Professional Retail which I installed on my laptop. Now I've decided to move it to be on my desktop PC, so I uninstalled Windows from my laptop, restoring the original OS came with the laptop (Vista Business), and installed Windows 7 on my desktop PC. The problem is that I cannot activate my copy of Windows 7 on the desktop PC. Every time I try to activate it I get the error message The product key you typed cannot be used to activate windows on this computer" and the code of the error is: Code: 0xc004c008 Description: The activation server determined that the specified product key could not be used. How can I solve this problem?

    Read the article

  • Difficulty with apps with a forced landscape orientation

    - by mahboudz
    I have two apps, both of which force the user to use the iPhone in landscape mode, in order to have a wider screen, instead of a taller one. One of the things I have found is that my first view will look fine, but all other views come up with their subviews (UIButtons, UIPicker, UIViews) squeezed to one side or clipped (depending on whether the elements were set to move, resize or stay in the same position as the view size changed). All my views are designed in IB in the landscape orientation. My underlying UIWindow, and everything I can think of has been laid out in landscape orientation. Even my plist file has the UIInterfaceOrientationLandscapeRight flag set. Now, if I load all my views at the same time as my rootview controller, then I have no problems. But if I have views loaded later, they get clipped or squeezed. The only way to get around the problem was to add the following line in my code that flips in a new view: [coming.view setFrame:CGRectMake(0, 0, 480, 300)]; Anyone know why I need to do this? Is it just that the iPhone assumes that loaded views are 300x480 unless a transform gets applied to them? Thanks. ps. This is what the view looks like if I don't call setFrame, as described above: All viewcontrollers that get loaded after the first one will have their screen similarly squeezed down. For some reason the first viewcontroller doesn't have this issue.

    Read the article

  • App Engine - Objectify - Storing a byte[]

    - by Spines
    I'm using the Objectify library for interfacing with the app engine datastore. In my User class, I store the hashed password as a byte[]. When I put it in the datastore, it is correctly stored as a blob. When I try to load the User object back out I get this error: java.lang.IllegalStateException: Cannot load non-collection value '<Blob: 40 bytes>' into private byte[] How do I fix this? Do I have to change my User class to have the hashed password be of type ShortBlob?

    Read the article

  • Bound DataGridView not updating data source

    - by Max Yaffe
    I'm trying to bind a table of structures to a DataGridView. Loading and viewing the table is working fine but I can't edit a value and get it stored back into the table. Here's what I'm doing. I have a "primitive" data type, Real defined by public struct MyReal:IMyPrimative { public Double m_Real; //... public MyReal(String val) { m_Real = default(Double); Init(val); } //... } It gets used in a structure: public struct MyReal_Record : IMyRecord { public MyReal Freq { get; set;} MyReal_Record(String[] vals) { Init(vals); } } And the structure is used to define a table using a generic Binding List public class MyTable<S> : BindingList<S> where S: struct, IMyRecord { public Type typeofS; public MyTable() { typeofS = typeof(S); // ... } This table is used as a binding source for a grid, dynamically. private void miLoadFile_Click(object sender, EventArgs e) { MyModel.Table<Real_Record> RTable = new MyModel.Table<Real_Record>(); //... Table initialized here //set up grid with virtual mode dataGridView1.DataSource = RTable; } All of this works fine and I can create RTable, initialize it and display it in a grid. The grid allows editing and has events set for CellParsing and CellFormatting which look like: private void dataGridView1_CellFormatting(object sender, DataGridViewCellFormattingEventArgs e) { if (e.DesiredType != typeof(String)) return; e.Value = e.Value.ToString(); } private void dataGridView1_CellParsing(object sender, DataGridViewCellParsingEventArgs e) { if (e.DesiredType != typeof(MyReal)) return; e.Value = new MyReal(e.Value.ToString()); e.ParsingApplied = true; this.dataGridView1.UpdateCellValue(e.ColumnIndex, e.RowIndex); } When I edit a value in a cell, I can change the text. On leaving the cell, CellParsing fires and the event handler is called. Everything seems to be correct going into the CellParsing handler. e.DesiredType is MyReal. e.Value is a string with the new value. After the new MyReal is created from the string, e.Value is set correctly. RowIndex and ColumnIndex are correct. ReadOnly is set false. However, when I leave the cell, the system restores the original value to the cell. I thought the UpdateCellValue would replace the value in the dataSource but I seem to be missing something. What did I miss? Thanks, Max

    Read the article

  • Best practice to display POI in iPhone's MapKit?

    - by iamj4de
    Assuming I have a database of POI with their respective coordinates (longitude & latitude). What would be the "standard" way to display the POI as annotations around the user's current location? To elaborate: Given a zoom level, I guess I have to search through the database for all POI whose distance to the current location < a certain threshold, then create annotations for them. Or is there any smarter way? If the user zooms in/out, moves the map... I will need to redo the whole thing again? It seems that MapKit has a mechanism to cache/reuse annotations. Should I create a lot of them right away and let MapKit decides what to render when the visible region changes? I guess this would make the transition smoother, but also consumes more memory. What is your experience with this? Thanks.

    Read the article

  • Designing the iPhone interface in a nib or in code?

    - by Jacob Relkin
    I've been pondering over this question for a long time already. On the one hand, Interface Builder offers a really easy way to design the interface and wire the elements up with objects in code. On the other hand, in larger projects, Interface Builder becomes a hassle to maintain. Any suggestions would be greatly appreciated.

    Read the article

  • C++ template nontype parameter arithmetic

    - by aaa
    hello I am trying to specialize template the following way: 132 template<size_t _1,size_t _2> 131 struct integral_index_ {}; ... 141 template<size_t _1> 142 struct integral_index_<_1, _1 + 1> { ... 148 }; however I get compiler message error the template argument list of the partial specialization includes a non -type argument whose type depends on a template parameter. what do my doing wrong? thanks

    Read the article

  • Insert lecture number and page number of lecture in footline

    - by Liam
    I am dividing a semester's worth of lectures via the \lecture command. I'd like to have in the footline (among other things) the lecture number, date, and page number of the current lecture. I would also like to use the default style footline, with the black box on the left and the blue on the right. So I define a lecture with e.g. \lecture{January 28, 2010}{lecture01} with \title[Lecture \insertlecturenumber{}(\insertlecture)\quad{}Page \insertframenumber]{Course Title} in the preamble, I get an error; it will not accept \insertlecture there. If I remove \insertlecture, it does what I want, except that the page number is counted from the start of the semester, not the lecture. Is there any way to do this? Thank you. Liam

    Read the article

  • Operate on pairs of rows of a data frame

    - by lorin
    I've got a data frame in R, and I'd like to perform a calculation on all pairs of rows. Is there a simpler way to do this than using a nested for loop? To make this concrete, consider a data frame with ten rows, and I want to calculate the difference of scores between all (45) possible pairs. > data.frame(ID=1:10,Score=4*10:1) ID Score 1 1 40 2 2 36 3 3 32 4 4 28 5 5 24 6 6 20 7 7 16 8 8 12 9 9 8 10 10 4 I know I could do this calculation with a nested for loop, but is there a better (more R-ish) way to do it?

    Read the article

  • refactor LINQ TO SQL custom properties that instantiate datacontext

    - by Thiago Silva
    I am working on an existing ASP.NET MVC app that started small and has grown with time to require a good re-architecture and refactoring. One thing that I am struggling with is that we've got partial classes of the L2S entities so we could add some extra properties, but these props create a new data context and query the DB for a subset of data. This would be the equivalent to doing the following in SQL, which is not a very good way to write this query as oppsed to joins: SELECT tbl1.stuff, (SELECT nestedValue FROM tbl2 WHERE tbl2.Foo = tbl1.Bar), tbl1.moreStuff FROM tbl1 so in short here's what we've got in some of our partial entity classes: public partial class Ticket { public StatusUpdate LastStatusUpdate { get { //this static method call returns a new DataContext but needs to be refactored var ctx = OurDataContext.GetContext(); var su = Compiled_Query_GetLastUpdate(ctx, this.TicketId); return su; } } } We've got some functions that create a compiled query, but the issue is that we also have some DataLoadOptions defined in the DataContext, and because we instantiate a new datacontext for getting these nested property, we get an exception "Compiled Queries across DataContexts with different LoadOptions not supported" . The first DataContext is coming from a DataContextFactory that we implemented with the refactorings, but this second one is just hanging off the entity property getter. We're implementing the Repository pattern in the refactoring process, so we must stop doing stuff like the above. Does anyone know of a good way to address this issue?

    Read the article

  • Regex to match card code input

    - by kate
    How can I write a regex to match strings following these rules? 1 letter followed by 4 letters or numbers, then 5 letters or numbers, then 3 letters or numbers followed by a number and one of the following signs: ! & @ ? I need to allow input as a 15-character string or as 3 groups of 5 chars separated by one space. I'm implementing this in JavaScript.

    Read the article

  • gcc run "light" preprocessor

    - by Claudiu
    Is there any way to run the gcc preprocessor, but only for user-defined macros? I have a few one-liners and some #ifdef etc... conditionals, and I want to see what my code looks like when just those are expanded. As it is, the includes get expanded, my fprintf(stderr)s turn into fprintf(((__getreeent())-_stderr), etc...

    Read the article

  • selecting the pixels from an image in opencv

    - by ajith
    hi everyone, this is refined version of my previous question http://stackoverflow.com/questions/2602628/computing-matting-laplacian-matrix-of-an-image actually i want to do following operation... summation for all k|(i,j)?wk [(Ii-µk)*(Ij-µk)]...where wk is 3X3 window & µk is mean of wk...here i dont know how to select Ii & Ij separately from an image which is 2 dimensional[Iij]...or does the eqn means anything else??please someone help me..

    Read the article

  • Most efficient way to solve system of equations involving the digamma function?

    - by Neil G
    What is the most efficient way to solve system of equations involving the digamma function? I have a vector v and I want to solve for a vector w such that for all i: digamma(sum(w)) - digamma(w_i) = v_i and w_i 0 I found the gsl function gsl_sf_psi, which is the digamma function. Is there an identity I can use to reduce the equations? Is my best bet to use a solver? I am using C++0x; which solver is easiest to use and fast?

    Read the article

  • How can I learn to set up a build process?

    - by Satoru.Logic
    Hi, all. What I was taught at school is all about programming languages, software design, but hardly anything about how to automatically build a software, probably with unit testing integrated. Please tell me how do one start learning to set up a build process for his project.

    Read the article

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