Search Results

Search found 4036 results on 162 pages for 'nested loops'.

Page 90/162 | < Previous Page | 86 87 88 89 90 91 92 93 94 95 96 97  | Next Page >

  • javascript - query object graph?

    - by Scott
    Given an object like this: var obj = { first:{ second:{ third:'hi there' } } }; And a key like this "first.second.third" How can I get the value of the nested object "hi there"? I think maybe the Array.reduce function could help, but not sure.

    Read the article

  • How can I use && in if in Ruby on Rails?

    - by Angela
    I tried the following && conditional for my if statement and I get a "bad range" error: <% if (from_today(contact, call.days) == 0..7) && (show_status(contact, call) == 'no status') %> Why and how can I fix it? The only other way I could do it was to have a second nested if statement and break it apart...not pretty :(

    Read the article

  • Get CCK values, without the html in Drupal templates

    - by DasRakel
    I'm storing a string in a CCK field. The problem is getting it back out. I have a node-node_type.tpl.php and ask it $node->content['field_custom_map_data']['#value'] That returns html, three nested div's and uses HTML entities, I want the pure text, as entered. What is the Drupal 5 way to fix this?

    Read the article

  • Concatenating an array of arrays in Coffeescript

    - by user380572
    Hi everyone, I'm trying to find an elegant way in Coffeescript to merge an array of arrays, so that [[1,2,3],[4,5,6],[7,8,9]] == [1,2,3,4,5,6,7,8,9]. As you might imagine, I need this because I'm generating arrays from a function in a "for in" construct and need to concatenate the resulting nested array: result = (generate_array(x) for x in arr) Is there an elegant way to handle this? Thanks for any pointers!

    Read the article

  • Check if a connection is in a transaction

    - by acidzombie24
    I am getting a SqlConnection does not support parallel transactions. exception and this answer mentions its when a connection tries to open two transactions. This is exactly what i am doing. I thought nested transactions were ok (i was using sqlite for the prototype). How do i check if the connection is already in a transaction? I am using Microsoft SQL Server Database File.

    Read the article

  • Do more specific css rules load better?

    - by bobobobo
    You can do this: .info { padding: 5px ; } Or, if you know it will be a div, you can do this div.info { padding: 5px ; } So, when there's a nested list.. you can do this.. div.info ul.navbar li.navitem a.sitelink { color: #f00; } Or you can do this a.sitelink { color: #f00; } Readability aside, which is better for the browser to parse/run?

    Read the article

  • Selector for a range of ids

    - by Kiffin
    I need to select all span tag elements within a div with an id list_{[0-9]}+ having the following form: <div id="list_1234" ...> <!-- can be nested multiple levels deep --> ... <span class="list_span">Hello</span> </div> How can I do that, e.g. without using jQuery? Is that possible?

    Read the article

  • Dell PowerEdge R410: System asks to press F1 or F2

    - by hurikhan77
    We just installed an option card (PERC 6/i) into a brand-new Dell PowerEdge R410 and now the system does no unattended startup but instead asks me to press F1 to continue or F2 to enter system setup after printing the following message on the console: Fan 4 speed may change depending on system configuration and option card install. How do I make the system ignore this "problem" or whatever that is? This system is going to be installed at a remote data center and needs to be able to restart unattended. I do not want to ignore errors completely to not get endless restart loops in case of errors.

    Read the article

  • Postfix on IspCP cannot send to google apps mail if it is in the same domain

    - by Evan Sap
    In my vps setup I have ispcp omega 1.0.7 installed. Everything works fine except the fact that postfix cannot send to google apps mail when the domain of google apps is also registered in ispcp. Postfix sends an email to normal addresses (hotmail, yahoo, gmail etc). I use external dns. There is also a discussion I started in the ispcp forum here .mail.log file provides these messages: mail for exampledomain.gr loops back to myself". postfix/bounce: sender non-delivery notification. postfix/qmgr: removed Any help would be appreciated.

    Read the article

  • Using naked domain in apache, no "www" on domain in httpd.conf

    - by chrsdgtl
    Incredibly there is no good tutorial or easy reference guide for using naked domains (no subdomain) as the primary URI online that I could find. I'm trying to configure this to happen in my httpd.conf in apache. Since I'm still a relative newb to this server stuff, trying to figure it out myself all I could do was configure some nasty redirect loops and error 400's. There's plenty of notes for the more common: http:// -- https:// and naked to -- www. and a ton of .htaccess stuff (not interested) What I want is http://www.domain.com -- http://domain.com The most helpful thing I found was this: Multiple domains (including www-"subdomain") on apache? I ended using the solution mentioned by ceejayoz in that post that some folks noted was messy and complicated because it got the desired result but I'd like to know the best practice for this in the future. I'd appreciate a nudge in the right direction. Thanks in advance.

    Read the article

  • DTS to AC3 conversion for LG TV using mediatomb DLNA server

    - by prion crawler
    I want to convert a MKV video file containing DTS audio to a stream with AC3 audio. I want to pass this resulting stream to mediatomb's transcoding feature. Mediatomb will transfer the stream via DLNA to a LG TV, which does not support DTS audio. I have tried the VLC command below but the TV does not recognize the stream, and playing the destination stream on PC does not produce sound. vlc -vvv -I dummy INPUT.file --sout \ '#transcode{acodec=ac3,ab=256k,channels=2,threads=4} \ :std{mux=ts,access=file,dst=DEST.file}' The following ffmpeg command give a stream that plays on the TV with sound, but the ffmpeg process gets killed (with signal 15) within 10-15 seconds, and then the TV restarts the playback from the beginning. This goes on in loops. ffmpeg -i INPUT.file -acodec ac3 -ab 384k -vcodec copy \ -vbsf h264_mp4toannexb -f mpegts -y DEST.file I want to have a working DLNA server which transcodes DTS to AC3, any help is appreciated.

    Read the article

  • program for drawing diagrams

    - by ldigas
    I need to draw a few diagrams that describe the working of some smaller programs (nothing real, but some exercise to illustrate some points). They're supposed to be 'old kind' diagrams, like you remember from the "old school of programming" - I gather some users here will know what I mean. And it's be good if they have ready blocks for program units, IF conditions, FOR/DO loops and such ... So, anyone knows of an application for such ? (I've tried Visio which I have on my work machine (for whatever reason ... I sure didn't put it there) ... but it is "too visual" for this kinda thing ... I just want to draw a few simple black on white diagrams ... nothing special or in colours).

    Read the article

  • Static error page served by nginx when my application is down

    - by dreeves
    If my (Rails) application is down or undergoing database maintenance or whatever, I'd like to specify at the nginx level to server a static page. So every URL like http://example.com/* should server a static html file, like /var/www/example/foo.html. Trying to specify that in my nginx config is giving me fits and infinite loops and whatnot. I'm trying things like location / { root /var/www/example; index foo.html; rewrite ^/.+$ foo.html; } How would you get every URL on your domain to serve a single static file?

    Read the article

  • [Apache] mod_rewrite www.site.com/dir/ --> www.site.com/dir/2009/

    - by Casey
    I'm having trouble with this rewrite. I've never really used mod_rewrite before and don't have much experience with regex. Any help is appreciated! <IfModule mod_rewrite.c> Options +FollowSymLinks RewriteEngine on #prevent nested looping RewriteCond %{ENV:REDIRECT_STATUS} ^$ #re-route incoming requests RewriteRule ^(.*)$ %{REQUEST_URI}2009/$1 [L,NE] </IfModule> This partially works, http://www.site.com/dir/ is routed to http://www.site.com/dir/2009/ but a request like http://www.site.com/dir/css/theme.css fails. I'm hoping to rewrite all requests to the parent directory into the 2009 subdirectory but I keep encountering infinite loops and server errors messages. I haven't found any useful examples out there. I figured this would be a common rewrite... Thanks in advance!

    Read the article

  • Looping through a batch file only if the response is "everything is okay"

    - by PeanutsMonkey
    I have a batch file that loops through the contents of a directory and compresses the files in the directory as follows; for %%a in (c:\data\*.*) do if "%%~xa" == "" "C:\Program Files\7-Zip\7za.exe" a -tzip -mx9 "%%a.zip" "%%a" Seeing that I am using 7zip to compress the file, it returns the message "everything is okay" if it has successfully compressed the file and it then moves onto the next file in any. What I would like to do is the following; Only move to the next file if the response is "everything is okay" If the response is anything but "everything is okay", the error is logged Since an error has occurred, it attempts to compress the file again Once when it has succeeded i.e. "everything is okay" it goes to the next file Steps 3 & 4 only occur a maximum of 3 times before it gives up and moves onto the next file. How can I achieve this?

    Read the article

  • Strange message during the Linux boot and slow start caused by "udevd[336] timeout ... "

    - by Kyrol
    When Debian (wheezy testing version) is loading, at a certain point appears a strange message: udevd[336] timeout usb_id--export /devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-2.2/1-1.2:1.0 video4linux/ [502] after this message, start another message that loops for 120 secs: udevd[336] killing /devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-2.2/1-1.2:1.0 video4linux/ [502] When the loop finish, Debian start normally and nothing seems to be "broken"! I also killed the loop with CTRL-C to break the loop and the system doesn't give any problem. Does anyone know a possible answer?

    Read the article

  • How to prevent partial crash during VLAN configuration on a HP ProCurve 3500

    - by vm370
    as you can see from my question, I have a VLAN configuration problem with a ProCurve3500. The goal is to remove a VLAN from the existing configuration, however when I use the WEB UI to do this, I cannot modify ports to be assigned to a different VLAN or the Default VLAN. I always get the message "config failed", which is not very helpful. When I try to do it over telnet, the router somehow partially crashes and somehow the utilization on all ports is at 100% and I can barely use the web ui. After a reboot everything is fine again, but the configuration was not changed... The traffic after this partial crash looks like a broadcast storm, however there are definitely no loops in the segment. I also updated to the latest stable firmware, but the problem persists. Thanks a lot in advance Br vm370

    Read the article

  • Use cURL with multiple POSTs

    - by Austin
    I'm trying to use cURL to download the contents of webpages that require forms to get to. In a browser it looks something like this 1.) Login using POST 2.) Pick which page to go to using another POST 3.) Pick another page... using POST 4.) etc.. until I get to the page I want, then download all textfiles linked to on that page. I am attempting to do this using a bash script and some loops with the values that change for each POST. My problem is how do I do multiple POSTs with cURL? Must there be cookies involved? FYI the website is http://metagenomics.nmpdr.org/ (MG-RAST).

    Read the article

  • Want to add a new domain to my postfix, but mails not delivered (mail look back to myself)

    - by user74850
    Hi everybody, My host relay is working but I was aksed to add a new domain (like external.example.com). I have added in main.cf the new fqdn in relay_domains relay_domains = $mydestination, example.com,example2.com, externe.example.com and in transport example.com smtp:[192.168.1.22] example2.com smtp:[192.168.1.22] external.example.com smtp:[192.168.1.22] Mails sent to users with example.com and example2.com domain are well delivered. But for mails to external.example.com i got this message Mar 17 16:47:52 relayhost postfix/smtp[11948]: 754E1876A01: to=<[email protected]>, relay=relayhost2.example.com[80.81.82.83]:25, delay=19555, delays=19525/0.01/30/0, dsn=4.4.6, status=deferred (mail for external.example.com loops back to myself) I read another Q/A about the same issue right here, but it's not helping me. Can you ?

    Read the article

  • Powershell, Task Scheduler or loop and sleep

    - by Paddy Carroll
    I have a job that needs to go off every minute or so, it loads a DLL i have written in C# that retrieves state for an SQL Server Mirror (Primary, Mirror and witness) for a number of databases; it allows us to poke DNS to show where the primary instances are. Please don't mention Clustering - We're not doing that. I can't be arsed to write a service, there simply isn't enough time do I Task Scheduler - every minute: Invoke a powershell script that loads the DLL does the business Task scheduler - At Startup : Invoke a similer powershell script that loads the DLL once but then loops and sleeps, refreshing the Object that the DLL exposes. Pros and cons?

    Read the article

  • powershell task scheduler or loop and sleep

    - by Paddy Carroll
    I have a job that needs to go off every minute or so, it loads a DLL written in C# that retrieves state for an SQL Server Mirror (Primary, Mirror and witness) for a number of databases; it allows us to poke DNS to show where the primary instances are. Please don't mention Clustering - We're not doing that. I can't be arsed to write a service, there simply isn't enough time do I Task Scheduler - every minute: Invoke a powershell script that loads the DLL does the business Task scheduler - At Startup : Invoke a similer powershell script that loads the DLL once but then loops and sleeps, refreshing the Object that the DLL exposes. Pros and cons?

    Read the article

  • Is it possible to rewrite some query strings to HTTPS and keep everything else on HTTP?

    - by Matt
    I'm rewriting query strings to pretty URIs, example: index.php?q=/en/contact becomes /en/contact and all works nicely.. # httpd.conf # HANDLE THE QUERY RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ index.php?q=$1 [L,QSA] Is it even possible to rewrite single queries to force https and force everything else onto http? I've tried many different approaches that typically end in infinate loops. I could write a plugin to do this in PHP but figured it would be more effecient to handle this in the server conf. I'd be greatful for any advice. EDIT: To clarify, I'd like to be able to rewrite the non SSL http://example.com/index.php?q=/en/contact to the SSL enabled https://example.com/en/contact and every query that is not /en/contact get written to http://example.com/...

    Read the article

  • Sendmail.mc: alias all incoming e-mails to one account

    - by Angus
    I need to alias all mail coming from another SMTP server to this one account "myinbox". The system in question is to receive all e-mail on the domain, if that's any help. http://william.shallum.net/random-notes/sendmailredirectallmailfordevelopment is a template for the beginning of a solution, but that routes everything (including outgoing and internal mail) to that one account, and trying to understand how these R rules work is making my head spin. I think the answer is in sendmail.mc rather than any Procmail configuration. So I think what I generally don't want the filter to do is: Interfere w/any outgoing e-mail Interfere w/any internal e-mail Sometimes some cron job causes "root" to mail to "root". I don't want these to go to myinbox. Cause infinite loops Who does? Bounce messages and any DSNs come to mind. I'm running Sendmail 8.13.1 and Procmail 3.22.

    Read the article

< Previous Page | 86 87 88 89 90 91 92 93 94 95 96 97  | Next Page >