Search Results

Search found 14593 results on 584 pages for 'pat inside'.

Page 74/584 | < Previous Page | 70 71 72 73 74 75 76 77 78 79 80 81  | Next Page >

  • How do you escape double quotes inside a SQL fulltext 'contains' function?

    - by Richard Davies
    How do you escape a double quote character inside a MS SQL 'contains' function? SELECT decision FROM table WHERE CONTAINS(decision, '34" AND wide') Normally contains() expects double quotes to surround an exact phrase to match, but I want to search for an actual double quote character. I've tried escaping it with \, `, and even another double quote, but none of that has worked. P.S. I realize a simple example like this could also be done using the LIKE statement, but I need to use the fulltext search function. The query I provided here has been simplified from my actual query for example purposes.

    Read the article

  • How do you render a rails partial that is outside of a namespace in a view that is inside of a namespace?

    - by iand675
    I've got a 'static' controller and static views that are pages that don't utilize ruby in their views. For these pages, I have a sitemap partial that is generated programatically and used in the application layout file. Namespaced routes still use the application layout file but are taking the static routes and trying to namespace them too. Here's the relevant portion of the route file: namespace :admin do resources :verse_categories resources :verses resources :songs resources :flowers resources :visits, :except => [:new, :create] end match ':action' => 'static' root :to => 'static#home' Here's the error I'm getting: No route matches {:controller=>"admin/static", :action=>"about"} Note that about is one of the static pages that the sitemap partial uses. So, how can I resolve this routing issue so that it's not trying to find my static sites inside of the admin namespace? Any help would be appreciated!

    Read the article

  • how to access android app's certificate from inside the app?

    - by Yan
    Hi All, Im trying to access the certificate/signature from inside an android app, so that I can do something with the certificate. I googled a bit and found the code below: Class c = getClass(); ProtectionDomain pd = c.getProtectionDomain(); CodeSource cs = pd.getCodeSource(); Certificate[] signingCertificates = cs.getCertificates(); String st = signingCertificates[0].toString(); but c.getProtectionDomain() returns null. anyone can help? many thanks.

    Read the article

  • What is the logic behind defining macros inside a struct?

    - by systemsfault
    As apparent in the title, I'm questioning the reason behind defining the macros inside a struct. I frequently see this approach in network programming for instance following snippet: struct sniff_tcp { u_short th_sport; /* source port */ u_short th_dport; /* destination port */ tcp_seq th_seq; /* sequence number */ tcp_seq th_ack; /* acknowledgement number */ u_char th_offx2; /* data offset, rsvd */ #define TH_OFF(th) (((th)->th_offx2 & 0xf0) >> 4) u_char th_flags; #define TH_FIN 0x01 #define TH_SYN 0x02 #define TH_RST 0x04 #define TH_PUSH 0x08 #define TH_ACK 0x10 #define TH_URG 0x20 #define TH_ECE 0x40 #define TH_CWR 0x80 #define TH_FLAGS (TH_FIN|TH_SYN|TH_RST|TH_ACK|TH_URG|TH_ECE|TH_CWR) u_short th_win; /* window */ u_short th_sum; /* checksum */ u_short th_urp; /* urgent pointer */ }; This example is from sniffex.c code in tcpdump's web site. Is this for enhancing readability and making code clearer.

    Read the article

  • Is it possible to use RedirectToAction() inside a custom AuthorizeAttribute class?

    - by Lance McNearney
    Using ASP.Net MVC 2, is there any way to use the RedirectToAction() method of the Controller class inside a class that is based on the AuthorizeAttribute class? public class CustomAttribute : AuthorizeAttribute { protected override bool AuthorizeCore(HttpContextBase context) { // Custom authentication goes here return false; } public override void OnAuthorization(AuthorizationContext context) { base.OnAuthorization(context); // This would be my ideal result context.Result = RedirectToAction("Action", "Controller"); } } I'm looking for a way to re-direct the user to a specific controller / action when they fail the authentication instead of returning them to the login page. Is it possible to have the re-direct URL generated for that controller / action and then use RedirectResult()? I'm trying to avoid the temptation to just hard-code the URL.

    Read the article

  • Geo Fence: how to find if a point or a shape is inside a polygon using oracle spatial

    - by Abdul
    Hi Folks, How do i find if a point or a polygon is inside another polygon using oracle spatial SQL query Here is the scenario; I have a table (STATE_TABLE) which contains a spatial type (sdo_geometry) which is a polygon (of say a State), I have another table (UNIVERSITY_TABLE) which contains spatial data (sdo_geometry) (point/polygon) which contains Universities; Now how do i find if a selected University('s) are in a given State using SQL select statement. Primarily i want to locate existence of given object(s) in a geofence. Thanks.

    Read the article

  • [jQuery] Any HTML tags inside of tooltip cause basic tooltip to close on hover.

    - by Christian
    Hi. I'm new to jQuery, in fact any kind of AJAX / JavsScript (although not new to PHP, xHTML and CSS). Anyway I'm trying to achieve a "tooltip-like" effect, where I can hover over a div...the new div fades in above it and then when I exit the div the "tooltip" fades out. So here's the basic jQuery I've managed to scrap together reading the odd guide here and there: $(function() { $('#sn-not-logged-in').hover(function() { $('#sn-not-logged-in-hover').fadeIn('medium'); }); $('#sn-not-logged-in-hover').mouseout(function() { $('#sn-not-logged-in-hover').fadeOut('medium'); }); }); Problem is if I put "any" html tag inside the div that hovers in, the second you roll over it the div fades back out. Any ideas how this can be fixed? Cheers.

    Read the article

  • How can I use Awk inside a Perl script?

    - by papoyan
    I'm having trouble using the following code inside my Perl script, any advise is really appreciated, how to correct the syntax? # If I execute in bash, it's working just fine bash$ whois google.com | egrep "\w+([._-]\w)*@\w+([._-]\w)*\.\w{2,4}" |awk ' {for (i=1;i<=NF;i++) {if ( $i ~ /[[:alpha:]]@[[:alpha:]]/ ) { print $i}}}'|head -n1 [email protected] #----------------------------------- #but this doesn't work bash$ ./email.pl google.com awk: {for (i=1;i<=NF;i++) {if ( ~ /[[:alpha:]]@[[:alpha:]]/ ) { print }}} awk: ^ syntax error # Here is my script bash$ cat email.pl ####\#!/usr/bin/perl $input = lc shift @ARGV; $host = $input; my $email = `whois $host | egrep "\w+([._-]\w)*@\w+([._-]\w)*\.\w{2,4}" |awk ' {for (i=1;i<=NF;i++) {if ( $i ~ /[[:alpha:]]@[[:alpha:]]/ ) { print $i}}}'|head -1`; print my $email; bash$

    Read the article

  • Rails 2.3.5: How does one access code inside of lib/directory/file.rb?

    - by randombits
    I created a file so I can share a method amongst many models in lib/foo/bar_woo.rb. Inside of bar_woo.rb I defined the following: module BarWoo def hello puts "hello" end end Then in my model I'm doing something like: def MyModel < ActiveRecord::Base include Foo::BarWoo def some_method Foo::BarWoo.hello end end The interpreter is complaining that it expected bar_woo.rb to define Foo::BarWoo. The Agile Web Development with Rails book states that if files contain classes or modules and the files are named using the lowercase form of the class or module name, then Rails will load the file automatically. I didn't require it because of this.

    Read the article

  • Staticly linked libraries not running code inside to setup static variables.

    - by MJD
    In a c++ project I am working on, I have a simple c++ file that needs to run some code at the beginning of the progam execution. This file is linked into a static library, which is then linked into the main program. I have similar code in other files running fine, that looks something like: bool ____nonexistant_value = executeAction(); However, it does not work inside this file unless I make use of a function implemented in this file. It does work if the library is compilied as a shared library. I'd prefer to link this statically as the library is only a convience as the file is in a different directory.

    Read the article

  • How can I lock the cursor to the inside of a window on Linux?

    - by ZorbaTHut
    I'm trying to put together a game for Linux which involves a lot of fast action and flinging around of the mouse cursor. If the user wants to play in windowed mode, I'd quite like to lock the cursor to the inside of the window to avoid accidentally changing programs in the heat of battle (obviously this will cancel itself if the user changes programs or hits escape for the pause menu.) On Windows, this can be accomplished easily with ClipCursor(). I can't find an equivalent on Linux. Is there one? I plan to do this in pure X code, but obviously if anyone knows of a way to do this in any Linux windowing library then I can just read the source code and figure out how to duplicate it in X.

    Read the article

  • Showing val as html inside of a div in real time.

    - by smudge
    I'm using the following in order to have on screen display of each value of a checkbox that's selected with great results when it's displayed inside a textbox. I'd like to change it so that I can show a real time display in a div as html instead of a textbox. A link to a working demo is here and below is the script. I know it's probably a basic line or two but i'm still learning and new. thanks! function updateTextArea() { var allVals = []; $('#c_b :checked').each(function() { allVals.push($(this).val()); }); $('#t').val(allVals) } $(function() { $('#c_b input').click(updateTextArea); updateTextArea(); });

    Read the article

  • Statically linked libraries not running code inside to setup static variables.

    - by MJD
    In a c++ project I am working on, I have a simple c++ file that needs to run some code at the beginning of the program execution. This file is linked into a static library, which is then linked into the main program. I have similar code in other files running fine, that looks something like: bool ____nonexistent_value = executeAction(); However, it does not work inside this file unless I make use of a function implemented in this file. It does work if the library is compiled as a shared library. I'd prefer to link this statically as the library is only a convenience as the file is in a different directory.

    Read the article

  • Is it possible to achieve string localization inside of a statically linked lib?

    - by user3696003
    I am working on building an SDK which will be built out as a statically linked library that third party applications can then drop in to their applications. Inside of this SDK, I was looking to be able to perform some "localization." Basically, I would like for the code in my SDK to be able to access some ".string" files to perform some string lookup and language translation capabilities. Then I could propagate these strings outward to implementing App layers through my exposed API's. Is this even possible? I thought it was but now that I have actually been trying, I am seriously having doubts.

    Read the article

  • How to define an array inside a function in C?

    - by Arunav Dev
    So in my source file I have the folowin function: void update(state* old_state, state* measurement, uint32_t size) { state new_state[size]; //some function using measurement and old_state and returning the result in newstate arm_fadd_32(measurement,old_state,newstate,size); // rest of the code } Now the compiler throws an error saying that error#28:expression must have a constant value. I think it's due to the fact that even though inside the method the size local variable is not changing the compiler is expecting a constant while defining the size. I have tried the following: int const a = size; and then tried to reinitialize it says constant value is not known. I did some research in internet and it appears that there is no easier way without using malloc, which I don't want to since I am using the code for some embedded application. Is there a way to avoid this problem without really using malloc? Thanks in advance guys!

    Read the article

  • Can't install Visual Studio 2010 SP1 from an .ISO file I downloaded. Error inside

    - by Sergio
    This is the error: [Window Title] C:\Users\Sergio\Desktop\Things\Setup.exe [Content] The version of this file is not compatible with the version of Windows you're running. Check your computer's system information to see whether you need an x86 (32-bit) or x64 (64-bit) version of the program, and then contact the software publisher. [OK] I'm running Windows 7 (64bit) Ultimate and have installed this service pack before (2 days ago) on another machine with similar specs and the same exact OS software. I've tried mounting the .ISO file to a virtual drive and installing from there and I get that error. I've tried mounting the .ISO and copy pasting the files to a local folder on my drive and then running the setup.exe application, and I get that error. I don't know how to proceed but can provide any additional information you require from me. What can I do to fix this? Edit If I right click Setup.exe and Run As Administrator, I get the following error: [Window Title] C:\Users\Sergio\Desktop\Things\Setup.exe [Content] Windows cannot find 'C:\Users\Sergio\Desktop\Things\Setup.exe'. Make sure you typed the name correctly, and then try again. [OK] I've already tried re downloading the ISO from the site, but a quick check of the bytes of the file assures me that the ISO on my drive is 100% correctly downloaded. I get the same amount of bytes in size from the downloading ISO (as Opera reports).

    Read the article

  • DNS configuration issues. Clients inside network unable to resolve DNS server's name

    - by hydroparadise
    Setup the DNS service on Ubuntu 12.04 64 and all apears to be well except that my dhcp clients do not recognize my DNS servers hostname. When doing a nslookup on one of my Windows clients, I get C:\Users\chad>nslookup Default Server: UnKnown Address: 192.168.1.2 Where I would expect the FQDN in the spot where UnKnown is seen. The DNS server know's itself pretty well, but I think only because I have an entry in the /etc/hosts file to resolve. There's so many places to look I don't even know where to begin. Are there any logs I can look at? Something. Places I've looked at and configured: /etc/bind/zones/domain.com.db /etc/bind/zones/rev.1.168.192.in-addr.arpa /etc/bind/named.conf.local EDIT: '/etc/bind/zones/rev.1.168.192.in-addr.arpa' @ IN SOA dns-serv1.mydomain.com [email protected]. ( 2006081401; 28800; 604800; 604800; 86400 ) IN NS dns-serv1.mydomain.com. 2 IN PTR dns-serv1 2 IN PTR mydomain.com EDIT 2: '/etc/bind/named.conf.local' zone "mydomain.com" { type master; file "/etc/bind/zones/mydomain.com.db"; }; zone "1.168.192.in-addr.arpa" { type master; file "/etc/bind/zones/rev.0.168.192.in-addr.arpa"; };

    Read the article

  • How to boot between OSes from inside each OS? in a Windows/Ubuntu dual boot system

    - by TheCompander
    My ideal scenario is that there is a script/command to boot into the alternate OS from the current OS you are in, restarting the same OS without running the script/command will return it to the same OS. Currently I have grub setup to remember the last OS booted, using GRUB_DEFAULT=saved and GRUB_SAVEDEFAULT=true, I'd like to keep this option. I have read about the ability to manipulate grub from within Ubuntu to boot into windows, shown in this link. Is there a way to similarly boot into Ubuntu from within Windows? I am primarily connecting to this device remotely and hence my query.

    Read the article

  • Deleted the .AppleDouble files inside my Time Machine backups - are they still OK?

    - by Jon M
    My Ubuntu server is set up to emulate a TimeCapsule (after a very long weekend following the instructions here, here and here). My macbook pro has been backing up happily to it for a month or so now, and all seems well. The other day I was tidying up the extraneous files from my music collection on the server, got a bit loose with the find command... and ended up deleting all the .AppleDouble files underneath '/', which included the Time Machine folder. Now, Time Machine still appears to work fine, it backs up regularly, I can look through all the previous versions of my files, and they seem to restore without trouble. My question is: by deleting the .AppleDouble files, have I actually broken anything? Is the TM data still good, or should I trash it and start fresh (i.e. with a new 'day 0' full backup)?

    Read the article

  • Can you use a USB dongle inside a VMWare ESX Virual Machine?

    - by Keith Sirmons
    Howdy, I need to know if a USB dongle that is required as a license key for a piece of software will accessible from the physical host machine. This will be a small vSphere 4 installation targeting the quick backup and system restore capabilities of VMWare, not specifically HA, so I am not to worried about the virtual machine automatically failing over to another physical machine and the dongle not being accessible. Does ESX have the capability to map a physical USB port or device to a specific Virtual Machine? I believe this is the dongle: Sentinal Superpro USB Dongle by Rainbow Technologies Thank you, Keith

    Read the article

  • Apache - how to serve from a directory inside home folder, whereas home folder doesn't has any publi

    - by Vikrant Chaudhary
    Hi, I'm using Apache2 for completely local development purposes. I'm trying to make DocumentRoot to be /home/vikrant/www/ whereas permissions of /home/vikrant/ are 700. I'm getting 403 Forbidden when DocumentRoot is /home/vikrant/www/ however It Works! when DocumentRoot is /var/www/. I've even changed permissions of /home/vikrant/www/ to 777 and changed owner and group to www-data. Is it possible to serve from home directory whereas home directory doesn't has public permissions? If yes, then how?

    Read the article

  • HDD from Mid-2009 MacBook Pro works OUTSIDE laptop, but not INSIDE.

    - by Jaime
    Leading up to the problem: I was working late one night on a Keynote presentation. My battery ran out, and the computer did that hibernation thing it does when there's no battery power. I got my charger, connected it to my computer, and then pushed the power button. It started up for a second in to the gray screen it usually goes to. Then I turned around, tugging the magsafe charger out of the connector on the computer. This caused my computer to shut down again. Now I can't get it to boot at all -- just a blinking folder icon with a question mark in it on boot up. I've tried pretty much everything to deal with this. Multiple forced reboots, resetting PRAM and NVRAM, etc. I booted to original OSX disc and ran disc utility, but I discovered that there is no disc to boot to. I ran the Apple Hardware Test, and it came back 100% good. I booted to an Ubuntu live-boot disc and ran that disc utility, just to see if it recognized a disc at all. It didn't. So I removed the HDD, and replaced it with a bootable volume running BSD. It didn't recognize that HDD either. I then attached my HDD to my computer via an external enclosure with a USB interface. Lo and behold, it booted! So my computer now only work with my HDD attached externally. This means that the HDD is functional. And the AHT returns no hardware malfunctions. So what the hell is going on? … In the meantime: I've put the HDD back into the computer but it still doesn't do anything at all (I'm running it externally right now). I just checked the serial number and my 1 year warranty expired recently, so I can't send it back for repair. … Little Help Thoughts? I've been searching everywhere for leads, but no luck. …

    Read the article

  • Disc drive busy on MacBook, with disc stuck inside.

    - by ayaz
    I have a white MacBook, running Snow Leopard, 10.6.3 with the latest updates. I popped in a DVD that the system failed to mount. I did not see any conspicuous errors. As a result of this failure, the DVD got stuck in the drive. Neither pressing the eject button on the keyboard nor running the diskutil eject command caused the DVD to come out. The commands drutil eject and drutil tray open could not get the DVD to budge at all. The 'mount' and 'eject' buttons on the window for Disk Utility are dimmed out, while it is written in the middle for the DVD drive that that particular disc drive is busy. This is not the first time this has happened with me. I know that I will ultimately have to resort to rebooting the system and holding down the eject button to get the DVD to come out. But, is there any workaround that does not involve rebooting the system and prying the disc out? The drive on this MacBook does not have a needle-pin reset button -- at least, I couldn't find it anywhere. Any help will be greatly appreciated. Many thanks.

    Read the article

  • Storage servers architectural solution for backup. What is the best way? (pics inside)

    - by Kirzilla
    Hello, What is the best architecture for storage servers array? Needs... a) easy way to add one more server to array b) we don't have single backup server c) we need to have one backup for each "web" part of each server Group #1 : is cross-server-backuping scheme; the main disadvantage that we can't add one more server, we should add 2 servers in one time. Group #2 : is a Group #1, but with three and more servers. It also have a disadvantage - to add one more server we should move existing backup to it. Any suggestions? Thank you. Thank you.

    Read the article

  • h264 inside FLV container vs. MP4 container?

    - by Gotys
    I am developing a tube site, and currently having issues with h264 format . By looking at youtube, I noticed they are putting their hi-def videos into mp4 container, so logically I did the same. Next, I installed mod_h264_streaming for lighttpd to make streaming and timeline-scrubbing work. Problem is, that large files (500mb+ at somewhat high resolution) take for EVER to even start buffering ( I read the flowplayer or other flash players need to download metadata first) . I moved the xmov atom to the front of the file with MP4Box (i tried qt-quickstart too) , and the problem didn't go away. Next I read online I need to interleave audio tracks, so I did that too. No change in slowness. So I tried putting the same exact h264 movie into an FLV container, and the playback buffering starts almost instantly - no slowness. So what am I missing here? Why would I choose MP4 container with mod_264_streaming module , which seems super-slow over a regular FLV container with lighttpd's built-in mod_flv_streaming ? Obviously many websites pick mp4 container , but I fail to understand why ? And as a side question - I tried using HTML5's VIDEO tag to try the same h264 MP4 movie, and the scrubbing is LIGHTING FAST! I looked into lighttpd's log file, and i noticed taht Flash Players append video.mp4?start=234 each time timeline is scrubbed, wheres HTML5's video tag does no such thing . Is this some sort of limitations of Flash ? Why Can't flash streaming be same fast as HTML5 streaming? Thanks to ALL who can help. I very much appreciate this community.

    Read the article

< Previous Page | 70 71 72 73 74 75 76 77 78 79 80 81  | Next Page >