Daily Archives

Articles indexed Tuesday April 13 2010

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

  • Query String in Javascript

    - by Ajith
    How can we collect a query string value in javascript. my script is like follows http://192.168.10.5/study/gs.js?id=200 here i want to collect the id value in my gs.js script file. For this i am using function getQuerystring(key, default_) { if (default_==null) default_=""; key = key.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]"); var regex = new RegExp("[\\?&]"+key+"=([^&#]*)"); var qs = regex.exec(window.location.href); if(qs == null) return default_; else return qs[1]; } var string_value = getQuerystring('id'); alert(string_value); But it is not getting..Please anybody can correct me.Please

    Read the article

  • vHost RewriteRule is creating a 500 Error

    - by Andrew Ellis
    Hello, Below you will find my current vHost entry that I am using for a site that I currently have under development. This vHost entry works fine when I have it on my local machine, but when I push my code to my staging server that is running this same vHost record I receive a 500 Internal Server error. The machine I'm running this vHost on is running Apache 2.2.9 (Debian). <VirtualHost 206.217.196.61:80> SuExecUserGroup 13labs 13labs ServerAdmin [email protected] ServerName admin.13labs.net ServerAlias admin.13labs.net DirectoryIndex index.php DocumentRoot /var/www/13labs.net/html/admin/ ErrorLog /var/www/13labs.net/logs/error.log # Hide .svn Directories <DirectoryMatch "\.svn"> Order deny,allow deny from all </DirectoryMatch> # FastCGI Alias /fcgi-bin/ /var/www/13labs.net/fcgi-bin/ AddHandler php-fastcgi .php AddType application/x-httpd-php .php Action php-fastcgi /fcgi-bin/admin-php.fcgi <Directory /var/www/13labs.net/fcgi-bin/> SetHandler fcgid-script AllowOverride None Options -Indexes +ExecCGI -FollowSymlinks -SymLinksIfOwnerMatch Order allow,deny Allow from all </Directory> <Directory /var/www/13labs.net/html/admin/> AllowOverride None Options -Indexes -FollowSymlinks -SymLinksIfOwnerMatch FileETag All </Directory> # Rewrite Logic RewriteEngine On RewriteCond %{REQUEST_FILENAME} !\.(gif|jpe?g|png|js|css|swf|php|ico|txt|pdf)$ RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-l RewriteRule ^/(.+)$ /index.php/$1 [PT,QSA,L] Thanks for any help that you can provide. Best regards, Andrew

    Read the article

  • Why in landscape orientation in simulator all the subviews appear out of order?

    - by wolverine
    I was doing a sample app in ipad. I added about 4 to 5 imageviews to the left side of the view vertically. This view will appear when we select the corresponding entry in the splitviewcontroller. In ipad simulator too, all the images were loading and all are working fine in portrait orientation. But when I rotate the simulator to landscape orientation, these imageviews doesnt appear where i placed them. Some of them overlapping each other, some have half of their part in the navigation bar and all. Has gone completely out of order. I am confused why is all this happening. Can anyone help me solve this issue?

    Read the article

  • IP address spoofing using Source Routing

    - by iamrohitbanga
    With IP options we can specify the route we want an IP packet to take while connecting to a server. If we know that a particular server provides some extra functionality based on the IP address can we not utilize this by spoofing an IP packet so that the source IP address is the privileged IP address and one of the hosts on the Source Routing is our own. So if the privileged IP address is x1 and server IP address is x2 and my own IP address is x3. I send a packet from x1 to x2 which is supposed to pass through x3. x1 does not actually send the packet. It is just that x2 thinks the packet came from x1 via x3. Now in response if x2 uses the same routing policy (as a matter of courtesy to x1) then all packets would be received by x3. Will the destination typically use the same IP address sequences as specified in the routing header so that packets coming from the server pass through my IP where I can get the required information? Can we not spoof a TCP connection in the above case? Is this attack used in practice?

    Read the article

  • Fix Firefox Not Scrolling with Up/Down Arrow Keys or Home/End Keys

    - by The Geek
    If you’ve encountered a problem where your Firefox installation no longer scrolls when you use the up or down arrow keys, and even the Home or End keys don’t work anymore, there’s an easy fix. When this problem happens, you’ll notice that moving the arrow keys around just moves the cursor around the page. Annoying! The problem is because you tripped the Caret Browsing feature at some point, and accidentally hit Yes. To fix this, you can just hit the F7 key again. Or, if you want to do it the about:config way, filter by accessibility.browsewithcaret and make sure it’s set to false. Remember, you can double-click on any boolean value to toggle between true and false. Similar Articles Productive Geek Tips Keyboard Ninja: Scrolling the Windows Command Prompt With Only the KeyboardShow Shortcut Keys in ScreenTips in Visual Studio 2003Show Shortcut Keys in ScreenTips in Visual Studio 2005Future Date a Post in Windows Live WriterDisable the Irritating Sticky / Filter Keys Popup Dialogs TouchFreeze Alternative in AutoHotkey The Icy Undertow Desktop Windows Home Server – Backup to LAN The Clear & Clean Desktop Use This Bookmarklet to Easily Get Albums Use AutoHotkey to Assign a Hotkey to a Specific Window Latest Software Reviews Tinyhacker Random Tips DVDFab 6 Revo Uninstaller Pro Registry Mechanic 9 for Windows PC Tools Internet Security Suite 2010 Need Help with Your Home Network? Awesome Lyrics Finder for Winamp & Windows Media Player Download Videos from Hulu Pixels invade Manhattan Convert PDF files to ePub to read on your iPad Hide Your Confidential Files Inside Images

    Read the article

  • C++ Template Class Constructor with Variable Arguments

    - by david
    Is it possible to create a template function that takes a variable number of arguments, for example, in this Vector< T, C class constructor: template < typename T, uint C > Vector< T, C >::Vector( T, ... ) { assert( C > 0 ); va_list arg_list; va_start( arg_list, C ); for( uint i = 0; i < C; i++ ) { m_data[ i ] = va_arg( arg_list, T ); } va_end( arg_list ); } This almost works, but if someone calls Vector< double, 3 ( 1, 1, 1 ), only the first argument has the correct value. I suspect that the first parameter is correct because it is cast to a double during the function call, and that the others are interpreted as ints and then the bits are stuffed into a double. Calling Vector< double, 3 ( 1.0, 1.0, 1.0 ) gives the desired results. Is there a preferred way to do something like this?

    Read the article

  • android: CheckedTextView cannot be checked?

    - by Yang
    Initially I wanted a checkmark where the text is placed on the left of the checkmark. After searching on this site I found out the best workaround is android:CheckedTextView? However, I found out that the checkmark cannot be changed manually by users. Is it by design? <CheckedTextView xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/autoupdatecheckboxview" android:layout_width="fill_parent" android:layout_height="wrap_content" android:gravity="center_vertical" android:checkMark="?android:attr/listChoiceIndicatorMultiple" android:paddingLeft="6dip" android:paddingRight="6dip" android:text="Pop up a message when new data available" android:typeface="sans" android:textSize="16dip"/>

    Read the article

  • Reverse ?? operator

    - by HeavyWave
    Is it possible to do something like this in C#? logger != null ? logger.Log(message) : ; // do nothing if null or logger !?? logger.Log(message); // do only if not null

    Read the article

  • jQuery: How can I check if a block in my document is inside the viewport or outside of it?

    - by Jannis
    I am basically trying to trigger a function if the footer is inside the viewport. How can I check whether the footer is currently visible in the viewport? I assume I will have to put it into the $(window).scroll() event so that the listener becomes true once the footer becomes visible but what the function should be I just can't figure out. Any help would be much appreciated. Thanks for reading, Jannis

    Read the article

  • Controlling the order of PicoContainer startup

    - by Trejkaz
    I have been tasked with doing some refactoring work on how we start up applications. Basically we have a bunch of console apps which were depending on the GUI application startup code, causing bogus dependencies which have kick-on effects for which libraries we need to ship, and which dependencies other modules need to declare. So I have written a simple startup framework where I basically just throw a bunch of Runnable objects into a list and then run them in order - and it works. But I was thinking - we already have PicoContainer in our project, so all these things that need to be run on startup could potentially be thrown into a PicoContainer, and if they implement Startable they will start... But in some cases we want to specify the ordering between them. For example, I don't want any other component writing to the log before we write a header into the log indicating that the application is starting up. I know I can introduce ordering by introducing injection dependencies, but this feels like a hack in this case - I would need to add the log header writer as a dependency for every other component which might write to the log, which isn't great at all. Nonetheless it seems like it would be nice to control the order of PicoContainer startup, so is there perhaps some other way? Alternatively I could just keep it simple and stick to my list of Runnable. It does, after all, work.

    Read the article

  • C++ vector<T>::iterator operator +

    - by Tom
    Hi, Im holding an iterator that points to an element of a vector, and I would like to compare it to the next element of the vector. Here is what I have Class Point{ public: float x,y; } //Somewhere in my code I do this vector<Point> points = line.getPoints(); foo (points.begin(),points.end()); where foo is: void foo (Vector<Point>::iterator begin,Vector<Point>::iterator end) { std::Vector<Point>::iterator current = begin; for(;current!=end-1;++current) { std::Vector<Point>::iterator next = current + 1; //Compare between current and next. } } I thought that this would work, but current + 1 is not giving me the next element of the vector. I though operator+ was the way to go, but doesnt seem so. Is there a workaround on this? THanks

    Read the article

  • Dropdown menus not showing when i use my wpf application via Remote connections

    - by Bijoy Das Yesudas
    When i connect to my machine using remote desktop the dropdown menus and comboboxes i used in my wpf application is not showing up. And after closing the session when i comes back to my development machine where actually my application runs there also the same issue happens after the remote desktop session. Tried by changing resolution and all sometimes it works but most of the time result is negative. The only temporary solution i found for this is just rebooting the system which is not applicable. Could anyone please help me to fix this issue. Thanks in advance.

    Read the article

  • BitmapContext on iphone

    - by user315142
    Hello, I am repeatedly drawing to an offscreen bitmap context non-destructivly on iphone. Right now the only way I have figured out to get it to display is to update the drawRect of my UIView with the contents of the context. This runs really slow and seems unnecessary. Does any one know of a way to have the bitmap update on the screen without force refreshing the whole thing?

    Read the article

  • How come drawing this line at (0,0) doesn't really draw it at (0,0)?

    - by George Edison
    I have this ActionScript code here: package { import flash.display.Sprite; import flash.display.LineScaleMode; import flash.display.CapsStyle; import flash.display.JointStyle; import flash.display.Shape; import flash.events.Event; public class Main extends Sprite { private var lines:Shape; public function Main():void { if (stage) init(); else addEventListener(Event.ADDED_TO_STAGE, init); } private function init(e:Event = null):void { removeEventListener(Event.ADDED_TO_STAGE, init); // entry point lines = new Shape(); addChild(lines); lines.graphics.clear(); lines.graphics.lineStyle(10, 0x000000); lines.graphics.moveTo(0, 0); lines.graphics.lineTo(stage.stageWidth, stage.stageHeight); } } } What I'm expecting this to do is to draw a line from one corner of the screen to the other... but that's not what it does. See here.

    Read the article

  • Changing Screen co-ordinates

    - by Anu
    Hi, Just i come across one application.When i load that application,the actual applcation is like toolbar only.Its get loaded in the top of the screen.And the desktop items automatically get moved and displayed below toolbar.Even when i open any other window and maximized the windoe,its get maximized below toolbar only.The screen co ordinates changed to new size. If before the screen size as (0,0,800,600),after this applcation loading it changed to (0,100,800,600). When i exit the application the screen changed to original position and all desktop items get arranged to original positiom. Hows it possible? Can i do that in MFC.

    Read the article

  • Get Cygwin installation path in a Python script

    - by chris.nullptr
    I'm writing a cross-platform python script that needs to know if and where Cygwin is installed if the platform is NT. Right now I'm just using a naive check for the existence of the default install path 'C:\Cygwin'. I would like to be able to determine the installation path programmatically. The Windows registry doesn't appear to be an option since Cygwin no longer stores it's mount points in the registry. Because of this is it even possible to programmatically get a Cygwin installation path?

    Read the article

  • Odd squid transparent redirect behavior

    - by EMiller
    This is the first time I've set up squid. It's running a redirect script that does some text search/replace on html pages, and then saves them to a location on the same machine on the nginx path - then issues the redirect to that URL (it's an art project :D). The relevant lines in squid.conf are http_port 3128 transparent redirect_program /etc/squid/jefferson_redirect.py The jefferson_redirect.py script is based on this script: http://gofedora.com/how-to-write-custom-redirector-rewritor-plugin-squid-python/ The issue: I'm getting strange http redirect behavior. For example, here is the normal request/response from a PHP script that issues a header("Location:"); - a 302 redirect: http://redirector.mysite.com/?unicmd=g+yreka GET /?unicmd=g+yreka HTTP/1.1 Host: redirector.mysite.com User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.9) Gecko/20100330 Fedora/3.5.9-1.fc12 Firefox/3.5.9 Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 Accept-Language: en-us,en;q=0.5 Accept-Encoding: gzip,deflate Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7 Keep-Alive: 300 Connection: keep-alive HTTP/1.1 302 Found Date: Tue, 13 Apr 2010 05:15:43 GMT Server: Apache X-Powered-By: PHP/5.2.11 Location: http://www.google.com/search?q=yreka Content-Type: text/html Vary: User-Agent,Accept-Encoding Content-Encoding: gzip Content-Length: 2108 Keep-Alive: timeout=3, max=100 Connection: Keep-Alive Here's what it looks like when running through the squid proxy (note that "redirector.mysite.com" is not the site running squid or nginx): http://redirector.mysite.com/?unicmd=g+yreka GET /?unicmd=g+yreka HTTP/1.1 Host: redirector.mysite.com User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.9) Gecko/20100330 Fedora/3.5.9-1.fc12 Firefox/3.5.9 Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 Accept-Language: en-us,en;q=0.5 Accept-Encoding: gzip,deflate Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7 Keep-Alive: 300 Proxy-Connection: keep-alive If-Modified-Since: Tue, 13 Apr 2010 05:21:02 GMT HTTP/1.0 200 OK Server: nginx/0.7.62 Date: Tue, 13 Apr 2010 05:21:10 GMT Content-Type: text/html Content-Length: 17865 Last-Modified: Tue, 13 Apr 2010 05:21:10 GMT Accept-Ranges: bytes X-Cache: MISS from jefferson X-Cache-Lookup: HIT from jefferson:3128 Via: 1.1 jefferson:3128 (squid/2.7.STABLE6) Connection: keep-alive Proxy-Connection: keep-alive It is basically working - but the URL http://redirector.mysite.com/?unicmd=g+yreka remains unchanged, while displaying the google page (mostly broken as it's using URLs relative to redirector.mysite.com) I've experienced a similar thing with google results pages: when clicking to another page from google, I get a google URL, with the other site's content. Sorry for the long post - many thanks if you've read this far! Any ideas?

    Read the article

  • How to get the binary data from a download link

    - by jacob
    Hi all, I need to get the binary data of a download link. When I run this link in the browser it always starts download manager. Rather I would like to copy that binary and display it on teh browser. How is this possible in any language. Objective c or c# preferred. Thanks

    Read the article

  • Is this a valid css?

    - by Pandiya Chendur
    I have a pager in my page with anchors in it... I use the following css... .page-numbers a { color:#808185; cursor:pointer; text-decoration:none;outline:none; } .page-numbers a:hover { text-decoration:underline; } .page-numbers a:visited { color:#808185;outline:none; } But my anchor tag doesn't seem to take the css above instead it uses the css below, a { color:#0077CC; cursor:pointer; text-decoration:none;outline:none; } a:hover { text-decoration:underline; } a:visited { color:#4A6B82;outline:none; } Which i have given in the top of my stylesheet... Any suggestion...

    Read the article

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