Daily Archives

Articles indexed Wednesday March 24 2010

Page 11/131 | < Previous Page | 7 8 9 10 11 12 13 14 15 16 17 18  | Next Page >

  • How to secure a directory in Apache using a PHP session

    - by Cogsy
    I have a site that uses PHP session for authentication. There is one directory that I would like to restrict access to that does not use any PHP, it's just full of static content. I just don't know how to restrict access without every request going through a PHP script. Is there some way to have Apache check the session credentials and restrict access like Basic Auth?

    Read the article

  • Celery and Django : How to start at boot in production env (linux)

    - by llazzaro
    Hello, I have and app that uses celery and django to run distribuited tasks (like send email, crawl web,etc). The app never wa sin prod, so I always start celeryd with ./manage celeryd. I want to setup a pre-post env in linux, and I will need information in how to make an init.d script for start the celeryd for django. (I had made some init.d scripts before, no need complete script just relevant part) Thanks!

    Read the article

  • Photoshop batch image processing based on EXIF?

    - by davr
    I use Photoshop to batch convert my RAW files to JPG. I was wondering if there was a way to make it take different actions based on EXIF? With my particular camera lens, if I open it all the way to F1.7 there is noticeable vignetting, but stopping down smaller doesn't have that problem. What I'd like to do is have Photoshop batch process all my RAW files, and anything that is at F1.7 it should automatically apply vignette correction, but not on the others (applying correction to the others would over-brighten the corners of the image). Is anything like this possible? Should I use some other RAW processing tool instead? FYI they are RW2 files from a Panasonic GF1 camera.

    Read the article

  • Passing existing cookie to Web service

    - by danny.lesnik
    HI have the following scenario: 1) i'm authenticated against some aSP.NET web site and my session time out expires in 24 hours. 2) after several time I would like to run query against asp.net Web Service located on the site using existing authentication. What should I add to cookie Container? I how do sent existing cookie to Web service? Thank you in Advance. Danny.

    Read the article

  • jquery javascript module architecture on a website

    - by stephan
    I want to write a module on one html site - I will never leave the site I think about two possible concurrent basic approaches: We go into the module by use only a specific function (with specific params - everything which will happen, happen there - logic, exception handling etc) We go in by using one handler-fct, which manages some kind of action & a dataArray (depending on the action also fcts will be called - but not directly maybe for exception handling) So what you prefer?!

    Read the article

  • .NET Setup Package Installer

    - by Duncan
    Hi, I have a .NET 3.5 Setup Package Project which installs my application successfully. The setup package deploys a number (around 70) custom files for use from within the application. From time to time I have the requirement of deleting some of these files, however upon restarting the executable, it automatically runs a portion of the Setup MSI again, and re-installs these files. The only way I can achieve my desired result at the moment is to delete the files after starting the executable. I have looked through the attributes on the files in the setup package such as Vital and PackageAs, however cannot seem to identify the required setting to achieve this. Does anybody have any idea what is needed to acheive this ? Much thanks

    Read the article

  • SQL Server Management Studio – tips for improving the TSQL coding process

    - by kristof
    I used to work in a place where a common practice was to use Pair Programming. I remember how many small things we could learn from each other when working together on the code. Picking up new shortcuts, code snippets etc. with time significantly improved our efficiency of writing code. Since I started working with SQL Server I have been left on my own. The best habits I would normally pick from working together with other people which I cannot do now. So here is the question: What are you tips on efficiently writing TSQL code using SQL Server Management Studio? Please keep the tips to 2 – 3 things/shortcuts that you think improve you speed of coding Please stay within the scope of TSQL and SQL Server Management Studio 2005/2008 If the feature is specific to the version of Management Studio please indicate: e.g. “Works with SQL Server 2008 only" Thanks EDIT: I am afraid that I could have been misunderstood by some of you. I am not looking for tips for writing efficient TSQL code but rather for advice on how to efficiently use Management Studio to speed up the coding process itself. The type of answers that I am looking for are: use of templates, keyboard-shortcuts, use of IntelliSense plugins etc. Basically those little things that make the coding experience a bit more efficient and pleasant. Thanks again

    Read the article

  • wx Menu disappears from frame when shown as a popup

    - by Adam Fraser
    I'm trying to create a wx.Menu that will be shared between a popup (called on right-click), and a sub menu accessible from the frame menubar. The following code demonstrates the problem. If you open the "MENUsubmenu" from the menubar the item "asdf" is visible. If you right click on the frame content area, "asdf" will be visible from there as well... however, returning to the menubar, you will find that "MENUsubmenu" is vacant. Why is this happening and how can I fix it? import wx app = wx.PySimpleApp() m = wx.Menu() m.Append(-1, 'asdf') def show_popup(evt): ''' R-click callback ''' f.PopupMenu(m, (evt.X, evt.Y)) f = wx.Frame(None) f.SetMenuBar(wx.MenuBar()) frame_menu = wx.Menu() f.MenuBar.Append(frame_menu, 'MENU') frame_menu.AppendMenu(-1,'submenu', m) f.Show() f.Bind(wx.EVT_RIGHT_DOWN, show_popup) app.MainLoop() Interestingly, appending the menu to MenuBar works, but is not the behavior I want: import wx app = wx.PySimpleApp() m = wx.Menu() m.Append(-1, 'asdf') def show_popup(evt): f.PopupMenu(m, (evt.X, evt.Y)) f = wx.Frame(None) f.SetMenuBar(wx.MenuBar()) f.MenuBar.Append(m, 'MENU') f.Show() f.Bind(wx.EVT_RIGHT_DOWN, show_popup) app.MainLoop()

    Read the article

  • ODBC Connection Setup in Java

    - by Jessica
    I want to write a Java program that automates the work that the ODBC Data Source Administrator does in Windows. That is, given an ODBC connection name and a path to the database on the hard drive, I want it to create the connection. I really have no idea where to even begin with this. I looked at this but it said it was for C and I don't think that's very helpful. If anyone could point me in the right direction for this at all, I would appreciate it. (I realize this question is REALLY vague, but that's all the information I was given.)

    Read the article

  • Is there a better way to deal with reserved characters when parsing XML/JSON data on the iPhone?

    - by Charles S.
    The following code works, but it's ugly and creates a bunch of autoreleased objects. I'm using similar code for parsing reserved HTML characters as well (for quotes, & symbols, etc). I'm just wondering... Is there a cleaner way? NSString *result = [[NSString alloc] initWithString:userInput]; NSString *result2 = [result stringByReplacingOccurrencesOfString:@"#" withString:@"\%23"]; NSString *result3 = [result2 stringByReplacingOccurrencesOfString:@" " withString:@"\%20"]; formatted = [[result3 stringByReplacingOccurrencesOfString:@"&" withString:@"\%26"] retain]; [result release];

    Read the article

  • Alternatives to Windows-builtin checkdisk utility for NTFS?

    - by t-a-w
    For some reason Windows 7's checkdisk freezes and doesn't move its progress bar forward for over an hour, while the disk is still supposedly active. Now it's possible that if I left it overnight it would finally figure out how to progress, but are there any other programs with similar functionality I could use instead?

    Read the article

  • Can't figure out how to make Slitaz USB persistent

    - by Dennis Hodapp
    I installed Slitaz on my USB. However I can't figure out how to make it persistent automatically. There are different sources telling me different ways to make it persistent. One told me to add "slitaz home=usb" to the syslinux.cfg file like this: append initrd=/boot/rootfs.gz rw root=/dev/null vga=normal autologin slitaz home=usb but it didn't work for me. http://www.slitaz.org/en/doc/handbook/liveusb.html gave an example of how to do it manually but I didn't try it and I also want it to happen automatically. custompc.co.uk/features/602451/make-any-pc-your-own-with-linux-on-a-usb-key.html is an older article that also explains how to make the USB persistent but I don't want to try it cause it looks outdated (from 2008) does anyone know the best way to make the USB automatically persistent?

    Read the article

  • Top Search Engine Optimization Strategies to Get High Rankings in Google For Your Business Websites

    The search Engine optimization strategies are mainly used to take your website rank to top 10 position. Having a higher rank in a search engine means that your business website will receive more traffic from Google and other search engines. This will eventually also mean that you will be able to have more customers and make more money off of your business, all at no additional cost to you!

    Read the article

  • Translate XSD element names to English

    - by Coov
    I have an XML Schema Definition file .XSD who's elements are in Spanish. I have an XML data file that is also in Spanish that matches the schema definition. I created a dataset from the xsd using xsd.exe and I'm loading the XML into the dataset. I want to translate the element names to English. I can think of two options off the top of my head. Either scrape the XSD & XML files and translate the elements prior to generating the dataset with esd.exe, or iterate the dataset after I have loaded it with the xml, and translate my objects. I do have a written document that provides the English names for every element name in Spanish. The problem is there are hundreds of elements and I was trying to avoid coding that manually. Getting precise translations is not that important, it just needs to be readable by an English speaking person. Here is an example of what an element may look like "Apellidos": <xs:element name="Apellidos" type="xs:string"/> that I will translate to "SirName": <xs:element name="SirName" type="xs:string"/> I'm looking for ideas and or opinions on a quick way to do this. It's a one time deal so I'm not working about it scaling or being functional for things other than this single xml file. I'll be taking this dataset and writing out a flat file for English speaking users to read.

    Read the article

  • Developing for the iPhone outside Xcode

    - by Federico Builes
    I'd like to develop and run my iPhone applications from the command line and my personal editor instead of having to use Xcode. So far I've been able to edit all the files in Emacs and run xcodebuild in the project to compile/link/etc. The next step would be to create a Makefile task to launch the iPhone Simulator with my current application. Any ideas of how can I do that? Update: I'm not interested in XCode calling my editor, I just want to forget about the IDE as much as I can.

    Read the article

  • Are variable length arrays possible with Javascript

    - by Ankur
    I want to make a variable length array in Javascript. Is this possible. A quick google search for "Javascript variable length array" doesn't seem to yield anything, which would be surprising if it were possible to do this. Should I instead have a String that I keep appending to with a separator character instead, or is there a better way to get a varible length array-like variable.

    Read the article

  • How to convert a UTC date to NSDate?

    - by Sheehan Alam
    I have a string that is UTC and would like to convert it to an NSDate. static NSDateFormatter* _twitter_dateFormatter; [_twitter_dateFormatter setFormatterBehavior:NSDateFormatterBehaviorDefault]; [_twitter_dateFormatter setDateFormat:@"EEE MMM dd HH:mm:ss ZZZ yyyy"]; [_twitter_dateFormatter setLocale:_en_us_locale]; NSDate *d = [_twitter_dateFormatter dateFromString:sDate]; When I go through the debugger *d is nil even though sDate is "2010-03-24T02:35:57Z" Not exactly sure what I'm doing wrong.

    Read the article

  • Java operator overload

    - by rengolin
    Coming from C++ to Java, the obvious unanswered question is why not operator overload. On the web some go about: "it's clearly obfuscated and complicate maintenance" but no one really elaborates that further (I completely disagree, actually). Other people pointed out that some objects do have an overload (like String operator +) but that is not extended to other objects nor is extensible to the programmer's decision. I've heard that they're considering extending the favour to BigInt and similar, but why not open that for our decisions? How exactly if complicates maintenance and where on earth does this obfuscate code? Isn't : Complex a, b, c; a = b + c; much simpler than: Complex a, b, c; a.equals( b.add(c) ); ??? Or is it just habit?

    Read the article

  • Chrome plugin removal

    - by kambamsu
    Hi, I'm writing an NPAPI plugin. In every webpage that the browser goes to, I inject my plugin with an object tag. Something like: <object id="myplugin" type="plugin-mime-type" > In some pages where i dont want it, after injection i remove it by finding the element using the id and doing a document.removeChild. From my logging i found that in firefox and opera, doing this automatically calls the plugin destroy method NPP_Destroy (NPAPI). But in chrome, it doesnt seem to call it. Is there any special way that i should remove a plugin in chrome that i am missing?? Any help would be appreciated. Thanks

    Read the article

< Previous Page | 7 8 9 10 11 12 13 14 15 16 17 18  | Next Page >