Daily Archives

Articles indexed Saturday September 22 2012

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

  • How to "reset" subviews of scrollview for new items?

    - by Tom Tallak Solbu
    I have a MasterViewController displaying Items. Selecting an Item (ItemA), displays images of ItemA in a DetailViewController. The DeatilViewController contains a scrollView, displaying all the images. When tableView:didSelectRowAtIndexPath is called, the images is added to an UIImageView, that is tagged and added as a subview to a scrollview. NSUInteger i; for (i = 1; i <= numberOfImages; i++) { NSString *imageName = [ItemAImages objectAtIndex:i-1]; UIImage *image = [UIImage imageNamed:imageName]; UIImageView *imageView = [[UIImageView alloc] initWithImage:image]; imageView.tag = i; [scrollView addSubview:imageView]; } Works fine. But when I go back to the MasterViewController, and selects a ItemB, the ItemA is still displayed, like the iPhone simulator refuses to forget the previous scrollview,containing ItemA images. I have tried [subview removeFromSuperview]; which results in either no scrollview at all, or no effect. Depending on when this method is called. How can I "reset" the scrollview for the next Item?

    Read the article

  • Java : Singleton class instances in a Web based Application

    - by Preethi Jain
    I have this Singleton class inside a Web Application . public class MyDAO { private static MyDAO instance; private MyDAO() { } public static MyDAO getInstance() { if (instance == null) { instance = new MyDAO(); } return instance; } I will access it this way public void get_Data() { MyDAO dao = MyDAO.getInstance(); } How many Objects of MyDAO class will be created if there are 3 Users accessing the Application ?? Will there be one instance of MyDAO per User ??

    Read the article

  • Unique identification string in php

    - by NardCake
    Currently me and my friend are developing a website, for what we will call 'projects' we just have a basic auto increment id in the database used to navigate to projects such as oururl.com/viewproject?id=1 but we started thinking, if we have alot of posted projects thats going to be a LONG url. So we need to somehow randomly generate a alphanumerical string about 6 characters long. We want the chance of the string being duplicated being extremely low and of course we will query the database before assigning an identifier. Thanks for anyhelp, means alot!

    Read the article

  • Unexpected error 0x8ffe2740 occurred in IIS

    - by user1622824
    I have installed IIS in my system (WINDOWS-XP). While i am seeing IIS window, the Default web site is in stop mode. when i am ready to start IIS. It shows "Unexpected error 0x8ffe2740 occurred" Finally, I discovered that its caused by Skype. It listens to port 80 for incoming call. Now, most of the time IIS starts before Skype starts. So IIS works but if you restart IIS or try to start IIS after Skype is started then you will get this error message. For this, I changed my Skype settings Skype File-> Options -> Connection Uncheck Use Port 80 as an alternative for incoming connections. But even though i am unable to start my IIS. Please help me some one.. Thanks.

    Read the article

  • javascript/html/php: Is it possible to insert a value into a form with Ajax?

    - by user1260310
    I have a form where users enter some text manually. Then I'd like to let the users choose a tag from a database through AJAX, not unlike how tag suggestions appear in the SO question form. While the div where the ajax call places the tag is inside the form, it does not seem to register and the tag is not picked up by the form. Am I missing something in my code, is this impossible or, if impossible there a better way to do this? Thanks for any suggestions. Here is code: html <form method="post" action="enterdata.php"> <input type="text" name="text">Enter text here. <div id="inserttags"></div><a href="javascript:void(0);" onclick="getTags()";>Get tags</a> <form type="button" name="submit" value="Enter Text and Tag"> </form> javascript getTags() { various Ajax goes here, then //following line inserts value into div of html document.getElementById("inserttags").innerHTML=xmlhttp.responseText; // a bit more ajax, then following pulls tag from db xmlhttp.open("GET","findtags.php",true); xmlhttp.send(); } //end function php //gettags.php //first pull tag from db. Then: echo 'input type="text" name="tag" value= "html">Enter tag'; //above output gets inserted in div and is visible on page. Though the above output is visible on page, the form does not seem to pick it up when you click "Enter Text and Tag" to submit the form.

    Read the article

  • BlogEngine - Mangling of HTML Anchor Links in TinyMCE Editor

    - by IrishChieftain
    When I create the following link: <a href="~/Contact.aspx" runat="server">Contact us</a> The editor strips out the runat attribute, breaking the link. It's also inserting "/page" into the URL which I do not want to happen. Is there some editor setting to prevent this from happening? I've checked here and couldn't find an answer. UPDATE I've added the following to tinyMCE.acsx to allow the addition of the runat attribute to anchor links: tinyMCE.init({ ... extended_valid_elements : "a[href|runat=server]" ... }); This solves the problem with the runat attribute being stripped out. My only remaining problem is the automatic insertion of "page" in the URL. Anybody?

    Read the article

  • mysqli query for no results do something else do something else

    - by Yousef Altaf
    I'm running a mysqli query. this is my code <?php $SM_pro_info="SELECT * FROM special_marketing_ads ORDER BY id desc LIMIT 4"; $QSM_pro_info = $db->query($SM_pro_info)or die($db->error); if($QSM_pro_info->num_rows ==1){ while($SM_pro=$QSM_pro_info->fetch_object()){ ?> <table width="208" border="0"> <tr> <td width="129" height="35" align="right"><span style="color:#361800; font-size:14px; font-weight:bold;"><?php echo $SM_pro->pro_title; ?></span></td> <td width="69" rowspan="2" align="center"><a rel="lightbox" href="includes/Cpanel/projectImages//images.jpg" ><img src="<?php echo $SM_pro->image_1; ?>" alt="" width="60" height="60" border="0" /></a></td> </tr> <tr align="right"> <td><span style="color:#361800; font-size:14px; font-weight:bold;">?????</span> : <span style="color:#da6e19; font-size:15px; font-weight:bold;"><?php echo $SM_pro->pro_purpose; ?></span></td> </tr> </table> <?php } }else{ echo"Your Ads here"; } ?> now all I want to do is if there is any results comeing from mysqli echo it if there is no results it should echo an image which is add your ads here. the point is I have 4 Ads so if there is 1 Ads in mysqli row and the others is empty so I want it to echo this single Ads and the other 3 Ads should be this image add your Ads here. any Help on this please?

    Read the article

  • Extracting URIs from RDF web page in Java using Jena Library

    - by Prannoy Mittal
    I have written following code for extratcting URIs from a web page with content type application/rdf-xml for Linked Data application. public static void test(String url) { try { Model read = ModelFactory.createDefaultModel().read(url); System.out.println("to go"); StmtIterator si; si = read.listStatements(); System.out.println("to go"); while(si.hasNext()) { Statement s=si.nextStatement(); Resource r=s.getSubject(); Property p=s.getPredicate(); RDFNode o=s.getObject(); System.out.println(r.getURI()); System.out.println(p.getURI()); System.out.println(o.asResource().getURI()); } } catch(JenaException | NoSuchElementException c) { } } But above code is not extracting all URIs. It provides only few of the URIs. Please guide me where i Went wrong?? hey Rafeel For Eq: for XML File : <?xml version="1.0"?> <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:ex="http://example.org/stuff/1.0/"> <rdf:Description rdf:about="http://www.w3.org/TR/rdf-syntax-grammar" dc:title="RDF/XML Syntax Specification (Revised)"> <ex:editor> <rdf:Description ex:fullName="Dave Beckett"> <ex:homePage rdf:resource="http://purl.org/net/dajobe/" /> </rdf:Description> </ex:editor> </rdf:Description> </rdf:RDF> The output is : Subject URI is http://www.w3.org/TR/rdf-syntax-grammar Predicate URI is http://example.org/stuff/1.0/editor Object URI is null Subject URI is http://www.w3.org/TR/rdf-syntax-grammar Predicate URI is http://purl.org/dc/elements/1.1/title Website is read

    Read the article

  • Facebook Tagging friends to the picture

    - by Rajesh Dante
    Below code tag only first uid then then its shows Fatal error: Uncaught OAuthException: (#100) Invalid parameter and can i use exact location for tagging.. as in below code x and y values are in pixel $facebook = new Facebook ( array ( 'appId' => FBAPPID, 'secret' => FBSECRETID ) ); $facebook->setFileUploadSupport ( true ); if (isset ( $_POST ['image'] ) && isset ( $_POST ['tname'] )) { $path_to_image = encrypt::instance ()->decode ( $_POST ['image'] ); $tags = (array)encrypt::instance ()->decode ( $_POST ['tname'] ); /* * Output $tags = array ( 0 => '[{"tag_uid":"100001083191675","x":100,"y":100},{"tag_uid":"100001713817872","x":100,"y":230},{"tag_uid":"100000949945144","x":100,"y":360},{"tag_uid":"100001427144227","x":230,"y":100},{"tag_uid":"100000643504257","x":230,"y":230},{"tag_uid":"100001155130231","x":230,"y":360}]' ); */ $args = array ( 'message' => 'Von ', 'source' => '@' . $path_to_image, 'access_token' => $this->user->fbtoken ) ; $photo = $facebook->api ( $this->user->data->fbid . '/photos', 'post', $args ); // upload works but not tags if (is_array ( $photo ) && ! empty ( $photo ['id'] )) { echo 'Photo uploaded. Check it on Graph API Explorer. ID: ' . $photo ['id']; foreach ( $tags as $key => $t ) { $tagRe = json_encode ( $t ); $args = array ( 'tags' => $tagRe, 'access_token' => $this->user->fbtoken ); $facebook->api ( '/' . $photo ['id'] . '/tags', 'post', $args ); } } }

    Read the article

  • Change title of UINavigationBar

    - by Lemmy
    I've created a view-based application. I've placed a Navigation Bar on the view and two buttons. I'd like to change the title of the nav bar after pressing the buttons. In IB I've connected the buttons with the corresponding actions. Debugging shows that the actions are getting called but the title of the nav bar is not changed. Kindly help! // // NavBarViewController.h #import <UIKit/UIKit.h> @interface NavBarViewController : UIViewController { } -(IBAction) clickedOne: (id)sender; -(IBAction) clickedTwo: (id)sender; @end // // NavBarViewController.m #import "NavBarViewController.h" @implementation NavBarViewController -(IBAction) clickedOne: (id)sender { self.navigationItem.title = @"1"; } -(IBAction) clickedTwo: (id)sender { self.navigationItem.title = @"2"; } - (void)didReceiveMemoryWarning { // Releases the view if it doesn't have a superview. [super didReceiveMemoryWarning]; // Release any cached data, images, etc that aren't in use. } - (void)viewDidUnload { // Release any retained subviews of the main view. // e.g. self.myOutlet = nil; } - (void)dealloc { [super dealloc]; } @end

    Read the article

  • Using pip to install modules in python failing

    - by James N
    I'm having trouble installing python modules using pip. Below is the output from the command window: Note that I installed pip immediately before trying to install GDAL module. I am on a w7 64bit machine running python 2.7 Microsoft Windows [Version 6.1.7601] Copyright (c) 2009 Microsoft Corporation. All rights reserved. C:\Users\jnunn\Desktop>python get-pip.py Downloading/unpacking pip Downloading pip-1.2.1.tar.gz (102Kb): 102Kb downloaded Running setup.py egg_info for package pip warning: no files found matching '*.html' under directory 'docs' warning: no previously-included files matching '*.txt' found under directory 'docs\_build' no previously-included directories found matching 'docs\_build\_sources' Installing collected packages: pip Running setup.py install for pip warning: no files found matching '*.html' under directory 'docs' warning: no previously-included files matching '*.txt' found under directory 'docs\_build' no previously-included directories found matching 'docs\_build\_sources' Installing pip-script.py script to C:\Python26\ArcGIS10.1\Scripts Installing pip.exe script to C:\Python26\ArcGIS10.1\Scripts Installing pip.exe.manifest script to C:\Python26\ArcGIS10.1\Scripts Installing pip-2.7-script.py script to C:\Python26\ArcGIS10.1\Scripts Installing pip-2.7.exe script to C:\Python26\ArcGIS10.1\Scripts Installing pip-2.7.exe.manifest script to C:\Python26\ArcGIS10.1\Scripts Successfully installed pip Cleaning up... C:\Users\jnunn\Desktop>pip install gdal Downloading/unpacking gdal Downloading GDAL-1.9.1.tar.gz (420kB): 420kB downloaded Running setup.py egg_info for package gdal Installing collected packages: gdal Running setup.py install for gdal building 'osgeo._gdal' extension c:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\BIN\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -I../../port -I../../gcore -I../../alg -I../../ogr/ -I C:\Python26\ArcGIS10.1\include -IC:\Python26\ArcGIS10.1\PC -IC:\Python26\ArcGIS1 0.1\lib\site-packages\numpy\core\include /Tpextensions/gdal_wrap.cpp /Fobuild\te mp.win32-2.7\Release\extensions/gdal_wrap.obj gdal_wrap.cpp c:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\INCLUDE\xlocale(342) : warning C4530: C++ exception handler used, but unwind semantics are not enabled . Specify /EHsc extensions/gdal_wrap.cpp(2853) : fatal error C1083: Cannot open include file : 'cpl_port.h': No such file or directory error: command '"c:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\BIN\c l.exe"' failed with exit status 2 Complete output from command C:\Python26\ArcGIS10.1\python.exe -c "import se tuptools;__file__='c:\\users\\jnunn\\appdata\\local\\temp\\pip-build\\gdal\\setu p.py';exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec' ))" install --record c:\users\jnunn\appdata\local\temp\pip-f7tgze-record\install -record.txt --single-version-externally-managed: running install running build running build_py creating build creating build\lib.win32-2.7 copying gdal.py -> build\lib.win32-2.7 copying ogr.py -> build\lib.win32-2.7 copying osr.py -> build\lib.win32-2.7 copying gdalconst.py -> build\lib.win32-2.7 copying gdalnumeric.py -> build\lib.win32-2.7 creating build\lib.win32-2.7\osgeo copying osgeo\gdal.py -> build\lib.win32-2.7\osgeo copying osgeo\gdalconst.py -> build\lib.win32-2.7\osgeo copying osgeo\gdalnumeric.py -> build\lib.win32-2.7\osgeo copying osgeo\gdal_array.py -> build\lib.win32-2.7\osgeo copying osgeo\ogr.py -> build\lib.win32-2.7\osgeo copying osgeo\osr.py -> build\lib.win32-2.7\osgeo copying osgeo\__init__.py -> build\lib.win32-2.7\osgeo running build_ext building 'osgeo._gdal' extension creating build\temp.win32-2.7 creating build\temp.win32-2.7\Release creating build\temp.win32-2.7\Release\extensions c:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\BIN\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -I../../port -I../../gcore -I../../alg -I../../ogr/ -IC:\P ython26\ArcGIS10.1\include -IC:\Python26\ArcGIS10.1\PC -IC:\Python26\ArcGIS10.1\ lib\site-packages\numpy\core\include /Tpextensions/gdal_wrap.cpp /Fobuild\temp.w in32-2.7\Release\extensions/gdal_wrap.obj gdal_wrap.cpp c:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\INCLUDE\xlocale(342) : war ning C4530: C++ exception handler used, but unwind semantics are not enabled. Sp ecify /EHsc extensions/gdal_wrap.cpp(2853) : fatal error C1083: Cannot open include file: 'c pl_port.h': No such file or directory error: command '"c:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\BIN\cl.ex e"' failed with exit status 2 ---------------------------------------- Command C:\Python26\ArcGIS10.1\python.exe -c "import setuptools;__file__='c:\\us ers\\jnunn\\appdata\\local\\temp\\pip-build\\gdal\\setup.py';exec(compile(open(_ _file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record c:\u sers\jnunn\appdata\local\temp\pip-f7tgze-record\install-record.txt --single-vers ion-externally-managed failed with error code 1 in c:\users\jnunn\appdata\local\ temp\pip-build\gdal Storing complete log in C:\Users\jnunn\pip\pip.log C:\Users\jnunn\Desktop> I have tried to use easy_install before too, and it came back with a common error to this: c:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\INCLUDE\xlocale(342) : war ning C4530: C++ exception handler used, but unwind semantics are not enabled. Sp ecify /EHsc extensions/gdal_wrap.cpp(2853) : fatal error C1083: Cannot open include file: 'c pl_port.h': No such file or directory error: command '"c:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\BIN\cl.ex e"' failed with exit status 2 Plus the following additional pip.log: Exception information: Traceback (most recent call last): File "C:\Python26\ArcGIS10.1\lib\site-packages\pip\basecommand.py", line 107, in main status = self.run(options, args) File "C:\Python26\ArcGIS10.1\lib\site-packages\pip\commands\install.py", line 261, in run requirement_set.install(install_options, global_options) File "C:\Python26\ArcGIS10.1\lib\site-packages\pip\req.py", line 1166, in install requirement.install(install_options, global_options) File "C:\Python26\ArcGIS10.1\lib\site-packages\pip\req.py", line 589, in install cwd=self.source_dir, filter_stdout=self._filter_install, show_stdout=False) File "C:\Python26\ArcGIS10.1\lib\site-packages\pip\util.py", line 612, in call_subprocess % (command_desc, proc.returncode, cwd)) InstallationError: Command C:\Python26\ArcGIS10.1\python.exe -c "import setuptools;__file__='c:\\users\\jnunn\\appdata\\local\\temp\\pip-build\\gdal\\setup.py';exec(compile(open(__file__).read().replace('\r \n', '\n'), __file__, 'exec'))" install --record c:\users\jnunn\appdata\local\temp\pip-f7tgze-record\install-record.txt --single-version-externally-managed failed with error code 1 in c:\users\jnunn\appdata \local\temp\pip-build\gdal

    Read the article

  • using qsub (sge) with multi-threaded applications

    - by dan12345
    i wanted to submit a multi-threaded job to the cluster network i'm working with - but the man page about qsub is not clear how this is done - By default i guess it just sends it as a normal job regardless of the multi-threading - but this might cause problems, i.e. sending many multi-threaded jobs to the same computer, slowing things down. Does anyone know how to accomplish this? thanks. The batch server system is sge.

    Read the article

  • CakePHP 'Cake is NOT able to connect to the database'

    - by kand
    I've looked at this post about a similar issue: CakePHP: Can't access MySQL database and I've tried everything they mentioned in there including: Changing my database.php so that the 'port' attribute for both $default and $test are the location of my mysqld.sock file Changing the 'port' attribute to the actual integer that represents the port in my my.cnf mysql config Changing the mysql socket locations in php.ini to the location of my mysqld.sock file I'm using ubuntu 11.04, apache 2.2.17, mysql 5.1.54, and CakePHP 1.3.10. My install of mysql and apache don't seem to match any conventions, as in, all the config files are there, they are all just in really weird places--I'm not sure why that is, but I've tried reinstalling both programs multiple times with the same results... At any rate, I can log into mysql from the terminal and use it normally, and apache is working because I can see the CakePHP default homepage. I just can't get it to change the message 'Cake is NOT able to connect to the database'. SOLVED: Figured it out, had to change php.ini so that extension_dir pointed to the correct directory and had to add a line extension=mysql.so.

    Read the article

  • jQuery sortable Div's

    - by kai lange
    is it possible to sort direct between two or more div's/boxe's and return the complete data (var order = ...) ? Online Demo: http://jsbin.com/alegu4 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>jQuery Dynamic Drag'n Drop</title> <script type="text/javascript" src="http://cdn.jquerytools.org/1.2.5/jquery.tools.min.js"></script> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.8/jquery-ui.min.js"></script> <style> body { font-family: Arial, Helvetica, sans-serif; font-size: 16px; margin-top: 10px; } ul { margin: 0; } #s1,#s2 { float: left; width: 400px; } #s1 li,#s2 li { list-style: none; margin: 0 0 4px 0; padding: 10px; background-color:#00CCCC; border: #CCCCCC solid 1px; color:#fff; } </style> <script type="text/javascript"> $(document).ready(function(){ $(function() { $("#s1 ul,#s2 ul").sortable({ opacity: 0.6, cursor: 'move', update: function() { var order = $(this).sortable("serialize") + '&action=updateRecordsListings'; //$.post("updateDB.php", order); alert(order); } }); }); }); </script> </head> <body> <div id="box"> <div class="box" id="s1"> <ul> <li id="recordsArray_1">1. Lorem ipsum dolor sit amet, consetetur</li> <li id="recordsArray_2">2. Lorem ipsum dolor sit amet, consetetur</li> <li id="recordsArray_3">3. Lorem ipsum dolor sit amet, consetetur</li> <li id="recordsArray_4">4. Lorem ipsum dolor sit amet, consetetur</li> </ul> </div> <div class="box" id="s2"> <ul> <li id="recordsArray_5">5. Lorem ipsum dolor sit amet, consetetur</li> <li id="recordsArray_6">6. Lorem ipsum dolor sit amet, consetetur</li> <li id="recordsArray_7">7. Lorem ipsum dolor sit amet, consetetur</li> <li id="recordsArray_8">8. Lorem ipsum dolor sit amet, consetetur</li> </ul> </div> </div> </body> </html> Please note it's not the same like my other post - thanks!

    Read the article

  • Checking sqlite datetime NULL with RoR

    - by Paul N
    RoR/SQL newbie here. My datetime column 'deleted_at' are all uninitialized. Running this query returns an error: SELECT * FROM variants v ON v.id = ovv0.variant_id INNER JOIN option_values_variants ovv1 ON v.id = ovv1.variant_id INNER JOIN option_values_variants ovv2 ON v.id = ovv2.variant_id INNER JOIN option_values_variants ovv3 ON v.id = ovv3.variant_id INNER JOIN option_values_variants ovv4 ON v.id = ovv4.variant_id WHERE v.deleted_at = NULL AND v.product_id = 1060500595 However, if I set my datetime values to 0, and set my query to v.deleted_at = 0, the correct variant is returned to me. How do I check for uninitialized/NULL datetimes?

    Read the article

  • Separation of static and dynamic content in Java EE applications

    - by Dan
    We work with IBM products and we typically use IBM Http Servers (read Apache) as a reverse proxy for our application servers. For performance reasons we serve static content (.gif, .jpg, .css, .html etc.) from our http servers, to ease the burden a bit from the application server. So far, we have to distribute files to http server and configure it manually (writing custom scripts at best.) The problem is the effort needed to keep everything in synch, especially when you need to update the app. Does any Java EE product support this “out of the box”? Is there a way to have application server do this automatically, like in cluster configuration for example, where master node is in charge of distributing the application to other nodes and for keeping everything in synch.

    Read the article

  • NSTableView selection & highlights

    - by Christian
    I have a NSTableView as a very central part of my Application and want it to integrate more with the rest of it. It has only one column (it's a list) and I draw all Cells (normal NSTextFieldCells) myself. The first problem is the highlighting. I draw the highlight myself and want to get rid of the blue background. I now fill the whole cell with the original background color to hide the blue background, but this looks bad when dragging the cell around. I tried overriding highlight:withFrame:inView: and highlightColorWithFrame:inView: of NSCell but nothing happened. How can I disable automatic highlighting? I also want all rows/cells to be deselected when I click somewhere outside my NSTableView. Since the background / highlight of the selected cell turns gray there must be an event for this, but I can't find it. I let my cells expand on a double click and may need to undo this. So getting rid of the gray highlight is not enough. EDIT: I add a subview to the NSTableView when a cell gets double clicked and then resignFirstResponder of the NSTableView gets called. I tried this: - (BOOL)resignFirstResponder { if (![[self subviews] containsObject:[[self window] firstResponder]]) { [self deselectAll:self]; ... } return YES; } Besides that it's not working I would need to implement this method for all objects in the view hierarchy. Is there an other solution to find out when the first responder leaves a certain view hierarchy?

    Read the article

  • Blog Now Hosted on IIS 8.0–DiscountASP.Net

    - by The Official Microsoft IIS Site
    On Thursday night I was having an email conversation with Takeshi Eto from DiscountASP.Net about the hosting of my blog.  I’ve been hosting my blog with DiscountASP.Net for nearly five years and have been very, very happy with their service – always up to date often offering services faster than other hosters and very quick turn around of support tickets if ever I’ve had any issues – they also host the NEBytes site. Well on Thursday I was asking about migrating my site onto IIS 8.0 hosting and...(read more)

    Read the article

  • .htaccess redirect to error page if port is not 80

    - by Momo
    I'm running a portable server through usb stick. The thing is I also have WAMP installed in my local machine and Apache somehow gets started on windows startup, because of some random reason which I don't recall now and it can't be changed. I want to prepare my portable server in situations like this, so closing httpd.exe from process and starting my portable server is not an option. Anyway, because of already active httpd.exe my portable server's WordPress site can only be accessed through localhost:81 - this is a problem as WP site is very dependent on the URL and I don't want to include the url with port on WP database. Here is what I want to do through .htaccess: On any path except for error.php file check if not port 80 If not port 80 redirect to /error.php?code=port It it possible for it to have priority over WP redirection or URL handling? In the error.php I provided info on how to manually close httpd.exe and such so my family and friends can access the portable site. It's sort of like a gallery and calender application for events and other such stuff... Please help? I'm I can't figure it out at all. I know others may not have apache already running, but I want to prepare for such a situation. Something like the following, but the following doesn't work. # BEGIN WordPress <IfModule mod_rewrite.c> <If "%{SERVER_PORT} = 80"> RewriteEngine On RewriteBase / RewriteRule ^index\.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] </If> <Else> RewriteEngine On RewriteRule ^(error.php)($|/) - [L] RewriteRule ^(.*)$ /error.php?code=port [L] </Else> </IfModule> # END WordPress By the way, the portable server Server2Go automatically generates vhosts based o the hostname set on it's config file and changes ports if the port (e.g. 80) is already open.

    Read the article

  • monitoring load on AWS EC2

    - by hortitude
    I'm interesting in monitoring our EC2 instances to ensure we scale up when necessary. Right now we are monitoring idle CPU time as our metric. We aren't measuring disk IO as we are not a very disk intensive application. When running on our own hardware in a datacenter I also usually monitor "load" from the top command. My question is: Does it make sense to monitor "load" on a shared env such as EC2? If so, how do you interpret the results?

    Read the article

  • Force google to reindex [migrated]

    - by Matthias
    I changed the structure of my urls. The pages are indexed by google and have the following structure http://mypage.com/myfolder/page.apsx The new structure is http://mypage.com/page.aspx Now all urls that google knows are wrong. How can I tell google to reindex and that the structure has changed? Internally I redirect in ASP.NET when the url contains the myfolder by I want google to update the urls.

    Read the article

  • rsnapshot preexec

    - by Zulakis
    I am mounting my remote backup volume using a rsnapshot cmd_preexec script. If the /mnt/backup directory doesn't exist when starting rsnapshot i get this error: ERROR: /mnt/backup does not exist. If the directory exists and the preexec mounting fails, it does not stop rsnapshot resulting in the backup being backed up on the completely wrong server... What should I do about this? Edit: I know that I could use a wrapper-script, but I don't want to do this..

    Read the article

  • STUN-server using AWS

    - by Yrlec
    We are about to hire some consultants to help us set up an AWS-based server environment that will enable us to handle NAT Traversal for our P2P application. One important part of the NAT Traversal infrastructure is the STUN-server (http://en.wikipedia.org/wiki/STUN). They just told us that in order for the STUN-server to work you must have two public static IP-addresses pointing to the same server. To more specific they said this: It appears that you need 2 static IPs for each server for the STUN to work. Please note, these IPs have to be put into the configuration file, therefore, each time you restart the instance you have to make sure you either use the same IPs or you have to update configuration. As you plan to use AWS for your installation, please confirm that you can have 2 static IP for each server. Our question is if this is possible using AWS and if so, how? If not, do you know any other way to set up a STUN-server using AWS?

    Read the article

  • Configuring Apache reverse proxy

    - by Martin
    I have loadbalancer server and edges. I am trying to configure reverse proxy in order to hide the backend servers PL1,2,3. PL 1,2,3 are not located in same subnet. They are located in different locations. PL1 Lb1 -> PL2 PL3 I tried to configure Apache reverse proxy but it is not sending request to PL1,2,3. Reverse proxy worked only when I configured apache to send request to local server on other port. ProxyRequests Off <Proxy *> Order deny,allow Allow from all </Proxy> ProxyPass /PL1 http://PL1server.com/ ProxyPassReverse /PL1 http://PL1server.com/ The above configuration did not worked. Could you help me to solve the issue. Or is there other proxy types like Squid,Socks5 to solve this issue. Does the reverse proxy fails if we use IP address or domain URL in ProxyPass and ProxyPassReverse ?

    Read the article

  • What does Email Header "x-store-info" means in Hotmail?

    - by Mercedez
    I am relatively new to the Server side Includes and I am currently been given a task to provide values to the Server Side Includes for my company's system. Well I have learned a few basics from technet.microsoft.com but i was not able to find out what is the meaning of "x-store-info" and what values does this pass on. Can some of the seniors help me out here. Please provide me at least a Guideline or a path where I can learn this.

    Read the article

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