Search Results

Search found 2503 results on 101 pages for 'danger cat'.

Page 3/101 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • Save user names on .txt file witch username is listed in /etc/passwd file. Bash

    - by user1448637
    well my goal is to make bash script to check if the username exist in /etc/passwd, if true i want to add it to the users.txt file. i am not really good at UNIX programming so i hope somebody help me. while(get to the end of /etc/passwd){ name=$(cat /etc/passwd | cut -d: -f1); num1=$(cat /etc/passwd | cut -d: -f3); num2=$(cat /etc/passwd | cut -d: -f4); if(num1==num2) /*i compare argv[0] with $name */ /* if true i=1 */ } if(i==1) save folowing string "argv[0]=agrv[1]" else "error message"

    Read the article

  • Explain this O(n log n) algorithm for the Cat/Egg Throwing Problem

    - by ripper234
    This problem (How many cats you need to throw out of a building in order to determine the maximal floor where such a cat will survive. Quite cruel, actually), has an accepted answer with O(n^3) complexity. The problem is equivalent to this Google Code Jam, which should be solvable for N=2000000000. It seems that the O(n^3) solution is not good enough to solve it. From looking in the solutions page, jdmetz's solution (#2) seems to be O(n log n). I don't quite understand the algorithm. Can someone explain it? Edit

    Read the article

  • Explained shell statement

    - by Mats Stijlaart
    The following statement will remove line numbers in a txt file: cat withLineNumbers.txt | sed 's/^.......//' >> withoutLineNumbers.txt The input file is created with the following statement (this one i understand): nl -ba input.txt >> withLineNumbers.txt I know the functionality of cat and i know the output is written to the 'withoutLineNumbers.txt' file. But the part of '| sed 's/^.......//'' is not really clear to me. Thanks for your time.

    Read the article

  • Brevets : Android de nouveau en danger, un consortium constitué d'Apple, Microsoft, Sony attaque en justice Google et plusieurs constructeurs

    Brevets : Android de nouveau en danger un consortium constitué d'Apple, Microsoft, Sony attaque en justice Google et plusieurs constructeurs Android de nouveau devant la barre. Après la grosse affaire de violation des brevets liés aux API Java ayant opposé Google à Oracle, Android va de nouveau faire face à une autre poursuite en justice qui pourrait bouleverser l'écosystème mobile.Le succès de la plateforme mobile de Google, qui détient désormais près de 70 % de part de marché du mobile, charme...

    Read the article

  • Can I use CAT 6a connectors with 7a cable (and get 6a performance)?

    - by Mr. Flibble
    I'm re-wiring a building and want to get the best cable possible laid - it required re-plastering to make a change to the cables and the cables will be there for the next 10 - 20 years. Currently there appears to be cat 7a cable available but not too much in the way of cat 7a connectors. Also - I won't be using 40Gig hardware in the near future. So, my question: is it possible to use cat 6a connectors / patch panels with cat 7a cable and get the same performance as I would had I used cat 6a cable? Are there any gotchas in trying to do this?

    Read the article

  • wp_get_archives(cat=id) <-- Any way to specifiy cat id in archives?

    - by Matrym
    Does anyone know how to specify an INCLUDE ONLY category using wp_get_archives? I would like to specify a category but then list results by month. I've tried kwebble's plugin to no avail. I've also found the following on WP forums, but it appears to only exclude categories. Perhaps it can be modified to do include? Even given that, I'm not sure how I would call it... Thanks in advance! add_filter( 'getarchives_where', 'customarchives_where' ); add_filter( 'getarchives_join', 'customarchives_join' ); function customarchives_join( $x ) { global $wpdb; return $x . " INNER JOIN $wpdb->term_relationships ON ($wpdb->posts.ID = $wpdb->term_relationships.object_id) INNER JOIN $wpdb->term_taxonomy ON ($wpdb->term_relationships.term_taxonomy_id = $wpdb->term_taxonomy.term_taxonomy_id)"; } function customarchives_where( $x ) { global $wpdb; $exclude = '1'; // category id to exclude return $x . " AND $wpdb->term_taxonomy.taxonomy = 'category' AND $wpdb->term_taxonomy.term_id NOT IN ($exclude)";

    Read the article

  • Cat with new line

    - by murugaperumal
    My input file content is welcome welcome1 welcome2 My script is for groupline in `cat file` do echo $groupline; done I got the following output. welcome welcome1 welcome2 Why it is not print the empty line. I want the reason.

    Read the article

  • Are these 2 sql queries equivalent in all respects (e.g. estimated and actual execution plan)?

    - by Xerion
    Are query 1) == 2) in terms of estimated query plan AND actual plan? (can statistics affect the actual plan here, ever?) declare @cat int -- input param from prc ... 1) select * from A as a join B as b on b.id = a.id on b.cat = @cat join C as c on c.fid = b.fid on c.cat = @cat where a.cat = @cat 2) select * from A as a join B as b on b.id = a.id on b.cat = a.cat join C as c on c.fid = b.fid on c.cat = b.cat where a.cat = @cat It seems to me that these should logically be equivalent and the execution plan should always be the same regardless of actual difference in tables. And adding more conditions either in join, or where, or add more tables to join shouldn't change this. Are there cases this is not true?

    Read the article

  • Le Web serait-il en danger face à la montée en puissance du mobile ? Pour l'écrivain et chercheur Danny Crichton, le « Web est en train de mourir »

    Le web serait-il en danger face à la montée en puissance du mobile ? Les applications natives plus plébiscitées sur mobileLe web serait-il en danger face à la montée en puissance du mobile ? Oui, pour le chercheur et écrivain Danny Crichton, pour qui le web se meurt lentement et surement à l'aube de son 25e anniversaire.Tout d'abord, il est important de définir le web, qui représente « une collection de protocoles (HTP) et de langages (HTML) qui permet à l'utilisateur de produire et de consommer...

    Read the article

  • Quelle firme représente le plus grand danger pour Google : Facebook ou Microsoft ? Eric Schmidt penche pour le second choix

    Quelle firme représente le plus grand danger pour Google : Facebook ou Microsoft ? Eric Schmidt penche pour le second choix Depuis quelques mois, les citations et rapports avançant que Facebook est le plus grand rival de Google ne cessent de se succéder. Mais est-ce vraiment le cas ? Pas au goût d'Eric Schmidt en tous cas, le CEO sortant de la firme de Mountain View. Selon lui, l'entreprise faisant le plus de concurrence à Google est Microsoft. Il précise que Redmond possède plus de cash, d'ingénieurs et de clients, ce qui pousse Google à "sentir la concurrence de Microsoft chaque jour". Alors que, parallèlement à cela, Facebook a clairement expliqué qu'il ne s'attaquerait pas ...

    Read the article

  • Référencement : un quart des marques utiliseraient des techniques prohibées qui les mettent en danger, souvent sans le savoir

    Optimisation du référencement : un quart des marques utiliseraient des techniques prohibées Souvent sans le savoir, et qui les mettent en danger d'après BrightEdge Le spécialiste de l'optimisation pour les moteurs de recherche « BrightEdge » vient de lancer un outil d'audit gratuit de la qualité des liens entrants pour les marques. L'outil de mesure vise à mettre en garde les dirigeants contre les risques inhérents à l'optimisation du référencement au travers de rétro-liens, de fermes de liens et d'autres techniques illégales ou en tout cas peu appréciées de Google. Deux semaines après le lancement de l'outil, BrightEdge vient de publier les résultats d'une étude qui s'appuie sur...

    Read the article

  • BlackBerry 10 en danger ? Nokia voudrait bloquer les terminaux de RIM pour violation de ses brevets WLAN

    BlackBerry 10 en danger ? Nokia voudrait bloquer les terminaux de RIM pour violation de ses brevets WLAN Mauvaise nouvelle pour RIM. Le constructeur canadien pourrait voir la commercialisation de ses terminaux bloquée dans plusieurs pays. Pour cause, une affaire de violation de brevets opposant la firme à Nokia, concernant l'utilisation du standard de réseau local sans fil WLAN (Wi-Fi) sur les téléphones portables. Nokia a adressé une note au tribunal de Californie pour demander l'exécution d'une sentence arbitrale qui empêcherait RIM de vendre des smartphones équipés de la norme WLAN, sur le territoire américain, jusqu'à ce que les deux firmes puissent trouver un accord.

    Read the article

  • WordPress jQuery Toggle based on category

    - by Cameron
    I have the following Nav: <li id="categories"> <ul> <li class="cat-item cat-item-8 current-cat"><a href="#">Link</a> <ul> <li class="cat-item"><a href="#">Link</a></li> <li class="cat-item"><a href="#">Link</a></li> <li class="cat-item"><a href="#">Link</a></li> <li class="cat-item"><a href="#">Link</a></li> </ul> </li> <li class="cat-item cat-item-10"><a href="#">Link</a> <ul> <li class="cat-item"><a href="#">Link</a></li> <li class="cat-item"><a href="#">Link</a></li> <li class="cat-item"><a href="#">Link</a></li> <li class="cat-item"><a href="#">Link</a> <ul> <li class="cat-item"><a href="#">Link</a></li> <li class="cat-item"><a href="#">Link</a></li> <li class="cat-item"><a href="#">Link</a></li> <li class="cat-item"><a href="#">Link</a></li> </ul> </li> </ul> </li> </ul> </li> and the following JS: jQuery("#categories li.cat-item").each(function(){ var item = jQuery("<span>").addClass('plus'), that = jQuery(this); if ( that.has("ul").length ) { item.click(function(e){ var self = jQuery(this); self.text( self.text() === "+" ? "-" : "+" ) .parent().next().toggle(); e.preventDefault(); }).text('+'); that.find(".children").hide(); } that.children("a").prepend( item ); }); This builds a nice toggle menu for my categories. However what I want it to do is based on what category I am currently viewing show the corresponding menu to be opened when the user lands on the page. Thanks.

    Read the article

  • How do I find the user that has both a cat and a dog?

    - by brad
    I want to do a search across 2 tables that have a many-to-one relationship, eg class User << ActiveRecord::Base has_many :pets end class Pet << ActiveRecord::Base belongs_to :users end Now let's say I have some data like so users id name 1 Bob 2 Joe 3 Brian pets id user_id animal 1 1 cat 2 1 dog 3 2 cat 4 3 dog What I want to do is create an active record query that will return a user that has both a cat and a dog (i.e. user 1 - Bob). My attempt at this so far is User.joins(:pets).where('pets.animal = ? AND pets.animal = ?','dog','cat') Now I understand why this doesn't work - it's looking for a pet that is both a dog and a cat so returns nothing. I don't know how to modify this to give me the answer I want however. Does anyone have any suggestions? This seems like it should be easy - it doesn't seem like an especially unusual situation.

    Read the article

  • Question about malware-sites: How can I be in danger?

    - by juanmaflyer
    Hi people!! My english is horrible but i will do the best to be as accurate as posible. I have been reading here (in superuser) some questions about the necessity of antivirus software in Windows and some doubts arise. As far as i know (and imagine) virus software can only be harmful if I download any type of infected executable file and then I RUN IT. I mean that if i have the infected executable in my desktop but i leave it there for years without clicking it, I won't be in danger... My question is: How can i be in danger browsing the so called "malware pages or sites"??. If i am just browsing an "infected site" how could I be affected by a virus. In any moment the browser is asking me for the permission to download "something", so how could it be?? Although i don't give permission to the browser to download 'something' is data being downloaded to my computer?? Its some kind of cookie? I will ask in another way... What is the level of riskiness if i get inffected in a malware site compared with the level of an executable virus?? Thanks a lot!

    Read the article

  • How to remove ˆM chars?

    - by LucaB
    I have a file generated from windows that I have to paste into a script under linux. My script works fine, except for the fact that at the end of every line I got a ^M char. How can I remove it with bash? Currently my script is: #/bin/bash IFS=$'\n' for CUSTOMER in `cat exp.csv` do echo $CUSTOMER done

    Read the article

  • Loading the 'pktgen' module on Ubuntu Server

    - by StackedCrooked
    I would like to enable and use the pktgen module on Ubuntu Server. I have enabed the module by adding a line containing 'pktgen' to the /etc/modules file. After rebooting it seems that the module is successfully loaded because the directory /proc/net/pktgen exists. However when trying to run the first sample I get these errors: root@ubuntu:~# bash ./pktgen.conf-1-1 Removing all devices Adding eth4 Setting max_before_softirq 10000 Configuring /proc/net/pktgen/eth4 ./pktgen.conf-1-1: line 9: /proc/net/pktgen/eth4: No such file or directory cat: /proc/net/pktgen/eth4: No such file or directory cat: /proc/net/pktgen/eth4: No such file or directory ./pktgen.conf-1-1: line 9: /proc/net/pktgen/eth4: No such file or directory cat: /proc/net/pktgen/eth4: No such file or directory cat: /proc/net/pktgen/eth4: No such file or directory ./pktgen.conf-1-1: line 9: /proc/net/pktgen/eth4: No such file or directory cat: /proc/net/pktgen/eth4: No such file or directory cat: /proc/net/pktgen/eth4: No such file or directory ./pktgen.conf-1-1: line 9: /proc/net/pktgen/eth4: No such file or directory cat: /proc/net/pktgen/eth4: No such file or directory cat: /proc/net/pktgen/eth4: No such file or directory ./pktgen.conf-1-1: line 9: /proc/net/pktgen/eth4: No such file or directory cat: /proc/net/pktgen/eth4: No such file or directory cat: /proc/net/pktgen/eth4: No such file or directory ./pktgen.conf-1-1: line 9: /proc/net/pktgen/eth4: No such file or directory cat: /proc/net/pktgen/eth4: No such file or directory cat: /proc/net/pktgen/eth4: No such file or directory Running... ctrl^C to stop Done It turns out the script simply unable to write a file to the /proc/net/pktgen directory. When I try this manually it fails as well: root@ubuntu:~# cd /proc/net/pktgen/ root@ubuntu:/proc/net/pktgen# touch eth4 touch: cannot touch `eth4': No such file or directory Can anyone help me make it work? I'm using Ubuntu version: 2.6.32-21-server. Fixed I apologize for keeping this post not up to date. I was able to fix it. If I remember well the cause of the error was that eth4 did not exist, or did not have the 'online' status. Anyway, it is fixed now.

    Read the article

  • Shell wrong encoding

    - by csch
    Somehow I managed to screw up my shell-encoding. An example: root§server:ç£ cat --help Usage: cat ¡OPTION¿... ¡FILE¿... Concatenate FILE(s), or standard input, to standard output. -A, --show-all equivalent to -vET -b, --number-nonblank number nonempty output lines -e equivalent to -vE -E, --show-ends display $ at end of each line -n, --number number all output lines -s, --squeeze-blank suppress repeated empty output lines -t equivalent to -vT -T, --show-tabs display TAB characters as ^I -u (ignored) -v, --show-nonprinting use ^ and M- notation, except for LFD and TAB --help display this help and exit --version output version information and exit With no FILE, or when FILE is -, read standard input. Examples: cat f - g Output f's contents, then standard input, then g's contents. cat Copy standard input to standard output. Report cat bugs to bug-coreutils§gnu.org GNU coreutils home page: <http://www.gnu.org/software/coreutils/> General help using GNU software: <http://www.gnu.org/gethelp/> For complete documentation, run: info coreutils 'cat invocation' root§server:ç£ It should look like: root@server:~# cat --help Usage: cat [OPTION]... [FILE]... Concatenate FILE(s), or standard input, to standard output. -A, --show-all equivalent to -vET -b, --number-nonblank number nonempty output lines -e equivalent to -vE -E, --show-ends display $ at end of each line -n, --number number all output lines -s, --squeeze-blank suppress repeated empty output lines -t equivalent to -vT -T, --show-tabs display TAB characters as ^I -u (ignored) -v, --show-nonprinting use ^ and M- notation, except for LFD and TAB --help display this help and exit --version output version information and exit With no FILE, or when FILE is -, read standard input. Examples: cat f - g Output f's contents, then standard input, then g's contents. cat Copy standard input to standard output. Report cat bugs to [email protected] GNU coreutils home page: <http://www.gnu.org/software/coreutils/> General help using GNU software: <http://www.gnu.org/gethelp/> For complete documentation, run: info coreutils 'cat invocation' root@server:~# I have no clue what went wrong, do you have any ideas?

    Read the article

  • Any danger in using the Wine workaround in 12.04?

    - by TrailRider
    To run certain Windows programs in WINE you need to this workaround: echo 0|sudo tee /proc/sys/kernel/yama/ptrace_scope According to the support websites, this is due to a bug in the Ubuntu kernel that prevents ptrace and WINE playing well together. Using the above command you set the ptrace to 0 which according the research I've done(don't ask me which websites, I have seem a lot of them), ptrace has to do with the interactions between programs. The 0 setting is more permissive than the 1. I have to assume that there was a good reason Ubuntu wanted the ptrace=1 so this leads me back to the short form of the question. Are there any risks involved in setting ptrace=0. Lower security? problems debugging? any others that I haven't thought of??? P.S. for anybody reading this that wonders what the bug causes, the Windows programs will fail to open at all, in the System Monitor you will see many instances of the program trying to open and then they will eventually all quit and if you run the progam for the terminal you will get an error that tells you that the maximum number of program instances has been reached.

    Read the article

  • Installing Visual Studio 2010 SP1 or Windows Phone tools in your VM (danger!)

    - by Jeff
    If you've read my blog for any amount of time, you probably know that I tend to develop stuff in a Parallels VM on a Mac. It's how I roll. I like VM's because I can trash them and do really stupid things with beta software. That said, there is a pain point that doesn't seem that well documented when it comes to installing stuff in this scenario.The WP7 tools, and SP1 for Visual Studio 2010 (perhaps only if you already have the WP7 tools installed, I'm not sure), do something strange on install. As if it weren't already a long and slow installation, for reasons I don't understand, the installer fires up an instance of Windows Phone Emulator. As you may already know, the emulator doesn't run in a VM, because it is itself a VM, apparently. What it will do is fire up your CPU, make your comprooder hot and make the fans blow harder.I found this out accidentally, as I started the (slow) phone tool installation once, and walked away. An hour and a half later, I came back to find it hadn't finished. But it was hot and the CPU was pegged, so I fired up the task manager to find XDE.exe, the phone emulator, cranking away. I had to kill it several times, and eventually the install finished. It fired up just once in the SP1 install, but it still had the same hanging effect.I can't for the life of me figure out why it does this. In a VM, I can connect the phone to it and use that, so I don't need the emulator. But this install, firing up the emulator, will make it choke until you kill the XDE.exe process. Watch out!

    Read the article

  • concatenation of all combination from different Lists in c#

    - by shan
    i have a List and i m grouping it into different lists. like:-List("a","b","c","it","as","am","cat","can","bat") 3 list List1:-a,b,c List2:-it,as,am List3:-cat,can,bat how can i concat the all possible combination from this lists. output like: a,it,cat b,it,cat c,it,cat a,am,cat b,am,cat c,am,cat . . . . etc so on...

    Read the article

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