Daily Archives

Articles indexed Saturday November 9 2013

Page 10/15 | < Previous Page | 6 7 8 9 10 11 12 13 14 15  | Next Page >

  • Standalone URL 301 Redirect Manager [on hold]

    - by Lex
    I'm looking for a script with a simple interface that helps me manage a large list of 301 redirects of the form: http://example.com/short ---> http://example.com/long-and-descriptive For example the following Wordpress plugin does this job, but it seems excessive to install Wordpress just for this one simple functionality. It looks like my question is similar to this closed question, but hopefully rephrased in such a way that makes it more relevant and "constructive".

    Read the article

  • Using a CDN for CMS software (multiple sites)

    - by SmokeyPHP
    I'm currently researching ideas for the media management side of a CMS I'm writing. I was looking at having images served from a CDN which is fine on a single site, but I want all sites that run the CMS to make use of a CDN (which will most likely be a custom developed one, rather than a third party service like S3). My main question is: Is a multi-site CDN a good idea? I can't think of a downside, but have probably missed something - obviously they won't share the same folder, as I invisage the requests to be css.cdnsite.com/example.com/style.css or something along those lines. Having multiple sites in the same place will obviously make it easier for us to manage, as well as being cheaper, but then I wonder if it'll be worth it... Long story short: How should the CMS handle user uploaded media (separate installations) Just keep a local copy of all assets and serve them from the same site, like in days of yore? Keep a local copy, force site to use www. and have CDN subdomains per site? Or use a single separate CDN for all sites? Apologies for the length of this question, not sure if this should be multiple questions or not, as all parts are kind of related and could affect each other.

    Read the article

  • Google Analytics - Profile filter with more than one dimension?

    - by Drewdavid
    I have identified some bot traffic in GA, but to filter it accurately I need to filter it by two dimensions, namely Browser and ISP To be clear, I don't want to apply both a filter to block the entire ISP and the entire Browser segments, but only the combination of the two To illustrate: Could someone explain how to do this? It's not apparent using the interface and I'm not able to find any documentation about it

    Read the article

  • Google Webmaster Tools robots test not working

    - by tracy_snap
    Within Webmaster Tools I have supplied my test content: User-agent: * Disallow:/admin/ Disallow: /tag/ When I specify the URL to test against, for example: http://www.site.com/tag/ It gives me this result: "Allowed: Detected as a directory; specific files may have different restrictions" As far as I know I have set this up correctly, shouldn't Google be saying that the /tag/ directory is "disallowed"?

    Read the article

  • Amazon EC2 vs Dedicated server at Hetzner, what's the use for EC2?

    - by C-Blu
    After searching the web I still can't find the reason to use EC2. What's the point to scale EC2? If you expect a huge burst in traffic, they say. OK, but what if you already have a couple of sites with good traffic, and for example medium reserved EC2 instance is not enough. You are paying $36.60(medium reserved for 1year) in EU(Ireland) + traffic + optional expenses for databases and S3 if you use them. Of course as some point when you are under $56.6-$66.1 you can optimize your hosting costs with Amazon EC2. But when you get at some point if purchase EX4 server from Hetzner, it will surpass your perfomance needs for a long time, before you get a massive traffic. (I am wrong?) CPU: i7-2600 Quadcore (3.4-3.8 Ghz) RAM: 16 GB HDD: 2x3 TB SATA (6 Gbit/s) - I think that disc performance of a dedicated is better then of Amazon EBS Traffic: 10 TiB in month included. This is what you get from Hetzner for $56(- 19% VAT) or $66 for EU residents. Please, tell me what's the reason to use Amazon? Which load won't a server from Hetzner take, but Amazon Auto Scaling will? The maintenance of dedicated vs EC2 is still the same? Or hardware failure at Amazon, won't ruin your EBS storage? I'm still not at the level when I need expensive hosting, but want to know beforehand, just to be sure if Amazon infrastructure is better then pure performance of Hetzner's hardware.

    Read the article

  • Subfolder non-www redirect

    - by Zealotry
    Is there a way to redirect a sub folder to no-www? What I use is: RewriteEngine On RewriteBase / RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC] RewriteRule ^(.*)$ http://%1/$1 [R=301,L] but this only redirects the www.example.com to example.com. I would like to redirect: www.example.com/home/ to example.com/home/ www.example.com/home/whatever URL to example.com/home/whatever URL. I have tried this: RewriteEngine on Options +FollowSymlinks -MultiViews RewriteCond %{HTTP_HOST} ^(www\.)?example\.com$ [NC] RewriteRule ^$ http://example.com [R=301,L] RewriteCond %{HTTP_HOST} ^www\.example\.com$ [NC] RewriteCond %{REQUEST_URI} !^/home/ [NC] RewriteRule ^(.+)$ http://example.com/$1 [R=301,L] This does not work, either. I can't really figure it out. Any help appreciated! ANSWER I figured it out and I will post it for others to see, if having the same issue. In the sub folder directory's .htaccess used the following: RewriteCond %{HTTP_HOST} ^(www\.example\.com)?$ RewriteRule ^(.*)$ http://example.com/subfoldername/$1 [R=301,L]

    Read the article

  • Is it possible to create an "impossible" rooms in games?

    - by qwerty3000
    Forgive me my lack of knowlegde, but for quite a long time I asked myself whether it was possible to create a continous game space that some player could walk inside and so on, that would be absolutely impossible in reality, e.g. you have a very small house that allows you to go around it to see all sides and the full dimensions, and then, when you enter, it is like a giant hall, without any loading screen or (internal) "model change" and so on. I'm no game designer and I never needed to learn 3D-modelling, so I don't know what is possible and what isn't. And is this the same as Is the "impossible object" possible in computer graphics? this? Or is it just the same category, but not exactly the same question? Thanks.

    Read the article

  • Setting up cube map texture parameters in OpenGL

    - by KaiserJohaan
    I see alot of tutorials and sources use the following code snippet when defining each face of a cube map: for (i = 0; i < 6; i++) glTexImage2D(GL_TEXTURE_CUBE_MAP_POSITIVE_X + i, 0, InternalFormat, size, size, 0, Format, Type, NULL); Is it safe to assume GL_TEXTURE_CUBE_MAP_POSITIVE_X + i will properly iterate the following cube map targets, GL_TEXTURE_CUBE_MAP_NEGATIVE_X, GL_TEXTURE_CUBE_MAP_POSITIVE_Y, GL_TEXTURE_CUBE_MAP_NEGATIVE_Y etc?

    Read the article

  • With 2 superposed cameras at different depths and switching their culling masks between layers to implement object-selective antialising:

    - by user36845
    We superposed two cameras, one of which uses AA as post-processing effect (AA filtering is cancelled). The camera with the AA effect has depth 0 and the camera with no effect has depth 1 as can be seen in the 5th and 6th Picture. The objects seen on the left are in layer 1 and the ones on the right are in layer 2. We then wrote a script that switches the culling masks of the cameras between the two layers at the push of buttons 1 and 2 respectively, and accomplishes object-selective antialiasing as seen in the first the three pictures. (The way two cameras separately switch culling masks between layers is illustrated in pictures 7,8 & 9.) HOWEVER, after making the environment 3D (see pictures 1-4), by parenting the 2 cameras under First-Person Controller, we started moving around in the environment and stumbled upon a big issue: When we look at the objects from such an angle as in the 4th Picture and we want to apply antialiasing to the first object (object on the left) which stands closer to our cameras now, the culling mask of 1st camera which is at depth 0, has to be switched to that object’s layer while the second object has to be in the culling mask of the 2nd camera at depth 1. And since the two image outputs of two superposed cameras are laid on top of one another; we obtain the erroneous/unrealistic result of the object farther in the back appearing closer to the camera than the front object (see 4th Picture). We already tried switching depths of cameras so that the 1st camera –with AA- now has depth 1 and the second has depth 0; BUT the camera with the AA effect Works in such a way that it applies the AA effect to its full view. So; the camera with the AA effect always has to remain at the lowest depth and the layer of the object to be antialiased has to be then assigned to the culling mask of the AA camera; otherwise all objects in the AA camera’s view (the two cubes in our case) become antialised, which we don’t want. So; how can we resolve this? The pictures are below and in the comments since each post can have 2 pics: Pic 1. No button is pushed: Both objects seem aliased. Pic 2. Button 1 is pushed: Left (1st) object is antialiased. 2nd object remains aliased. Pic 3. Button 2 is pushed: Right (2nd) object is antialiased. 1st object remains aliased. Pic 4. The problematic result in 3D, when using two superposed cameras with different depths Pic 5. Camera 1’s properties can be seen: using AA post-processing and its depth is 0 Pic 6. Camera 2’s properties can be seen: NOT using AA post-processing and its depth is 1 Pic 7. When no button is pushed, both objects are in the culling mask of Camera 2 and are aliased Pic 8. When pushed 1, camera 1 (bottom) shows the 1st object and camera 2 (top) shows the 2nd Pic 9. When pushed 2, camera 1 (bottom) shows the 2nd object and camera 2 (top) shows the 1st

    Read the article

  • Where can I find game postmortems with a programmer perspective [on hold]

    - by Ken
    There are a number of interesting game post-mortems in places like GDC vault or gamastura.com. The post-mortems are generally give with a CEO/manager perspective or a designer perspective, or, more often a combination of both e.g DOOM postmortem But I have not been able to find many post-mortems which are primarily from the programmers perspective. I'm looking for discussions and rational for technical choices and tradeoffs and how technical problems were overcome. The motivation here is to learn what kind of problems real game programmers encounter and how they go about solving them. A perfect example of what I'm looking for is Renaud Bédard's excellent GDC talk on the development of Fez, "Cubes all the way down". Where can I find more like that?

    Read the article

  • OcclusionQuery: how to ignore some objects?

    - by ApocKalipsS
    I'm trying to make a LensFlare effect when the player watch the sun in my XNA 4.0 Game. To do this, I use OcclusionQuery, here's my code: http://pastebin.com/meAkdwmD I also have some models, a terrain and a skybox. Here's my main Draw code: terrain.Draw(); model1.Draw(); model2.Draw(); skybox.Draw(); lensFlare.UpdateOcclusion(); lensFlare.Draw(); The problem is that the occlusion considers the sun to be behind the skybox, and the lensFlare wasn't showing up. So I moved lensFlare.UpdateOcclusion() before the drawing of the Skybox, and now the lensFlare appears, but my skybox is blinking (it's like it disappear and reappear at each frames...) How do I ignore the skybox in the occlusion?

    Read the article

  • Creating user UI using Flixel

    - by Jamie Read
    I am new to game development but familiar with programming languages. I have started using Flixel and have a working Breakout game with score and lives. What I am trying to do is add a Start Screen before actually loading the game. I have a create function that adds all the game elements to the stage: override public function create():void // all game elements { How can I add this pre-load Start Screen? I'm not sure if I have to add in the code to this create function or somewhere else and what code to actually add. Eventually I would also like to add saving, loading, options and upgrades too. So any advice with that would be great. Here is my main game.as: package { import org.flixel.*; public class Game extends FlxGame { private const resolution:FlxPoint = new FlxPoint(640, 480); private const zoom:uint = 2; private const fps:uint = 60; public function Game() { super(resolution.x / zoom, resolution.y / zoom, PlayState, zoom); FlxG.flashFramerate = fps; } } } Thanks.

    Read the article

  • Flixel Game Over Screen

    - by Jamie Read
    I am new to game development but familiar with programming languages. I have started using Flixel and have a working Breakout game with score and lives. I am just stuck on how I can create a new screen/game over screen if a player runs out of lives. I would like the process to be like following: Check IF lives are equal to 0 Pause the game and display a new screen (probably transparent) that says 'Game Over' When a user clicks or hits ENTER restart the level Here is the function I currently have to update the lives: private function loseLive(_ball:FlxObject, _bottomWall:FlxObject):void { // check for game over if (lives_count == 0) { } else { FlxG:lives_count -= 1; lives.text = 'Lives: ' + lives_count.toString() } } Here is my main game.as: package { import org.flixel.*; public class Game extends FlxGame { private const resolution:FlxPoint = new FlxPoint(640, 480); private const zoom:uint = 2; private const fps:uint = 60; public function Game() { super(resolution.x / zoom, resolution.y / zoom, PlayState, zoom); FlxG.flashFramerate = fps; } } }

    Read the article

  • Rotations and Origins

    - by Theodore Enderby
    I was hoping someone could explain to me, or help me understand, the math behind rotations and origins. I'm working on a little top down space sim and I can rotate my ship just how I want it. Now, when I get my blasters going it'd be nice if they shared the same rotation. Here's a picture. and here's some code! blast.X = ship.X+5; blast.Y = ship.Y; blast.RotationAngle = ship.RotationAngle; blast.Origin = new Vector2(ship.Origin.X,ship.Origin.Y); I add five so the sprite adds up when facing right. I tried adding five to the blast origin but no go. Any help is much appreciated

    Read the article

  • PHP not talking to MySQL

    - by KodeSeeker
    Im trying to set up a AMP installation on my windows 8 laptop. However, Im not being able to get PHP to talk to MySQL. When I start apache server, the following error log is generated PHP Warning: PHP Startup: Unable to load dynamic library 'ext\\php_mysql.dll' - %1 is not a valid Win32 application.\r\n in Unknown on line 0 PHP Warning: PHP Startup: Unable to load dynamic library 'ext\\php_mysqli.dll' - %1 is not a valid Win32 application.\r\n in Unknown on line .. Any idea why this could be happening?

    Read the article

  • Wildcards in jnlp template file

    - by Andy
    Since the last security changes in Java 7u40, it is required to sign a JNLP file. This can either be done by adding the final JNLP in JNLP-INF/APPLICATION.JNLP, or by providing a template JNLP in JNLP-INF/APPLICATION_TEMPLATE.JNLP in the signed main jar. The first way works well, but we would like to allow to pass a previously unknown number of runtime arguments to our application. Therefore, our APPLICATION_TEMPLATE.JNLP looks like this: <?xml version="1.0" encoding="UTF-8"?> <jnlp codebase="*"> <information> <title>...</title> <vendor>...</vendor> <description>...</description> <offline-allowed /> </information> <security> <all-permissions/> </security> <resources> <java version="1.7+" href="http://java.sun.com/products/autodl/j2se" /> <jar href="launcher/launcher.jar" main="true"/> <property name="jnlp...." value="*" /> <property name="jnlp..." value="*" /> </resources> <application-desc main-class="..."> * </application-desc> </jnlp> The problem is the * inside of the application-desc tag. It is possible to wildcard a fixed number of arguments using multiple argument tags (see code below), but then it is not possible to provide more or less arguments to the application (Java Webstart will no start with an empty argument tag). <application-desc main-class="..."> <argument>*</argument> <argument>*</argument> <argument>*</argument> </application-desc> Does someone can confirm this problem and/or has a solution for passing a previously undefined number of runtime arguments to the Java application? Thanks alot!

    Read the article

  • Why is HttpClient's GetStringAsync is unbelivable slow?

    - by Jason94
    I have a Windows Phone 8 project where I've taken to use the PCL (Portable Class Library) project too since I'm going to build a Win8 app to. However, while calling my api (in Azure) my HttpClient's GetStringAsync is so slow. I threw in a couple of debugs with datetime and GetStringAsync took like 14 seconds! And sometimes it takes longer. What I'm doing is retrieving simple JSON from my Azure API site. My Android client has no problem with getting that same data in a split second... so is there something I'm missing? The setup is pretty straight forward: HttpClient client = new HttpClient(); client.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json")); client.DefaultRequestHeaders.Add("X-Token", "something"); string responseJSON = await client.GetStringAsync("url"); I've places the debug times right before and after the await there, in between it is 14 seconds! Does someone know why?

    Read the article

  • Error: Get JSON Data from Web API Using Jquery

    - by Kenneth
    I'm really new at this. And I'm really stuck. I have the jquery code, it will load data from Web API, but it does not display on my page. $.getJSON("/api/Order", function(data) { if (data != null) { var str = ''; $.each(data, function (item) { str = '<li>' + item.ItemName + '</li>'; }); $("#contents").append(str); } }); Can anyone explain what is going on? Thanks.

    Read the article

  • Select list auto update on any kind of change?

    - by Tom Irons
    I have a jQuery that when you click on a select option it will show the next one, but you have to click, you cant just use the down arrow or "tab" to the next option. I am wondering what options do I have to make this work? Here is my jQuery: function typefunction() { var itemTypes = jQuery('#type'); var select = this.value; itemTypes.change(function () { if ($(this).val() == '1-Hand') { $('.1-Hand').show(); $('.2-Hand').hide(); $('.off').hide(); $('.Armor').hide(); } else $('.1-Hand').hide(); if ($(this).val() == '2-Hand') { $('.2-Hand').show(); $('.1-Hand').hide(); $('.off').hide(); $('.Armor').hide(); } else $('.2-Hand').hide(); if ($(this).val() == 'Armor') { $('.Armor').show(); $('.2-Hand').hide(); $('.off').hide(); $('.1-Hand').hide(); } else $('.Armor').hide(); if ($(this).val() == 'Off-Hand') { $('.Off').show(); $('.2-Hand').hide(); $('.1-Hand').hide(); $('.Armor').hide(); } else $('.Off').hide(); if ($(this).val() == '1-Hand') { $('.one-hand-dps').show(); $('.item-armor').hide(); $('.two-hand-dps').hide(); } else $('.one-hand-dps').hide(); if ($(this).val() == '2-Hand') { $('.two-hand-dps').show(); $('.one-hand-dps').hide(); $('.item-armor').hide(); } else $('.two-hand-dps').hide(); if ($(this).val() == 'Armor') { $('.item-armor').show(); $('.one-hand-dps').hide(); $('.two-hand-dps').hide(); } else $('.item-armor').hide(); }); } And the HTML: <div class="input-group item"> <span class="input-group-addon">Type</span> <select id="type" name="type" class="form-control" onclick="typefunction(); itemstats(); Armor(); OffHand(); TwoHand();"> <option value="Any Type">Any Type</option> <option value="1-Hand">1-Hand</option> <option value="2-Hand">2-Hand</option> <option value="Armor">Armor</option> <option value="Off-Hand">Off-Hand</option> </select> </div> <div class="input-group item"> <span class="1-Hand input-group-addon" style="display: none;">Sub-Type</span> <select class="1-Hand form-control" name="sub[1]" style="display: none;"> <option value="All 1-Hand Item Types">All 1-Hand Item Types</option> <option>Axe</option> <option>Ceremonial Knife</option> <option>Hand Crossbow</option> <option>Dagger</option> <option>Fist Weapon</option> <option>Mace</option> <option>Mighty Weapon</option> <option>Spear</option> <option>Sword</option> <option>Wand</option> </select> </div> <div class="input-group"> <span class="2-Hand input-group-addon" style="display: none; ">Sub-Type</span> <select class="2-Hand form-control" name="sub[2]" style="display: none;"> <option>All 2-Hand Item Types</option> <option>Two-Handed Axe</option> <option>Bow</option> <option>Diabo</option> <option>Crossbow</option> <option>Two-Handed Mace</option> <option>Two-Handed Mighty Weapon</option> <option>Polearm</option> <option>Staff</option> <option>Two-Handed Sword</option> </select> </div> <div class="input-group"> <span class="Armor input-group-addon" style="display: none;">Sub-Type</span> <select class="Armor form-control" name="sub[3]" style="display:none;"> <option>All Armor Item Types</option> <option>Amulet</option> <option>Belt</option> <option>Boots</option> <option>Bracers</option> <option>Chest Armor</option> <option>Cloak</option> <option>Gloves</option> <option>Helm</option> <option>Pants</option> <option>Mighty Belt</option> <option>Ring</option> <option>Shoulders</option> <option>Spirit Stone</option> <option>Voodoo Mask</option> <option>Wizard Hat</option> </select> </div> <div class="input-group"> <span class="Off input-group-addon" style="display: none;">Sub-Type</span> <select class="Off form-control" name="sub[4]" style="display:none;"> <option>All Off-Hand Item Types</option> <option>Mojo</option> <option>Source</option> <option>Quiver</option> <option>Shield</option> </select> </div>

    Read the article

  • jquery child element as trigger

    - by Dan w
    When "forum-title" is clicked, I want "subtopic-frame" within the parent "forum-topics-head" to expand. There are multiple "forum-topics-head" (with all associated children) on this page. The way I have it now, the "forum-topics-head" is the trigger, but I want the "forum-title" to be the trigger. html: <div class="forum-topic-head"> <div class="forum-title">Forum Title</div> <div class="subtopic-frame"> subtopic 1 subtopic 2 </div> </div>

    Read the article

  • How can i create an n-dimensional array in c

    - by shortCircuit
    I was thinking of making a function that would accept the size of array as a parameter and create a n dimensional array. My room-mate took the liberty of making it complex. He said lets write a function that takes n parameters and returns an n-dimensional array using those parameters as the dimensions. Now i realize an one-day and d array is easy to implement with pointers. For 2d array the snippet would be something like (standard way) : int** x; int* temp; x = (int**)malloc(m * sizeof(int*)); temp = (int*)malloc(m*n * sizeof(int)); for (int i = 0; i < m; i++) { x[i] = temp + (i * n); } where the array is of size m*n; But the problem lies how do we find the nested loop parameters for a n-dimensional array? Is there any way to optimize the code?

    Read the article

  • How do I know that a process has more than 1 thread?

    - by Richard77
    I'have typed ps -ALF and got the following results. Actually there are more to the tow lines that I typed. UID PID PPID LWP C NLWP SZ RSS PSR STIME TTY TIME CMD root 1 0 1 0 1 5900 1644 1 Nov05 ? 00:00:05 /sbin/init root 2 0 2 0 1 0 0 0 Nov05 ? 00:00:00 [kthreadd] I'm supposed to find which process has more than 1 threads. Which column am I supposed to examine? Thanks for helping

    Read the article

  • cakephp htaccess for production install

    - by Joshua Foxworth
    So, I have cakephp installed in what I believed to be the appropriate way for production code with actual cake files above the public_html folder. The app folder is removed from the cake folder and placed at the same level. Loading the home page works fine with the databases and the debug working. However, in trying to run some test files I get a 404. Obviously, I need some way to direct something like www.example.com/posts/index to the proper location. I am not sure as to why this is necessary since the index.php file tells cake where the app directory is located? Also, if I need to use the .htaccess file, how do I point to the proper location and exactly what am I pointed at?

    Read the article

  • How to strip specific contents of a String in Java

    - by user2974877
    So I have a string, and I want to strip out some parts of it using, for example, the firt and last characters of the "interesting" part. String dirty = "$!$!%!%$something interesting&!!$!%$something interesting2"; And the output something like: String clean = "something interesting:something interesting2"; Note: The code needs to work without knowing the random part, changing everytime the program runs. I researched and only found code that does it, but only knowing the random segment.

    Read the article

  • what is the relation between SIGTSTP and SIGCHLD

    - by Rawhi
    I have tow handlers for each one of them (SIGTSTP, SIGCHLD), the thing is that when I pause a process using SIGTSTP the handler function of SIGCHLD run too. what should I do to prevent this . void ExeExternal(char *args[MAX_ARG], char* cmdString, LIST_ELEMENT** pList, int *Susp_Bg_Pid, int *susp) { int pID, status, w; switch (pID = fork()) { case -1: perror("smash error: >"); break; case 0: // Child Process setpgrp(); execv(args[0], args); execvp(args[0], args); perror("error"); exit(EXIT_FAILURE); break; default: if (cmdString[strlen(cmdString) - 1] != '&') { *Susp_Bg_Pid = pID; *susp = 1; while(*susp); } else { InsertElem(pList, args[0], getpid(), pID, 0); } break; } } signal handlers : void signalHandler(int signal) { int pid, cstatus; if (signal == SIGCHLD) { susp = 0; pid = waitpid(-1, &cstatus, WNOHANG); printf("[[child %d terminated]]\n", pid); DelPID(&JobsList, pid); } } void ctrlZsignal(int signal){ kill(Susp_Bg_Pid, SIGTSTP); susp = 0; printf("\nchild %d suspended\n", Susp_Bg_Pid); } Susp_Bg_Pid used to save the paused process id. susp indicates the state of the "smash" the parent process if it is suspended or not .

    Read the article

< Previous Page | 6 7 8 9 10 11 12 13 14 15  | Next Page >