Search Results

Search found 3022 results on 121 pages for 'loose typing'.

Page 79/121 | < Previous Page | 75 76 77 78 79 80 81 82 83 84 85 86  | Next Page >

  • Hide *.inc.php from website visitors

    - by Ghostrider
    I have a script myscript.inc.php which handles all urls that look like /script-blah I accomplish this by using following .htaccess RewriteEngine On RewriteRule ^script-(.*)$ myscript.inc.php?s=$1 [QSA,L] However users could also access it this way by typing /myscript.inc.php?s=blah I would like to prevent that. I tried <Files ~ "\.inc\.php$"> Order deny,allow Deny from all </Files> and RewriteCond %{REQUEST_URI} \.inc\.php RewriteRule .* - [F,L,NS] They both prevent users from viewing /myscript.inc.php?s=blah but they also cause /script-blah to return 403... Is there a way to do this correctly?

    Read the article

  • 0xDEADBEEF equivalent for 64-bit development?

    - by Peter Mortensen
    For C++ development for 32-bit systems (be it Linux, Mac OS or Windows, PowerPC or x86) I have initialised pointers that would otherwise be undefined (e.g. they can not immediately get a proper value) like so: int *pInt = reinterpret_cast<int *>(0xDEADBEEF); (To save typing and being DRY the right-hand side would normally be in a constant, e.g. BAD_PTR.) If pInt is dereferenced before it gets a proper value then it will crash immediately on most systems (instead of crashing much later when some memory is overwritten or going into a very long loop). Of course the behavior is dependent on the underlying hardware (getting a 4 byte integer from the odd address 0xDEADBEEF from a user process may be perfectly valid), but the crashing has been 100% reliable for all the systems I have developed for so far (Mac OS 68xxx, Mac OS PowerPC, Linux Redhat Pentium, Windows GUI Pentium, Windows console Pentium). For instance on PowerPC it is illegal (bus fault) to fetch a 4 byte integer from an odd address. What is a good value for this on 64-bit systems?

    Read the article

  • ie7 preserve whitespace on dynamically injected text

    - by Rajat
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <script type="text/javascript"> function init(){ document.getElementById('test2').innerHTML = '1 2'; } </script> <style type="text/css"> #test{ white-space:pre; } #test2{ white-space:pre; } </style> <title></title> </head> <body onload="init();"> <div id="test"> 1 2 </div> <div id="test2"></div> </body> </html> Here is an example page showing my problem. I have two divs. Each has this text '1 2' with white-space. The only difference is that one is injected dynamically and one is in the html itself. If you open the above page in IE7, the text in div test2 doesn't respect white space. How can i get the same behavior for the text that is dynamically injected?? P.S. My doctype is triggering standards mode on IE7.

    Read the article

  • Xcode: code loses syntax coloring

    - by ColorMeFamous
    I find that in various situations Objective-C code in Xcode 3.1 (Leopard) can fail to get appropriate syntax coloring after typing or lose coloring that it had. This isn't just a "refresh" issue with new custom symbols -- but affects Cocoa framework symbols as well. Sometimes CMD-a to select all text on the code page will make the coloring (re)appear, sometimes double-clicking on a line to select it will work, sometimes I have to add/delete a space in a symbol to get that symbol to (re)color. Rebuilding, or closing/reopening the project may or may not work. Is this a known issue with Xcode? For something so annoying to me, I'm not finding the plentiful discussions of it on SO and elsewhere I'd expect. And is there any command to force global syntax recoloring?

    Read the article

  • ASP.Net AJAX controls, adding via .ashx page

    - by Matt Dawdy
    Okay, this is a continuation of a previous question of mine, but it is distinct enough to be its own question. Based on user interaction, I'm calling a .ashx handler via a jquery ajax call, and that handler is building some html for me that includes some Telerik controls like a masked textbox (masked for a phone number like "(###) ###-####". I got around all the hurdles of using Render() to get the html output of a server control even when it doesn't have a "Page" object or a ScriptHandler object. However, when I show the control to a user, I see the mask in the text of the textbox, but the mask doesn't "work" in the sense that when a user starts typing, it is as if the mask is really just text. So, my question is, after putting the html code out for a masked textbox, how do I tell whatever javascript is supposed to mask the input to really start masking on that specific control? I really hope this made sense. Please tell me if you need any clarification.

    Read the article

  • How to deal with "partial" dates (2010-00-00) from MySQL in Django?

    - by Etienne
    In one of my Django projects that use MySQL as the database, I need to have a date fields that accept also "partial" dates like only year (YYYY) and year and month (YYYY-MM) plus normal date (YYYY-MM-DD). The date field in MySQL can deal with that by accepting 00 for the month and the day. So 2010-00-00 is valid in MySQL and it represent 2010. Same thing for 2010-05-00 that represent May 2010. So I started to create a PartialDateField to support this feature. But I hit a wall because, by default, and Django use the default, MySQLdb, the python driver to MySQL, return a datetime.date object for a date field AND datetime.date() support only real date. So it's possible to modify the converter for the date field used by MySQLdb and return only a string in this format 'YYYY-MM-DD'. Unfortunately the converter use by MySQLdb is set at the connection level so it's use for all MySQL date fields. But Django DateField rely on the fact that the database return a datetime.date object, so if I change the converter to return a string, Django is not happy at all. Someone have an idea or advice to solve this problem? How to create a PartialDateField in Django ? EDIT Also I should add that I already thought of 2 solutions, create 3 integer fields for year, month and day (as mention by Alison R.) or use a varchar field to keep date as string in this format YYYY-MM-DD. But in both solutions, if I'm not wrong, I will loose the special properties of a date field like doing query of this kind on them: Get all entries after this date. I can probably re-implement this functionality on the client side but that will not be a valid solution in my case because the database can be query from other systems (mysql client, MS Access, etc.)

    Read the article

  • Where'd my sounds go?

    - by Dane Man
    In my Row class I have the initWithCoder method and everything restored in that method works fine, but only within the method. After the method is called I loose an array of sounds that is in my Row class. The sounds class also has the initWithCoder method, and the sound plays fine but only in the Row class initWithCoder method. After decoding the Row object, the sound array disappears completely and is unable to be called. Here's my source for the initWithCoder: - (id) initWithCoder:(NSCoder *)coder { ... soundArray = [coder decodeObjectForKey:@"soundArray"]; NSLog(@"%d",[soundArray count]); return self; } the log shows the count as 8 like it should (this is while unarchiving). Then the row object I create gets assigned. And the resulting row object no longer has a soundArray. [NSKeyedArchiver archiveRootObject:row toFile:@"DefaultRow"]; ... row = [NSKeyedUnarchiver unarchiveObjectWithFile:@"DefaultRow"]; So now whenever I call the soundArray it crashes. //ERROR IS HERE NSLog(@"%d",[[row soundArray] count]); Help please (soundArray is an NSMutableArray).

    Read the article

  • Query DNSBL or other block lists using PHP

    - by 55skidoo
    Is there any way to use PHP code to query a DNSBL (block list) provider and find out if the IP address submitted is a bad actor? I would like to take an existing IP address out of a registration database, then check whether it's a known block-listed IP address by performing a lookup on it, then if it's a blacklisted, do an action on it (such as, delete entry from registration database). Most of the instructions I have seen assume you are trying to query the blocklist via a mail server, which I can't do. I tried querying via web browser by typing in queries such as "58.64.xx.xxx.dnsbl.sorbs.net" but that didn't work.

    Read the article

  • Custom Alignment and Backgrounds Through Greasemonkey

    - by Jivec
    I'm trying to implement something in greasemonkey and it is giving me a fair bit of trouble as I can't get it to work. I frequently use Wolfram Alpha (http://wolframalpha.com) for a lot of things. They have recently updated the home page with a new style. There are settings that you can edit on this page (http://www.wolframalpha.com/homesettings.html) As you would expect when you clear cookies you loose these settings. What I would like to do is have a greasemonky script that sets the background to what ever I like (which will stay also regardless of the state of your cookies). It would also be cool if this background was displayed the whole way through Wolfram Alpha (ie when you make queries too eg. http://www.wolframalpha.com/input/?i=stack+overflow ) The other thing I'm trying to implement but I'm struggling is to force the results pages to be left aligned so that the browser window can be smaller. If anyone could help me with this it would be appreciated, I have tried to do it my self but I'm unsure how to get it to work.

    Read the article

  • Binding output of Custom Activity designer to activity argument

    - by gbanfill
    I am trying to add a custom activity designer for an activity that I have. The activity looks a little like: public class WaitForUserInputActvitiy : NativeActivity { public InArgument<UserInteractionProperty[]> UserInteraction { get; set; } } I am trying to put a designer on the activity to make it a bit nicer to set these values (so you don't end up typing VB in directly. My designer is based on mindscape property grid. I have an ObservableDictionary source that I want to get the values from and put them in to the InArgument. Currently I am using private void TestGrid_LostFocus(object sender, RoutedEventArgs e) { using (ModelEditingScope editingScope = this.ModelItem.BeginEdit()) { Argument myArg = Argument.Create(typeof(WaitForUserInputActvitiy), ArgumentDirection.In); this.ModelItem.Properties["UserInteraction"].SetValue(source.Values.ToArray()); editingScope.Complete(); } } However this results in an ArgumentException "Object of type UserInteractionProperty[] cannot be converted to InArgument`1[UserInteractionProperty[]]. So how do I convert my array of UserInteractionProperties into an InArgument?

    Read the article

  • Silverlight 4 NewBie Question

    - by codemnky
    I am watching a video from Silverlight.net website about DataForm. There is no source code download, so I am typing in the code as I watch the video. Unfortunately I can't replicate what is shown in the video. there are several issues. I am going to list out only the first 2 1) The presenter shows a simple class inside DataForm that has a icon at the very top of the data form that upon clicking it makes the DataForm editable and a save button appears at the bottom. I did'nt get the same thing when I ran my code against Silverlight 4 or Silverlight 3 2) Than he goes on to show that if you mark your class [Bindable(false)] you shouldn't see anything in your page. I did that but my form still shows all the properties I stopped after these 2 issues. If the features being talked about in this video were deprecated in the final release than this video should have been taken off the site. can anyone help me with this??

    Read the article

  • The type or namespace name 'Oledb' does not exist in the namespace 'System.Data' error on Web Servic

    - by Pankaj Kumar
    Hi everyone... i have a webservice that i want to test by typing the url in the address bar in the web browser localhost:1981/myProject/admin/autocomplete.asmx and when i do this it gives this compilation error CS0234: The type or namespace name 'Oledb' does not exist in the namespace 'System.Data' (are you missing an assembly reference?) i know this is because we added this in our web.config <add namespace="System.Data.Oledb"/> <add namespace ="System.Data"/> in the namespaces section..... when i call this web service through ajax it works but if i try to test it it gives this error. Is there any way to prevent this?

    Read the article

  • How can I stop my application?

    - by Roman
    I have the main thread from which I start a window using invokeLater. I run my application from command line. So, when application is running I see the window and my command line is "blocked" by the application. I can stop the application either by closing the window (as a result the command line is unblocked) or by typing Ctrl-C in the command line (as a result the window disappear). I wanted to be able to stop the application by clicking on a button in the window of the application. I used setVisible(false) for that. But in this way I can achieve the goal only partially. My window really disappear but the command line is still blocked. So, the software is still running. Well, I assume it's because some other threads are still running. But how can I easily close all these threads (like I do by closing the window of the application manually).

    Read the article

  • Vim: Delete Buffer When Quitting Split Window

    - by Rafid K. Abdullah
    I have this very useful function in my .vimrc: function! MyGitDiff() !git cat-file blob HEAD:% > temp/compare.tmp diffthis belowright vertical new edit temp/compare.tmp diffthis endfunction What it does is basically opening the file I am currently working on from repository in a vertical split window, then compare with it. This is very handy, as I can easily compare changes to the original file. However, there is a problem. After finishing the compare, I remove the split window by typing :q. This however doesn't remove the buffer from the buffer list and I can still see the compare.tmp file in the buffer list. This is annoying because whenever I make new compare, I get this message: Warning: File "temp/compare.tmp" has changed since editing started. Is there anyway to delete the file from buffers as well as closing the vertical split window?

    Read the article

  • Problem implementing Interceptor pattern

    - by ph0enix
    I'm attempting to develop an Interceptor framework (in C#) where I can simply implement some interfaces, and through the use of some static initialization, register all my Interceptors with a common Dispatcher to be invoked at a later time. The problem lies in the fact that my Interceptor implementations are never actually referenced by my application so the static constructors never get called, and as a result, the Interceptors are never registered. If possible, I would like to keep all references to my Interceptor libraries out of my application, as this is my way of (hopefully) enforcing loose coupling across different modules. Hopefully this makes some sense. Let me know if there's anything I can clarify... Does anyone have any ideas, or perhaps a better way to go about implementing my Interceptor pattern? Update: I came across Spring.NET. I've heard of it before, but never really looked into it. It sounds like it has a lot of great features that would be very useful for what I'm trying to do. Does anyone have any experience with Spring.NET? TIA, Jeremy

    Read the article

  • Cmake suddenly can't find my source files anymore...

    - by aheld
    To make a long story short: To add insult to injury, CMake actually ran fine several times. I was wrestling with a compiler error when CMake suddenly didn't feel like working anymore. For reference, here's the whole CMakeLists.txt file: set(CMAKE_INCLUDE_CURRENT_DIR ON) Find_Package ( SDL REQUIRED ) Find_Package ( SDL_image REQUIRED ) Find_Package ( SDL_mixer REQUIRED ) if ( NOT SDL_FOUND ) message ( FATAL_ERROR "Make sure that SDL is installed" ) endif ( NOT SDL_FOUND ) link_libraries ( ${SDL_LIBRARY} ${SDLIMAGE_LIBRARY} ${SDLMIXER_LIBRARY} SDLmain ) set(wiggle_SOURCES level.cpp levelgenerator.cpp main.cpp player.cpp scoreboard.cpp snake.cpp soundplayer.cpp titlescreen.cpp ) add_executable(Wiggle ../${wiggle_SOURCES}) The error occured for the first time when, instead of simply typing "make", I typed "make -lSDL -lSDL_image -lSDL_mixer" - make refused to find the header files SDL.h and SDL_image.h after I detached the project from Code::Blocks.

    Read the article

  • How to set labels inside textfields for username and password like facebook?

    - by NAVEED
    I have a login form for my website. This login form have two text fields, username and password. Currently I am placing labels(username, password) just before textfields. But now I want to removed these two labels and want to show text(username, password) inside textfield. When user focuses on these textfields then texts should be removed and user can enter his desired username and password. I have also noticed that when user open a login form then font color of text(username, password) populated in textfield(username, password) is of diffent color and when user start typing in that field then previous text is removed and new font color is black. How is it possible?

    Read the article

  • Generating PDF document using XSLT

    - by Nair
    I have one huge XML document. I have set of XSL representing each node in the XML. These XSL also have java script to generate the dynamic content. It uses images which are in seperate images folder and it uses fonts as well. At present, I have a program which displays all the nodes that can be transformed and user click on one of the node and the program performs XSLT and display the content in HTML format on IE screen. I want to write a program (.Net , C# or any .Net language) which will allow user to do XSLT tranform on all the available notes and create one PDF document. My initial requirement was to display all the document in the IE itself, so I reused the existing code, and foreach node, perform XSLT and then append it to the current HTML with a page break and it worked ok till we hit huge files. So the requirement changed to create one PDF file with all the nodes. I have couple of questions, 1. What is the best way to create PDF file using XSLT transformation? 2. Since the images are relative path, if we generate the XSLT in html and then write it to a output stream will it loose the images? 3. Will the font be preserved in the PDF document? Really appriciate if someone could point me to some good example that I can take and run with it. Thanks a lot.

    Read the article

  • How to list the code of a verb in J

    - by MPelletier
    In the console, typing a single verb without parameters will print its content: tolower 3 : 0 x=. I. 26 > n=. ((65+i.26){a.) i. t=. ,y ($y) $ ((x{n) { (97+i.26){a.) x}t ) That's nice for development, but unexploitable during execution. Is there a way to do that dynamically? Is there a verb that can return the contents of another verb? For example: showverb 'tolower' or showverb tolower

    Read the article

  • Encoding issue with form and HTML Purifier / MySQL

    - by Andrew Heath
    Driving me nuts... Page with form is encoded as Unicode (UTF-8) via: <meta http-equiv="content-type" content="text/html; charset=utf-8"> entry column in database is text utf8_unicode_ci copying text from a Word document with " in it, like this: “1922.” is insta-fail and ends up in the database as â??1922.â?? (typing new data into the form, including " works fine... it's cut and pasting from Word...) PHP steps behind the scenes are: grab value from POST run through HTML Purifier default settings run through mysql_real_escape_string insert query into dbase Help?

    Read the article

  • Representing geographical points/polygons in Python/Django

    - by Cornflake
    I'm building a website in Django, and I want one of my datatypes to be a geographical polygon. I want to mark points on a map (say, in Google Maps) and then store the resulting polygon in the database. Is there any way to do it that will save me the work of typing all the longitudes and latitudes manually? I guess I'm looking both for a geographical library for Python, and for a special website that will let me mark points on the map and save them in a standard format. Thanks!

    Read the article

  • Cancel page forward/back hotkeys in Firefox with Greasemonkey

    - by Stimulating Pixels
    First the background: In Firefox 3.6.3 on Mac OS X 10.5.8 when entering text into a standard the hotkey combination of Command+LeftArrow and Command+RightArrow jump the cursor to the start/end of the current line, respectively. However, when using CKEditor, FCKEditor and YUI Editor, Firefox does not seem to completely recognize that it's a text area. Instead, it drops back to the default function for those hotkeys which is to move back/forward in the browser history. After this occurs, the text in the editor is also cleared when you return to the page making it very easy to loose whatever is being worked on. I'm attempting to write a greasemonkey script that I can use to capture the events and prevent the page forward/back jumps from being executed. So far, I've been able to see the events with the following used as a .user.js script in GreaseMonkey: document.addEventListener('keypress', function (evt) { // grab the meta key var isCmd = evt.metaKey; // check to see if it is pressed if(isCmd) { // if so, grab the key code; var kCode = evt.keyCode; if(kCode == 37 || kCode == 39) { alert(kCode); } } }, false ); When installed/enabled, pressing command+left|right arrow key pops an alert with the respective code, but as soon as the dialog box is closed, the browser executes the page forward/back move. I tried setting a new code with evt.keyCode = 0, but that didn't work. So, the question is, can this Greasemonkey script be updated so that it prevents the back/forward page moves? (NOTE: I'm open to other solutions as well. Doesn't have to be Greasemonkey, that's just the direction I've tried. The real goal is to be able to disable the forward/back hotkey functionality.)

    Read the article

  • mediawiki markup equivalent of WMD editor?

    - by Justin Grant
    Anyone have a recommendation for an editor like the WMD editor, but using MediaWiki markup instead of Markdown? Our site is already using MediaWiki markup but we want a slicker editor without changing markup completely. Requirements include: live preview of formatted text underneath the markup you're typing a toolbar for common formatting (bold, italic, links, bullets, numbered-list, code, etc) keyboard shortcuts for each toolbar button (e.g. CTRL+B for bold) Undo/redo via keyboard shortcuts (CTRL+Z/CTRL+Y) or toolbar buttons works well in the usual set of popular browsers (including IE6!) open-source would be preferred

    Read the article

  • Longest keyword chain?

    - by pg-robban
    As I was typing some constants in Java I noticed I had used 4 keywords in a row, which Eclipse highlighted for me: public static final int. I then took a break from my regular coding and asked myself (and google with no relevant results) what the longest chain of keywords I can use and still have valid code. After a while, the best I could come up with was this method definition: public synchronized static final strictfp int a() { ... which is 6 keywords in Java. Is it possible to go 7, or even higher? What about other languages?

    Read the article

  • Undo/Redo Support for Table Changes in WPF RichTextBox

    - by Jeff
    As part of an editor project, I need to add functionality to the WPF RichTextBox control to allow the user to perform operations on a table. One of those operations is to apply a new width value to one or more columns of the table. I have a function that is applying a new Width value to the TableColumn objects in question, and the table is resizing itself nicely. However, I've noticed that the column-width change operation does not seem to be added to the undo stack. In other words, if a user types something, then changes a column width, then selects undo, the RichTextBox control undoes the user's typing. Undo and redo don't seem to be picking up the property change on the TableColumn object. Is there some way to make this operation occur in a way that it actually is undoable/redoable?

    Read the article

< Previous Page | 75 76 77 78 79 80 81 82 83 84 85 86  | Next Page >