Daily Archives

Articles indexed Sunday March 28 2010

Page 2/83 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • What's the reason for leaving an extra blank line at the end of a code file?

    - by Lord Torgamus
    Eclipse and MyEclipse create new Java files with an extra blank line after the last closing brace by default. I think CodeWarrior did the same thing a few years back, and that some people leave such blank lines in their code either by intention or laziness. So, this seems to be at least a moderately widespread behavior. As a former human language editor -- copy editing newspapers, mostly -- I find that those lines look like sloppiness or accidents, and I can't think of a reason to leave them in source files. I know they don't affect compilation in C-style languages, including Java. Are there benefits to having those lines, and if so, what are they?

    Read the article

  • wordpress my_deregister plugin from page

    - by musiC addicted
    i try to use the next code to load cforms II plugin only on my CONTACT PAGE (http://www.deliciousdays.com/cforms-plugin/) #/template/functions.php add_action( 'wp_print_scripts', ' ', 100 ); function my_deregister_javascript() { if ( !is_page('Contact') ) { wp_deregister_script( 'cforms' ); } } add_action( 'wp_print_styles', 'my_deregister_styles', 100 ); function my_deregister_styles() { if ( !is_page('contact') ) { wp_deregister_style( 'cforms' ); wp_deregister_style( 'style' ); } } but doesn't work the code worked for contact form 7 ( http://wordpress.org/extend/plugins/contact-form-7/)

    Read the article

  • Hide deprecated methods from tab completion

    - by Morgoth
    I would like to control which methods appear when a user uses tab-completion on a custom object in ipython - in particular, I want to hide functions that I have deprecated. I still want these methods to be callable, but I don't want users to see them and start using them if they are inspecting the object. Is this something that is possible?

    Read the article

  • Calling a webservice in javascript

    - by user303052
    So, I am trying to make a firefox extension which will use a webservice. I was looking online to find a way to do this. I was wondering if someone could explain what the following objects/methods do: service.useService(_, _); service.<`Service Name.callService(); If there is an alternative that does not include these objects, I would be happy to hear about it. Thank you very much

    Read the article

  • Best way to backup and restore millions of files

    - by bongo
    Hi, I'm facing a rebuilding of the volume on which I host the mail storage (kerio mailserver, which uses maildirs). I need to backup and restore as quick as possible the 3.5+ millions (for about 600GB) small files of the store directory. It takes more than 12 hours via rsync to a NFS share, but I also have a 1TB firewire 800 raid1 disk that I can use (from some preliminary tests it's faster). I'm working off a XServe intel. What is the fastest way to do it? Rsync? Finder copy? tar?

    Read the article

  • Delphi: Autoscale TEdit based on text length does not work when removing chars

    - by pr0wl
    Hello. I have an input edit field where the user can enter data. I want the box width to be at least 191px (min) and maximum 450px (max). procedure THauptform.edtEingabeChange(Sender: TObject); begin // Scale if Length(edtEingabe.Text) > 8 then begin if Hauptform.Width <= 450 then begin verschiebung := verschiebung + 9; // The initial values like 'oldedtEingabeWidth' are global vars. edtEingabe.Width := oldedtEingabeWidth + verschiebung; buDo.Left := oldbuDoLeft + verschiebung; Hauptform.Width := oldHauptformWidth + verschiebung; end; end; end; This works for ENTERING text. But when I delete one char, it does not scale back accordingly.

    Read the article

  • Cassandra/HBase or just MySQL: Potential problems doing the next thing

    - by alexeypro
    Say I have "user". It's the key. And I need to keep "user count". I am planning to have record with key "user" and value "0" to "9999+ ;-)" (as many as I'll have). What problems I will drive in if I use Cassandra, HBase or MySQL for that? Say, I have thousand of new updates to this "user" key, where I need to increment the value. Am I in trouble? Locked for writes? Any other way of doing that? Why this is done -- there will be a lot of "user"-like keys. Different other cases. But the idea is the same. Why keep it this way -- because I'll have more reads, so I can always get "counted value" very fast.

    Read the article

  • How can I resolve gstreamer dependencies in Ubuntu

    - by michael
    Hi, Can you please tell me how can I resolve these dependencies on ubuntu: checking for GSTREAMER... configure: error: Package requirements (gstreamer-0.10 >= 0.10 gstreamer-app-0.10 gstreamer-base-0.10 gstreamer-pbutils-0.10 gstreamer-plugins-base-0.10 >= 0.10.25 gstreamer-video-0.10) were not met: No package 'gstreamer-app-0.10' found No package 'gstreamer-pbutils-0.10' found No package 'gstreamer-plugins-base-0.10' found No package 'gstreamer-video-0.10' found I have tried: $ sudo apt-get install *gstreamer-video* Reading package lists... Done Building dependency tree Reading state information... Done E: Regex compilation error - Invalid preceding regular expression $ sudo apt-get install *gstreamer-app* Reading package lists... Done Building dependency tree Reading state information... Done E: Regex compilation error - Invalid preceding regular expression $ sudo apt-get install *gstreamer-base* Reading package lists... Done Building dependency tree Reading state information... Done E: Regex compilation error - Invalid preceding regular expression

    Read the article

  • Detect similar sounding words in Ruby

    - by JP
    I'm aware of SOUNDEX and (double) Metaphone, but these don't let me test for the similarity of words as a whole - for example "Hi" sounds very similar to "Bye", but both of these methods will mark them as completely different. Are there any libraries in Ruby, or any methods you know of, that are capable of determining the similarity between two words? (Either a boolean is/isn't similar, or numerical 40% similar) edit: Extra bonus points if there is an easy method to 'drop in' a different dialect or language!

    Read the article

  • Autohotkey editor

    - by Kjensen
    What is the best editor for Autohotkey with regards to syntax hightlighting, command completion (intellisense), testing etc. I am doing a bit of Autohotkey programming, and being spoiled rotten by Visual Studio, I really miss these features - especially being new to the language/framework.

    Read the article

  • How to find the computer name a user logged on to

    - by V. Romanov
    Hi guys Is there a tool or script or some other way of knowing what computer name a specific user is currently logged on to? Or even was logged on to? Say the user "HRDrone" is working on his machine whose hostname is "HRStation01". I, sitting at my sysadmin desk, only know that the username is "HRDrone". Any way i can find out that he is logged on to "HRStation01" without asking the user? AD event viewer? anything? Thanks!

    Read the article

  • IIS 7.5 401.3 Access Denied

    - by Jeffrey
    I am having this weird issue with IIS 7.5 on Windows 2008 R2 x64. I created a site in IIS and manually created a test file index.html and everything worked. When I try to do a deployment, I copy all the files from my local PC to the IIS server, try to access index.html (this is the proper deployed file) and getting 401.3 access denied error. I then try to manually recreate index.html and copy content into this newly created file and the page is accessible again... I just can't figure this out. So the issue is that IIS 7.5 can't server files that have been copied from other PCs. I tried to reset/apply permission settings to the copied folders/files but nothing has worked. Please help. Thanks! By the way, the files that I copied are just some html cutups i.e. generic html, css and image files, nothing special.

    Read the article

  • Upgrade from Etch to Lenny, server no longer reboots

    - by Jack
    Hi, I just upgraded my (remote) webserver to Lenny from Etch. and no real issue occurs except that I cannot reboot that server. (I can only start in a rescue mode) I recall that a MBR change performed and I am wondering if that could be the reason for this failure. Would someone know how I can revert this MBR change ? I had switched back to my previous linux kernel, still cannot reboot. I would appreciate your help. thanks Jack

    Read the article

  • ID not recognized in .ascx page

    - by Alexander
    I have the following code: <%@ Control Language="C#" AutoEventWireup="true" CodeBehind="DurationPicker.ascx.cs" Inherits="Permias.DurationPicker" %> <%@ Register TagPrefix="Club" Namespace="ClubSite" %> <div class="controlblock"> <table> <tr> <td> Start Date: </td> <td> <Club:DatePicker ID="dp1" runat="server" /> </td> <td> <Club:TimePicker ID="tp1" runat="server" /> </td> </tr> <tr> <td> End Date: </td> <td> <Club:DatePicker ID="dp2" runat="server" /> </td> <td> <Club:TimePicker ID="tp2" runat="server" /> </td> </tr> </table> </div> In my code behind I have public System.DateTime startDateTime { get { return dp1.SelectedDate.Add(tp1.SelectedTime.TimeOfDay); } set { dp1.SelectedDate = value; tp1.SelectedTime = value; } } However dp1 is underlined in red, which means it can't find dp1.. why is this?

    Read the article

  • Running DOS command through C# just opens blank cmd window

    - by Mohit Deshpande
    I was trying to execute a command through C#, but when I run the following code, a blank cmd window just opens up. The code: string command = string.Format(@"adb install C:\Users\Mohit\Programming\Android_Workspace\{0}\bin\{0}.apk", appName); ProcessStartInfo cmdsi = new ProcessStartInfo("cmd.exe"); cmdsi.Arguments = command; Process cmd = Process.Start(cmdsi); What could be wrong? I am sure the syntax is right.

    Read the article

  • Can someone explain this "endian-ness" function for me?

    - by Mike
    Write a program to determine whether a computer is big-endian or little-endian. bool endianness() { int i = 1; char *ptr; ptr = (char*) &i; return (*ptr); } So I have the above function. I don't really get it. ptr = (char*) &i, which I think means a pointer to a character at address of where i is sitting, so if an int is 4 bytes, say ABCD, are we talking about A or D when you call char* on that? and why? Would some one please explain this in more detail? Thanks. So specifically, ptr = (char*) &i; when you cast it to char*, what part of &i do I get?

    Read the article

  • C# Win Forms Auto-Updating Controls

    - by Goober
    Hello! I have a datagridview and a combobox which get populated randomly with data. However, the new data is never displayed automatically. Someone mentioned the idea of invalidating the control to force the application to redraw it and thus iterate through the contents and populate the control with the new data. Does anyone know which is the best method for implementing auto-updating controls in windows forms applications? help greatly appreciated, regards.

    Read the article

  • Apache fop-0.95 error on FopFactory.newInstance() command

    - by FlexInfoSys
    I am using Apache fop-0.95 to build pdf files from a JSP web application on IBM iSeries V5R4 using Websphere 6.0. Everything works perfect in my development using Websphere Development Studio client. When I put the application on the server, I get an error at this line. FopFactory fopFactory = FopFactory.newInstance(); The error is: java.lang.UnsatisfiedLinkError: javax/imageio/ImageIO Does anyone know how I can fix this error? All of the fop class files are part of the EAR file. The files were installed to the projects \WEB-INF\lib directory. I have added the fop jar files to the classpath, using the admin console. I am running IBM WebSphere Application Server - Express, 6.0.2.9 Build Number: cf90614.22 on IBM iSeries V5R4

    Read the article

  • how to open a .pdf file in a panel or iframe using asp.net c#

    - by rahul
    I am trying to open a .pdf file on a button click. I want to open a .pdf file into a panel or some iframe. With the following code i can only open .pdf file in a separate window or in a save as mode. string filepath = Server.MapPath("News.pdf"); FileInfo file = new FileInfo(filepath); if (file.Exists) { Response.ClearContent(); Response.AddHeader("Content-Disposition", "inline; filename=" + file.Name); Response.AddHeader("Content-Length", file.Length.ToString()); Response.ContentType = ReturnExtension(file.Extension.ToLower()); Response.TransmitFile(file.FullName); Response.End(); } how to assign a iframe to the below line Response.AddHeader("Content-Disposition", "inline; filename=" + file.Name);

    Read the article

  • BeginForm in RC bug?

    - by msony
    I think that there are something wrong with new RC, when i write Html.BeginForm("Item", "Newsletter", FormMethod.Post, new { enctype = "multipart/form-data" }) method must render in output something like this: <form action="/Newsletter/Item" enctype = "multipart/form-data" method="POST"></form> but instead of that im getting: <form action="Item" enctype = "multipart/form-data" method="POST"></form> where my full action path?

    Read the article

  • Android and config.xml

    - by synic
    Looking in the android sdk folders, I've found a file called values/config.xml. This seems to be somewhere that you can define values for later use in layouts and animations. Given the config.xml: <resources> <string name="config_somePadding">50dip</string> </resources> How would I reference this to use as the layout_height in a layout xml file? @string/config_somePadding is actually the only one I've found that doesn't throw an error in Eclipse (even though there isn't a config_somePadding in values/strings.xml), but it appears to just put an empty string.

    Read the article

  • C/C++ Allegro program causes Windows 7 to switch to Aero Basic

    - by Matt H
    Hi SO, I'm just trying out the allegro library, and here is the code which I've got so far: #include <allegro.h> int main(int argc, char *argv[]) { allegro_init(); // initialize the allegro libraries install_keyboard(); // initialize keyboard functions set_color_depth(16); // set the color depth set_gfx_mode(GFX_AUTODETECT_WINDOWED, 640, 480, 0, 0); // set up 640*480px window BITMAP *pic = NULL; pic = load_bitmap("C:/picture.bmp", NULL); // load the picture blit(pic, screen, 0, 0, 0, 0, 1000, 1000); readkey(); destroy_bitmap(pic); return 0; } END_OF_MAIN() It works fine, but when I run it, while the program's window is open, Windows 7 changes the theme from Aero to Aero basic. If you aren't sure what I mean, this pops up (I got this from Google, which is why it says Vista rather than Windows 7): 1) Why? 2) How can I ensure that this doesn't happen?

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >