Search Results

Search found 2319 results on 93 pages for 'mod suphp'.

Page 80/93 | < Previous Page | 76 77 78 79 80 81 82 83 84 85 86 87  | Next Page >

  • How to confirm php enabled on ubuntu server

    - by Shishant
    Hello, I am not much into linux. I am trying to setup a server through ssh. I installed apache php and mysql through this command. sudo aptitude install apache2 php5-mysql libapache2-mod-php5 mysql-server but I think php is not enabled on the server. when I run command I receive response as below $ which apache2ctl /usr/sbin/apache2ctl but when i check $ which php i receive no response. $ locate php5 /etc/apparmor.d/abstractions/php5 /usr/share/ubuntu-serverguide/html/C/php5.html available apache2 modules aptitude package manager

    Read the article

  • Replacing hyperlinks in Apache2 ProxyPass

    - by Jeroen
    I am using Apache2 with mod proxy on Ubuntu 12.04 as a reverse proxy to some back-end server: <VirtualHost *:80> ProxyPass / http://somewhere.com/mysite ProxyPassReverse / http://somewhere.com/mysite ServerName www.mysite.nl ServerAlias mysite.nl *.mysite.nl </VirtualHost> However, unfortunately the back-end server has some internal links hardcoded; e.g. a link to somewhere else in the site has <a href="http://somewhere.com/mysite/something"> instead of just <a href="something.png">. Is there a way I can use Apache to replace strings in the body as served by the backend before passing it back to the client? E.g replace all instances of "http://somewhere.com/site/" with "http://mysite.nl/" ? I know nginx or so is better as a reverse proxy, but the server is hosting other stuff so port 80 needs to be Apache2.

    Read the article

  • Exempt programs from using active VPN connection

    - by Oxwivi
    When I connect to a VPN, all my network traffic is automatically routed through it. Is there a way to add exemptions to that? I don't know if adding exceptions has anything to do with the VPN protocol, but the VPN I'm using is of the OpenVPN protocol. Speaking of OpenVPN, why is it not installed by default on Ubuntu installs unlike PPTP? I could not get the list of IRCHighWay's servers, and this is the result I get trying to connect on XChat with running the bash script running: * Looking up irc.irchighway.net * Connecting to irc.irchighway.net (65.23.153.98) port 6667... * Connected. Now logging in... * You have been K-Lined. * *** You are not welcome on this network. * *** K-Lined for Open proxies are not allowed. (2011/02/26 01.21) * *** Your IP is 173.0.14.9 * *** For assistance, please email [email protected] and include everything shown here. * Closing Link: 0.0.0.0 (Open proxies are not allowed. (2011/02/26 01.21)) * Disconnected (Remote host closed socket). The IP 173.0.14.9 is the one due to my VPN. I had forgotten to check ip route list before running the script, and this is the one after running it: ~$ ip route list 99.192.193.241 dev ppp0 proto kernel scope link src 173.0.14.9 173.0.14.2 via 192.168.1.1 dev eth1 proto static 173.0.14.2 via 192.168.1.1 dev eth1 src 192.168.1.3 192.168.1.0/24 dev eth1 proto kernel scope link src 192.168.1.3 metric 2 169.254.0.0/16 dev eth1 scope link metric 1000 default dev ppp0 proto static Oh and running the script returned this output: ~$ sudo bash irc_route.sh Usage: inet_route [-vF] del {-host|-net} Target[/prefix] [gw Gw] [metric M] [[dev] If] inet_route [-vF] add {-host|-net} Target[/prefix] [gw Gw] [metric M] [netmask N] [mss Mss] [window W] [irtt I] [mod] [dyn] [reinstate] [[dev] If] inet_route [-vF] add {-host|-net} Target[/prefix] [metric M] reject inet_route [-FC] flush NOT supported I ran the script after connecting to the VPN.

    Read the article

  • Tiling window manager where dual heads share common workspace

    - by mikero
    I want to use a tiling window manager with my dual monitor setup, but almost all wms seem to treat each monitor as an independent workspace. This means that I can change the workspace of monitor 0 without affecting the workspace of monitor 1. This is not what I want -- I want a workspace to span both monitors, where each monitor is essentially a separate column for tiling (my monitors are oriented vertically, so they are well-suited as tiling columns). When I switch workspaces, say with Mod-[0-9], I want both monitors to change contents. So far the only wm I have found to support this is wmii, but I'd love to try some other options. Have I missed this capability from other tiling wms?

    Read the article

  • Suitable SDK to develop quick game?

    - by gRnt
    I'm currently undertaking a personal project at home that I need to turn around inside the next few months (which working full time and still learning programming makes it a tad difficult). I'm looking for suggestions on SDK's or tools (preferably free or that come with games, similar to steam tools) that I can use to develop a "game". I'm OK with coding but have no 3D development skills at all. I've very little experience with mod tools or SDK's at all but I'm hoping someone can point me in the direction of one that does the following: A decent library of prefab 3D models to build scenes. Ability to add scripting to the scene I've used Unity before and would prefer to continue to do so however I really have the worst 3D skills imaginable and can't waste time learning them. I'd be looking for pre-fab items that are both industrial and possibly more lush environments (trees etc). If it makes any difference (due to licencing and what-not) I WILL NOT be selling this game or marketing it in any way and I am a University Student if any places do educations licences. Another alternative would be to source free 3d models elsewhere but again while I'm still learning I have no idea where to look if someone could point me in the right direction I'll do the rest of the digging. Thanks

    Read the article

  • How to disable apache mods without any problems

    - by Saif Bechan
    I have an apache installation where every single mod is enabled. I want my server to be as light as possible so I want to disable everything i do now need. What is the best way to go about this. I know its just removing the ; before the line in the conf file. But what if some hidden service somewhere need that at some random point in time. Can i get some suggestion on what to do.

    Read the article

  • Getting PHP to work with apache to run .php files through browser

    - by Kevin Duke
    I have VPS running Debian 5.0 (I think) and I would like to get it to run PHP files. I was told it needed to be configured with Apache. I tried entering the command apt-get install apache2 php5 libapache2-mod-php5. But there was no change. Console output: http://pastebin.com/sVMWq6mA This is everything in my /etc/apache2/mods-enabled: http://img35.imageshack.us/img35/6474/modsb.jpg My webserver can be accessed here: http://206.217.223.136/test/ In my test.php file I have the code : <?php phpinfo(); ?> but instead of displaying the page, it tries to download it. How can I fix this?

    Read the article

  • Forum engine with full LDAP integration [closed]

    - by Andrian Nord
    We are looking for forum engine which may actually maintain user data into LDAP, maybe via mods. Core point is about ability to maintain the data, i.e. all user profile settings, like nickname, password, email, avatar, birthday and others (preferably configurable). One example of good ldap integration, level of which I'm expecting, is drupal's ldap integration, which allows to map any user's attribute into ldap and keeps it in sync with database. Year ago I've done a small research over existing Free&FOSS engines and find out few forum engines with LDAP integration, namely SFM, phpBB and something else. The most maintained solution were provided by phpBB3, which supports LDAP integration out-of-box, but it is unable to sync data with changes in LDAP server made by other software. Actually it wasn't even propagating changes back, I'm not saying about ability to map additional attributes (other than name/password/email). Also, I haven't found any forum with architecture which have proper abstraction over user settings, thus I doubt that this engines (including phpBB) are possible to mod such functionality without introducing dramatic changes into core codebase. More recent research showed that even some commercial software, like IPB is unable to keep it's database synced with LDAP directory and map additional attributes. In other words, all support I've seen so far is simple user creation upon first user's login, which is not good for us, as forum is not primary site and should not maintain it's own users base (to reduce risk of possible collisions). LDAP import is required due to many other services (ftp, email, jabber, drupal site) using same users base. Currently we have forum embedded into Drupal site, but we are unsatisfied with it's features. BTW, we are using Linux and this is not duplicate of this question, as it's author seems to be satisfied with behaviour described above. So, my question is: Are there any (preferably FOSS&free) forum engines that may import, export, keep in sync, or otherwise integrade with LDAP user database (preferably with ability to map additional fields to ldap attributes)?

    Read the article

  • Fair dice over network w/o trusted 3rd party

    - by Kay
    Though it should be a pretty basic problem, I did not find a solution for it: How to play dice over a network without a trusted third party? The M players shall roll N dice, one player after another. No player may "cheat", i.e. change the outcome to his advantage, or "look into the future" before the next roll. Is that possible? I guess the solution would be something like public key crypto, where each player turns in an encrypted message. After all messages were collected you exchange the keys to decode the messages. Then the sha1(joined string of all decrypted messages) mod 6 + 1 is used to determine the die. The major problem I have: since the message [c/s]hould be anything, I don't know how to prevent tampering with the private keys. Esp. the last player to turn in his key could easily cheat (I guess). The game should even stay fair, if all players "conspire" against one player.

    Read the article

  • Is my JS/Jquery methodology good?

    - by absentx
    I always struggle with which of the stack sites is best to post "questions of theory" like this, but I think programmers is the best, if not, as usual a mod will move it etc... I am seeking critique on what has become my normal methodology of writing javascript. I have become heavily reliant on the Jquery library, but I think this has helped me learn the native language better also. Anyways, please critique the following style of JS coding...buried are a lot of questions of scope, if you could point out the strengths and weaknesses of this style I would appreciate it. var critique ={ start: function(){ globalness = 'GLOBAL-GLOBAL'; //available to all critique's methods var notglobalness = 'LOCAL-LOCAL';// only available to critiques start method //am I using the "method" teminology properly here?? $('#stuff').on('click','a.closer-target',function(){ $target = $(this); if($target.hasClass('active')){ $target.removeClass('active'); } else{ $target.addClass('active'); critique.madness($target); } }) console.log(notglobalness+': at least I am useful at home'); console.log('note here that: '+notglobalness+' is no longer available after this point, lets continue on:'); critique.madness(notglobalness); }, madness: function($e){ // do a bunch of awesomeness with $e //but continue to keep it seperate because you think its best to keep things isolated. //send to the next function when complete here console.log('here is globalness, which is still available from the start method of critique!! ' + globalness); console.log('lets see if the globalness carries on to a new var object!!'); console.log('the locally isolated variable of NOTGLOBALNESS is available here because it was passed to this method, lets show it:'+$e); carryOn.start(); } } //end critique var carryOn={ start: function(){ console.log('any chance critique.globalness will work here??? lets see: ' +globalness); console.log('it absolutely does'); } } $(document).ready(critique.start);

    Read the article

  • FTP Issue when connecting to a debian machine from windows

    - by erin c
    I have a .net application which copies bunch of files to a specific FTP folder on a debian machine on periodical basis, ftp folder has 755 mod, owner of the directory is the ftp username that I authenticate in .net application. So far I tested this application with bunch of debian boxes, my initial attempts generally fail with following message if I try it with a debian machine that I haven't tried it before: "remote server returned an error 550 File unavailable" When I see this error, I log onto another debian machine on my network, and I try FTP'ing the debian box that returns the error message from command line. I generally "put" a very small file to the folder in question, right after that windows application starts copying files successfully via FTP. It is as if my command line ftp operation fixes the problem and makes debian compatible with my .net application. I checked permissions before and after the problem, it doesn't look like what I did changed anything, I am at loss understanding why this problem occurs and why it is fixed with my silly hack. Can anybody tell me where to look at next to fix this extremely annoying issue?

    Read the article

  • Adding custom attribute to openldap

    - by arukaen
    I am attempting to setup ConTagged - The LDAP Address Book but I am having a few issues with some of the attributes. The problem is that some of them are undefined and they do not seem to be in the inetorgperson.schema. How do I set these custom attributes? For reference, here is the exact error I receive whenever I make a change to a contact. The LDAP server returned the following errors Invalid syntax Undefined attribute type(del anniversary) Undefined attribute type(del marker) Object class violation(mod c) Undefined attribute type(del custom1) Undefined attribute type(del custom2) Undefined attribute type(del custom3) Undefined attribute type(del custom4)

    Read the article

  • The specified module (mod_h264_streaming) could not be found (Apache2)?

    - by rphello101
    I'm trying to get the mod_h264_streaming to work with my Apache2 server. I downloaded a precompiled version of the mod from here. I read here that all I have to do is extract the file to my modules folder, which I did, and add LoadModule h264_streaming_module modules/mod_h264_streaming.so AddHandler h264-streaming.extensions .mp4 to the httpd.conf, which I also did. However, I get this error when I restart Apache: Syntax error on line 173 of C:/Program Files (x86)/Apache Group/Apache2/conf/httpd.conf: Cannot load C:/Program Files (x86)/Apache Group/Apache2/modules/mod_h264_streaming.so into server: The specified module could not be found. Note the errors or messages above, and press the <ESC> key to exit. 26... Even though the file exists right here: C:\Program Files (x86)\Apache Group\Apache2\modules\mod_h264_streaming.so Can anyone tell me what I'm doing wrong?

    Read the article

  • 12.04 LTS boot hangs at "SP5100 TCO timer: mmio address 0xfec000f0 already in use", didn't yesterday

    - by DarkIron112
    Dual-booting Windows 7 and Ubuntu 12.04 LTS. I went to reboot from Win to Ubu, and found a few interesting things. My POST screen is covered in blocks of epileptic colors until I hit GRUB, which continues when I try to boot into Ubuntu. These color blocks don't appear when I use my on-board VGA, so I'll just attribute to that. Grub dimensions are swapped (card vs onboard, probably), but, when interfacing with onboard VGA, the Grub Timeout Counter works and when using my card, it does not (see "[!!!]" below for more information) Booting into Ubuntu directly causes the error: SP5100 TCO timer: mmio address 0xfec000f0 already in use Booting into recovery mode, meanwhile, and then "resuming normal boot" gets me to the desktop without native 1440x900 resolution and graphic drivers can't tell the monitor it's looking at (I assume this is because it's not a full graphic boot, and as it says, some drivers won't run?) [!!!] When I reboot after going into recovery mode, the countdown timer works ONCE, puts me back into default ubuntu boot, and then does not work again until after another recovery-mode boot. Windows 7 can boot perfectly with no issues whatsoever from epilepsy color blocks or driver detection. This makes me wonder /why/ the POST screen can't handle my video card anymore. Amidst all the diagnostics, I opened my case and re-seated the videocard securely, ensuring it wasn't a loose connection-- But this did nothing to help me. Hardware I am running an NVidia GeForce GTX 8800 video card in a PCI slot. I have 4.8GiB memory, an AMD Athlon II Quad-core 640 Processor, on an MSI K9N6GM Series Mobo. Onboard video is an NVidia GeForce MCP61(V/S/P) card. Note: I did not have any of these problems yesterday, and I have been using Ubuntu intensively for a week, though it's been working flawlessly for months. I've recently been using it to mod my Android phone, perhaps I messed something up in the file system?

    Read the article

  • how to log trigger intiated CRUD queries on postgresql 8.4

    - by user47650
    in the postgresql config file there is an option log_statement = 'mod' which causes CRUD statements to be logged. However this does not include the CRUD statements that are called from trigger functions, which means that following the log file is not useful to determine what changes are being made to the database data, if the 3rd part application has been making lots of changes using triggers. Is there some other option I can use to include trigger CRUD? alternatively, can I inspect the pg_xlog in real time using some tool? (xlogdump and xlogviewer do not work with version 8.4, i have tried)

    Read the article

  • Setting up Shibboleth to secure part of a website

    - by HorusKol
    I've installed the Shibboleth module for apache on Ubuntu 10.04 using aptitude to install libapache2-mod-shib2 as per https://groups.google.com/group/shibboleth-users/browse_thread/thread/9fca3b2af04d5ca8?pli=1 and enabled the module (I have checked in /etc/apache2/mods-enabled) I then proceeded to secure a directory on the server by placing a .htaccess file with the following directives: AuthType shibboleth ShibRequestSetting requireSession 1 Require valid-user Now - I haven't set up an SSL host yet - and I also haven't set up the IdP - but I would expect that the server would block access to this directory - but I'm getting the content without any problems. I have restarted the apache service and I have no errors in the log files.

    Read the article

  • What are the most commonly used and basic Apache htaccess redirects?

    - by bybe
    This question is here so we can offer users who are looking for information on how to make one or more common or basic redirects in Apache using the htaccess file. All future questions pertaining to finding information that is that is covered by the question should be closed as a duplication of this question. As per this Meta question. Whats the point in this question? The idea while not perfect is catch the most commonly asked questions regarding redirects using the htaccess on the Apache platform either on some type of lamp or a live server. The type of answers should be generally those that you could imagine are used by 100,000’s of sites world-wide and are constantly asked here at Pro Webmasters repeatedly over and over in various forms. A few examples of the type of answers we are looking for: How can I redirect non-www to www? How can I redirect a sub domain to the main domain? How can I redirect a sub folder from domain to a root or a subdomain? How can I redirect an old URL to a new URL? A few examples of the types of answers that we are not looking for: Answers that do not involve a redirect. Any answers relating to NGinx, IIS or any other non-Apache platform. Answers that involve custom and complex string or query removals. Resources for Advanced to Complex Mod_Rewrite Rules: Everything you ever wanted to know about mod rewrite rules but were afraid to ask Please note: that this question is still in construction and may need some refining either by myself or a real moderator of Pro Webmasters, if you have any concerns or questions please use the meta page I made a few days back here.

    Read the article

  • Which programming language should i choose? (much more info inside) [closed]

    - by Andreas
    I am not completely sure if this is the right place to put this question, but since it's the programming thread I guessed that there's many experienced programmers here. :) Ok, hello! My name is Andreas and I am a 16 years old guy from Norway. For some time now I've wanted to learn a programming language. Six months ago I started learning C++, but quit withing a week due to lack of motivation. The same thing happend only 2 months ago when I tried to learn Lua. I wanted to program mods to the game Garry's mod, and was really motivated. Then I stopped playing the game, and the programming stopped with it. Today though I am ready again. The only difference is that I am not completely sure what I want to do with the language. I only want to create something, and I miss the progress of failing and enduring hard work until I finally solve the problem I've worked on for hours. What I am trying to say is; Is there any program out there that allows me, a complete noob (I didn't learn that much in a week, so I like to call myself a beginner), to create apps, mods or something similar but at the same time being qualified as a first time language? I was thinking of Java, because Android, Minecraft and many other applications and games use it. But I've heard that it is going to be replaced by a program called HTML 5 (whatever that is), is this true? I certainly don't want to spend many hours of my life on something that is useless in a year or two. Hopefully I didn't make this too complicated. I know that it is hard to recommend something when I don't have a goal, but I really don't know what to say. Have a good day kind folks! - Andreas EDIT:* I did not know that this was an off topic question, really sorry!

    Read the article

  • Include requested hostname in access_log

    - by Aaron J Spetner
    I would like my access_log to list the host name that the client is requesting (e.g. when requesting http://www.example.com/test I should see "www.example.com" in the log). The only thing I have found so far is to use %v in the LogFormat directive, but this only gives "the canonical ServerName of the server serving the request" (as described by Apache at http://httpd.apache.org/docs/2.0/mod/mod_log_config.html#formats). This does not help me for requests that use a hostname that is not specified in a ServerName directive. Is there any way to log the requested hostname? Thanks

    Read the article

  • Is there an open source clone of a game in the Total War Series?

    - by sinekonata
    I loved Shogun:Total War gameplay and then later on spent weeks re-enacting historical wars and battles with Europa Barbarorum. It's a mod for Rome:TW that focuses on historical accuracy in the peoples, units, sounds, visuals, everything from macro mechanics to actual battles (e.g. a lot more missiles). Since that time I kind of turned my back on Windows cause it sucks and use Linux cause Mac sucks even worse. So as I miss that game (Eur. Barb.) and consider it the most realistic RTS to date, I'd like to know if there are any free and open source alternatives to it because ever since I'm under linux, I became addicted to FOSS so I also turned my back on paying (even kickstarters) for closed source, pay to play games. I have found a clone/alternative for everyone of the best games like Minecraft, CSS, Natural Selection, TA/SupCom etc... It's kind of the last one I need. The Spring engine is amazing for example, is there another open source project of the source in current development? Or would Spring itself be enough (it certainly looks capable) to make it? Thanks in advance guys...

    Read the article

  • Website: Requested filename being rewritten

    - by horatio
    I have been unable to find an answer via search. I have a website (I do not administer the servers) where the server will serve a different file than the one requested. I first noticed this when using a filename of the following form: _foo.php (single underscore) If I request foo.php (does not exist), the server returns _foo.php. By "returns" I mean that the server decides I meant _foo.php, processes the php file, and serves the output. If I request afoo.php, zfoo.php, or even __foo.php (two underscores) (these files do not exist) the server returns _foo.php. If I request aafoo.php, the server returns 404. To sum up: the server seems to be doing a partial filename match. My question is: what is happening and is this accepted behavior for a web server (or standard behavior of a common mod/package/etc)?

    Read the article

  • Redirect domains with lighttpd?

    - by matt
    I'm working on getting a Wordpress MU install running on my VPS. I enabled the 'simple-vhost' mod and can access the site fine. The problem is I can only get to it from domain.com. If I try www.domain.com I get shown the lighthttpd page? I'd like to get everything pointing to one place. My DNS records look like this: *.domain.ORG xx.xx.xx domain.ORG 300 A domain.ORG xx.xx.xx domain.ORG 300 A WWW.domain.ORG domain.ORG domain.ORG 300 CNAME domain.ORG domain.ORG domain.ORG 300 MX What is happening? Thanks

    Read the article

  • Importing tab delimited file into array in Visual Basic 2013 [migrated]

    - by JaceG
    I am needing to import a tab delimited text file that has 11 columns and an unknown number of rows (always minimum 3 rows). I would like to import this text file as an array and be able to call data from it as needed, throughout my project. And then, to make things more difficult, I need to replace items in the array, and even add more rows to it as the project goes on (all at runtime). Hopefully someone can suggest code corrections or useful methods. I'm hoping to use something like the array style sMyStrings(3,2), which I believe would be the easiest way to control my data. Any help is gladly appreciated, and worthy of a slab of beer. Here's the coding I have so far: Imports System.IO Imports Microsoft.VisualBasic.FileIO Public Class Main Dim strReadLine As String Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim sReader As IO.StreamReader = Nothing Dim sRawString As String = Nothing Dim sMyStrings() As String = Nothing Dim intCount As Integer = -1 Dim intFullLoop As Integer = 0 If IO.File.Exists("C:\MyProject\Hardware.txt") Then ' Make sure the file exists sReader = New IO.StreamReader("C:\MyProject\Hardware.txt") Else MsgBox("File doesn't exist.", MsgBoxStyle.Critical, "Error") End End If Do While sReader.Peek >= 0 ' Make sure you can read beyond the current position sRawString = sReader.ReadLine() ' Read the current line sMyStrings = sRawString.Split(New Char() {Chr(9)}) ' Separate values and store in a string array For Each s As String In sMyStrings ' Loop through the string array intCount = intCount + 1 ' Increment If TextBox1.Text <> "" Then TextBox1.Text = TextBox1.Text & vbCrLf ' Add line feed TextBox1.Text = TextBox1.Text & s ' Add line to debug textbox If intFullLoop > 14 And intCount > -1 And CBool((intCount - 0) / 11 Mod 0) Then cmbSelectHinge.Items.Add(sMyStrings(intCount)) End If Next intCount = -1 intFullLoop = intFullLoop + 1 Loop End Sub

    Read the article

  • My site not directing links correctly.

    - by mystycs
    I have a site at http://badassmonkeys.com/ and when i click any of the links it does not direct it to the actual page but still pulls up the link. For some reason it works perfectly on linux cpanel and actually loads the pages, but on windows in apache, or in IIS even with a rewrite mod for it, it just doesnt work. The links dont go correctly. Is it a php.ini setting? This is my htaccess file if curious, but it works perfect in linux, but not on windows.... DirectoryIndex index.html index.htm default.htm index.php Options +FollowSymlinks RewriteEngine on RewriteRule ^(.*\.(css|swf|js|xml|gif|jpg))$ $1 [L,QSA,NE] RewriteRule ^((images|contactus|css|blog|script|style|docs|admin|fck|swf|Scripts|includes|images|img|uploads|templates|js|css|calendar|expert_area|fckfiles|flvplayer|highslide)/.*) $1 [L,QSA,NE] RewriteRule ((fb_login|phpinfo|aim|csql|info|cron|index|site|simg|img|ajax|ari|fck_install|ffmpeg_test|file|redirect|rss_blogs|rss_info)\.php) $1 [L,QSA,NE] RewriteRule ^ajax/?$ ajax.php [L,QSA,NE] RewriteRule ((xd_receiver)\.htm) $1 [L,QSA,NE] RewriteRule ((google7a9ea27ccf395e97)\.html) $1 [L,QSA,NE] RewriteRule ((favicon)\.ico) $1 [L,QSA,NE] RewriteRule ((W4uFNrPc9U9SAfP7qiJFwCfp7vk)\.txt) $1 [L,QSA,NE] RewriteRule ^(.*)$ index.php?htaccesss=%{HTTP_HOST}%{REQUEST_URI} [L,QSA,NE]

    Read the article

  • Algorithmic problem - quickly finding all #'s where value %x is some given value

    - by Steve B.
    Problem I'm trying to solve, apologies in advance for the length: Given a large number of stored records, each with a unique (String) field S. I'd like to be able to find through an indexed query all records where Hash(S) % N == K for any arbitrary N, K (e.g. given a million strings, find all strings where HashCode(s) % 17 = 5. Is there some way of memoizing this so that we can quickly answer any question of this form without doing the % on every value? The motivation for this is a system of N distributed nodes, where each record has to be assigned to at least one node. The nodes are numbered 0 - (K-1) , and each node has to load up all of the records that match it's number: If we have 3 nodes Node 0 loads all records where Hash % 3 ==0 Node 1 loads all records where Hash % 3 ==1 Node 2 loads all records where Hash % 3 ==2 adding a 4th node, obviously all the assignments have to be recomputed - Node 0 loads all records where Hash % 4 ==0 ... etc I'd like to easily find these records through an indexed query without having to compute the mod individually. The best I've been able to come up with so far: If we take the prime factors of N (p1 * p2 * ... ) if N % M == I then p % M == I % p for all of N's prime factors e.g. 10 nodes : N % 10 == 6 then N % 2 = 0 == 6 %2 N % 5 = 1 == 6 %5 so storing an array of the "%" of N for the first "reasonable" number of primes for my data set should be helpful. For example in the above example we store the hash and the primes HASH PRIMES (array of %2, %3, %5, %7, ... ]) 16 [0 1 1 2 .. ] so looking for N%10 == 6 is equivalent to looking for all values where array[1]==1 and array[2] == 1. However, this breaks at the first prime larger than the highest number I'm storing in the factor table. Is there a better way?

    Read the article

< Previous Page | 76 77 78 79 80 81 82 83 84 85 86 87  | Next Page >