Daily Archives

Articles indexed Sunday January 16 2011

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

  • .htaccess to nginx rewite

    - by Deepak
    please help me with changing this .htaccess to rginx rewite RewriteRule ^show.php/(.*)$ show2.php?img=$1 [L] RewriteRule ^out.php/([a-z]{1})(.*)$ out2.php?$1=$2&%{QUERY_STRING} [L] RewriteRule ^view.php/(.)$ view2.php?img=$1 [L] RewriteRule ^images.php/([a-z]{1})(.)$ images2.php?$1=$2&%{QUERY_STRING} [L] RewriteRule ^gallery/([0-9]+)-([^/])/(.)$ gallery.php?gal=$1&img=$3 [L] RewriteRule ^view/([0-9]+)-([^/])/(.)$ gallery_body.php?gal=$1&img=$3 [L]

    Read the article

  • Stripping a spike from rrdtool when removespike.pl doesn't find any

    - by raccettura
    I know when rrdtool graphs (using rrdtool 1.4) network traffic and the host is restarted a spike is a pretty normal thing to see. In the past I've just run that removespike.pl script that is hosted by the author and it strips the spike and I'm good to go. The last few times I've rebooted removespike.pl finds no spikes, but it's obvious that there are spikes. So my question is, how can I easily remove these spikes and get my graphs usable again? Right now it's so skewed it's meaningless.

    Read the article

  • How can I password-protect a Mac shared folder on a Windows workgroup?

    - by Phillip Oldham
    We have a Mac-mini running 10.5.8 which already acts as a fileserver for our simple Windows (mixed XP/Vista) workgroup. The Mac-mini is on the same workgroup and the files are shared via SMB, FTP, and AFP. Basic file-sharing is working, and has been for some time. We'd now like to add an additional directory/share which can be secured by a password so that only a small number on the network have access. Is this possible? I've already tried creating the additional folder on the mac system, adding it to the shared folders, and limiting it to a specific "shared user", however it's not possible to log-in from an XP machine. Adding a sub-directory to the currently working share and giving limiting it's access to the shared user doesn't work either.

    Read the article

  • Auto Launching PHP-FPM

    - by Seth
    My plist file <?xml version='1.0' encoding='UTF-8'?> <!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd" > <plist version='1.0'> <dict> <key>Label</key><string>org.macports.php-fpm</string> <key>ProgramArguments</key> <array> <string>/opt/local/bin/daemondo</string> <string>--label=php-fpm</string> <string>--start-cmd</string> <string>/opt/local/sbin/php-fpm</string> <string>;</string> <string>--pid=fileauto</string> <string>--pidfile</string> <string>/opt/local/var/run/php-fpm/php-fpm.pid</string> </array> <key>Debug</key><false/> <key>Disabled</key><true/> <key>OnDemand</key><false/> </dict> </plist> After rebooting, it's not loading up automatically. I still have to manually start php-fpm. I have tried unloading and adding RunAtLoad etc. with no luck and tried both these launchctl commands. sudo launchctl load -F /Library/LaunchDaemons/org.macports.php-fpm.plist sudo launchctl load -w /Library/LaunchDaemons/org.macports.php-fpm.plist

    Read the article

  • CVS vs SVN vs GIT

    - by user3215
    CVS is being used in my workplace and I've no much knowledge of cvs other than installing and creating cvs users and I heard developers share their project with eclipse or something like that. I'm asked to check for best repositories which offers advanced features giving the hints SVN and GIT. If any one using these repositories please short list their features and if possible with links of good installation guides and a bit information of what the eclipse to do with these repositories. Thank you!

    Read the article

  • Error while including j2ssh in a j2me midlet

    - by Farhan
    I obtained an evaluation license for j2ssh maverick, downloaded the library and included the j2me jar into my project. But i get the following error when i try to run/build the project (in netbeans, using WTK 3.0) Error preverifying class com.maverick.events.J2SSHEventMessages VERIFIER ERROR com/maverick/events/J2SSHEventMessages.class$(Ljava/lang/String;)Ljava/lang/Class;: Cannot find class java/lang/NoClassDefFoundError I get the same error when i use eclipse (error in preverifying stage). Any pointers ? There are more than one NoClassDefFoundErrors in the preverifying stage. Am i using the wrong .jar file ?

    Read the article

  • Having a fork match the original repo when the original master branch can't be merged in?

    - by a2h
    The related questions that SO offer me only answer simple cases that can be solved with a pull - however, that won't work for my case. There's a repository I've forked, with just a master branch, and I've forked it, and I've worked in both my master, and a new branch of my own, rw-style. The owner of the forked repository's committed some of my changes but not others; the black dots on the top right below represent commits from both my master and rw-style branches. I'm aware using the fork queue is not a good idea, so I'm staying away from it. Using git pull does work, but it creates a conflict that I would then need to resolve, and it also results in duplicate history for my master branch, and that doesn't look particularly pretty. I don't know any other solutions right now, so I'm currently considering just creating a patch from two commits that I haven't yet pushed, deleting my fork, creating it again from the original, and then applying my patches on top of it. Is that the only solution?

    Read the article

  • Pulling .live() functionality out of jQuery

    - by Daniel
    I am writing a Firefox Add-On that currently is depending on jQuery for the following things: Selectors Animations A special .live("focus") hail-mary event-catching maneuver that happens to work with jQuery 1.4.2 (but not 1.4.4) jQuery isn't well suited for functioning inside XUL, and it's a miracle we've gotten this far with it. We're trying to remove the jQuery requirements, the first two are easy (animations are simple, and we can use .querySelector() instead of jQuery), but the .live has proven impossible to do on our own. I've tried reading the source code, but I haven't been able to piece it apart. What is the jQuery .live function doing? There's clearly a lot more going on than document.addEventListener("focus"/"focusin",function_to_pick_apart_events). What else is going on here?

    Read the article

  • how can i execute other class?

    - by stella
    hi, i have to connect java to mysql db using jdbc. thats not a problem and i can query data from db successfully. the problem is, i have another class that i need to execute which the application is using the data from db. can i execute jdbc and call the application class to executed after the data dragged from db?means, i just execute jdbc class in command prompt and automatically application class also executed

    Read the article

  • arm-linux-androideabi-gcc: Internal error: Killed (program cc1) from Android NDK r8

    - by user577272
    When I build hello-jni which i got from the sample folder of android-ndk-r5, I got a folloiwng error. Would you please tell me your any idea what i missed? "arm-linux-androideabi-gcc: Internal error: Killed (program cc1)" Development environment: OS: Ubuntu 10.04 Desktop on WINDOWS 7 via VertualBox Android SDK: r08 Android NDK: r5 detail of error: $ ndk-build Gdbserver : [arm-linux-androideabi-4.4.3] libs/armeabi/gdbserver Gdbsetup : libs/armeabi/gdb.setup Compile thumb : hello-jni <= hello-jni.c arm-linux-androideabi-gcc: Internal error: Killed (program cc1) Please submit a full bug report. See http://gcc.gnu.org/bugs.html for instructions. make: * [/home/users001/android-ndk/samples/hello-jni/obj/local/armeabi/objs-debug/hello-jni/hello-jni.o] error1 Please advice.

    Read the article

  • Integers in JavaScript

    - by muntoo
    I'm a beginner to Javascript so forgive me if I sound dumb because I learned some Javascript from W3Fools (which are really difficult tutorials - they don't explain anything I want to know, but everything I probably can guess from my experience with C++). I may be switching over to MDN, but if you can recommend any other tutorials, that be great. Anyways, so here's my question: I just read a few lines of this, and apparently: Numbers in JavaScript are "double-precision 64-bit format IEEE 754 values", according to the spec. This has some interesting consequences. There's no such thing as an integer in JavaScript, so you have to be a little careful with your arithmetic if you're used to math in C or Java. I've already seen that there are few of the data types (for variables) I'm used to from C++. But I didn't expect all numbers to automatically be floats. Isn't there any way to use integers, not float? Will a future version of JavaScript support ints?

    Read the article

  • How would I compare two Lists(Of <CustomClass>) in VB?

    - by Kumba
    I'm working on implementing the equality operator = for a custom class of mine. The class has one property, Value, which is itself a List(Of OtherClass), where OtherClass is yet another custom class in my project. I've already implemented the IComparer, IComparable, IEqualityComparer, and IEquatable interfaces, the operators =, <>, bool and not, and overriden Equals and GetHashCode for OtherClass. This should give me all the tools I need to compare these objects, and various tests comparing two singular instances of these objects so far checks out. However, I'm not sure how to approach this when they are in a List. I don't care about the list order. Given: Dim x As New List(Of OtherClass) From {New OtherClass("foo"), New OtherClass("bar"), New OtherClass("baz")} Dim y As New List(Of OtherClass) From {New OtherClass("baz"), New OtherClass("foo"), New OtherClass("bar")} Then (x = y).ToString should print out True. I need to compare the same (not distinct) set of objects in this list. The list shouldn't support dupes of OtherClass, but I'll have to figure out how to add that in later as an exception. Not interested in using LINQ. It looks nice, but in the few examples I've played with, adds a performance overhead in that bugs me. Loops are ugly, but they are fast :) A straight code answer is fine, but I'd like to understand the logic needed for such a comparison as well. I'm probably going to have to implement said logic more than a few times down the road.

    Read the article

  • Screen orientation change forces data re-entry

    - by Timbermar
    I'm developing a simple app, only a handful of activities and nothing to complicated. The issue I'm having is that in a few of my activities I have EditText widgets, and when the screen is rotated, these widgets loose their values. They still visually, that is, on the handset screen, report their values from before the rotation, but to the code report their default values. An example, I have an activity with an EditText, I enter a number, 15, the calculator starts calculating, displays a result. If at this point I rotate to a different orientation, as expected the activity dies, reloads, shows the new orientation, my value of 15 is still in the EditText, however the calculator (the code) calculates as if it was 0, which is the initial value. I have not tried changing the initial value to see if it is really pulling from the default value, or just setting itself to 0 when I cast it as an int. If I didn't explain this well enough, let me know, I can add source code if I need to. Thanks.

    Read the article

  • Can I overwrite an Object that has been Locked() in C#?

    - by makerofthings7
    I have a few objects that I'd like to send to the server, but I want to make sure that this is the only thread that moving the data from Stage to Upload. Is the following code valid in a multithreaded environment? List<CounterInternal> UploadToServer = new List<CounterInternal>(); List<CounterInternal> StagingQueue = new List<CounterInternal>(); lock (this.UploadToServer) lock (this.StagingQueue) { if (UploadToServer.Count == 0) { UploadToServer = StagingQueue.DoDeepCopyExtensionMethod(); // is the following line valid given that I have a Lock() on it? StagingQueue = new List<CounterInternal>(); } } }

    Read the article

  • Encode and Decode using UTF-8 in iphone

    - by Ekra
    Hi friends, I wanted an example were in I can encode and then decode the same string using UTF-8. Encode and then Decode means I want to implement the method in 2 area were one can encode it and other is able to decode it. I have seen the API but I didnt get much success:- StringWithCString:encoding: stringWithUTF8String: stringWithCString:(const char *)cString encoding:(NSStringEncoding)enc; =================EDITED================= I have string as "øæ-test-2.txt" . when I am encoding it char *s = "øæ-test-2.txt"; NSString *enc = [NSString stringWithCString:s encoding:NSASCIIStringEncoding]; I am getting "øæ-test-2.txt" as output. Now I want to get back the original string back i.e. "øæ-test-2.txt" +++++++++EDITED+++++++++++++++++++ I am getting "øæ-test-2.txt" from server and I need "øæ-test-2.txt" by decoding it . I am able to get the output from the link below http://www.cafewebmaster.com/online_tools/utf_decode Please try to use the link and u will understand my concern. I need the solution on urgent basis. It would be highly appreciated if anyone can give some hint or tutorial in right direction. Regards

    Read the article

  • Questions about nhibernate.

    - by chobo2
    Hi I have a couple questions about nhibernate. I still don't understand what contextual sessions means. I do web stuff so I just choose "web" but I really don't know what it is doing. Should I put session.BeginTransaction() in Application_BeginRequest? Should I commit everything in Application_EndRequest? Or should I commit when needed. Say I need to insert a user and then down in some code later I need to update some other table. Should I make the user and do the update then finally commit or should I wait till both are ready to be commited? Should you always have session.Rollback() in Application_EndRequest? Should I session.close() or session.dispose() or both in Application_EndRequest?

    Read the article

  • Oracle access from iOS

    - by Michael Lowman
    I'm developing an iPad app that needs read-only access to an Oracle database. Is there any way to do this? As far as I can see, the only options are using OCI, which requires a prebuilt binary in the form of the instant client (and not built for ARM), or OJDBC drivers. Both of these seem to be out of the question. In my research I have discovered that libmysqlclient compiles for arm with minimal tuning. This is a stretch, but is there any possible way to use this to my advantage? I have seen this product providing odbc connectivity through the use of a Windows gateway machine using the ODBC client libraries, but this solution really isn't an option for me at the present time. Any ideas?

    Read the article

  • Problem using easy_install on Windows 7, 64 bit. (cannot find python.exe)

    - by Rune
    Hi, I have just now installed Python 2.6 on my Windows 7 (64 bit) Lenovo t61p laptop. I have downloaded Sphinx and nose and apparently installed them correctly using python setup.py install (at least no errors were reported during the installation). Now I am trying to install pymongo using easy_install but I am not having much success. It seems that easy_install isn't working at all. I execute easy_install as administrator: C:\>easy_install Cannot find Python executable C:\Program Files\Python26\python.exe The path C:\Program Files\Python26\python.exe is correct. I have found this bug report on bugs.python.org which seems to be related, although its status is 'Resolved'. Do you have any ideas as to what may be wrong? Any pointers, hints or tips for diagnosing the problem further would be greatly appreciated. EDIT: This is the stacktrace I receive when trying to install pymongo: C:\Users\Rune Ibsen\Documents\Downloads\pymongo-1.4>python setup.py install running install running bdist_egg running egg_info writing pymongo.egg-info\PKG-INFO writing top-level names to pymongo.egg-info\top_level.txt writing dependency_links to pymongo.egg-info\dependency_links.txt reading manifest file 'pymongo.egg-info\SOURCES.txt' reading manifest template 'MANIFEST.in' writing manifest file 'pymongo.egg-info\SOURCES.txt' installing library code to build\bdist.win-amd64\egg running install_lib running build_py running build_ext building 'pymongo._cbson' extension Traceback (most recent call last): File "setup.py", line 166, in <module> "doc": doc}) File "C:\Program Files\Python26\lib\distutils\core.py", line 152, in setup dist.run_commands() File "C:\Program Files\Python26\lib\distutils\dist.py", line 975, in run_commands self.run_command(cmd) File "C:\Program Files\Python26\lib\distutils\dist.py", line 995, in run_command cmd_obj.run() File "C:\Program Files\Python26\lib\site-packages\setuptools-0.6c9-py2.6.egg\setuptools\command\install.py", line 76, in run File "C:\Program Files\Python26\lib\site-packages\setuptools-0.6c9-py2.6.egg\setuptools\command\install.py", line 96, in do_egg_install File "C:\Program Files\Python26\lib\distutils\cmd.py", line 333, in run_command self.distribution.run_command(command) File "C:\Program Files\Python26\lib\distutils\dist.py", line 995, in run_command cmd_obj.run() File "C:\Program Files\Python26\lib\site-packages\setuptools-0.6c9-py2.6.egg\setuptools\command\bdist_egg.py", line 174, in run File "C:\Program Files\Python26\lib\site-packages\setuptools-0.6c9-py2.6.egg\setuptools\command\bdist_egg.py", line 161, in call_command File "C:\Program Files\Python26\lib\distutils\cmd.py", line 333, in run_command self.distribution.run_command(command) File "C:\Program Files\Python26\lib\distutils\dist.py", line 995, in run_command cmd_obj.run() File "C:\Program Files\Python26\lib\site-packages\setuptools-0.6c9-py2.6.egg\setuptools\command\install_lib.py", line 20, in run File "C:\Program Files\Python26\lib\distutils\command\install_lib.py", line 113, in build self.run_command('build_ext') File "C:\Program Files\Python26\lib\distutils\cmd.py", line 333, in run_command self.distribution.run_command(command) File "C:\Program Files\Python26\lib\distutils\dist.py", line 995, in run_command cmd_obj.run() File "setup.py", line 107, in run build_ext.run(self) File "C:\Program Files\Python26\lib\distutils\command\build_ext.py", line 340, in run self.build_extensions() File "C:\Program Files\Python26\lib\distutils\command\build_ext.py", line 449, in build_extensions self.build_extension(ext) File "setup.py", line 117, in build_extension build_ext.build_extension(self, ext) File "C:\Program Files\Python26\lib\distutils\command\build_ext.py", line 499, in build_extension depends=ext.depends) File "C:\Program Files\Python26\lib\distutils\msvc9compiler.py", line 448, in compile self.initialize() File "C:\Program Files\Python26\lib\distutils\msvc9compiler.py", line 358, in initialize vc_env = query_vcvarsall(VERSION, plat_spec) File "C:\Program Files\Python26\lib\distutils\msvc9compiler.py", line 274, in query_vcvarsall raise ValueError(str(list(result.keys()))) ValueError: [u'path'] C:\Users\Rune Ibsen\Documents\Downloads\pymongo-1.4> PS.: I previously installed Python 3.1 but later installed 2.6 because I am not sure whether pymongo supports 3.1. PPS.: I have tried installing pymongo using the python setup.py install approach, but this resulted in a nasty-looking stack trace, so I thought I would try to let easy_install take care of it for me. PPPS.: I am completely new to Python, easy_install, eggs etc.

    Read the article

  • Predefined column names in SQL Server pivot table

    - by Marcos Buarque
    Hi, the other day I opened a topic here in StackOverflow (stackoverflow.com/questions/4663698/how-can-i-display-a-consolidated-version-of-my-sql-server-table). At that time I needed help on how to show data on a pivot table. From the help I got here in the forum, my research led me to this page about dynamic SQL: www.sommarskog.se/dynamic_sql.html. And then it led me to this awesome SQL script by Itzik Ben-Gan that will create a stored procedure that outputs a pivot table exactly the way I want: sommarskog.se/pivot_sp.sp. Well, almost. I need one change in this stored procedure. Instead of having dynamic column names pulled from the @on_cols variable in the SPROC, I need the output table to hold generic column names in simple ASC order. Could be, for example, col1, col2, col3, col4 ... The dynamic column names are a problem for me. So I need them named by their index in the order they appear. I have tried all sorts of things changing this great SQL script, but it won't work. I did not paste the code from the author because it is too long, but the link above will get us there. Any help appreciated. Thank you very much

    Read the article

  • Integrate Python Projects Into Xcode

    - by Vynile
    Hi! I'm a Mac user, and one of my hobbies is programming. I use Xcode, the integrated IDE of Mac OS X. I started to learn Python programming langage, and I want to use Xcode for developing my scripts. I searched for weeks in the internet, but I didn't find something interesting. Firstly, I want to update the integrated interpreter of Mac OS X, that is on 2.6 version. And secondly, I want to create a Python project on Xcode easily, like I do with C & C++ projects. Can you help me? I really need help! Cordially.

    Read the article

  • Adding two buttons next to an ExtJS ComboBox

    - by Giku Promitt
    Hi. I need to place an Add button and a Remove button next to an ExtJS ComboBox. It's critical for these three elements to be in a single line because I have to apply this to all other ComboBoxes in the fieldset too. Please notice that the given ComboBoxes are items of a fieldset. Replacing the buttons with context menu items is not the desired solution. Can you give me some ideas? Thanks in advance.

    Read the article

  • What is the meaning of @ModelAttribute annotation at method argument level?

    - by beemaster
    Spring 3 reference teaches us: When you place it on a method parameter, @ModelAttribute maps a model attribute to the specific, annotated method parameter I don't understand this magic spell, because i sure that model object's alias (key value if using ModelMap as return type) passed to the View after executing of the request handler method. Therefore when request handler method executes the model object's name can't be mapped to the method parameter. To solve this contradiction i went to stackoverflow and found this detailed example. The author of example said: // The "personAttribute" model has been passed to the controller from the JSP It seems, he is charmed by Spring reference... To dispel the charms i deployed his sample app in my environment and cruelly cut @ModelAttribute annotation from method MainController.saveEdit. As result the application works without any changes! So i conclude: the @ModelAttribute annotation is not needed to pass web form's field values to the argument's fields. Then i stuck to the question: what is the mean of @ModelAttribute annotation? If the only mean is to set alias for model object in View, then why this way better than explicitly adding of object to ModelMap?

    Read the article

  • [iptables] Why do 'iptables -A OUTPUT -j REJECT' at the end of the chain OUTPUT override the previous rules??

    - by Serge
    Those are my IPTABLES rules: iptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT iptables -A OUTPUT -p tcp --dport 22 -j ACCEPT iptables -A OUTPUT -p udp --dport 22 -j ACCEPT iptables -A OUTPUT -p tcp --dport 80 -j ACCEPT iptables -A OUTPUT -p udp --dport 53 -j ACCEPT iptables -A OUTPUT -p tcp --dport 53 -j ACCEPT iptables -A INPUT -p tcp --dport 80 -j ACCEPT iptables -A INPUT -p tcp -m tcp --dport 22 -m state --state NEW -m recent --set --name DEFAULT --rsource iptables -A INPUT -p tcp -m tcp --dport 22 -m state --state NEW -m recent --update --seconds 180 --hitcount 4 --name DEFAULT --rsource -j DROP iptables -A INPUT -p tcp -m state --state NEW --dport 22 -j ACCEPT iptables -A OUTPUT -j REJECT iptables -A INPUT -j REJECT iptables -A FORWARD -j REJECT Im using a remote ssh conetion to set them up, but after i set: iptables -A OUTPUT -j REJECT My connection get lost. I have read all the documentation for Iptables and i can figure out anything, the global Rejects for INPUT work well because i can access to the web page but i get a timeout for ssh. Any idea? Thanks

    Read the article

  • After updating debian lenny, ps stops recognising my users

    - by William Coates
    Since upgrading my debian lenny box with apt-get, ps seems to be behaving strangely, and also if i run top i see under the user column the ids, not the names. whoami => foo ps -U foo => ERROR: User name does not exist. I get this output when I run "strace -e trace=open ps -U foo 2&1 | less", seems just this /usr/lib/libnss_compat.so.2 doesnt exist: open("/etc/mtab", O_RDONLY) = 3 open("/usr/lib/locale/locale-archive", O_RDONLY|O_LARGEFILE) = 3 open("/proc/self/stat", O_RDONLY) = 3 open("/proc/uptime", O_RDONLY) = 3 open("/etc/nsswitch.conf", O_RDONLY) = 4 open("/etc/ld.so.cache", O_RDONLY) = 4 open("/lib/libnss_compat.so.2", O_RDONLY)=4 open("/usr/lib/libnss_compat.so.2", O_RDONLY)=-1 ENOENT (No such file or directory) open("/proc/self/stat", O_RDONLY)= 4

    Read the article

  • Can I replace a router and DHCP server without disrupting traffic?

    - by SRobertJames
    I have a device which acts as a router and DHCP server. I'm replacing it, and would like to minimize down time. If I unplug it, and plug in a different device with the same IP, will all the PCs with DHCP leases keep on working? (I have DHCP Conflict detect on, so it shouldn't reassign a DHCP address already used). What if I want to change the IP (new subnet) - is there anyway to tell all the clients (Windows PCs) to release their DHCP leases and request new ones in a minute? If before unplugging the old device, I have it release all DHCP leases, will the Windows PCs automatically ask for new DHCP addresses?

    Read the article

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