Search Results

Search found 2348 results on 94 pages for 'cat pants'.

Page 7/94 | < Previous Page | 3 4 5 6 7 8 9 10 11 12 13 14  | Next Page >

  • wordpress categories and their subcategories

    - by Ayrton
    Hi I'm looking to obtain all the (parent) categories with their children accordingly (assuming you don't have grandchildren) and make the following structure <div class="box"> <h3><a href="#">Parent Category I</a></h3> <ul> <li><a href="#">sub cat 1</a></li> <li><a href="#">sub cat 2</a></li> <li><a href="#">sub cat 3</a></li> </ul> </div> <div class="box"> <h3><a href="#">Parent Category II</a></h3> <ul> <li><a href="#">sub cat 1</a></li> <li><a href="#">sub cat 2<</a></li> <li><a href="#">sub cat 3</a></li> </ul> </div> I figured it's something like (don't mind the syntax) however I don't know how to obtain those (parent)categories and their children: $parents = ... ; foreach($parents as $parent){ <div> <h3>$parent</h3> $children = ...; <ul> foreach ($children as $child){ <li>$child</li> } </ul> </div> }

    Read the article

  • PHP, MySQL: mysql substitute for php in_array function

    - by Devner
    Hi all, Say if I have an array and I want to check if an element is a part of that array, I can go ahead and use in_array( needle, haystack ) to determine the results. I am trying to see the PHP equivalent of this for my purpose. Now you might have an instant answer for me and you might be tempted to say "Use IN". Yes, I can use IN, but that's not fetching the desired results. Let me explain with an example: I have a column called "pets" in DB table. For a record, it has a value: Cat, dog, Camel (Yes, the column data is a comma separated value). Consider that this row has an id of 1. Now I have a form where I can enter the value in the form input and use that value check against the value in the DB. So say I enter the following comma separated value in the form input: CAT, camel (yes, CAT is uppercase & intentional as some users tend to enter it that way). Now when I enter the above info in the form input and submit, I can collect the POST'ed info and use the following query: $search = $_POST['pets']; $sql = "SELECT id FROM table WHERE pets IN ('$search') "; The above query is not fetching me the row that already exists in the DB (remember the record which has Cat, dog, Camel as the value for the pets column?). I am trying to get the records to act as a superset and the values from the form input as subsets. So in this case I am expecting the id value to show up as the values exist in the column, but this is not happending. Now say if I enter just CAT as the form input and perform the search, it should show me the ID 1 row. Now say if I enter just camel, cAT as the form input and perform the search, it should show me the ID 1 row. How can I achieve the above? Thank you.

    Read the article

  • json parsing problems

    - by C.
    Hi I have the following Json : "{\"doc\":{\"info\":{\"allowDistribution\":\"true\",\"allowSearch\":\"true\",\"calaisRequestID\":\"67a02f61-7e45-cfc4-1276-e123c5f7422f\",\"externalID\":\"\",\"id\":\"http://id.opencalais.com/dBo1YRiQeqS-kfO-m9UeWA\",\"docId\":\"http://d.opencalais.com/dochash-1/8edabb36-eece-3f67-b187-ab64cd885ecb\",\"document\":\"What type of music do you listen to? How much would you pay for a cd? Do you still buy cds? Do you like Shakira? What genre of music do you listen to?\",\"docTitle\":\"\",\"docDate\":\"2010-03-17 17:40:41.323\",\"externalMetadata\":\"\",\"submitter\":\"\"},\"meta\":{\"contentType\":\"text/raw\",\"emVer\":\"7.1.1103.5\",\"langIdVer\":\"DefaultLangId\",\"processingVer\":\"CalaisJob01\",\"submitionDate\":\"2010-03-17 17:40:41.183\",\"submitterCode\":\"b54c734e-b865-185b-c83a-66e1c66272de\",\"signature\":\"digestalg-1|FXnvwLovOsqVoSPX0JfGvj3tp7s=|cyV2tZWY9OXG1RBO0SuND4kd3Pkvqv0cS2YpsEBQhXDfSV4KoE61sQ==\",\"language\":\"English\",\"messages\":[]}},\"http://d.opencalais.com/dochash-1/8edabb36-eece-3f67-b187-ab64cd885ecb/cat/1\":{\"_typeGroup\":\"topics\",\"category\":\"http://d.opencalais.com/cat/Calais/EntertainmentCulture\",\"classifierName\":\"Calais\",\"categoryName\":\"Entertainment_Culture\",\"score\":1},\"http://d.opencalais.com/dochash-1/8edabb36-eece-3f67-b187-ab64cd885ecb/cat/2\":{\"_typeGroup\":\"topics\",\"category\":\"http://d.opencalais.com/cat/Calais/HumanInterest\",\"classifierName\":\"Calais\",\"categoryName\":\"Human Interest\",\"score\":1},\"http://d.opencalais.com/dochash-1/8edabb36-eece-3f67-b187-ab64cd885ecb/cat/3\":{\"_typeGroup\":\"topics\",\"category\":\"http://d.opencalais.com/cat/Calais/TechnologyInternet\",\"classifierName\":\"Calais\",\"categoryName\":\"Technology_Internet\",\"score\":0.932}}" Can you please tell me why it won't parse this? This is my code: JObject o = JObject.Parse(json); String category = (string)o["doc"]["_typeGroup"]["categoryName"]; It tells me: Object reference not set to an instance of an object. Thanks :)

    Read the article

  • Populating an array into a TableView - Thanks in advance.

    - by tssav
    Hello Developers, View not being populated with the array. I would really appreciate if I could get some help. Thanks!! In a tableView I have the following: NSDictionary *cat = [category objectAtIndex:indexPath.row]; cell.textLabel.text = [cat valueForKey:@"reference"]; This populates the tableView with the content of the array from an XML file. There is another array “data” that prints out the content to the debug console and I want to populate another view with this content. But I am having lot of trouble populating the next view with the data array. NSLog(@"cellForRowAtIndexPath-- Reference:%@: Verse:%@", [cat valueForKey:@"reference"], [cat valueForKey:@"data"]); The didSelectRowAtIndexPath method looks like this: Verse *vvc = [[Verse alloc] initWithNibName:@"VerseView" bundle:nil]; vvc.verses = [[category objectAtIndex:indexPath.row] valueForKey:@"verse"]; [self.navigationController pushViewController:vvc animated:YES]; [vvc release]; [tableView deselectRowAtIndexPath:indexPath animated:YES]; In the cellForRowAtIndexPath of the next view I have the following: NSDictionary *cat = [verses objectAtIndex:indexPath.row]; cell.textLabel.text = [cat valueForKey:@"data"]; What I would like is to have the “data” in a textView. I don’t know what’s wrong. Any help would be appreciated!

    Read the article

  • Why does this work in Firefox but not IE and how can I fix it?

    - by bstullkid
    I want to show and hide rows of a table based on the value of a select box and this works in Firefox but not IE: <select onChange="javascript: toggle(this.value);"> <option value="cat0">category 0</option> <option value="cat1">category 1</option> </select> <table> <tr name="cat0"> <td>some stuff v</td> <td>some stuff v</td> </tr> <tr name="cat0"> <td>some stuff d</td> <td>some stuff d</td> </tr> <tr name="cat1"> <td>some stuff a</td> <td>some stuff a</td> </tr> <tr name="cat1"> <td>some stuff b</td> <td>some stuff b</td> </tr> </table> <script type="text/javascript"> function toggle(category) { // turn everything off for (var i = 0; i < 2; i++) { var cat = document.getElementsByName('cat' + i); for (var j = 0; j < cat.length; j++) cat[j].style.display = 'none'; } // turn on category chosen var cat = document.getElementsByName(category); for (var i = 0; i < cat.length; i++) cat[i].style.display = ''; } // start by showing cat0 toggle('cat0'); </script>

    Read the article

  • What's the most productive coding environment

    - by Ubiguchi
    I was speaking with an ex-colleague the other day about the most productive way to write code and he said he found it best "to CIMP, or Code In My Pants". When I asked him exactly what he meant, he explained he found it best to work at home, coding at his own pace, dressed comfortably (in his pants), and communicating with his team through emails, IM, or the telephone. Digesting his approach (which he describes to clients as the Complete Integrated Method of Programming), I realised my coding is also more productive when working in an isolated environment, which made me wonder if the software industry has got it all wrong and should development be really done by dispersed teams of individuals, or are there advantages to geographical herding that make up for the added interruptions it brings? So has business got it wrong? Should development occur predominantly across geographically isolated individuals to increase productivity, or are there real reasons why herding developers together makes sense?

    Read the article

  • Setting correct hostname

    - by Vlad
    Hi, when i type cat /etc/hostname the console show me my ip adress, when i type cat /etc/mailname it shows me my-ip-adress.internetserviceteam.com I have no idea if it's a problem or not, but i was lokking through a lot of postfix install tutorials, and there when typing cat /etc/hostname they were geting their site name. Why do i get just a ip-adress? Maybe i messed up something when i set up my dns and domains with the webmin tool (I did that for the first time in my life)? OS: debian

    Read the article

  • Print full path of files and sizes with find in Linux

    - by cat pants
    Here are the specs: Find all files in / modified after the modification time of /tmp/test, exclude /proc and /sys from the search, and print the full path of the file along with human readable size. Here is what I have so far: find / \( -path /proc -o -path /sys \) -prune -o -newer /tmp/test -exec ls -lh {} \; | less The issue is that the full path doesn't get printed. Unfortunately, ls doesn't support printing the full path! And all solutions I have found that show how to print the full path suggest using find. :| Any ideas? Thanks!

    Read the article

  • Rename url hiding file extension

    - by Anusri Roy Chowdhury
    I want to show url http://some.com/designit/portfolio.php?cat=website&subcat=nature as http://some.com/designit/portfolio/website/nature. cat may pe presentor may not.also subcat may present or not I have put .htaccess file in designit folder and code in it is as follows: RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ $1.php [L,QSA] RewriteRule ^portfolio/?$ portfolio.php[NC,QSA] RewriteRule ^portfolio/([a-zA-Z0-9_-]+)/?$ portfolio.php?cat=$1[L,NC,QSA] it is showing ..some.com/designit/portfolio.php as ..some.com/designit/portfolio but it is not showing ..some.com/designit/portfolio.php?cat=website as ..some.com/designit/portfolio/website.Showing error "Internal Server Error.The server encountered an internal error or misconfiguration and was unable to complete your request." please help me to complete this code.

    Read the article

  • Linux not buffering block I/O when the device is not "in use" (i.e. mounted)

    - by Radek Hladík
    I am installing new server and I've found an interesting issue. The server is running Fedora 19 (3.11.7-200.fc19.x86_64 kernel) and is supposed to host a few KVM/Qemu virtual servers (mail server, file server, etc..). The HW is Intel(R) Xeon(R) CPU 5160 @ 3.00GHz with 16GB RAM. One of the most important features will be Samba server and we have decided to make it as virtual machine with almost direct access to the disks. So the real HDD is cached on SSD (via bcache) then raided with md and the final device is exported into the virtual machine via virtio. The virtual machine is again Fedora 19 with the same kernel. One important topic to find out is whether the virtualization layer will not introduce high overload into disk I/Os. So far I've been able to get up to 180MB/s in VM and up to 220MB/s on real HW (on the SSD disk). I am still not sure why the overhead is so big but it is more than the network can handle so I do not care so much. The interesting thing is that I've found that the disk reads are not buffered in the VM unless I create and mount FS on the disk or I use the disks somehow. Simply put: Lets do dd to read disk for the first time (the /dev/vdd is an old Raptor disk 70MB/s is its real speed): [root@localhost ~]# dd if=/dev/vdd of=/dev/null bs=256k count=10000 ; cat /proc/meminfo | grep Buffers 2621440000 bytes (2.6 GB) copied, 36.8038 s, 71.2 MB/s Buffers: 14444 kB Rereading the data shows that they are cached somewhere but not in buffers of the VM. Also the speed increased to "only" 500MB/s. The VM has 4GB of RAM (more that the test file) [root@localhost ~]# dd if=/dev/vdd of=/dev/null bs=256k count=10000 ; cat /proc/meminfo | grep Buffers 2621440000 bytes (2.6 GB) copied, 5.16016 s, 508 MB/s Buffers: 14444 kB [root@localhost ~]# dd if=/dev/vdd of=/dev/null bs=256k count=10000 ; cat /proc/meminfo | grep Buffers 2621440000 bytes (2.6 GB) copied, 5.05727 s, 518 MB/s Buffers: 14444 kB Now lets mount the FS on /dev/vdd and try the dd again: [root@localhost ~]# mount /dev/vdd /mnt/tmp [root@localhost ~]# dd if=/dev/vdd of=/dev/null bs=256k count=10000 ; cat /proc/meminfo | grep Buffers 2621440000 bytes (2.6 GB) copied, 4.68578 s, 559 MB/s Buffers: 2574592 kB [root@localhost ~]# dd if=/dev/vdd of=/dev/null bs=256k count=10000 ; cat /proc/meminfo | grep Buffers 2621440000 bytes (2.6 GB) copied, 1.50504 s, 1.7 GB/s Buffers: 2574592 kB While the first read was the same, all 2.6GB got buffered and the next read was at 1.7GB/s. And when I unmount the device: [root@localhost ~]# umount /mnt/tmp [root@localhost ~]# cat /proc/meminfo | grep Buffers Buffers: 14452 kB [root@localhost ~]# dd if=/dev/vdd of=/dev/null bs=256k count=10000 ; cat /proc/meminfo | grep Buffers 2621440000 bytes (2.6 GB) copied, 5.10499 s, 514 MB/s Buffers: 14468 kB The bcache was disabled while testing and the results are same on faster (newer) HDDs and on SSD (except for the initial read speed of course). To sum it up. When I read from the device via dd first time, it gets read from the disk. Next time I reread it gets cached in the host but not in the guest (thats actually the same issue, more on that later). When I mount the filesystem but try to read the device directly it gets cached in VM (via buffers). As soon as I stop "using" it, buffers are discarded and the device is not cached anymore in the VM. When I looked into buffers value on the host I realized that the situation is the same. The block I/O gets buffered only when the disk is in use, in this case it means "exported to a VM". On host, after all the measurement done: 3165552 buffers On the host, after the VM shutdown: 119176 buffers I know it is not important as the disks will be mounted all the time but I am curious and I would like to know why it is working like this.

    Read the article

  • The meaning of thermal throttle counters and package power limit notifications in Linux

    - by Trustin Lee
    Whenever I do some performance testing on my Linux-installed MacBook Pro, I often see the following messages in dmesg: Aug 8 09:29:31 infinity kernel: [79791.789404] CPU1: Package power limit notification (total events = 40365) Aug 8 09:29:31 infinity kernel: [79791.789408] CPU3: Package power limit notification (total events = 40367) Aug 8 09:29:31 infinity kernel: [79791.789411] CPU2: Package power limit notification (total events = 40453) Aug 8 09:29:31 infinity kernel: [79791.789414] CPU0: Package power limit notification (total events = 40453) I also see the throttle counters in the sysfs increases over time: trustin@infinity:/sys/devices/system/cpu/cpu0/thermal_throttle $ ls core_power_limit_count package_power_limit_count core_throttle_count package_throttle_count $ cat core_power_limit_count 0 $ cat core_throttle_count 41912 $ cat package_power_limit_count 67945 $ cat package_throttle_count 67565 What do these counters mean? Do they affect the performance of CPU or system? Do they result in increased deviation of performance numbers? (i.e. Do they prevent me from getting reliable performance numbers?) If so, how do I avoid these messages and increasing counters? Would running the performance tests on a well-cooled desktop system help?

    Read the article

  • How to determine why a burned DVD won't boot?

    - by cat pants
    So I have an interesting problem where a burned DVD of "debian-7.2.0-ia64-CD-1.iso" won't boot. The DVD is a DVD+RW. I have tried erasing, burning, and booting from "debian-live-7.0.0-i386-gnome-desktop+nonfree.iso" and that works fine, but I would rather install debian 7.2 with the x86-64 architecture. After burning "debian-7.2.0-ia64-CD-1.sio", I can mount the CD as well and it appears that all the files show up correctly. I was just wondering if there is any sort of boot sector I can try inspecting on the ISO to see if perhaps it is incorrect. Thanks!

    Read the article

  • concatenate files including path in header - path contains spaces

    - by manolo
    I have to concatenate a number of files in a directory structure which contains spaces in the folder names looking like this: ./CH 0000100014/A10/11XT/11xt#001.csv find . -name "*.csv" -type f -print0 | xargs -0 cat > allmycsv.txt does the job, however now I need to include the information contained in the path, i.e. CH 0000100014/A10/11XT as a header of each inputfile to cat. find . -name "*.csv" -type f -print0 | xargs -0 -I % sh -c 'echo %; cat %' >allmycsv.txt would do the job, if I had no spaces in the path, but in my case, cat does not get along with the space in the path name. Is there a way out? Cheers, E P.S. I am working on bash on OSX

    Read the article

  • vim does not preserve symlink over sshfs

    - by HighCommander4
    I'm having some trouble with symlinks and sshfs. I use the '-o follow_symlinks' option to follow symlinks on the server side, but whenever I edit a symlinked file on the client side with vim, a copy of it is made on the server side, i.e. it's no longer a symlink. Set up a symlink on the server side: me@machine1:~$ echo foo > test.txt me@machine1:~$ mkdir test me@machine1:~$ cd test me@machine1:~/test$ ln -s ../test.txt test.txt me@machine1:~/test$ ls -al test.txt lrwxrwxrwx 1 me me 11 Jan 5 21:13 test.txt -> ../test.txt me@machine1:~/test$ cat test.txt foo me@machine1:~/test$ cat ../test.txt foo So far so good. Now: me@machine2:~$ mkdir test me@machine2:~$ sshfs me@machine1:test test -o follow_symlinks me@machine2:~$ cd test me@machine2:~/test$ vim test.txt [in vim, add a new line "bar" to the file] me@machine2:~/test$ cat test.txt foo bar Now observe what this does to the file on the server side: me@machine1:~/test$ ls -al test.txt -rw-r--r-- 1 me me 19 Jan 5 21:24 test.txt me@machine1:~/test$ cat test.txt foo bar me@machine1:~/test$ cat ../test.txt foo As you can see, it made a copy and only edited the copy. How can I get it to work so it actually follows the symlink when editing the file?

    Read the article

  • Creating ip alias on bonded interface ie. bond0:1

    - by bobothechimp
    System: HP Proliant DL360 G5 running CentOS 5.4 Bonded interface is working fine for a long time. I just went to add an alias the way I always have on a regular interface, and on first check it works (pinging on the local box) but it is not accessable from outside (iptables is turned off). In addition with this setup the normal network response started to decline, hanging for around a minute before I could get a prompt on login. Here are my config files: [root network-scripts]# cat ifcfg-eth0 DEVICE=eth0 BOOTPROTO=none ONBOOT=yes MASTER=bond0 SLAVE=yes USERCTL=no [root network-scripts]# cat ifcfg-eth1 DEVICE=eth1 BOOTPROTO=none ONBOOT=yes MASTER=bond0 SLAVE=yes USERCTL=no [root network-scripts]# cat ifcfg-bond0 DEVICE=bond0 BONDING_OPTS="mode=1 miimon=100" BOOTPROTO=none ONBOOT=yes NETWORK=10.2.1.0 NETMASK=255.255.255.0 IPADDR=10.2.1.11 USERCTL=no [root network-scripts]# cat ifcfg-bond0:1 DEVICE=bond0:1 BOOTPROTO=static ONBOOT=yes NETWORK=10.2.1.0 NETMASK=255.255.255.0 IPADDR=10.2.1.12 USERCTL=no any thoughts?

    Read the article

  • LXC Container Networking

    - by digitaladdictions
    I just started to experiment with LXC containers. I was able to create a container and start it up but I cannot get dhcp to assign the container an IP address. If I assign a static address the container can ping the host IP but not outside the host IP. The host is CentOS 6.5 and the guest is Ubuntu 14.04LTS. I used the template downloaded by lxc-create -t download -n cn-01 command. If I am trying to get an IP address on the same subnet as the host I don't believe I should need the IP tables rule for masquerading but I added it anyways. Same with IP forwarding. I compiled LXC by hand from the following source https://linuxcontainers.org/downloads/lxc-1.0.4.tar.gz Host Operating System Version #> cat /etc/redhat-release CentOS release 6.5 (Final) #> uname -a Linux localhost.localdomain 2.6.32-431.20.3.el6.x86_64 #1 SMP Thu Jun 19 21:14:45 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux Container Config #> cat /usr/local/var/lib/lxc/cn-01/config # Template used to create this container: /usr/local/share/lxc/templates/lxc-download # Parameters passed to the template: # For additional config options, please look at lxc.container.conf(5) # Distribution configuration lxc.include = /usr/local/share/lxc/config/ubuntu.common.conf lxc.arch = x86_64 # Container specific configuration lxc.rootfs = /usr/local/var/lib/lxc/cn-01/rootfs lxc.utsname = cn-01 # Network configuration lxc.network.type = veth lxc.network.flags = up lxc.network.link = br0 LXC default.confu 1500 qdisc pfifo_fast state UP qlen 1000 link/ether 00:0c:29:12:30:f2 brd ff:ff:ff:ff:f #> cat /usr/local/etc/lxc/default.conf lxc.network.type = veth lxc.network.link = br0 lxc.network.flags = up #> lxc-checkconfig Kernel configuration not found at /proc/config.gz; searching... Kernel configuration found at /boot/config-2.6.32-431.20.3.el6.x86_64 --- Namespaces --- Namespaces: enabled Utsname namespace: enabled Ipc namespace: enabled Pid namespace: enabled User namespace: enabled Network namespace: enabled Multiple /dev/pts instances: enabled --- Control groups --- Cgroup: enabled Cgroup namespace: enabled Cgroup device: enabled Cgroup sched: enabled Cgroup cpu account: enabled Cgroup memory controller: /usr/local/bin/lxc-checkconfig: line 103: [: too many arguments enabled Cgroup cpuset: enabled --- Misc --- Veth pair device: enabled Macvlan: enabled Vlan: enabled File capabilities: /usr/local/bin/lxc-checkconfig: line 118: [: -gt: unary operator expected Note : Before booting a new kernel, you can check its configuration usage : CONFIG=/path/to/config /usr/local/bin/lxc-checkconfig Network Config (HOST) #> cat /etc/sysconfig/network-scripts/ifcfg-br0 DEVICE=br0 TYPE=Bridge BOOTPROTO=dhcp ONBOOT=yes #> cat /etc/sysconfig/network-scripts/ifcfg-eth0 DEVICE=eth0 ONBOOT=yes TYPE=Ethernet IPV6INIT=no USERCTL=no BRIDGE=br0 #> cat /etc/networks default 0.0.0.0 loopback 127.0.0.0 link-local 169.254.0.0 #> ip a s 1: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436 qdisc noqueue state UNKNOWN link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 inet 127.0.0.1/8 scope host lo inet6 ::1/128 scope host valid_lft forever preferred_lft forever 2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000 link/ether 00:0c:29:12:30:f2 brd ff:ff:ff:ff:ff:ff inet6 fe80::20c:29ff:fe12:30f2/64 scope link valid_lft forever preferred_lft forever 3: pan0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN link/ether 42:7e:43:b3:61:c5 brd ff:ff:ff:ff:ff:ff 4: br0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UNKNOWN link/ether 00:0c:29:12:30:f2 brd ff:ff:ff:ff:ff:ff inet 10.60.70.121/24 brd 10.60.70.255 scope global br0 inet6 fe80::20c:29ff:fe12:30f2/64 scope link valid_lft forever preferred_lft forever 12: vethT6BGL2: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000 link/ether fe:a1:69:af:50:17 brd ff:ff:ff:ff:ff:ff inet6 fe80::fca1:69ff:feaf:5017/64 scope link valid_lft forever preferred_lft forever #> brctl show bridge name bridge id STP enabled interfaces br0 8000.000c291230f2 no eth0 vethT6BGL2 pan0 8000.000000000000 no #> cat /proc/sys/net/ipv4/ip_forward 1 # Generated by iptables-save v1.4.7 on Fri Jul 11 15:11:36 2014 *nat :PREROUTING ACCEPT [34:6287] :POSTROUTING ACCEPT [0:0] :OUTPUT ACCEPT [0:0] -A POSTROUTING -o eth0 -j MASQUERADE COMMIT # Completed on Fri Jul 11 15:11:36 2014 Network Config (Container) #> cat /etc/network/interfaces # This file describes the network interfaces available on your system # and how to activate them. For more information, see interfaces(5). # The loopback network interface auto lo iface lo inet loopback auto eth0 iface eth0 inet dhcp #> ip a s 11: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000 link/ether 02:69:fb:42:ee:d7 brd ff:ff:ff:ff:ff:ff inet6 fe80::69:fbff:fe42:eed7/64 scope link valid_lft forever preferred_lft forever 13: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436 qdisc noqueue state UNKNOWN link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 inet 127.0.0.1/8 scope host lo inet6 ::1/128 scope host valid_lft forever preferred_lft forever

    Read the article

  • Split a table in Word without losing row title

    - by Shane Hsu
    Word has the feature to repeat title row of a table when a table is so long that it spans a bunch of pages. I need to categorize my data into several pages, and I did that by splitting the table and insert page split to put them all in a page of itself. So now I got several page of data, but only the first page has title row. Is there anyway else to do this beside manually adding the title row to all the other pages? Original data: _________________ | Cat. Data | | 1 * | | 1 * | | 1 * | | 1 * | | 1 * | | 1 * | | 2 * | | 2 * | | 2 * | | 2 * | | 3 * | |___3______*______| And then turn it into: _________________ | Cat. Data | | 1 * | | 1 * | | 1 * | | 1 * | | 1 * | |___1______*______| Next page _________________ | Cat. Data | | 2 * | | 2 * | | 2 * | |___2______*______| Next Page _________________ | Cat. Data | | 3 * | |___3______*______|

    Read the article

  • Unique string values in range

    - by Dean Smith
    I have some spreadsheets where there are large number of cells that have essentially been used for free text. There is a finite set of values for this free text and most, if not all repeat. eg. A B C D 1 Monkey Gorilla Cat Dog 2 Dog Cat Gorilla Gorilla 3 Dog Dog Dog Cat There are probably 50 or so different cell values spread over multiple sheets and hundreds of rows and columns. I need to analyse this data and count occurancies, which is not a problem other than getting a list of unique values to start with and this has been driving me up the wall. What is the best way to produce this list. So from the above we would have Monkey Dog Cat Gorilla In order of preferred solutions, as this will need to be done monthly. Dynamic formula based VB Script Other ( Advanced filtering or other manual steps )

    Read the article

  • RAID setup for maximizing data retention and read speed

    - by cat pants
    My goals are simple: maximize data retention safety, and maximize read speeds. My first instinct is to do a a three drive software RAID 1. I have only used fakeraid RAID 1 in the past and it was terrible (would have led to data loss actually if it weren't for backups) Would you say software raid 1 or a cheap actual hardware raid card? OS will be linux. Could I start with a two drive raid 1 and add a third drive on the fly? Can I hot swap? Can I pull one of the drives and throw it into a new machine and be able to read all the data? I do not want a situation where I have a raid card fail and have to try and find the same chipset in order to read my data (which i am assuming can happen) Please clarify any points on which it sounds like I have no idea what I am talking about, as I am admittedly inexperienced here. (My hardest lesson was fakeraid lol) Thanks!

    Read the article

  • Triple head DVI KVM

    - by cat pants
    I am trying to run a Linux desktop and Windows desktop simultaneously with a KVM for maximum productivity. Also running three monitors. I need a KVM that can do 3x DVI @ 1920x1080 + 2x usb (mouse and keyboard) + toslink for two machines. What would you suggest? I ask on here because I have searched quite a bit and have yet to find a KVM with these requirements. (I would be open to something like modifying 3x regular KVMs to control them with one button or similar) Thanks! (I tried posting this question earlier, but it was closed as being "not related to computer hardware or software" ... is a KVM not related to computer hardware or software? I'm pretty sure it is. kvm-switch has been tagged 100 times on here for example.)

    Read the article

  • How can I see if apache is overloaded and dropping or not accepting connections?

    - by cat pants
    Basically I just want to see if apache is handling a current level of high traffic or if I need to tune it to handle more connections. (I have found plenty of information on the actual tuning, so no help needed there) I know it has been dropping or not accepting connections earlier today, but not seeing anything in the error logs. Is the expected behavior to throw a 503 in the error log if apache cannot accept more connections? If so, what error logging level do I need in order to see these? What is the correct terminology: dropping connections or not accepting connections? MPM is prefork, OS is Linux, apache version is 2.2.15.

    Read the article

  • Is it possible to ack nagios alerts from the terminal on a remote workstation?

    - by cat pants
    I have nagios alerts set up to come through jabber with an http link to ack. Is is possible there is a script I can run from a terminal on a remote workstation that takes the hostname as a parameter and acks the alert? ./ack hostname The benefit, while seemingly mundane, is threefold. First, take http load off nagios. Secondly, nagios http pages can take up to 10-20 seconds to load, so I want to save time there. Thirdly, avoiding slower use of mouse + web interface + firefox/other annoyingly slow browser. Ideally, I would like a script bound to a keyboard shortcut that simply acks the most recent alert. Finally, I want to take the inputs from a joystick, buttons and whatnot, and connect one to a big red button bound to the script so I can just ack the most recent nagios alert by hitting the button lol. (It would be rad too if the button had a screen on the enclosure that showed the text of the alert getting acked lol) Make fun of me all you want, but this is actually something that would be useful to me. If I can save five seconds per alert, and I get 200 alerts per day I need to ack, that's saving me 15 minutes a day. And isn't the whole point of the sysadmin to automate what can be automated? Thanks!

    Read the article

  • Output of free -m on a Linux server

    - by cat pants
    I can see from this page here: http://www.linuxatemyram.com/ That the correct amount of free ram is on the "-/+ buffers/cache" line. The extra ram being used is for disk caching. However, I noticed that the total amount of memory used listed in "-/+ buffers/cache" line is significantly less than the sum total of the "RES" column of the processes shown in top. And AFAIK, the "RES" column is how much physical memory is being used by a process. How do you explain this discrepancy?

    Read the article

  • Bash script throws, "syntax error near unexpected token `}'" when ran

    - by Tab00
    I am trying to write a script to monitor some battery statuses on a laptop running as a server. To accomplish this, I have already started to write this code: #! /bin/bash # A script to monitor battery statuses and send out email notifications #take care of looping the script for (( ; ; )) do #First, we check to see if the battery is present... if(cat /proc/acpi/battery/BAT0/state | grep 'present: *' == present: yes) { #Code to execute if battery IS present #No script needed for our application #you may add scripts to run } else { #if the battery IS NOT present, run this code sendemail -f [email protected] -t 214*******@txt.att.net -u NTA TV Alert -m "The battery from the computer is either missing, or removed. Please check ASAP." -s smtp.gmail.com -o tls=yes -xu [email protected] -xp *********** } #Second, we check into the current state of the battery if(cat /proc/acpi/battery/BAT0/state | grep 'charging state: *' == 'charging state: charging') { #Code to execute if battery is charging sendemail -f [email protected] -t 214*******@txt.att.net -u NTA TV Alert -m "The battery from the computer is charging. This MIGHT mean that something just happened" -s smtp.gmail.com -o tls=yes -xu [email protected] -xp *********** } #If it isn't charging, is it discharging? else if(cat /proc/acpi/battery/BAT0/state | grep 'charging state: *' == 'charging state: discharging') { #Code to run if the battery is discharging sendemail -f [email protected] -t 214*******@txt.att.net -u NTA TV Alert -m "The battery from the computer is discharging. This shouldn't be happening. Please check ASAP." -s smtp.gmail.com -o tls=yes -xu [email protected] -xp *********** } #If it isn't charging or discharging, is it charged? else if(cat /proc/acpi/battery/BAT0/state | grep 'charging state: *' == 'charging state: charged') { #Code to run if battery is charged } done I'm pretty sure that most of the other stuff works correctly, but I haven't been able to try it because it will not run. whenever I try and run the script, this is the error that I get: ./BatMon.sh: line 15: syntax error near unexpected token `}' ./BatMon.sh: ` }' is the error something super simple like a forgotten semicolon? Thanks -Tab00

    Read the article

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