Search Results

Search found 1157 results on 47 pages for 'recursive descent'.

Page 20/47 | < Previous Page | 16 17 18 19 20 21 22 23 24 25 26 27  | Next Page >

  • How to install Awesome WM without root access?

    - by ssice
    I want to install the Awesome window manager. In the environment where I want to configure it I don't have root access. I do have a machine were I can be root (I use for this a virtual machine in my laptop). I have tried the following: $ sudo apt-get install awesome The following packages are about to be installed: awesome libev3 libid3tag0 libimlib2 liblua5.1-0 libxcb-icccm1 libxcb-image0 libxcb-keysyms1 libxcb-property1 libxcb-randr0 libxcb-xinerama0 libxcb-xtest0 libxdg-basedir1 menu rlwrap Do you want to continue [Y/n]? n I do now have the list of dependencies for awesome, so I downloaded them all. For that, I did the following. $ pkgs="awesome libev3 libid3tag0 libimlib2 liblua5.1-0 libxcb-icccm1 libxcb-image0 libxcb-keysyms1 libxcb-property1 libxcb-randr0 libxcb-xinerama0 libxcb-xtest0 libxdg-basedir1 menu rlwrap" # this is just for not writing it all ;) $ sudo apt-get install --download-only $pkgs .... $ mkdir -p /tmp/x_debs $ for pkg in $pkgs; do cp /var/cache/apt/archives/$pkg* /tmp/x_debs/; done [ copies all *.deb from my dependencies to /tmp/x_debs ] Now, I want to install the dependencies. For that, I setup a fake dpkg install in my home folder: $ mkdir $HOME/root $ mkdir -p $HOME/root/var/lib/dpkg/{triggers,updates} $ touch $HOME/root/var/lib/dpkg/{available,status} Now I tried to install with dpkg, but I could not: $ dpkg --force-not-root --root=$HOME/root --recursive -i /tmp/x_debs It failed while trying to set permissions for the packages and running chroot. As I do have root access in this machine, I ran it with privileges: $ sudo dpkg --root=$HOME/root --recursive -i /tmp/x_debs Then I had a lot of stuff (i.e., everything: dependencies and the own WM) installed inside $HOME/root. Particularly, xcb-* libraries were installed in $HOME/root/usr/lib and the awesome binary in $HOME/root/usr/bin/awesome. If I try to execute awesome as is I get as an error that libraries could not be loaded. That's normal, as they are not in /usr/lib nor in /lib. So I ran export LD_LIBRARY_PATH=$HOME/root/usr/lib:$HOME/root/lib:${LD_LIBRARY_PATH} and awesome would try to load. However, I could not make gdm to run awesome within gnome or replacing it. I did it this way so I can copy everything in my $HOME/root folder, paste it in the other machine and have it running. Is there any other way (to have less wasted space maybe..) to do this? How can I tell gdm to exec awesome without root access?

    Read the article

  • i need ur help [closed]

    - by aisha khan
    Write a program that prompts the user to enter the size of the array, allocate memory using malloc(), ask the user to enter elements of the array and displays if the puzzle is solvable. As part of this program, write a recursive function int Solvable(int start, int squares[]) that takes a starting position of the marker along with the array of squares. The function should return 1 if it is possible to solve the puzzle from the starting configuration and 0 if it is impossible

    Read the article

  • 2D Grid Map Connectivity Check (avoiding stack overflow)

    - by SombreErmine
    I am trying to create a routine in C++ that will run before a more expensive A* algorithm that checks to see if two nodes on a 2D grid map are connected or not. What I need to know is a good way to accomplish this sequentially rather than recursively to avoid overflowing the stack. What I've Done Already I've implemented this with ease using a recursive algorithm; however, depending upon different situations it will generate a stack overflow. Upon researching this, I've come to the conclusion that it is overflowing the stack because of too many recursive function calls. I am sure that my recursion does not enter an infinite loop. I generate connected sets at the beginning of the level, and then I use those connected sets to determine connectivity on the fly later. Basically, the generating algorithm starts from left-to-right top-to-bottom. It skips wall nodes and marks them as visited. Whenever it reaches a walkable node, it recursively checks in all four cardinal directions for connected walkable nodes. Every node that gets checked is marked as visited so they aren't handled twice. After checking a node, it is added to either a walls set, a doors set, or one of multiple walkable nodes sets. Once it fills that area, it continues the original ltr ttb loop skipping already-visited nodes. I've also looked into flood-fill algorithms, but I can't make sense of the sequential algorithms and how to adapt them. Can anyone suggest a better way to accomplish this without causing a stack overflow? The only way I can think of is to do the left-to-right top-to-bottom loop generating connected sets on a row basis. Then check the previous row to see if any of the connected sets are connected and then join the sets that are. I haven't decided on the best data structures to use for that though. I also just thought about having the connected sets pre-generated outside the game, but I wouldn't know where to start with creating a tool for that. Any help is appreciated. Thanks!

    Read the article

  • Need a bounding box for CCSprite that includes all children/subchildren

    - by prototypical
    I have a CCSprite that has CCSprite children, and those CCSprite children have CCSprite children. The contentSize property doesn't seem to include all children/subchildren, and seems to only work for the base node. I could write a recursive method to traverse a CCSprite for all children/subchildren and calculate a proper boundingbox, but am curious as to if I am missing something and it's possible to get that information without doing so. I'l be a little surprised if such a method doesn't exist, but I can't seem to find it.

    Read the article

  • new block adding error

    - by ata ur rehman
    g++: error: ./gr_my_swig.cc: No such file or directory g++: fatal error: no input files compilation terminated. make[3]: *** [_gr_my_swig_la-gr_my_swig.lo] Error 1 make[3]: Leaving directory `/home/ataurrehman/gr-my-basic/swig' make[2]: *** [all] Error 2 make[2]: Leaving directory `/home/ataurrehman/gr-my-basic/swig' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/home/ataurrehman/gr-my-basic' make: *** [all] Error 2

    Read the article

  • New Samples on MSDN Code Gallery

    - by mattande
    (This post was contributed by John Burrows, Lead Program Manager for the MDS Team) A couple of new samples have been posted to the MSDN Code Gallery; two sample models that illustrate recursive and explicit cap hierarchies and a Visual Studio solution that contains an example of calling the Model Deployment API via code. Sample Models Employees The Employee sample model contains the employees of a fictitious Winery “Coho Winery” that has a legal structure in the form of three subsidiaries and an...(read more)

    Read the article

  • What Precalculus knowledge is required before learning Discrete Math Computer Science topics?

    - by Ein Doofus
    Below I've listed the chapters from a Precalculus book as well as the author recommended Computer Science chapters from a Discrete Mathematics book. Although these chapters are from two specific books on these subjects I believe the topics are generally the same between any Precalc or Discrete Math book. What Precalculus topics should one know before starting these Discrete Math Computer Science topics?: Discrete Mathematics CS Chapters 1.1 Propositional Logic 1.2 Propositional Equivalences 1.3 Predicates and Quantifiers 1.4 Nested Quantifiers 1.5 Rules of Inference 1.6 Introduction to Proofs 1.7 Proof Methods and Strategy 2.1 Sets 2.2 Set Operations 2.3 Functions 2.4 Sequences and Summations 3.1 Algorithms 3.2 The Growths of Functions 3.3 Complexity of Algorithms 3.4 The Integers and Division 3.5 Primes and Greatest Common Divisors 3.6 Integers and Algorithms 3.8 Matrices 4.1 Mathematical Induction 4.2 Strong Induction and Well-Ordering 4.3 Recursive Definitions and Structural Induction 4.4 Recursive Algorithms 4.5 Program Correctness 5.1 The Basics of Counting 5.2 The Pigeonhole Principle 5.3 Permutations and Combinations 5.6 Generating Permutations and Combinations 6.1 An Introduction to Discrete Probability 6.4 Expected Value and Variance 7.1 Recurrence Relations 7.3 Divide-and-Conquer Algorithms and Recurrence Relations 7.5 Inclusion-Exclusion 8.1 Relations and Their Properties 8.2 n-ary Relations and Their Applications 8.3 Representing Relations 8.5 Equivalence Relations 9.1 Graphs and Graph Models 9.2 Graph Terminology and Special Types of Graphs 9.3 Representing Graphs and Graph Isomorphism 9.4 Connectivity 9.5 Euler and Hamilton Ptahs 10.1 Introduction to Trees 10.2 Application of Trees 10.3 Tree Traversal 11.1 Boolean Functions 11.2 Representing Boolean Functions 11.3 Logic Gates 11.4 Minimization of Circuits 12.1 Language and Grammars 12.2 Finite-State Machines with Output 12.3 Finite-State Machines with No Output 12.4 Language Recognition 12.5 Turing Machines Precalculus Chapters R.1 The Real-Number System R.2 Integer Exponents, Scientific Notation, and Order of Operations R.3 Addition, Subtraction, and Multiplication of Polynomials R.4 Factoring R.5 Rational Expressions R.6 Radical Notation and Rational Exponents R.7 The Basics of Equation Solving 1.1 Functions, Graphs, Graphers 1.2 Linear Functions, Slope, and Applications 1.3 Modeling: Data Analysis, Curve Fitting, and Linear Regression 1.4 More on Functions 1.5 Symmetry and Transformations 1.6 Variation and Applications 1.7 Distance, Midpoints, and Circles 2.1 Zeros of Linear Functions and Models 2.2 The Complex Numbers 2.3 Zeros of Quadratic Functions and Models 2.4 Analyzing Graphs of Quadratic Functions 2.5 Modeling: Data Analysis, Curve Fitting, and Quadratic Regression 2.6 Zeros and More Equation Solving 2.7 Solving Inequalities 3.1 Polynomial Functions and Modeling 3.2 Polynomial Division; The Remainder and Factor Theorems 3.3 Theorems about Zeros of Polynomial Functions 3.4 Rational Functions 3.5 Polynomial and Rational Inequalities 4.1 Composite and Inverse Functions 4.2 Exponential Functions and Graphs 4.3 Logarithmic Functions and Graphs 4.4 Properties of Logarithmic Functions 4.5 Solving Exponential and Logarithmic Equations 4.6 Applications and Models: Growth and Decay 5.1 Systems of Equations in Two Variables 5.2 System of Equations in Three Variables 5.3 Matrices and Systems of Equations 5.4 Matrix Operations 5.5 Inverses of Matrices 5.6 System of Inequalities and Linear Programming 5.7 Partial Fractions 6.1 The Parabola 6.2 The Circle and Ellipse 6.3 The Hyperbola 6.4 Nonlinear Systems of Equations

    Read the article

  • How can you tell whether to use Composite Pattern or a Tree Structure, or a third implementation?

    - by Aske B.
    I have two client types, an "Observer"-type and a "Subject"-type. They're both associated with a hierarchy of groups. The Observer will receive (calendar) data from the groups it is associated with throughout the different hierarchies. This data is calculated by combining data from 'parent' groups of the group trying to collect data (each group can have only one parent). The Subject will be able to create the data (that the Observers will receive) in the groups they're associated with. When data is created in a group, all 'children' of the group will have the data as well, and they will be able to make their own version of a specific area of the data, but still linked to the original data created (in my specific implementation, the original data will contain time-period(s) and headline, while the subgroups specify the rest of the data for the receivers directly linked to their respective groups). However, when the Subject creates data, it has to check if all affected Observers have any data that conflicts with this, which means a huge recursive function, as far as I can understand. So I think this can be summed up to the fact that I need to be able to have a hierarchy that you can go up and down in, and some places be able to treat them as a whole (recursion, basically). Also, I'm not just aiming at a solution that works. I'm hoping to find a solution that is relatively easy to understand (architecture-wise at least) and also flexible enough to be able to easily receive additional functionality in the future. Is there a design pattern, or a good practice to go by, to solve this problem or similar hierarchy problems? EDIT: Here's the design I have: The "Phoenix"-class is named that way because I didn't think of an appropriate name yet. But besides this I need to be able to hide specific activities for specific observers, even though they are attached to them through the groups. A little Off-topic: Personally, I feel that I should be able to chop this problem down to smaller problems, but it escapes me how. I think it's because it involves multiple recursive functionalities that aren't associated with each other and different client types that needs to get information in different ways. I can't really wrap my head around it. If anyone can guide me in a direction of how to become better at encapsulating hierarchy problems, I'd be very glad to receive that as well.

    Read the article

  • PHP - A Widely-Used Scripting Language

    Typified as interpreted script language, PHP - a recursive acronym for Hypertext Preprocessor - is a widely used general purpose scripting or programming language. Hypertext Preprocessor is suited for web development in particular as it can be embedded into HTML.

    Read the article

  • Slackware Linux: Glib can't find libffi.so.6. Where is it trying to look?

    - by Mathmagician
    I have libffi installed and it's in /usr/local/lib, yet the glib make process can't find it /home/mathmagi/src/glib-2.32.4/gio/.libs/lt-glib-compile-resources: error while loading shared libraries: libffi.so.6: cannot open shared object file: No such file or directory /home/mathmagi/src/glib-2.32.4/gio/.libs/lt-glib-compile-resources: error while loading shared libraries: libffi.so.6: cannot open shared object file: No such file or directory /home/mathmagi/src/glib-2.32.4/gio/.libs/lt-glib-compile-resources: error while loading shared libraries: libffi.so.6: cannot open shared object file: No such file or directory /home/mathmagi/src/glib-2.32.4/gio/.libs/lt-glib-compile-resources: error while loading shared libraries: libffi.so.6: cannot open shared object file: No such file or directory make[4]: Entering directory `/home/mathmagi/src/glib-2.32.4/gio/tests' GEN gdbus-test-codegen-generated.c GEN test_resources.c /home/mathmagi/src/glib-2.32.4/gio/.libs/lt-glib-compile-resources: error while loading shared libraries: libffi.so.6: cannot open shared object file: No such file or directory make[4]: *** [test_resources.c] Error 127 make[4]: Leaving directory `/home/mathmagi/src/glib-2.32.4/gio/tests' make[3]: *** [all-recursive] Error 1 make[3]: Leaving directory `/home/mathmagi/src/glib-2.32.4/gio' make[2]: *** [all] Error 2 make[2]: Leaving directory `/home/mathmagi/src/glib-2.32.4/gio' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/home/mathmagi/src/glib-2.32.4' make: *** [all] Error 2 It's definitely in /usr/local/lib! bash-4.1# updatedb bash-4.1# locate libffi.so.6 /usr/local/lib/libffi.so.6 /usr/local/lib/libffi.so.6.0.0 /home/mathmagi/src/libffi-3.0.11/x86_64-unknown-linux-gnu/.libs/libffi.so.6 /home/mathmagi/src/libffi-3.0.11/x86_64-unknown-linux-gnu/.libs/libffi.so.6.0.0 With glib I've tried LDFLAGS=-L/usr/local/lib ./configure Doesn't work. How do I find where glib is looking and change it?

    Read the article

  • Get user profile size in vbscript

    - by Cameron
    Hello, I am trying to get the size of a user's local profile using VBScript. I know the directory of the profile (typically "C:\Users\blah"). The following code does not work for most profiles (Permission Denied error 800A0046): Dim folder Dim fso Set fso = WScript.CreateObject("Scripting.FileSystemObject") Set folder = fso.GetFolder("C:\Users\blah") MsgBox folder.Size ' Error occurs here Is there another way to do this? UPDATE: I did some deeper digging and it turns out that the Permission Denied error occurs if permission is denied to some subfolders or files of the directory whose size I wish to get. In the case of user profiles, there's always a few system files that even the Administrator group does not have permission to access. To get around this, I wrote a function that tries to get the folder size the normal way (above), then, if the error occurs, it recurses into the subdirectories of the folder, ignoring folder sizes that are permission denied (but not the rest of the folders). Dim fso Set fso = WScript.CreateObject("Scripting.FileSystemObject") Function getFolderSize(folderName) On Error Resume Next Dim folder Dim subfolder Dim size Dim hasSubfolders size = 0 hasSubfolders = False Set folder = fso.GetFolder(folderName) ' Try the non-recursive way first (potentially faster?) Err.Clear size = folder.Size If Err.Number <> 0 then ' Did not work; do recursive way: For Each subfolder in folder.SubFolders size = size + getFolderSize(subfolder.Path) hasSubfolders = True Next If not hasSubfolders then size = folder.Size End If End If getFolderSize = size Set folder = Nothing ' Just in case End Function

    Read the article

  • MemCache-repcached compile error

    - by Ramy Allam
    I'm trying to install [memcached-1.2.8-repcached-2.2.1]( http://sourceforge.net/projects/repcached/files/latest/download?source=files) And I have the following error after running the make command: make all-recursive make[1]: Entering directory `/usr/local/src/pro/memcached-1.2.8-repcached-2.2.1' Making all in doc make[2]: Entering directory `/usr/local/src/pro/memcached-1.2.8-repcached-2.2.1/doc' make[2]: Nothing to be done for `all'. make[2]: Leaving directory `/usr/local/src/pro/memcached-1.2.8-repcached-2.2.1/doc' make[2]: Entering directory `/usr/local/src/pro/memcached-1.2.8-repcached-2.2.1' gcc -DHAVE_CONFIG_H -I. -DNDEBUG -g -O2 -MT memcached-memcached.o -MD -MP -MF .d eps/memcached-memcached.Tpo -c -o memcached-memcached.o test -f 'memcached.c' || echo './'memcached.c memcached.c: In function ‘add_iov’: memcached.c:697: error: ‘IOV_MAX’ undeclared (first use in this function) memcached.c:697: error: (Each undeclared identifier is reported only once memcached.c:697: error: for each function it appears in.) make[2]: * [memcached-memcached.o] Error 1 make[2]: Leaving directory `/usr/local/src/pro/memcached-1.2.8-repcached-2.2.1' make[1]: * [all-recursive] Error 1 make[1]: Leaving directory `/usr/local/src/pro/memcached-1.2.8-repcached-2.2.1' make: * [all] Error 2 OS : Centos5.7 64bit gcc-4.1.2-51.el5 gcc-c++-4.1.2-51.el5 libgcc-4.1.2-51.el5 Note : Memcached and memcache extension for php are already installed root@server[~]# memcached -h memcached 1.4.5 php ext http://pecl.php.net/get/memcache-2.2.6.tgz

    Read the article

  • Compiling Mono on Fedora 7

    - by Gary
    Trying to install Mono from source on Fedora 7.. running # ./configure --prefix=/opt/mono works fine, but doing the make # make ; make install ends up with the following: Makefile:93: warning: overriding commands for target `csproj-local' ../build/executable.make:131: warning: ignoring old commands for target `csproj-local' make install-local make[6]: Entering directory `/opt/mono-2.6.4/mcs/mcs' Makefile:93: warning: overriding commands for target `csproj-local' ../build/executable.make:131: warning: ignoring old commands for target `csproj-local' MCS [basic] mcs.exe typemanager.cs(2047,40): error CS0103: The name `CultureInfo' does not exist in the context of `Mono.CSharp.TypeManager' Compilation failed: 1 error(s), 0 warnings make[6]: *** [../class/lib/basic/mcs.exe] Error 1 make[6]: Leaving directory `/opt/mono-2.6.4/mcs/mcs' make[5]: *** [do-install] Error 2 make[5]: Leaving directory `/opt/mono-2.6.4/mcs/mcs' make[4]: *** [install-recursive] Error 1 make[4]: Leaving directory `/opt/mono-2.6.4/mcs' make[3]: *** [profile-do--basic--install] Error 2 make[3]: Leaving directory `/opt/mono-2.6.4/mcs' make[2]: *** [profiles-do--install] Error 2 make[2]: Leaving directory `/opt/mono-2.6.4/mcs' make[1]: *** [install-exec] Error 2 make[1]: Leaving directory `/opt/mono-2.6.4/runtime' make: *** [install-recursive] Error 1 I've been following the instructions at http://ruakuu.blogspot.com/2008/06/installing-and-configuring-opensim-on.html. This is all in an effort to get OpenSimulator running.

    Read the article

  • glib2 64-bit compile fails on Solaris 10

    - by Aaron
    I'm encountering a problem building glib-2.26.1 on a Solaris 10 box - 64-bit. Goo diligence doesn't turn anything up, but no matter what I do the build fails in the same way. I've tried using the Sun Studio compiler, gcc (SFW) to no avail. When I compile I get the following error: [root@foo glib-2.26.1]$ export CC=/opt/solstudio12.2/bin/cc [root@foo glib-2.26.1]$ export CFLAGS="-m64" ...configure goes normally... [root@foo glib-2.26.1]$ make ...snip... source='gatomic.c' object='gatomic.lo' libtool=yes \ DEPDIR=.deps depmode=none /bin/bash ../depcomp \ /bin/bash ../libtool --tag=CC --mode=compile /opt/solstudio12.2/bin/cc -DHAVE_CONFIG_H -I. -I.. -I.. -I../glib -I../glib -I.. -DG_LOG_DOMAIN=\"GLib\" -DG_DISABLE_CAST_CHECKS -DG_DISABLE_DEPRECATED -DGLIB_COMPILATION -DPCRE_STATIC -DG_DISABLE_SINGLE_INCLUDES -D_REENTRANT -D_PTHREADS -m64 -c -o gatomic.lo gatomic.c libtool: compile: /opt/solstudio12.2/bin/cc -DHAVE_CONFIG_H -I. -I.. -I.. -I../glib -I../glib -I.. -DG_LOG_DOMAIN=\"GLib\" -DG_DISABLE_CAST_CHECKS -DG_DISABLE_DEPRECATED -DGLIB_COMPILATION -DPCRE_STATIC -DG_DISABLE_SINGLE_INCLUDES -D_REENTRANT -D_PTHREADS -m64 -c gatomic.c -KPIC -DPIC -o .libs/gatomic.o "gatomic.c", line 885: warning: no explicit type given "gatomic.c", line 885: syntax error before or at: * "gatomic.c", line 885: warning: old-style declaration or incorrect type for: g_atomic_mutex "gatomic.c", line 906: warning: implicit function declaration: g_mutex_lock "gatomic.c", line 909: warning: implicit function declaration: g_mutex_unlock "gatomic.c", line 1155: warning: implicit function declaration: g_mutex_new "gatomic.c", line 1155: warning: improper pointer/integer combination: op "=" cc: acomp failed for gatomic.c make[4]: *** [gatomic.lo] Error 1 make[4]: Leaving directory `/root/glib-2.26.1/glib' make[3]: *** [all-recursive] Error 1 make[3]: Leaving directory `/root/glib-2.26.1/glib' make[2]: *** [all] Error 2 make[2]: Leaving directory `/root/glib-2.26.1/glib' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/root/glib-2.26.1' make: *** [all] Error 2 Does anyone know where the build might be going wrong? Not sure where else to look here. Thanks.

    Read the article

  • Help setting up a secondary authoritative DNS server.

    - by GLB03
    We have three Authoritative DNS servers and three recursive/caching DNS servers on my campus. Authoritative servers DNS1- Windows 2003 DNS2- Old Red Hat ----- Replacing w/ newer version DNS3- Windows 2008 (I installed) Caching and Recursive resolvers servers Server1- Windows 2003 Server2- CentOS 5.2 (I installed) Server3- CentOS 5.3 (I installed) I am replacing DNS2 with a newer Red Hat version, but have no documentation on how it was implemented. I have setup caching and windows authoritative servers, but not a linux secondary authoritative server. I have a perl script from the original server that pulls data from our DNS1 server. We use DJBDNS and TinyDNS on our linux servers. Our Network Engineer says the DNS2 server I am replacing is an authoritative server that doesn't need to be caching, but the only instructions I see is for an Authoritative server that does caching as well. Can someone point me in the right directions. I thought I was on the right track with using these instructions but when I query my new dns server I get "No response from server", I have temporarily disabled iptables to eliminate it from being an issue. ps -aux | grep dns avahi 3493 0.0 0.2 2600 1272 ? Ss Apr24 0:05 avahi-daemon: running [newdns2.local] root 5254 0.0 0.1 3920 680 pts/0 R+ 09:56 0:00 grep dns root 6451 0.0 0.0 1528 308 ? S Apr29 0:00 supervise tinydns dnslog 6454 0.0 0.0 1540 308 ? S Apr29 0:00 multilog t ./main tinydns 9269 0.0 0.0 1652 308 ? S Apr29 0:00 /usr/local/bin/tinydns

    Read the article

  • Help setting up an secondary authoritative DNS server.

    - by GLB03
    We have three Authoritative DNS servers and three recursive/caching DNS servers on my campus. Authoritative servers DNS1- Windows 2003 DNS2- Old Red Hat ----- Replacing w/ newer version DNS3- Windows 2008 (I installed) Caching and Recursive resolvers servers Server1- Windows 2003 Server2- CentOS 5.2 (I installed) Server3- CentOS 5.3 (I installed) I am replacing DNS2 with a newer Red Hat version, but have no documentation on how it was implemented. I have setup caching and windows authoritative servers, but not a linux secondary authoritative server. I have a perl script from the original server that pulls data from our DNS1 server. We use DJBDNS and TinyDNS on our linux servers. Our Network Engineer says the DNS2 server I am replacing is an authoritative server that doesn't need to be caching, but the only instructions I see is for an Authoritative server that does caching as well. Can someone point me in the right directions. I thought I was on the right track with using these instructions but when I query my new dns server I get "No response from server", I have temporarily disabled iptables to eliminate it from being an issue. ps -aux | grep dns avahi 3493 0.0 0.2 2600 1272 ? Ss Apr24 0:05 avahi-daemon: running [newdns2.local] root 5254 0.0 0.1 3920 680 pts/0 R+ 09:56 0:00 grep dns root 6451 0.0 0.0 1528 308 ? S Apr29 0:00 supervise tinydns dnslog 6454 0.0 0.0 1540 308 ? S Apr29 0:00 multilog t ./main tinydns 9269 0.0 0.0 1652 308 ? S Apr29 0:00 /usr/local/bin/tinydns

    Read the article

  • wget recursively download from pages with lots of links

    - by Shadow
    When using wget with the recursive option turned on I am getting an error message when it is trying to download a file. It thinks the link is a downloadable file when in reality it should just be following it to get to the page that actually contains the files(or more links to follow) that I want. wget -r -l 16 --accept=jpg website.com The error message is: .... since it should be rejected. This usually occurs when the website link it is trying to fetch ends with a sql statement. The problem however doesn't occur when using the very same wget command on that link. I want to know how exactly it is trying to fetch the pages. I guess I could always take a poke around the source although I don't know how messy the project is. I might also be missing exactly what "recursive" means in the context of wget. I thought it would run through and travel in each link getting the files with the extension I have requested. I posted this up over at stackOverFlow but they turned me over here:) Hoping you guys can help.

    Read the article

  • Is there a faster way to change default apps associated with file types on OS X?

    - by Lri
    Is there anything more convenient than using RCDefaultApp or Magic Launch, or just repeatedly pressing the Change All buttons in Finder's information panels? I thought about writing a shell script that would modify the CFBundleDocumentTypes arrays in Info.plist files. But each app has multiple keys (sometimes an icon) that would need to be changed. lsregister can't be used to make specific modifications to the Launch Services database. $ `locate lsregister` -h lsregister: [OPTIONS] [ <path>... ] [ -apps <domain>[,domain]... ] [ -libs <domain>[,domain]... ] [ -all <domain>[,domain]... ] Paths are searched for applications to register with the Launch Service database. Valid domains are "system", "local", "network" and "user". Domains can also be specified using only the first letter. -kill Reset the Launch Services database before doing anything else -seed If database isn't seeded, scan default locations for applications and libraries to register -lint Print information about plist errors while registering bundles -convert Register apps found in older LS database files -lazy n Sleep for n seconds before registering/scanning -r Recursive directory scan, do not recurse into packages or invisible directories -R Recursive directory scan, descending into packages and invisible directories -f force-update registration even if mod date is unchanged -u unregister instead of register -v Display progress information -dump Display full database contents after registration -h Display this help

    Read the article

  • python: what are efficient techniques to deal with deeply nested data in a flexible manner?

    - by AlexandreS
    My question is not about a specific code snippet but more general, so please bear with me: How should I organize the data I'm analyzing, and which tools should I use to manage it? I'm using python and numpy to analyse data. Because the python documentation indicates that dictionaries are very optimized in python, and also due to the fact that the data itself is very structured, I stored it in a deeply nested dictionary. Here is a skeleton of the dictionary: the position in the hierarchy defines the nature of the element, and each new line defines the contents of a key in the precedent level: [AS091209M02] [AS091209M01] [AS090901M06] ... [100113] [100211] [100128] [100121] [R16] [R17] [R03] [R15] [R05] [R04] [R07] ... [1263399103] ... [ImageSize] [FilePath] [Trials] [Depth] [Frames] [Responses] ... [N01] [N04] ... [Sequential] [Randomized] [Ch1] [Ch2] Edit: To explain a bit better my data set: [individual] ex: [AS091209M02] [imaging session (date string)] ex: [100113] [Region imaged] ex: [R16] [timestamp of file] ex [1263399103] [properties of file] ex: [Responses] [regions of interest in image ] ex [N01] [format of data] ex [Sequential] [channel of acquisition: this key indexes an array of values] ex [Ch1] The type of operations I perform is for instance to compute properties of the arrays (listed under Ch1, Ch2), pick up arrays to make a new collection, for instance analyze responses of N01 from region 16 (R16) of a given individual at different time points, etc. This structure works well for me and is very fast, as promised. I can analyze the full data set pretty quickly (and the dictionary is far too small to fill up my computer's ram : half a gig). My problem comes from the cumbersome manner in which I need to program the operations of the dictionary. I often have stretches of code that go like this: for mk in dic.keys(): for rgk in dic[mk].keys(): for nk in dic[mk][rgk].keys(): for ik in dic[mk][rgk][nk].keys(): for ek in dic[mk][rgk][nk][ik].keys(): #do something which is ugly, cumbersome, non reusable, and brittle (need to recode it for any variant of the dictionary). I tried using recursive functions, but apart from the simplest applications, I ran into some very nasty bugs and bizarre behaviors that caused a big waste of time (it does not help that I don't manage to debug with pdb in ipython when I'm dealing with deeply nested recursive functions). In the end the only recursive function I use regularly is the following: def dicExplorer(dic, depth = -1, stp = 0): '''prints the hierarchy of a dictionary. if depth not specified, will explore all the dictionary ''' if depth - stp == 0: return try : list_keys = dic.keys() except AttributeError: return stp += 1 for key in list_keys: else: print '+%s> [\'%s\']' %(stp * '---', key) dicExplorer(dic[key], depth, stp) I know I'm doing this wrong, because my code is long, noodly and non-reusable. I need to either use better techniques to flexibly manipulate the dictionaries, or to put the data in some database format (sqlite?). My problem is that since I'm (badly) self-taught in regards to programming, I lack practical experience and background knowledge to appreciate the options available. I'm ready to learn new tools (SQL, object oriented programming), whatever it takes to get the job done, but I am reluctant to invest my time and efforts into something that will be a dead end for my needs. So what are your suggestions to tackle this issue, and be able to code my tools in a more brief, flexible and re-usable manner?

    Read the article

  • Cakephp - Banner Problem

    - by Joe Elliott
    Hi guys I have a banner rotator on my main page and it was working but it has stopped. All I have done before it stopped was modified some of the db fields. I added to fields position and company and deleted the field 'description.' It was a friend of a friend that made this part of the site for me while i was on holiday so i dont know which files i should show you cos dont know exactly what hes done but im guessing the following ones are the ones you need. banner_view <div id="banner"> <?php if(!empty($banners) && ($banners['Banner']['position']=='Top')){ foreach($banners as $banner){ ?> <a href="<?php echo $banner['Banner']['url']; ?>"><img src="<?php echo $banner['Banner']['path']; ?>" alt="<?php echo $banner['Banner']['company']; ?>" /></a> <?php } } ?> </div> banner_controller <?php class BannersController extends AppController { var $name = 'Banners'; var $helpers = array('Html', 'Form', 'Ajax','Javascript'); var $layout = 'ajax'; var $components = array('Session', 'Cookie'); function beforeFilter() { parent::beforeFilter(); $this->Auth->allow('index','featrot'); if(strpos($this->here, 'admin')) { $this->layout = 'admin'; } } function index() { Configure::write('debug',0); $this->Banner->recursive = 0; $this->paginate['Banner']; $banners = $this->paginate(); if($banners) { $this->set('banners', $banners); } } function featrot() { Configure::write('debug',0); $this->Banner->recursive = 0; $this->paginate['Banner']; $banners = $this->paginate(); if($banners) { $this->set('banners', $banners); } } function admin_edit(){ $this->pageTitle='Admin section - .: Banners Edit:.'; $banners = $this->Banner->find('first'); $id = $banners['Banner']['id']; if (!empty($this->data)) { $this->Banner->id = $id; if ($this->Banner->save($this->data)) { $this->Session->setFlash(__('The Banner has been updated', true)); } else { $this->Session->setFlash(__('The Banner could not update. Please, try again.', true)); } } if (empty($this->data)) { $this->data = $this->Banner->read(null, $id); } } function admin_display_banners($id=null){ $this->pageTitle='Admin section - .: Banners Setting :.'; if (!empty($this->data)) { $this->Banner->id = $id; if ($this->Banner->save($this->data)) { $this->Session->setFlash(__("Banner#$id has been updated", true)); $this->Banner->id = null; } else { $this->Session->setFlash(__("Banner#$id could not update. Please, try again.", true)); } } $this->data = null; $this->Banner->recursive = -1; $this->paginate['Banner']; $banners = $this->paginate('Banner'); $this->set('banners', $banners); } } ?> banner_model <?php class Banner extends AppModel { var $name = 'Banner'; } ?> Hope this is all the details you need. Thanks in advance folks :) Joe :)

    Read the article

  • using ajax to post comments in cakephp results in 404 error, but no errors locally?

    - by Paul
    Using an ajax helper created for use with Jquery I've created a form that posts comments to "/comments/add", and this works as expected on my local wamp server but not on my production server. On my production server I get a '404 error, cannot find /comments/add'. I've spent quite a bit of time searching for a resolution with no luck so far. I've focused on trying to identify a gap but nothing jumps out at me. Here are some observations: works as expected on local wamp server requestHandler is listed as component files on both local and production server are the same controllers folder has write access autoLayout and autoRender are both set to false Here is the form in my view: <div class="comments form"> <?php echo $ajax->form('/comments/add', 'tournament', array('url' => '/comments/add', 'update' => 'Comments', 'indicator' => 'commentSaved'));?> <fieldset> <legend><?php __('Add Comment');?></legend> <div id="commentSaved" style="display: none; float: right;"> <h2>Loading...</h2> </div> <?php echo $form->hidden('Comment.foreign_id', array('value' => $tournament['Tournament']['id'])); echo $form->hidden('Comment.belongs_to', array('value' => 'Tournament')); echo $form->input('Comment.name'); echo $form->input('Comment.email'); echo $form->input('Comment.web', array('value' => 'http://')); echo $form->input('Comment.content'); ?> </fieldset> <?php echo $form->end('Submit');?> </div> And here is my 'comment's controller add action: function add() { if($this->RequestHandler->isAjax()) { $this->autoLayout = false; $this->autoRender=false; $this->Comment->recursive =-1; $commentInfos = $this->Comment->findAllByIp($_SERVER['REMOTE_ADDR']); $spam = FALSE; foreach($commentInfos as $commentInfo) { if ( time() - strtotime($commentInfo['Comment']['created']) < 180) { $spam = TRUE; } } if ($spam === FALSE) { if (!empty($this->data)) { $this->data['Comment']['ip'] = $_SERVER['REMOTE_ADDR']; $this->Comment->create(); if ($this->Comment->save($this->data)) { $this->Comment->recursive =-1; $comments = $this->Comment->findAll(array('Comment.foreign_id' => $this->data['Comment']['foreign_id'], 'Comment.belongs_to' => $this->data['Comment']['belongs_to'], 'Comment.status' =>'approved')); $this->set(compact('comments')); $this->viewPath = 'elements'.DS.'posts'; $this->render('comments'); } } } else { $this->Comment->recursive =-1; $comments = $this->Comment->findAll(array('Comment.foreign_id' => $this->data['Comment']['foreign_id'], 'Comment.belongs_to' => $this->data['Comment']['belongs_to'], 'Comment.status' =>'approved')); $this->set(compact('comments')); $this->viewPath = 'elements'.DS.'posts'; $this->render('spam'); } } else { $this->Session->setFlash(__('Invalid Action. Please view a post to add a comment.', true)); $this->redirect(array('controller' => 'pages', 'action'=>'display', 'home')); } } As you can see I've made sure that 'autoLayout' and 'autoRender' are set to false, but in Firebug I still get a 404 error stating /comments/add cannot be found on the production server. I should also point out that I'm using jquery, jquery.form and jquery.editable as well as a ajax helper created to be used with jquery. Any help or even suggestions about how to trouble shoot this is really appreciated. Cheers, Paul

    Read the article

  • Control truetype font tracking in fontforge

    - by ??O?????
    Hello. I'm designing a font intended to be used mainly as a subtitle font. It's a sans-serif font not unlike Helvetica. The em size is 2000 (I know it "should" be 2048 for a truetype font), the ascent/descent are 1600/400. Most glyphs don't go higher than 1450 though, with the exception of accented Latin characters. There lies the issue: when my font includes accented Latin characters, the tracking (line -of-text intradistance, but correct me if I got the term "tracking" wrong) skyrockets. I can't seem to find a way to control that. As my intended design goes, I don't mind if I have a descender (e.g. "g") above and an accented capital Latin letter below and they almost touch. It's something that does not happen very often, anyway. How can I control tracking? It seems it's auto-calculated.

    Read the article

  • Challenge 19 – An Explanation of a Query

    - by Dave Ballantyne
    I have received a number of requests for an explanation of my winning query of TSQL Challenge 19. This involved traversing a hierarchy of employees and rolling a count of orders from subordinates up to superiors. The first concept I shall address is the hierarchyId , which is constructed within the CTE called cteTree.   cteTree is a recursive cte that will expand the parent-child hierarchy of the personnel in the table @emp.  One useful feature with a recursive cte is that data can be ‘passed’ from the parent to the child data.  The hierarchyId column is similar to the hierarchyId data type that was introduced in SQL Server 2008 and represents the position of the person within the organisation. Let us start with a simplistic example Albert manages Bob and Eddie.  Bob manages Carl and Dave. The hierarchyId will represent each person’s position in this relationship in a single field.  In this simple example we could append the userID together into a varchar field as detailed below. This will enable us to select a branch of the tree by filtering using Where hierarchyId  ‘1,2%’ to select Bob and all his subordinates.  Naturally, this is not comprehensive enough to provide a full solution, but as opposed to concatenating the Id’s together into a varchar datatyped column, we can apply the same theory to a varbinary.  By CASTing the ID’s into a datatype of varbinary(4) ,4 is used as 4 bytes of data are used to store an integer and building a hierarchyId  from those.  For example: The important point to bear in mind for later in the query is that the binary data generated is 'byte order comparable'. ie We can ORDER a dataset with it and the resulting data, will be in the order required. Now, would probably be a good time to download the example file and, after the cte ‘cteTree’, uncomment the line ‘select * from cteTree’.  Mark this and all prior code and execute.  This will show you how this theory directly relates to the actual challenge data.  The only deviation from the above, is that instead of using the ID of an employee, I have used the row_number() ranking function to order each level by LastName,Firstname.  This enables me to order by the HierarchyId in the final result set so that the result set is in the required order. Your output should be something like the below.  Notice also the ‘Level’ Column that contains the depth that the employee is within the tree.  I would encourage you to ‘play’ with the query, change the order in the row_number() or the length of the cast in the hierarchyId to see how that effects the outcome.  The next cte, ‘cteTreeWithOrderCount’, is a join between cteTree and the @ord table, and COUNT’s the number of orders per employee.  A LEFT JOIN is employed here to account for the occasion where an employee has made no sales.   Executing a ‘Select * from cteTreeWithOrderCount’ will return the result set as below.  The order here is unimportant as this is only a staging point of the data and only the final result set in a cte chain needs an Order by clause, unless TOP is utilised. cteExplode joins the above result set to the tally table (Nums) for Level Occurances.  So, if level is 2 then 2 rows are required.  This is done to expand the dataset, to create a new column (PathInc), which is the (n+1) integers contained within the heirarchyid.  For example, with the data for Robert King as given above, the below 3 rows will be returned. From this you can see that the pathinc column now contains the values for Andrew Fuller and Steven Buchanan who are Robert King’s superiors within the tree.    Finally cteSumUp, sums the orders for each person and their subordinates using the PathInc generated above, and the final select does the final simple mathematics and filters to restrict the result set to only the ‘original’ row per employee.

    Read the article

  • Oracle Australia Supports MS Sydney to Gong Ride by Chris Sainsbury

    - by user769227
    What is the Sydney to Gong Ride? The Gong Ride is a one of a kind fundraising event. You can pedal 90 km from Sydney to Wollongong on any day of the year but it's only on the first Sunday of November that you'll experience the camaraderie, fellowship, unity, safey, scenery and sense of achievement for pedalling in support of people living with MS. Well done to the 22 members of the Oracle Sydney to Gong ride on Sunday 6 November. For many, this was the first time riding over distance – officially a 90km event, by GPS about 84km. The event started in Sydney Park, Newtown. We left in a few separate groups between 6.30 and 7.30am – and finished with times between 2 hours 45 mins and 6 hours. With 10,000 riders there was a lot of congestion at the start but that soon thinned out as we left Sydney. It was a great spring day for the event but at 34 degrees it was getting pretty warm once we left the shade of the Royal National Park and carried on over the Sea Cliff bridge and down the coast road towards Wollongong. Unfortunately Dan managed to get himself a facial scrub when someone clipped his front wheel on the descent from Bald Hill lookout. No major incidents thankfully and Dan soldiered on. Most importantly everyone had a good time (even Dan) and we raised $5,800 for Multiple Sclerosis Australia. In total more than $3.7m was raised for this good cause.

    Read the article

  • Felix Baumgartner Skydives from the Edge of Space [Video]

    - by Jason Fitzpatrick
    Yesterday Felix Baumgartner broke the record for highest skydive by leaping out of a capsule 128,100 feet above the Earth. Check out his jump in the following videos. After flying to an altitude of 39,045 meters (128,100 feet) in a helium-filled balloon, Felix Baumgartner completed a record breaking jump for the ages from the edge of space, exactly 65 years after Chuck Yeager first broke the sound barrier flying in an experimental rocket-powered airplane. Felix reached a maximum of speed of 1,342.8 km/h (833mph) through the near vacuum of the stratosphere before being slowed by the atmosphere later during his 4:20 minute long freefall. The 43-year-old Austrian skydiving expert also broke two other world records (highest freefall, highest manned balloon flight), leaving the one for the longest freefall to project mentor Col. Joe Kittinger. The above video is a 2 minute highlight reel of the ascent and jump; check out the full 15 minute descent video here. For an in-depth look at the technology used to keep Baumgartner safe during his record setting journey, hit up the link below. The Tech Behind Felix Baumgartner’s Stratospheric Skydive [ExtremeTech] HTG Explains: What is the Windows Page File and Should You Disable It? How To Get a Better Wireless Signal and Reduce Wireless Network Interference How To Troubleshoot Internet Connection Problems

    Read the article

< Previous Page | 16 17 18 19 20 21 22 23 24 25 26 27  | Next Page >