Search Results

Search found 2396 results on 96 pages for 'alex zylman'.

Page 48/96 | < Previous Page | 44 45 46 47 48 49 50 51 52 53 54 55  | Next Page >

  • Modify shell script to monitor/ping multiple ip addresses

    - by Alex
    Alright so I need to constantly monitor multiple routers and computers, to make sure they remain online. I have found a great script here that will notify me via growl(so i can get instant notifications on my phone) if a single ip cannot be pinged. I have been attempting to modify the script to ping multiple addresses, with little luck. I'm having trouble trying to figure out how to ping a down server while the script keeps watching the online servers. any help would be greatly appreciated. I haven't done much shell scripting so this is quite new to me. Thanks #!/bin/sh #Growl my Router alive! #2010 by zionthelion73 [at] gmail . com #use it for free #redistribute or modify but keep these comments #not for commercial purposes iconpath="/path/to/router/icon/file/internet.png" # path must be absolute or in "./path" form but relative to growlnotify position # document icon is used, not document content # Put the IP address of your router here localip=192.168.1.1 clear echo 'Router avaiability notification with Growl' #variable avaiable=false com="################" #comment prefix for logging porpouse while true; do if $avaiable then echo "$com 1) $localip avaiable $com" echo "1" while ping -c 1 -t 2 $localip do sleep 5 done growlnotify -s -I $iconpath -m "$localip is offline" avaiable=false else echo "$com 2) $localip not avaiable $com" #try to ping the router untill it come back and notify it while !(ping -c 1 -t 2 $localip) do echo "$com trying.... $com" sleep 5 done echo "$com found $localip $com" growlnotify -s -I $iconpath -m "$localip is online" avaiable=true fi sleep 5 done

    Read the article

  • [PHP] Associate different data

    - by Alex Cane
    I will try to be as clear as possible because I can't get anybody to help me around, I am trying to associate some data from a 'videos' table with their respective ID. Lets say, I have column ID, title, serie, season, episode. I am getting my data : <? $result = mysql_query("SELECT * FROM videos WHERE serie = '".$row['serie']."' AND season = '".$row['season']."'"); $total_rows = mysql_num_rows($result); ?> (that is in the page where you see the video itself) So now I can get the number of episodes from a serie and season. What I'm trying to do is have a link for the next episode, and aa link for the previous one. In the URL I am working with the id, so http://website.com/view/id/'video id here'/ So how can I get the ID of the following and previous episodes of the same season AND serie? Help will be much appreciated! The easiest thing I thought of is <?=$row['id'] + 1?> <?=$row['id'] - 1?> But the thing is that it's mixed videos, so it wont work 100%

    Read the article

  • ajax response byte size

    - by Alex Pacurar
    Im using jQuery's getJSONP and I want to log the duration of the call and the size of the response to be able to have some statistics about the usage of my application. This is a cross domain ajax call, so I need to use JSONP, but as the JSONP call is not done with an XMLHttpRequest object, the complete callback from jquery's ajax doesnt pass the response content. So my question is how to get the response size (content lenght) from a JSONP call. $.ajaxSetup( { complete:function(x,e) { log(x.responseText.length, x.responseText); } } here x is a XMLHttpRequest object for a JSON call , but for JSONP call is undefined.

    Read the article

  • What could cause a button on a UIActionSheet to "miss" on touches?

    - by Alex Gosselin
    I have a UIActionSheet as follows: UIActionSheet *sheet = [[UIActionSheet alloc] initWithTitle:[NSString stringWithFormat: @"Cancel New %@? Changes will be lost.", [creator propertyName]] delegate:self cancelButtonTitle:@"Stay Here" destructiveButtonTitle:@"Discard and Close" otherButtonTitles:@"Save and Close", nil]; [sheet showInView:self.view]; [sheet release]; It creates the action sheet, The buttons display, the Destructive button is on top, cancel button is on the bottom, other button (save and close) shows up in the middle, the top two buttons, (destructive and other) work fine, but the bottom button has a gap, so it is farther down than the other buttons. For some reason though, in order to press the button I need to touch where it would be if there was no gap. Touching the actual button doesn't work. Sorry if this isn't super clear, has anyone encountered something like this? I don't like to whip out the "I found a bug" card too fast, maybe I'm doing something wrong here.

    Read the article

  • Xcode 4.2 how include one project into another one?

    - by Alex Stone
    I keep searching, but cannot find a clear and simple explanation on how to include one XCode project, along with all of it's sub-classes into another project. I routinely see stuff like that in sample projects that I download off the web, but do not know how to do this myself. Within XCode, along with .h and .m files, and folders, there's a whole new project, starting with a blue xcode project icon, that is expandable to contain everything within the project. Please, can someone explain to me step by step what do I need to do to add one XCode project into another one? I've seen a ton of one liners like "header search paths", but that does not tell me much. UPDATE: After re-reading the documentation, I realized that the project to include must be dragged ONTO the BLUE project icon of the parent project. Regular sources can be dragged anywhere, but a project must be dragged onto a project. Thank you!

    Read the article

  • What is a good motivating example for dataflow concurrency?

    - by Alex Miller
    I understand the basics of dataflow programming and have encountered it a bit in Clojure APIs, talks from Jonas Boner, GPars in Groovy, etc. I know it's prevalent in languages like Io (although I have not studied Io). What I am missing is a compelling reason to care about dataflow as a paradigm when building a concurrent program. Why would I use a dataflow model instead of a mutable state+threads+locks model (common in Java, C++, etc) or an actor model (common in Erlang or Scala) or something else? In particular, while I know of library support in the languages above (and Scala and Ruby), I don't know of a single program or library that is a poster child user of this model. Who is using it? Why do they find it better than the other models I mentioned?

    Read the article

  • Testing installation package in OpenSolaris

    - by Alex Farber
    Testing my "configure - make - make install" installation package on OpenSolaris, I found that all required files are placed to expected locations. usr/local/bin contains myprogram file. If I type in command line: /usr/local/bin/myprogram, it is working. However, typing "myprogram" without path does not work. Is /usr/local/bin directory included in OpenSolaris executable path? If not, why autoconfig tools place my executable to this directory? Installation package is created in Ubuntu.

    Read the article

  • Should an NSLock instance be "global"?

    - by Alex Reynolds
    Should I make a single NSLock instance in the application delegate, to be used by all classes? Or is it advisable to have each class instantiate its own NSLock instance as needed? Would the locking work in the second case, if I, for example, had access to a managed object context that is spread across two view controllers?

    Read the article

  • How can I write this query in Django? (datetime)

    - by alex
    | time_before | datetime | YES | MUL | NULL | | | time_after | datetime | YES | MUL | NULL | | the_tag = Tag.objects.get(id=tag_id) Log.objects.filter(blah).extra(where=['last_updated >'+the_tag.time_before, 'last_updated' < the_tag.time_after]) Ok. Basically, I have an object that's called "the_tag". I want to select from Log where log.last_updated (which is a datetime field) is between the tag's time. But, I don't know how to write the last part of this Django query.

    Read the article

  • Java assert nasty side-effect - compiler bug?

    - by Alex
    This public class test { public static void main(String[] args) { Object o = null; assert o != null; if(o != null) System.out.println("o != null"); } } prints out "o != null"; both 1.5_22 and 1.6_18. Compiler bug? Commenting out the assert fixes it. The byte code appears to jump directly to the print statement when assertions are disabled: public static main(String[]) : void L0 LINENUMBER 5 L0 ACONST_NULL ASTORE 1 L1 LINENUMBER 6 L1 GETSTATIC test.$assertionsDisabled : boolean IFNE L2 ALOAD 1: o IFNONNULL L2 NEW AssertionError DUP INVOKESPECIAL AssertionError.<init>() : void ATHROW L2 LINENUMBER 8 L2 GETSTATIC System.out : PrintStream LDC "o != null" INVOKEVIRTUAL PrintStream.println(String) : void L3 LINENUMBER 9 L3 RETURN L4

    Read the article

  • Any best practices with feedback colours?

    - by alex
    I have a few that I think are correct. These are background colours for messages. ERROR: red; INFO: blue; SUCCESS: green; NOT IMPORTANT INFO: yellow Have I got the blue and yellow around the wrong way? Any hex values that are a de facto standard for these? I am curious considering web development, but I think the answers will be agnostic. Here is an interesting thought (I'm sure I've read about it in an article). What colours would the errors be on Target's website, considering all their branding is red?

    Read the article

  • If you can't do a Support Role, does this mean you should not be in development?

    - by Alex
    Hi, I've been shifted around roles a lot, and have been put in a support role which seems to deal out a lot of rubbish due to poor business management. Anyway, my line manager says that he's not sure he would recommend me for a developer role as they regard support as a poor technical role. What I resent is the fact that not all the information is available to us about what we're supporting and I miss coding. This thing I'm supporting has been regarded as a disaster when it went in and is still highly unstable. The thing is...does he have a point about Support roles being under developers, or are they completely two different kettle of fish?

    Read the article

  • break dataframe into subsets by factor values, send to function that returns glm class, how to recom

    - by Alex Holcombe
    Thanks to Hadley's plyr package ddply function we can take a dataframe, break it down into subdataframes by factors, send each to a function, and then combine the function results for each subdataframe into a new dataframe. But what if the function returns an object of a class like glm or in my case, a c("glm", "lm"). Then, these can't be combined into a dataframe can they? I get this error instead Error in as.data.frame.default(x[[i]], optional = TRUE, stringsAsFactors = stringsAsFactors) : cannot coerce class 'c("glm", "lm")' into a data.frame Is there some more flexible data structure that will accommodate all the complex glm class results of my function calls, preserving the information regarding the dataframe subsets? Or should this be done in an entirely different way?

    Read the article

  • SQL Server: One large persisted computed column for Fulltext Indexing

    - by Alex
    It appears to me as the easiest, most straightforward solution, but please correct me if I'm wrong. Instead of having a fulltext index on all individual columns of a table, isn't it better to just generate one single wide computed column and run the fulltext index against that only? It appears to me that it gets rid of all the issues of having multiple columns, incl. that I can't search "x AND y" as this will not match a row with "x" present in column 1 and "y" present in column 2. Any counterarguments?

    Read the article

  • help me to cheat with numericUpDown1_ValueChanged event

    - by alex
    I have a Form and numericupdown control located on it. I want that in some conditions (_condition1) user cannot be able to change a value of numericupdown control. How can I do it ? I wrote some code but it works twice (double time). class Form1 : Form { bool _condition1; int _previousValue; void numericUpDown1_ValueChanged(object sender, EventArgs e) { if(_condition1) { numericUpDown1.Value = (decimal)_previousValue; } else { _previousValue = (int)numericUpDown1.Value; } } } Control must be enable.

    Read the article

  • How do I build mDNSResponder?

    - by Alex
    I have tried checking out the mDNSResponder source from Apple's SVN host, with the thought of compiling it and tweaking it. This failed miserably. Here is the last line of the output of cd trunk SRCROOT=. make I get the same error for several tags in the SVN tree, so I'm not sure if there is something on my end wrong? The following build commands failed: mDNSResponder: CompileC mDNSResponder.build/mDNSResponder.build/Objects-normal/i386/mDNSMacOSX.o /Users/myname/Desktop/mDNSResponder/trunk/mDNSMacOSX/mDNSMacOSX.c normal i386 c com.apple.compilers.gcc.4_2 PhaseScriptExecution "Run Script" /Users/myname/Desktop/mDNSResponder/trunk/mDNSMacOSX/mDNSResponder.build/mDNSResponder.build/Script-D284BE6C0ADD80740027CCDF.sh mDNSResponder debug: CompileC "mDNSResponder.build/mDNSResponder debug.build/Objects-normal/i386/mDNSMacOSX.o" /Users/myname/Desktop/mDNSResponder/trunk/mDNSMacOSX/mDNSMacOSX.c normal i386 c com.apple.compilers.gcc.4_2 Build Some: PhaseScriptExecution "Run Script" "/Users/myname/Desktop/mDNSResponder/trunk/mDNSMacOSX/mDNSResponder.build/Development/Build Some.build/Script-FF045B6A0C7E4AA600448140.sh" (4 failures)

    Read the article

  • How to create a container that holds different types of function pointers in C++?

    - by Alex
    I'm doing a linear genetic programming project, where programs are bred and evolved by means of natural evolution mechanisms. Their "DNA" is basically a container (I've used arrays and vectors successfully) which contain function pointers to a set of functions available. Now, for simple problems, such as mathematical problems, I could use one type-defined function pointer which could point to functions that all return a double and all take as parameters two doubles. Unfortunately this is not very practical. I need to be able to have a container which can have different sorts of function pointers, say a function pointer to a function which takes no arguments, or a function which takes one argument, or a function which returns something, etc (you get the idea)... Is there any way to do this using any kind of container ? Could I do that using a container which contains polymorphic classes, which in their turn have various kinds of function pointers? I hope someone can direct me towards a solution because redesigning everything I've done so far is going to be painful.

    Read the article

  • The question about the basics of LINQ to SQL

    - by Alex
    I just started learning LINQ to SQL, and so far I'm impressed with the easy of use and good performance. I used to think that when doing LINQ queries like from Customer in DB.Customers where Customer.Age > 30 select Customer LINQ gets all customers from the database ("SELECT * FROM Customers"), moves them to the Customers array and then makes a search in that Array using .NET methods. This is very inefficient, what if there are hundreds of thousands of customers in the database? Making such big SELECT queries would kill the web application. Now after experiencing how actually fast LINQ to SQL is, I start to suspect that when doing that query I just wrote, LINQ somehow converts it to a SQL Query string SELECT * FROM Customers WHERE Age > 30 And only when necessary it will run the query. So my question is: am I right? And when is the query actually run? The reason why I'm asking is not only because I want to understand how it works in order to build good optimized applications, but because I came across the following problem. I have 2 tables, one of them is Books, the other has information on how many books were sold on certain days. My goal is to select books that had at least 50 sales/day in past 10 days. It's done with this simple query: from Book in DB.Books where (from Sale in DB.Sales where Sale.SalesAmount >= 50 && Sale.DateOfSale >= DateTime.Now.AddDays(-10) select Sale.BookID).Contains(Book.ID) select Book The point is, I have to use the checking part in several queries and I decided to create an array with IDs of all popular books: var popularBooksIDs = from Sale in DB.Sales where Sale.SalesAmount >= 50 && Sale.DateOfSale >= DateTime.Now.AddDays(-10) select Sale.BookID; BUT when I try to do the query now: from Book in DB.Books where popularBooksIDs.Contains(Book.ID) select Book It doesn't work! That's why I think that we can't use thins kinds of shortcuts in LINQ to SQL queries, like we can't use them in real SQL. We have to create straightforward queries, am I right?

    Read the article

  • Workling not running tasks in background

    - by alex
    Hi, I followed the railscast that describes how to get workling running background tasks, but can't get it working. The task runs, but not in the background (it's taking 5 secs before I'm redirected to admin_path). Here is what my code looks like: class AdminWorker < Workling::Base   def test_workling(options)     sleep 5   end end class AdminController < ApplicationController   def test_workling     AdminWorker.async_test_workling     flash[:notice] = "Doing stuff in the background"     redirect_to admin_path   end end What am I doing wrong? How to debug? Thanks!

    Read the article

  • Can someone help me with m Django localization?

    - by alex
    I have a template with has text in it. It's located in /templates under my project directory. I'm trying to do Japanese now. I create a directory called "locale" in my project directory. Then, I set up this in my settings: gettext = lambda s: s LANGUAGES = ( ('de', gettext('German')), ('en', gettext('English')), ('ja', gettext('Japanese')), ) After that, I run this command: django-admin.py makemessages -l ja The only problem is, this doesn't work! In my locale/ja/LC_MESSAGES/django.po: Isn't it supposed to scan my templates with .html extension and grab all the strings? # SOME DESCRIPTIVE TITLE. # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER # This file is distributed under the same license as the PACKAGE package. # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. # #, fuzzy msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2010-05-20 22:45+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Language-Team: LANGUAGE <[email protected]>\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: settings.py:101 msgid "German" msgstr "" #: settings.py:102 msgid "English" msgstr "" #: settings.py:103 msgid "Japanese" msgstr ""

    Read the article

  • Help with Django localization--doesn't seem to be working. Nothing happens

    - by alex
    Can someone help me with Localization? I put {% trans "..." %} in my template, I filled in my django.po after running "makemessages". #: templates/main_content.html:136 msgid "Go to page" msgstr "¦~C~Z¦~C¦¦~B¦¦~L~G¦~Z" #: templates/main_content.html:138 msgid "Page" msgstr "¦~C~Z¦~C¦¦~B¦" #: templates/main_content.html:154 msgid "Next" msgstr "?" Then, I set LANGUAGES={} in my settings.py along with "gettext lambda": gettext = lambda s: s LANGUAGES = ( ('de', gettext('German')), ('en', gettext('English')), ('ja', gettext('Japanese')), ) Of course, I installed the LocaleMiddleware. I also set the request.session['django_language'] = "ja" How do I test that this is working? How do I see japanese on my site!?

    Read the article

  • WxPython Incompatible With Snow Leopard?

    - by Alex
    Hello all, Recently I upgraded to Snow Leopard, and now I can't run programs built with wxPython. The errors I get are (from Eclipse + PyDev): import wx File "/var/tmp/wxWidgets/wxWidgets-13~231/2.6/DSTROOT/System/Library/Frameworks /Python.framework/Versions/2.6/Extras/lib/ python/wx-2.8-mac-unicode/wx/__init__.py", line 45, in <module> File "/var/tmp/wxWidgets/wxWidgets-13~231/2.6/DSTROOT /System/Library/Frameworks/Python.framework/Versions/2.6/Extras/lib /python/wx-2.8-mac-unicode/wx/_core.py", line 4, in <module> ImportError:/System/Library/Frameworks /Python.framework/Versions/2.6/Extras/lib/python /wx-2.8-mac-unicode/wx/_core_.so: no appropriate 64-bit architecture (see "man python" for running in 32-bit mode) I don't really understand them and would appreciate if you could help me to do so, also, if you do know what's going on, how can I go about fixing them? Maybe this has something to do with the fact that Snow Leopard is 64-bit? Thanks!!

    Read the article

  • Should I update an application when a used framework release a new version?

    - by Alex
    I have an application that use several libraries and frameworks, should I update my application to use the latest version of those frameworks when a new stable version is available? For example, migrate from python 2.x to python 3.x, or from spring 2.5 to spring 3.0, but the question es very general, not language specific. If I keep the application updated to use the latest stable frameworks versions then I will have new features available in case I need them. If I don't, then may be in a future I will need to do the update and it will be a lot of work to update the application. Is there any best practice about this?

    Read the article

< Previous Page | 44 45 46 47 48 49 50 51 52 53 54 55  | Next Page >