Daily Archives

Articles indexed Thursday March 11 2010

Page 23/97 | < Previous Page | 19 20 21 22 23 24 25 26 27 28 29 30  | Next Page >

  • Modifying LaTeX Table of Contents to add a period after chapter/table/figure number

    - by Reverend Gonzo
    I need to add a period after the chapter/table/figure number in each line in Table of Contents/LoT/LoF. ie, right now it shows: TABLES 1 first 2 second but I need it to show: TABLES 1. first 2. second I know this can be done with the tocloft package, however, that package is conflicting with the latex style I'm using, with the error: \c@lotdepth is already defined. (The style is an old style for my university's thesis format, but it's slightly out of date, so I need to make some changes to get it right. I also found that I can change thechapter/thetable/thefigure, so those contain periods. However, that then messes up my references and has the period in all of my references.

    Read the article

  • hi when i write <h:outputText value="Login Name"/> tag in my jsp i am getting Cannot find FacesConte

    - by Sunny Mate
    hi when i write <h:outputText value="Login Name"/> tag in my jsp i am getting "Cannot find FacesContext" error , with out that tag my jsp working fine here is my JSP <%@ page language="java" import="java.util.*" pageEncoding="ISO-8859-1"%> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %> <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %> <body> Login Name <input type="text" value=""/><br> **<h:outputText value="Login Name"/>** Password<input type="password" value=""/><br> <input type="submit" value="Login"> </body> </html>

    Read the article

  • B-V to Kelvin formula

    - by PeanutPower
    Whilst looking for a "B-V color index to temperature conversion formula" I found this javascript: var C1 = 3.979145; var C2 = -0.654499; var C3 = 1.74069; var C4 = -4.608815; var C5 = 6.7926; var C6 = -5.39691; var C7 = 2.19297; var C8 = -.359496; bmv = parseFloat(BV); with (Math) { logt= C1 +C2*bmv +C3*pow(bmv,2) +C4*pow(bmv,3) +C5*pow(bmv,4) +C6*pow(bmv,5) +C7*pow(bmv,6) +C8*pow(bmv,7); t=pow(10,logt); } Which is supposed to convert B-V color index to temperature. Does anyone understand how this is working and if the output value is an approximation for temperature in celcius or kelvin? Is it something to do with products of logarithms?

    Read the article

  • Long running stateful service in .NET

    - by Asaf R
    Hi, I need to create a service in .NET that maintains (inner) state in-memory, spawns multiple threads and is generally long-running. There are a lot options - Good-old Windows Service Windows Communication Services Windows Workflow Foundation I really don't know which to choose. Most of the functionality is in a library used by this service, so the service itself is rather simple. On one hand, it's important the service host is as close to "simply working" as possible, which excludes Windows Service. On the other hand, it's important that the service is not taken down by the host just because there's no external activity, which makes WCF kind o' "scary". As for WF, it's strongest selling point is the ability to create processes as, um..., workflows, which is something I don't need nor want. To sum it up, the plethora of Microsoft technologies got me a bit confused. I'd appreciate help regarding the pros and cons of each solution (or other's I've failed to mention) for the problem of a stateful, long running service in .NET Thanks, Asaf P.S., I'm using .NET 4. EDIT: What I mean by the host "simply working" is, for example, that the service I create be reactivated if it crashes. I guess the reason for this question is that I've created Windows Services in the past (I think it was in plain C++ with Win32 API), and I don't want to miss out on something simpler if there's is such as thing. Thanks for all the replies thus far! Asaf.

    Read the article

  • C/C++ macro/template blackmagic to generate unique name.

    - by anon
    Macros are fine. Templates are fine. Pretty much whatever it works is fine. The example is OpenGL; but the technique is C++ specific and relies on no knowledge of OpenGL. Precise problem: I want an expression E; where I do not have to specify a unique name; such that a constructor is called where E is defined, and a destructor is called where the block E is in ends. For example, consider: class GlTranslate { GLTranslate(float x, float y, float z); { glPushMatrix(); glTranslatef(x, y, z); } ~GlTranslate() { glPopMatrix(); } }; Manual solution: { GlTranslate foo(1.0, 0.0, 0.0); // I had ti give it a name ..... } // auto popmatrix Now, I have this not only for glTranslate, but lots of other PushAttrib/PopAttrib calls too. I would prefer not to have to come up with a unique name for each var. Is there some trick involving macros templates ... or something else that will automatically create a variable who's constructor is called at point of definition; and destructor called at end of block? Thanks!

    Read the article

  • creating a wrapper around a 3rd party assembly - swap out and decouple

    - by mrblah
    I have an email component that I am integrating into my application, looking for some tips on how should build a wrapper around it so I can swap it out with another 3rd party component if needed. My approach right now is it: build an interface will the functionality I need. create a class that implements the interface, using my 3rd party component inside this class. any usage of this component will be via the interface so like: IPop3 pop3 = new AcmeIncePop3Wrapper(); pop3.connect(); and inside AcmeIncePop3Wrapper will be: public void connect() { AcmeIncePop3 pop = new AcmeIncePop3(); pop.connect(); } Is that a good approach? I could probably add another abstraction by using ninject so I could swap out implementations, but really this seems to be all I need as i don't expect to be changing 3rd party assemblies every day, just don't want to make things so tightly coupled.

    Read the article

  • When to choose LAMP over ASP.NET?

    - by Carlo
    Hello. A friend wants to start a dating website, she wants me to help her. We still haven't discussed on what platform it'll be developed, but I'm thinking she'll suggest LAMP to save a buck (which is one reason already to chose over ASP.NET already). If the dating website does well, it'll potentially hold a large amount of data (I'm not sure if this would be another reason to consider either ASP.NET or LAMP). Anyway, I ask this from an ASP.NET developer point of view. I have very little, almost null experience with LAMP, and I don't like it very much either, so if she decides to go with PHP odds are I won't help her. So what would be some good points to bring up when deciding which platform to develop on? Please be objective, I don't want this to be argumentative or anything, try to stick to facts, not opinions alone. Thanks!

    Read the article

  • JSP property lookup error

    - by AEIOU
    I'm getting the following error in ours logs: Error looking up property "foo" in object type "foo.bar". Cause: null java.lang.reflect.InvocationTargetException at sun.reflect.GeneratedMethodAccessor363.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.commons.beanutils.PropertyUtilsBean.invokeMethod(PropertyUtilsBean.java:1773) I cannot for the life of me recreate it, I was wondering if anyone has any experience with this kind of problem with JSP/Java Bean. What I wanted to know was, will this prevent the user from getting the web page to show up? I know this isn't a whole lot of information, but any advice could help.

    Read the article

  • What are the worst examples of moral failure in the history of software engineering?

    - by Amanda S
    Many computer science curricula include a class or at least a lecture on disasters caused by software bugs, such as the Therac-25 incidents or Ariane 5 Flight 501. Indeed, Wikipedia has a list of software bugs with serious consequences, and a question on StackOverflow addresses some of them too. We study the failures of the past so that we don't repeat them, and I believe that rather than ignoring them or excusing them, it's important to look at these failures squarely and remind ourselves exactly how the mistakes made by people in our profession cost real money and real lives. By studying failures caused by uncaught bugs and bad process, we learn certain lessons about rigorous testing and accountability, and we make sure that our innocent mistakes are caught before they cause major problems. There are kinds of less innocent failure in software engineering, however, and I think it's just as important to study the serious consequences caused by programmers motivated by malice, greed, or just plain amorality. Thus we can learn about the ethical questions that arise in our profession, and how to respond when we are faced with them ourselves. Unfortunately, it's much harder to find lists of these failures--the only one I can come up with is that apocryphal "DOS ain't done 'til Lotus won't run" story. What are the worst examples of moral failure in the history of software engineering?

    Read the article

  • Featureful commercial text editors?

    - by wrp
    I'm willing to buy tools if they add genuine value over a FOSS equivalent. One thing I wouldn't mind having is an editor with the power of Emacs, but made more user-friendly. There seem to be several commercial editors out there, but I can't find much discussion of them online. Maybe it's because the kind of people who use commercial software don't have time to do much blogging. ;-) If you have used any, what was your evaluation? I'd especially like to hear how you would compare them to Emacs. I'm thinking of editors like VEDIT, Boxer, Crisp, UltraEdit, SlickEdit, etc. To get things started, I tried EditPad Pro because I needed something on a Win98SE box. I was attracted by its powerful support for regexps, but I didn't use it for long. One annoyance was that find-in-files was only available in a separate product you had to buy. The main problem, though, was stability. It sometimes hung and I lost a few files because it corrupted them while editing. After a couple weeks, I found that I was avoiding using it, so I just uninstalled. Edit: Ah...I need to remove some ambiguity. With reference to Emacs, "power" often means its potential for customization. This malleability comes from having an architecture in which most of the functionality is written in a scripting language that runs on a compiled core. Emacs (with elisp) is by far the most widely known such system among home users, but there have been other heavily used editors such as Freemacs (MINT), JED (S-Lang), XEDIT (Rexx), ADAM (TPU), and SlickEdit (Slick-C). In this case, by "power" I'm not referring to extensibility but to realized features. There are three main areas which I think a commercial text editor might be an improvement over Emacs: Stability The only apps I regularly use on Linux that give me flaky behavior are Emacs, Gedit, and Geany. On Windows, I like the look and features of Notepad++, but I find it extremely unstable, especially if I try to use the plugins. Whatever I happen to be doing, I'm using some text editor practically all day long. If I could switch to an editor that never gave me problems, it would definitely lower my stress level. Tools When I started using Emacs, I searched the manual cover to cover to gleam ideas for clever, useful things I could do with it. I'd like to see lots of useful features for editing code, based on detailed knowledge of what the system can do and the accumulated feedback of users. Polish The rule of threes goes that if you develop something for yourself, it's three times harder to make it usable in-house, and three times harder again to make it a viable product for sale. It's understandable, but free software development doesn't seem to benefit from much usability testing. BTW, texteditors.org is a fantastic resource for researching text editors.

    Read the article

  • SSRS export to Excel UNFORMATTED

    - by mjmcloug
    Hey, I'm looking into SSRS with intention of exporting a lot of the reports to excel. The problem is that when you export it changes cell sizes and removes borders to try and keep the original report format. Is there anyway to stop this happening? So that the report exports to excel with the "usual" excel formatting? If it requires any coding that's fine as most of my reports will be run from C# code. Thanks Mat

    Read the article

  • Two column layout, navigation div on the right, solution from previous thread didn't seem to work

    - by Tom
    I tried the solution from this thread, but I must be missing something because it doesn't work: <div style="float:left;margin-right:200px"> <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p> </div> <div style="float:right;width:200px"> <p>navigation</p> </div> It works when the text in the content div (the left one) is short, but when it's long then the div takes up the whole width of the browser and the margin is there, but the right div is pushed below the first one nevertheless. What am I missing? Edit: The goal is to have a fix sized navigation column on the right of the browser window and the left div should get all the space left by the right navigation column (liquid layout).

    Read the article

  • Why are not all texts of my MFC applicatiopn displayed using ClearType?

    - by mxp
    I've got an MFC application that is built with VC6. When ClearType is enabled (Windows XP) some texts are rendered smoothly, i.e. with ClearType, and others are not. Dialog texts don't seem to ever get rendered with ClearType. Some list controls, however, have it enabled completely, others only in their headers. What could be the reason for this? Where should I look to find out why it works only in some places and doesn't in others?

    Read the article

  • Setting a background drawable for a dialog?

    - by user291701
    Hi, Tried posting this at android dev, wanted to go here too in case anyone knows. I'm trying to supply a custom background drawable for a dialog. I've created the following in my styles.xml file: <style name="CustomDlg" parent="@android:style/Theme.Dialog"> <item name="android:windowBackground">@drawable/my_background</item> </style> This works fine on 1.6+. On my g1 running 1.5 (and the 1.5 emulator) the drawable is used, but the area around the dialog is opaque black instead of being translucent. Is there something I'm missing here, or is this a bug with 1.5? Any work arounds? Is 1.5 just the ie6 of Android? Thanks

    Read the article

  • I want to use VI-like commands in Web Browser?

    - by Frank
    I love VI and I'm looking for a plugin of some sort that would allow me to input text in my browser (preferably Firefox or Chrome) using VI commands. It would save me an immense amount of time and at the same time when writing long emails. Can anyone think of any plugins that would allow me to do this? I was hopeful with Vimperator (https://addons.mozilla.org/en-US/firefox/addon/4891) but after installing it, I realized that it didn't do the one VI think I wanted to do: create or edit a text box with VI commands. It just allowed me to do Browser commands and scrolling in VI-style.

    Read the article

  • Running Xcode Applications without installing Xcode

    - by Cawas
    I know nothing about Xcode, except it's a Developer interface from Apple that actually comes on OSX CD and it's used to create iPhone apps as well. I also know it have a Applications folder, filled with little utilities, that are indeed quite useful. I tried grabbing one of them and running, without installing Xcode but it doesn't work. It brings an error and a Problem Report from which I believe the relevant part is this: Dyld Error Message: Library not loaded: @rpath/DevToolsInterface.framework/Versions/A/DevToolsInterface I've tried, of course, locating that "framework", with no success. Well... I guess it's probably possible to install Xcode, get that utility source, if it exists somewhere, and compile for stand-alone. But that goes beyond my point. I just want to know if there's somewhere I can get those utilities and/or make them run without needing to install Xcode at all.

    Read the article

  • How to join list of strings?

    - by satsurae
    Hi all, This is probably seriously easy to solve for most of you but I cannot solve this simply putting str() around it can I? I would like to convert this list: ['A','B','C'] into 'A B C'. Thanks in advance!!

    Read the article

  • Widget host app with custom view - onClick is not triggered in the app widget.

    - by Dennis K
    I'm writing an app that will host widgets. The app has custom view (which probably is the source of issue). I obtain AppWidgetHostView like this private AppWidgetHostView widget; ... AppWidgetProviderInfo appWidgetInfo = mAppWidgetManager.getAppWidgetInfo(appWidgetId); widget = mAppWidgetHost.createView(this, appWidgetId, appWidgetInfo); widget.setAppWidget(appWidgetId, appWidgetInfo); mView.addWidget(widget, appWidgetInfo); mView.addWidget() basically just remembers this AppWidgetHostView instance and then draws it directly onto canvas. Visually everything is fine - I can see the actual widget. But the issue is with reacting on UI events. Please advise what needs to be done in the parent view in order to correctly trigger handlers in the widgets like onClick(). Notes: I used standard widgets which normally react on click events. None worked. I also created my own test widget with listener (via views.setOnClickPendingIntent(R.id.appwidget_text, pending);) and onClick() is successfully triggered if the widget is added on Homescreen, but doesn't work in my app. mView correctly detects click event and I tried to call widget.performClick() there, which returns false meaning onClickListener is not registered in the widget. But according to source mAppWidgetHost.createView() would call updateAppWidget which would register its onClick listener.. Please advise where to look at. Thanks

    Read the article

  • What is a good generic sibling control Javascript communication strategy?

    - by James
    I'm building a webpage that is composed of several controls, and trying to come up with an effective somewhat generic client side sibling control communication model. One of the controls is the menu control. Whenever an item is clicked in here I wanted to expose a custom client side event that other controls can subscribe to, so that I can achieve a loosely coupled sibling control communication model. To that end I've created a simple Javascript event collection class (code below) that acts as like a hub for control event registration and event subscription. This code certainly gets the job done, but my question is is there a better more elegant way to do this in terms of best practices or tools, or is this just a fools errand? /// Event collection object - acts as the hub for control communication. function ClientEventCollection() { this.ClientEvents = {}; this.RegisterEvent = _RegisterEvent; this.AttachToEvent = _AttachToEvent; this.FireEvent = _FireEvent; function _RegisterEvent(eventKey) { if (!this.ClientEvents[eventKey]) this.ClientEvents[eventKey] = []; } function _AttachToEvent(eventKey, handlerFunc) { if (this.ClientEvents[eventKey]) this.ClientEvents[eventKey][this.ClientEvents[eventKey].length] = handlerFunc; } function _FireEvent(eventKey, triggerId, contextData ) { if (this.ClientEvents[eventKey]) { for (var i = 0; i < this.ClientEvents[eventKey].length; i++) { var fn = this.ClientEvents[eventKey][i]; if (fn) fn(triggerId, contextData); } } } } // load new collection instance. var myClientEvents = new bsdClientEventCollection(); // register events specific to the control that owns it, this will be emitted by each respective control. myClientEvents.RegisterEvent("menu-item-clicked"); Here is the part where this code above is consumed by source and subscriber controls. // menu control $(document).ready(function() { $(".menu > a").click( function(event) { //event.preventDefault(); myClientEvents.FireEvent("menu-item-clicked", $(this).attr("id"), null); }); }); <div style="float: left;" class="menu"> <a id="1" href="#">Menu Item1</a><br /> <a id="2" href="#">Menu Item2</a><br /> <a id="3" href="#">Menu Item3</a><br /> <a id="4" href="#">Menu Item4</a><br /> </div> // event subscriber control $(document).ready(function() { myClientEvents.AttachToEvent("menu-item-clicked", menuItemChanged); myClientEvents.AttachToEvent("menu-item-clicked", menuItemChanged2); myClientEvents.AttachToEvent("menu-item-clicked", menuItemChanged3); }); function menuItemChanged(id, contextData) { alert('menuItemChanged ' + id); } function menuItemChanged2(id, contextData) { alert('menuItemChanged2 ' + id); } function menuItemChanged3(id, contextData) { alert('menuItemChanged3 ' + id); }

    Read the article

  • HTML5 video tag in chrome - wmv

    - by elcuco
    Hi Al, I need to make a page which displays a video. Firefox and and Opera support the OGG format, no problem there. Chrome is ... "stupid" and does not recognize OGG. Does Chrome on Windows know how to handle WMV? I already have them encoded, and no I cannot recode new videos since the media is limited in spaced (CDROM). My code currently looks like this (and not working in chrome) <video controls> <source codecs="theora, vorbis" media="video/ogg" src="video.ogv" /> <source media="video/x-ms-wmv" src="video.wmv" /> Please install a new browser, or just get out </video> Note that I am missing a codec entry, does anyone know what I need to put there?

    Read the article

  • How can I know if a file has been changed in .NET C#?

    - by Anthony D
    I have an application that requires a secure way to store its configuration. There are users that can change the configuration. I need some sort of signature scheme where I can verify that the config file has not changed with out a valid user. I had thought about using RSA, where the private key is encrypted with the users password, and the public key is used to sign the config. However there is nothing to prevent someone from changing the user file and adding their own public key, thus circumventing my security. Any ideas?

    Read the article

< Previous Page | 19 20 21 22 23 24 25 26 27 28 29 30  | Next Page >