Daily Archives

Articles indexed Friday November 16 2012

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

  • Issue tracking multiple domains with Google Analytics

    - by user359650
    I have 2 domains mydomain.com and mydomain.net which I'm trying to track with the same GA code. Here are the options I turned on: Subdomains of mydomain ON Examples: www.mydomain.com -and- apps.mydomain.com -and- store.mydomain.com Multiple top-level domains of mydomain ON Examples: mydomain.uk -and- mydomain.cn -and- mydomain.fr Which gave me the following code: _gaq.push(['_setAccount', 'UA-123456789-1']); _gaq.push(['_setDomainName', 'mydomain.com']); _gaq.push(['_setAllowLinker', true]); _gaq.push(['_trackPageview']); In this help page I read that _setDomainName must be changed for each domain which I did: -if you go to mydomain.net you get _gaq.push(['_setDomainName', 'mydomain.net']); -if you go to mydomain.com you get _gaq.push(['_setDomainName', 'mydomain.com']); When I generate traffic on both mydomain.dom and mydomain.net and watches GA push requests made with firebug I can see requests generated for both domains and the parameter called utmhn has the proper domain value (which matches that of _setDomainName and the browser address bar). However when I monitor the realtime statistics under Home->Real-Time->Overview I see pageviews for mydomain.net BUT NOT for mydomain.dom :( What am I missing to properly track both domains? PS: in the help page I mentioned they talk about setting up cross links which I didn't do for now as my understanding is that it shouldn't be needed to get what I'm trying to do to work. Also I want to mention that I do not have any tracking code for any of these 2 domains other than the one I mentioned.

    Read the article

  • Recovering domain name from a person I can't find

    - by Daniel Gruszczyk
    I have a problem with one domain and I have no idea how to go about it. I am volunteering for a small charity in Sheffield (UK), more specifically I am redoing their website. A while ago (few years) there was one guy who made that website for them, sorted out a free hosting with another charity, bought domain name etc. Since the domain name is registered in his name, and he disappeared and we have no way of finding/contacting him, we can't move it to different hosting or do virtually nothing about it. Somehow the domain is being renewed every year, we know which domain registration service provider it is registered with, we know the guys name, and that's about it. How would we go about re-registering that domain in the charity's name, instead of that guy, is that at all possible? If we happen to get in touch with him, what should we ask for? Thanks for your help.

    Read the article

  • SEO - Index images (lazyload)

    - by Guilherme Nascimento
    Note:My question is not about Javascript. I'm developing a plugin for jQuery/Mootols/Prototype, that work with DOM. This plugin will be to improve page performance (better user experience). The plugin will be distributed to other developers so that they can use in their projects. How does the lazyload: The images are only loaded when you scroll down the page (will look like this: http://www.appelsiini.net/projects/lazyload/enabled_timeout.html LazyLoad). But he does not need HTML5, I refer to this attribute: data-src="image.jpg" Two good examples of website use LazyLoad are: youtube.com (suggested videos) and facebook.com (photo gallery). I believe that the best alternative would be to use: <A href="image.jpg">Content for ALT=""</a> and convert using javascript, for this: <IMG alt="Content for ALT=\"\"" src="image.jpg"> Then you question me: Why do you want to do that anyway? I'll tell you: Because HTML5 is not supported by any browser (especially mobile) And the attribute data-src="image.jpg" not work at all Indexers. I need a piece of HTML code to be fully accessible to search engines. Otherwise the plugin will not be something good for other developers. I thought about doing so to help in indexing: <noscript><img src="teste.jpg"></noscript> But noscript has negative effect on the index (I refer to the contents of noscript) I want a plugin that will not obstruct the image indexing in search engines. This plugin will be used by other developers (and me too). This is my question: How to make a HTML images accessible to search engines, which can minimize the requests?

    Read the article

  • Web host recommendation [closed]

    - by birdus
    Possible Duplicate: How to find web hosting that meets my requirements? I'm researching a web host for a client and am looking for any recommendations of hosts you may have used and been happy with. Here are the requirements I've been given: The hosting service needs to either provide or allow us to add the following functionality: i. ASP/ASP.Net ii. video streaming iii. audio streaming iv. reporting v. RSS feeds vi. site search vii. forums viii. podcasts ix. Flash x. CMS: looking at using Percussion Software xi. PII registration xii. tie into SF.com (Sales Force) They also want to have a pre-prod server available so they can test the website before going public with it. This may just be a matter of paying extra for another site/server. Thanks for the help.

    Read the article

  • SEO indexing with dynamic titles, keywords and description

    - by Andrea Turri
    I'm working on a worldwide website (all in one single domain) so I'm wondering to create dynamic titles, descriptions, keywords and headings for each location. What I'm doing is to get information from the IP of the user and show for example a dynamic title: var userCity = codeToGetCityFromIP; <title>Welcome to userCity</title> // and same for description, keywords and headings... Obviously the code is different... I'd like to know if it is a good solution to create multiple SEO indexing based on cities? I'm also using GeoLocation and I do same using the returned values from it. I'm doing right or there are more effective ways to indexing in different countries and cities without create multiple website for each city of the world? Thanks.

    Read the article

  • Website design reviews and advice [closed]

    - by dotman14
    I have developed a website for a non-profit organisation, and after a while I constantly get bad reviews on how my CSS is. Most of them don't really say what the problem is or how I can manage to redo or make amends to it. Please what do you advice that I do in this case to make it look better. Please feel free to migrate the question to the appropriate SO site, if this question does not belong here. Thank you.

    Read the article

  • How to give parallax backgrounds more depth

    - by user28015
    I have 3 tiled images of some sort of galaxy/space in the background of a 2D Game: The first one has an alpha of 100%, the second an alpha of 80% and the last one has an alpha of 60%. I scroll the the one in the background slower than the other ones of course. classic parallax. In the foreground I have some particles flying towards the player to simulate some dust / stars flying by. (I know that stars don't fly by, but I think we all have seen this in a lot of games). But I can't quite achieve the depth effect I am looking for. I want it to look "deeper". I did read something about using blending modes for the backgrounds, but that would require to render them as objects right? So the question is: What is a good technique to do a scrolling parallax background in GameMaker?

    Read the article

  • SDK mouse relative motion, weird results

    - by zaftcoAgeiha
    I have a simple SDL application that tracks the relative change in mouse position But for some reason, the motion.xrel and motion.yrel give back massive numbers! my code: SDL_WM_GrabInput(SDL_GRAB_ON); SDL_ShowCursor(false); while(!quit){ // Draw the scene if (invalidated == 1){ on_render(); invalidated = 0; } // And poll for events SDL_PumpEvents(); SDL_Event event; while ( SDL_PollEvent(&event) ) { switch (event.type) { case SDL_KEYDOWN: case SDL_KEYUP: on_key(event.key); break; case SDL_MOUSEMOTION: std::cerr << event.motion.xrel << ":" << event.motion.yrel << std::endl; invalidated = 1; break; ... and the printed results are ridiculous: 400:300 -11297:1705 -11215:1268 -10969:940 -10314:-43 -9986:-698 -9331:-1681 -9003:-2227 -8593:-2664 -8020:-3538 -7774:-3647 -7365:-4193 -7283:-4302 -7119:0 any idea why?? System is Ubuntu 12 running in virtual box

    Read the article

  • C++ OpenGL wireframe cube rendering blank

    - by caleb.breckon
    I'm just trying to draw a bunch of lines that make up a "cube". I can't for the life of me figure out why this is producing a black screen. The debugger does not break at any point. I'm sure it's a problem with my pointers, as I'm only decent at them in regular c++ and in OpenGL it gets even worse. const char* vertexSource = "#version 150\n" "in vec3 position;" "void main() {" " gl_Position = vec4(position, 1.0);" "}"; const char* fragmentSource = "#version 150\n" "out vec4 outColor;" "void main() {" " outColor = vec4(1.0, 1.0, 1.0, 1.0);" "}"; int main() { initializeGLFW(); // Initialize GLEW glewExperimental = GL_TRUE; glewInit(); // Create Vertex Array Object GLuint vao; glGenVertexArrays(1, &vao); glBindVertexArray(vao); // Create a Vertex Buffer Object and copy the vertex data to it GLuint vbo; glGenBuffers( 1, &vbo ); float vertices[] = { 1.0f, 1.0f, 1.0f, // Vertex 0 (X, Y, Z) -1.0f, 1.0f, 1.0f, // Vertex 1 (X, Y, Z) -1.0f, -1.0f, 1.0f, // Vertex 2 (X, Y, Z) 1.0f, -1.0f, 1.0f, // Vertex 3 (X, Y, Z) 1.0f, 1.0f, -1.0f, // Vertex 4 (X, Y, Z) -1.0f, 1.0f, -1.0f, // Vertex 5 (X, Y, Z) -1.0f, -1.0f, -1.0f, // Vertex 6 (X, Y, Z) 1.0f, -1.0f, -1.0f // Vertex 7 (X, Y, Z) }; GLuint indices[] = { 0, 1, 1, 2, 2, 3, 3, 0, 4, 5, 5, 6, 6, 7, 7, 4, 0, 4, 1, 5, 2, 6, 3, 7 }; glBindBuffer( GL_ARRAY_BUFFER, vbo ); glBufferData( GL_ARRAY_BUFFER, sizeof( vertices ), vertices, GL_STATIC_DRAW ); //glBindBuffer( GL_ELEMENT_ARRAY_BUFFER, vbo); //glBufferData( GL_ELEMENT_ARRAY_BUFFER, sizeof( indices ), indices, GL_STATIC_DRAW ); // Create and compile the vertex shader GLuint vertexShader = glCreateShader( GL_VERTEX_SHADER ); glShaderSource( vertexShader, 1, &vertexSource, NULL ); glCompileShader( vertexShader ); // Create and compile the fragment shader GLuint fragmentShader = glCreateShader( GL_FRAGMENT_SHADER ); glShaderSource( fragmentShader, 1, &fragmentSource, NULL ); glCompileShader( fragmentShader ); // Link the vertex and fragment shader into a shader program GLuint shaderProgram = glCreateProgram(); glAttachShader( shaderProgram, vertexShader ); glAttachShader( shaderProgram, fragmentShader ); glBindFragDataLocation( shaderProgram, 0, "outColor" ); glLinkProgram (shaderProgram); glUseProgram( shaderProgram); // Specify the layout of the vertex data GLint posAttrib = glGetAttribLocation( shaderProgram, "position" ); glEnableVertexAttribArray( posAttrib ); glVertexAttribPointer( posAttrib, 3, GL_FLOAT, GL_FALSE, 0, 0 ); // Main loop while(glfwGetWindowParam(GLFW_OPENED)) { // Clear the screen to black glClearColor( 0.0f, 0.0f, 0.0f, 1.0f ); glClear( GL_COLOR_BUFFER_BIT ); // Draw lines from 2 vertices glDrawElements(GL_LINES, sizeof(indices), GL_UNSIGNED_INT, indices ); // Swap buffers glfwSwapBuffers(); } // Clean up glDeleteProgram( shaderProgram ); glDeleteShader( fragmentShader ); glDeleteShader( vertexShader ); //glDeleteBuffers( 1, &ebo ); glDeleteBuffers( 1, &vbo ); glDeleteVertexArrays( 1, &vao ); glfwTerminate(); exit( EXIT_SUCCESS ); }

    Read the article

  • Does concurrency inherently introduce "randomness" into a game?

    - by Jeff
    When a game is implemented with concurrency (as most games are), does this necessarily, by its very nature, introduce an element of randomness into the game that is outside of the players' control? Note that when I use the word "random", I'm not meaning to launch into a philosophical debate about the deterministic nature of the system. I understand that concurrency is deterministic in the sense that the operating system decides which processes to allow time on the CPU and in what order (or the JVM controls which Thread's turn it is to execute, etc). But my understanding of this is that there is no way to control or predict whether one thread's next command will execute before or after another. The reason I'm asking is because this seems like a fundamental difficulty for game development where a game is supposedly designed around a player's skill. Consider a game like League of Legends. Assume that two players are battling it out. It's a very close contest between the two and it's coming down to the wire -- so much so that whoever gets their last attack off will be the one to kill the other and win the game for their team. If the players are implemented using concurrency and the situation really was like this, is it essentially out of the players' hands at this point? Is the outcome of this match all up to whatever system is arbitrarily deciding which player's thread/process will execute next? If not, what am I misunderstanding about concurrency? If so, is there any way around this problem so that a game of skill can always be a game of skill, especially in those most crucial moments?

    Read the article

  • Who should respond to collision: Unit or projectile?

    - by aleguna
    In an RTS if a projectile hits a unit. Who should handle the collision? If projectile handles the collision, it must be aware of all possible types of units, to know what damage to inflict. For example a bullet will likely kill a human, but it will do nothing to a tank. The same goes if unit handles a collision. So either way one of them should be aware of all possible types of the other. Of course the 'true' way would be to do full physics simulation, but that's not an option for an RTS with 1000s of units and projectiles... So what are the common practicies in this regards?

    Read the article

  • Rotating a Quad around it center

    - by Trixmix
    How can you rotate a quad around its center? This is what im trying to do but it aint working: GL11.glTranslatef(x-getWidth()/2, y-getHeight()/2, 0); GL11.glRotatef(30, 0.0f, 0.0f, 1.0f); GL11.glTranslatef(x+getWidth()/2, y+getHeight()/2, 0); DRAW my main problem is that it renders it off the screen.. draw code: GL11.glBegin(GL11.GL_QUADS); { GL11.glTexCoord2f(0, 0); GL11.glVertex2f(0, 0); GL11.glTexCoord2f(0, getTexture().getHeight()); GL11.glVertex2f(0, height); GL11.glTexCoord2f(getTexture().getWidth(), getTexture().getHeight()); GL11.glVertex2f(width,height); GL11.glTexCoord2f(getTexture().getWidth(), 0); GL11.glVertex2f(width,0); } GL11.glEnd();

    Read the article

  • What is going on in this SAT/vector projection code?

    - by ssb
    I'm looking at the example XNA SAT collision code presented here: http://www.xnadevelopment.com/tutorials/rotatedrectanglecollisions/rotatedrectanglecollisions.shtml See the following code: private int GenerateScalar(Vector2 theRectangleCorner, Vector2 theAxis) { //Using the formula for Vector projection. Take the corner being passed in //and project it onto the given Axis float aNumerator = (theRectangleCorner.X * theAxis.X) + (theRectangleCorner.Y * theAxis.Y); float aDenominator = (theAxis.X * theAxis.X) + (theAxis.Y * theAxis.Y); float aDivisionResult = aNumerator / aDenominator; Vector2 aCornerProjected = new Vector2(aDivisionResult * theAxis.X, aDivisionResult * theAxis.Y); //Now that we have our projected Vector, calculate a scalar of that projection //that can be used to more easily do comparisons float aScalar = (theAxis.X * aCornerProjected.X) + (theAxis.Y * aCornerProjected.Y); return (int)aScalar; } I think the problems I'm having with this come mostly from translating physics concepts into data structures. For example, earlier in the code there is a calculation of the axes to be used, and these are stored as Vector2, and they are found by subtracting one point from another, however these points are also stored as Vector2s. So are the axes being stored as slopes in a single Vector2? Next, what exactly does the Vector2 produced by the vector projection code represent? That is, I know it represents the projected vector, but as it pertains to a Vector2, what does this represent? A point on a line? Finally, what does the scalar at the end actually represent? It's fine to tell me that you're getting a scalar value of the projected vector, but none of the information I can find online seems to tell me about a scalar of a vector as it's used in this context. I don't see angles or magnitudes with these vectors so I'm a little disoriented when it comes to thinking in terms of physics. If this final scalar calculation is just a dot product, how is that directly applicable to SAT from here on? Is this what I use to calculate maximum/minimum values for overlap? I guess I'm just having trouble figuring out exactly what the dot product is representing in this particular context. Clearly I'm not quite up to date on my elementary physics, but any explanations would be greatly appreciated.

    Read the article

  • Need game development sandbox like Etoys to do 2D games prototyping

    - by Dimitry Tato
    I am new to game development, and currently working on development a mobile 2D game (for android). As the part of the development process, I need to build a prototype and playtest it, to see if the game mechanics and user interaction is ok For example: if I have a starship shooting at ememies, I need to see what's the best size for my starship. what trajectories should the enemy ships fly and what velocity. Should the enemy ships be coming only from left to right, or also from top Should the enemy ships form a 'flock' or just fly by themselves what's the best 'powerup' pickup mechanics: to shoot it, or to pick it with the ship etc Implementing these details directly in Java (Android) is time consuming and as many of the 'hypotheses' will be rejected, I also don't want to invest a lot of time to code thigs, majority of which gonna be rejected. I found 'tool' Etoys http://www.youtube.com/watch?v=34cWCnLC5nM&feature=related and official website http://www.squeakland.org/ which helps to build 'prototype' quickly, but Etoys is meant for children learning programming and is too basic. SO MY QUESTION IS: Is there any prototyping tool, as simple as Etoys and with better prototype quality?

    Read the article

  • Node.js A Good authentication module ? or whats the proper way to authenticate users?

    - by Mohamed Ahmed
    I'm learning Node.js and looking forward to create a simple web application which will be based on Express and I was thinking of something like creating user groups and each group has its own users and each group has its own permissions (Just like ACL in Cakephp) So can anyone recommend a good module or whatever to do so ? Also I'm a little curious about security and how these passwords are going to be saved and what type of encryption the passwords will be encrypted in. Thanks :)

    Read the article

  • Showing div based on filled form field

    - by Fabio
    I have this script where I use a slider to show some elements of a form. So far so good. The way I'm doing it is by having a slider (can't use a multistep form since it uses a plugin not allowing multistep forms, plus some graphic behaviors) and a button that goes to the next slider. So now I need that button (not part of the form) to show only if a certain field is filled. I tried teh following, but it's not working, I assume some error but can't figure what. My code is as follows: $('#clientname').change(function() { var clientVal = $("input").val() == ''; $(".next").hide(); if ($('#clientname').val() != '').show(); else $('.next').hide(); }); and the html as follows: <div class="b40-right"> <h3>The Basics</h3> <div class="label"> Your Name (required)</div> <div class="inputes"> <span class="wpcf7-form-control-wrap your-name"><input id="clientname" type="text" name="your-name" value="" class="wpcf7-form-control wpcf7-text wpcf7-validates-as-required" size="40" /></span> </div> <div class="label">Your Email (required)</div> <div class="inputes"> <span class="wpcf7-form-control-wrap your-email"><input type="text" name="your-email" value="" class="wpcf7-form-control wpcf7-text wpcf7-email wpcf7-validates-as-required wpcf7-validates-as-email" size="40" /></span> </div> <div class="label">Type of Business</div> <div class="inputes"> <span class="wpcf7-form-control-wrap type-of-business"><textarea name="type-of-business" class="wpcf7-form-control wpcf7-textarea" cols="40" rows="10"></textarea></span> </div> </div> <a class="next" href="javascript:stepcarousel.stepBy('mygallery2', 1)"><img id="nextbut1" src="<?php bloginfo('template_directory'); ?>/images/next.png" alt="" /></a> any help on what am I doing wrong? Is there a better approach/solution? (I'm not a programmer as you may figure) Thank you in advance!

    Read the article

  • Submit multiple forms as one

    - by Stephen Sarcsam Kamenar
    I have two forms on the page. To the user it looks like 1 form, and I actually wish it was one form. But the way I'm trying to reuse code and include things, I can't avoid two forms in the source code... trying to act as one. I don't want to do ajax submit, I want a normal post submit, my form handler has redirects in it. How can I submit both of these, and get values that make sense on the server side. something like $_POST['form1]['whatever'] $_POST['form2]['thing'] Maybe take all the inputs from form 2, rename all of them with a prefix, and append them to form 1? I can't find a non-messy way of doing this. I don't think I need code, just a plan. Least messy idea wins.

    Read the article

  • Getting ID of all elements of a certain class into an array

    - by Tommy Coffee
    Here's what I' trying to do: Currently I am using this to create an array of all elements matching the class name of '.cookie'. Right now I am getting the text value of that element, which is not what I need: var getAllCookies = $('.cookie').text(); var cookiesArray = jQuery.makeArray(getAllCookies); alert(cookiesArray[0]); What I need is to find all elements of a certain class (.cookie), get that elements ID value and store that ID value inside of array.

    Read the article

  • Prove 2^sqrt(log(n))= O(n^a)

    - by user1830621
    I posted a question similar to this earlier, although it seemed like it was much easier. I know the underlying principle of Big-O notation says that to prove that 2^sqrt(log(n)) is O(n^a), there must exist a positive value c for which c(n^a) = 2^sqrt(log(n)) for all values n = N. c*n^a >= 2^sqrt(log(n)) c >= 2^sqrt(log(n)) / n^a This number will always be positive so long as n 0. I suppose I could make N = 1 just to be safe. c = 2^sqrt(log(n)) / n^a N = 1 c*n^a = 2^sqrt(log(n) <= 2^log(n) for all values of n >= 1 Now, I know this is incorrect, because I could just as easily claim that the function 2^sqrt(log(n)) is O(n)...

    Read the article

  • select value of td and download content of selected tds

    - by user1272145
    I have this table <table class="results" id="summary_results"> <tr> <td>select all</td> <td>name</td> <td>id</td> <td>address</td> <td>url</td> </tr> <tr> <td> <input type="checkbox"> </td> <td>john doe</td> <td>1</td> <td>33.85 some address</td> <td>http://www.domain.com</td> </tr> <tr> <td> <input type="checkbox"> </td> <td>jane doe</td> <td>2</td> <td>34.85 some address</td> <td>http://www.domain2.com</td> </tr> <tr> <td> <input type="checkbox"> </td> <td>sam</td> <td>3</td> <td>33.86 some address</td> <td>http://www.domain3.com</td> </tr> </table> I would like to select all the rows then download the content of the urls knowing that each url is linked to the id. for example the first url will be www.domain.com?id=1&report=report

    Read the article

  • Cannot access data in a xml string

    - by Jess McKenzie
    I am trying to create an array that I can include the perent category Name and the child category Name. I can so far access the below object fine using $xml->Subcategories; but if I try my code below I get an empty array why? PHP: foreach ($catDetailsXml->Category as $value) { $categoryDetails[] = array('CategoryNumber' => $value->Number); } Structure: object(SimpleXMLElement)#13 (1) { ["Category"]=> array(5) { [0]=> object(SimpleXMLElement)#14 (4) { ["Name"]=> string(19) "Commercial Property" ["Number"]=> string(10) "0350-0100-" ["Subcategories"]=> object(SimpleXMLElement)#35 (1) { ["Category"]=> array(3) { [0]=> object(SimpleXMLElement)#36 (4) { ["Name"]=> string(9) "Car parks" ["Number"]=> string(15) "0350-0100-8946-" ["Subcategories"]=> object(SimpleXMLElement)#39 (0) { } }

    Read the article

  • will destroyed() be emitted if the constructor of a class derived from QObject throws?

    - by PorkyBrain
    Ive seen Qt GUI syntax like the following all over the place: myDialog::myDialog(QWidget *parent, Qt::WFlags flags):QDialog(parent, flags) { QPushButton *button = new QPushButton("&Download", this); QVBoxLayout *layout = new QVBoxLayout(this); //something that can throw here layout ->addWidget(button ); setLayout(layout); } I've always wondered if this can leak in the event of an exception because the "this" I'm giving as a parent to button and layout is not fully constructed so it might not destroy its children. I tried it out in MSVC2010 Qt4.8.3 and it looks like as soon as the base QObject class is fully created (which is done first of course) it is ok to pass "this" to other objects in the constructor, they will destroyed correctly. I haven't found the spot in the Qt docs guaranteeing this though, can someone point me to it so I have assurance that this will not change in the future?

    Read the article

  • android google maps my location

    - by windblow
    I have google maps activity where i would like to get my location but im facing NullPointerException... locManager = (LocationManager) getSystemService(Context.LOCATION_SERVICE); locManager.requestLocationUpdates(LocationManager.NETWORK_PROVIDER, 0, 0, this); Location location = locManager.getLastKnownLocation(LocationManager.NETWORK_PROVIDER); System.out.println("loaded4"); myPoint = new GeoPoint((int)(location.getLatitude()*1E6),(int)(location.getLongitude()*1E6)); System.out.println("loaded5"); I am able to get "loaded4" but not "loaded5" So NullPointer cause is between them. I also tried to use GPS_PROVIDER but it didnt work out. Yes i have all permissions in manifest. Map is able to load in if im not searhing for my loacation. Is it possible its NullPointer because before that i load some other coordinates in same class ? Maybe its emulator fault ? I can give extended code if needed. Using source from http://www.chupamobile.com/tutorial/details/53

    Read the article

  • Algorithm for redirecting the traffic

    - by TechGeeky
    I was going through the interview questions and found out the below question which I am not able to answer it. Can anyone provide some sort of algorithm for this problem how can I solve it? There are a cluster of stateless servers all serving the same pages. The servers are hosting 5 web pages- p1.html, p2.html, p3.html, p4.html and p5.html p1.html just redirects users to the other 4 pages Requests to p1.html should result in 10% of users being redirected to p2.html, 5% of users redirected to p3.html, 20% of users redirected to p4.html, and 65% of users redirected to p5.html. Users do not need to stick to the page they are first redirected to. They could end up on a different page with every request to p1.html Write a function/pseudocode that would be invoked with every request to p1.html and redirect the correct percentage of users to the correct page. Any suggestions will be of great help.

    Read the article

  • CMD Execption Handling C/C++

    - by ciyo
    I will use some CMD commands in my program and these commands might throw some exceptions. And as you know, when an exception accours, CMD writes its own error message the screen. But, I want to write my own error message. My question is this: Is there a way to block CMD messages and write only my own error messages? P.S. This is not a complex program. It executes CMD commands using System(). Example: Let's say, the user can rename and copy any files in the program. As you know, if the user does not enter file's path properly, an error message is showed on the screen. And I want that this error message never appears on the screen. Only my own error message is showed. Thank you!

    Read the article

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