Daily Archives

Articles indexed Thursday October 24 2013

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

  • More than 5 custom variables across multiple websites using Google Analytics

    - by brakes
    We have multiple websites using the same Google Analytics account number so we can track visitors across multiple websites. One of these websites has set 5 custom variables. We want to introduce a new custom variable to track logged in users for our single sign-on (SSO) system to find out what parts of which website they are accessing. Is this possible or is it a case that all the custom variables have been used up by 1 of the sites?

    Read the article

  • Multi language switch links translated or in current language?

    - by FFish
    Should I do: A: translate the language links in the current language: (if I am on the English version) <a href="en/">English</a> | <a href="it/">Italian</a> | <a href="fr/">French B: the links in the native languages: <a href="en/">English</a> | <a href="it/">Italiano</a> | <a href="fr/">Français</a> From a user perspective option B is obvious, but what about SEO?

    Read the article

  • Reversing animated sprites

    - by brandon sedgwick
    I have created a sprite sheet of which consists of 6 frames with a character moving legs each frame, now I have coded it so that the animation is running successfully from frame 1 to 6, however I am trying to reverse this so then when it goes from 1 to 6 instead of restarting it go's 6 to 1 in a continuous loop. The coding for current animation is: void SpriteGame::Update(int tickTotal, int tickDelta) { //This is where you manage the state of game objects if ( tickTotal >= this->playerLastFrameChange + 4) { //Four ticks have elapsed since the last frame change this->playerFrame = this->playerFrame + 1; this->playerLastFrameChange = tickTotal; //We've just changed the frame if (this->playerFrame >= this->playerSheetLength) { this->playerFrame = playerLastFrameChange + 4; } //Frame has changed so change the source rectangle this->playerSourceRect->left = this->playerFrame * 64; this->playerSourceRect->top = 0; this->playerSourceRect->right = (this->playerFrame + 1) * 64; this->playerSourceRect->bottom = 64; } } any help please I am using DirectX11 as thats what we are being told to use as its for an win 8 game.

    Read the article

  • OpenGL ES 2/3 vs OpenGL 3 (and 4)

    - by Martin Perry
    I have migrated my code from OpenGL ES 2/3 to OpenGL 3 (I added bunch of defines and abstract classes to encapsulate both versions, so I have both in one project and compile only one or another). All I need to change was context initialization and glClearDepth. I dont have any errors. This was kind of strange to me. Even shaders are working correctly (some of them are GL ES 3 - with #version 300 es in their header) Is this a kind of good solution, or should I rewrite something more, before I start adding another functionality like geometry shaders, performance tools etc ?

    Read the article

  • Different ways to pass Textures into HLSL shaders

    - by codymanix
    The GraphicsDevice class of xna 4 has the properties Textures and VertexTextures. What is the exact difference? I don't really understand what MSDN tells me about this. I usually use Effect parameters to pass textures to my HLSL shaders. What are the differences between these methods, which is faster? My Scenario: I am working on a minecraft like game, which means lots of separate DrawPrimitives calls and change current Texture often since I have lots of different block types. Since I use an Octtree to organize the world, I cannot easily sort by texture.

    Read the article

  • How to make Pokémon White 3D effect?

    - by Pipo
    I just wondered how to create a 3D effect similar to Pokemon White/Black? It seems to be not polygon based, but created just with sprites. If the perspective changes the sprites stay sharp and don't get blurred. How can I archive this? Source: https://www.youtube.com/watch?v=fZEPUPYOnRc&feature=youtube_gdata_player Edit: Wow, two downvotes because I used a video instead of screenshots? Don't get me wrong, I thank you, because you want to help me, but the 3D effect can be better understand in motion. Anyway, here is a screenshot: http://wearearcade.com/wp-content/uploads/2011/03/pokemon-black-white-starter-town.jpg So, if this is a hardware limitation, how can I archive this o na different hardware, e.g. a HTML5 game? Thank you.

    Read the article

  • create file in user's temp folder

    - by user2867494
    I am using the following code to try and create a file in the user's temp folder, but it will not. var fs = require('fs'); var os = require('os'); var ostemp = os.tmpdir(); var exec = require('child_process').exec; var file = fs.createWriteStream(ostemp + '\setup.exe'); ostemp will return a path similar to 'c:\users\user\appdata\local\temp' But the code above will save the file to local, and the filename will be tempsetup.exe Why is that?

    Read the article

  • Creating a dataframe in pandas by multiplying two series together

    - by Aoife
    Say I have two series in pandas, series A and series B. How do I create a dataframe in which all of those values are multiplied together, i.e. with series A down the left hand side and series B along the top. Basically the same concept as this, where series A would be the yellow on the left and series B the yellow along the top, and all the values in between would be filled in by multiplication: http://www.google.co.uk/imgres?imgurl=http://www.vaughns-1-pagers.com/computer/multiplication-tables/times-table-12x12.gif&imgrefurl=http://www.vaughns-1-pagers.com/computer/multiplication-tables.htm&h=533&w=720&sz=58&tbnid=9B8R_kpUloA4NM:&tbnh=90&tbnw=122&zoom=1&usg=__meqZT9kIAMJ5b8BenRzF0l-CUqY=&docid=j9BT8tUCNtg--M&sa=X&ei=bkBpUpOWOI2p0AWYnIHwBQ&ved=0CE0Q9QEwBg Thanks!

    Read the article

  • Anova test in the loop and outputing the p-value in separate column

    - by Juanhijuan
    Once again I'm trying to get an answer. I am already stuck for like 5h with that so that's why I keep trying to get an answer. That's my data: id Sequence variable value 75 AAAAGAAAVANQGKK BiotinControl1_2 3893050.50 192 AAAAGAAAVANQGKK BiotinControl1_2 900604.61 3770 AAFTKLDQVWGSE BiotinControl1_2 90008.14 The code which I am trying to use to calculate the p-value: My Code: tbl_anv <- tbl_all_onlyK[,c("id", "BiotinControl1_2", "BiotinControl2", "BiotinControl3", "BiotinTreatment1_2", "BiotinTreatment2", "BiotinTreatment3", "Sequence")] tbl_reo <- melt(tbl_anv, measure.vars=2:7) set.seed(1) vars <- c("id", "BiotinControl1_2", "BiotinControl2", "BiotinControl3", "BiotinTreatment1_2", "BiotinTreatment2", "BiotinTreatment3", "Sequence") tbl_reo <- as.data.frame(tbl_reo) by(tbl_reo,tbl_reo$Sequence,function(x){ anova(lm(value ~ variable, data = x))$"Pr(>F)"[1] }) An error ocurs: There were 50 or more warnings (use warnings() to see the first 50) Anyway, how can I do that and export the p-value in the separate column. That's what I tried to do on my own: aov_test <- by(tbl_reo,tbl_reo$Sequence,function(x){ anova(lm(value ~ variable, data = x))$"Pr(>F)"[1] }) tbl_reo[,5] <- aov.test[[1]]$'Pr(>F)'[1]

    Read the article

  • How to get XML nodes content when names include special Characters?

    - by paoloi
    Im trying to navigate an XML block similar to this one ($doc) using PHP simplexml_load_string and using xpath on $doc to get only the 'Day' block like this: $myday = $doc->xpath ('//Day'); that lets me access all data from the block as an object, meaning $doc-AdultCount returns 1 and $doc-Id returns "6a0" however I can't access "SpecialDeals" content not using: $doc-SpecialDeals nor using: $doc-SpecialDeals-a:string Whats is the right syntax in this case? Thanks in advance. <Days> <DaysId>687</DaysId> <Day> <AdultsCount>1</AdultsCount> <Availability>Available</Availability> <Id>6a0</Id> <RoomType>Studio</RoomType> <SpecialDeals xmlns:a="http://microsoft.com/2003/Arrays"> <a:string>Best Day Ever</a:string> </SpecialDeals> </Day> <DaysPrice>247.4</DaysPrice> </Days>");

    Read the article

  • How to ignore an exception and continue processing a foreach loop?

    - by Barry Dysert
    I have a test program that is supposed to loop over all the files under C:. It dies when it hits the "Documents and Settings" folder. I'd like to ignore the error and keep looping over the remaining files. The problem is that the exception is thrown in the foreach, so putting a try/catch around the foreach will cause the loop to exit. And putting a try/catch after the foreach never fires (because the exception is thrown in the foreach). Is there any way to ignore the exception and continue processing the loop? Here's the code: static void Main(string[] args) { IEnumerable<string> files = Directory.EnumerateFiles(@"C:\", "*.*", SearchOption.AllDirectories); foreach (string file in files) // Exception occurs when evaluating "file" Console.WriteLine(file); }

    Read the article

  • Unable to debug simple Java application in Eclipse. Cannot connect to VM. AGENT_ERROR_TRANSPORT_INIT(197)

    - by Heptaparaparshi
    When i try to debug a simple application in Eclipse i receive a following error: Cannot connect to VM com.sun.jdi.connect.TransportTimeoutException And console provides me with a lonely string: FATAL ERROR in native method: JDWP No transports initialized, jvmtiError=AGENT_ERROR_TRANSPORT_INIT(197) I have JRE 1.6, JRE 1.7 and JDK 1.7 installed. Tried all of them. I've seen tons of same topics, but not a single answer helped me to solve my issue. Here they are: 1) Disable Firewall. Doesn't help. I have latest Avast ver. 9.0 at the moment. I'm a bit suspicious about that software, because before updating my Avast i was able to debug in Eclipse. I think it may cause this error, but i do not have direct clues :). I may ping my machine, firewall doesn't block Eclipse traffic, etc. 2) Add strings to hosts file. No reaction. ::1 localhost.localdomain localhost 127.0.0.1 localhost 3) Changing Network Settings in Java Control Panel to "Direct" connection. Doubtful advice. Also read that thing: http://wiki.eclipse.org/Debug/FAQ Can anyone help me to find out what is happening? Or guide me in the right direction?

    Read the article

  • protecting applet code against hackers

    - by CodeMed
    I have a Java application that I am considering releasing over the web as an applet. I am concerned about java-savvy end users being able to somehow view the source code, given that my web server would be sending the code to their remote jvm when they try to use the applet. What precautions can be taken to ensure that end users are never able to directly view source code of an applet? I am hoping that release as an applet might somehow protect the privacy of the code more than releasing an application with downloadable jars that the user could just unzip. Is this true?

    Read the article

  • Why isn't this javascript with else if working?

    - by Uni
    I'm sorry I can't be any more specific - I have no idea where the problem is. I'm a total beginner, and I've added everything I know to add to the coding, but nothing happens when I push the button. I don't know at this point if it's an error in the coding, or a syntax error that makes it not work. Basically I am trying to get this function "Rip It" to go through the list of Dewey decimal numbers, change some of them, and return the new number and a message saying it's been changed. There is also one labeled "no number" that has to return an error (not necessarily an alert box, a message in the same space is okay.) I am a total beginner and not particularly good at this stuff, so please be gentle! Many thanks! <!DOCTYPE html> <html> <head> <script type="text/javascript"> function RipIt() { for (var i = l; i <=10 i=i+l) { var dewey=document.getElementById(i); dewey=parseFloat(dewey); if (dewey >= 100 && 200 >= dewey) { document.getElementById('dewey'+ 100) } else if (dewey >= 400 && 500 >= dewey) { document.getElementById('dewey'+ 200) } else if (dewey >= 850 && 900 >= dewey) { document.getElementById('dewey'-100) } else if (dewey >= 600 && 650 >= dewey) { document.getElementById('dewey'+17) } } } </script> </head> <body> <h4>Records to Change</h4> <ul id="myList"> <li id ="1">101.33</li> <li id = "2">600.01</li> <li id = "3">001.11</li> <li id = "4">050.02</li> <li id = "5">199.52</li> <li id = "6">400.27</li> <li id = "7">401.73</li> <li id = "8">404.98</li> <li id = "9">no number</li> <li id = "10">850.68</li> <li id = "11">853.88</li> <li id = "12">407.8</li> <li id = "13">878.22</li> <li id = "14">175.93</li> <li id = "15">175.9</li> <li id = "16">176.11</li> <li id = "17">190.97</li> <li id = "18">90.01</li> <li id = "19">191.001</li> <li id = "20">600.95</li> <li id = "21">602.81</li> <li id = "22">604.14</li> <li id = "23">701.31</li> <li id = "24">606.44</li> <li id = "25">141.77</li> </ul> <b> </b> <input type="button" value="Click To Run" onclick="RipIt()"> <!-- <input type="button" value="Click Here" onClick="showAlert();"> --> </body> </html>

    Read the article

  • HTTP post using php and curl failing

    - by user2916484
    I am trying to send an XML file to an external system. I am using the below code for doing so, which I got over the internet. But I observed that when i put an echo on the xml variable, it does not show me the XML as a string, but it is parsing the xml and showing me the values. Same is happening when I am sending this to external system. Which is failing. Can you please tell me a way, in which the XML is not parsed and I can send the entire XML text as a string to external system? My code is below. <?php $xml = '<?xml version=\"1.0\" encoding="UTF-8" ?><shiporder><orderID>1234</orderID> <orderperson>John Smith</orderperson></shiporder>'; $xml2 = ''; $headers = array( "Content-type: text/xml", "Content-length: " . strlen($xml), "Connection: close", ); // give the path of the Third party site $url = "http://<server>:<port>/XMII/Illuminator?service=WSMessageListener&mode=WSMessageListenerServer&NAME=shiporder&IllumLoginName=<name>&IllumLoginPassword=<pswd>"; echo $xml; echo $url; $ch = curl_init(); curl_setopt($ch, CURLOPT_URL,$url); //curl_setopt($ch, CURLOPT_MUTE, 1); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_TIMEOUT, 10); curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); curl_setopt($ch, CURLOPT_POSTFIELDS, $xml); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); $output = curl_exec($ch); echo $output; curl_close($ch); ?> Regards, Gita

    Read the article

  • Regex get multiple segments of a string in javascript

    - by dave
    I'm trying to extract some results from a download manager, the format is: [#8760e4 4.3MiB/40MiB(10%) CN:2 DL:4.9MiB ETA:7s] what I'd like to extract from the above example, would be an array that looks like this: ['4.3','MiB','40','MiB','10%','4.9','MiB','7','s'] I've tried to split this in various combinations, but nothing seems to be right. Would anyone happen to know how to do this or be able to offer suggestions? Thank you!

    Read the article

  • CSS Sliding Underline does not work in Safari?

    - by ghilton
    I have created a navigation menu which has a 'sliding underline' effect for each hyperlink. JS Fiddle: http://jsfiddle.net/ZZuQR/12/ RELEVANT CODE: /* sliding underline */ nav li a:after { content: " "; display:block; margin: 5px 0px 0px 0px; border-bottom: 3px solid transparent; width: 0px; transition: 0.5s ease; } nav li a:hover:after { border-bottom: 3px solid #0076a3; width:50px; } This solution works in Chrome but not in Safari. Does anyone know why this might be?

    Read the article

  • How can I define a method with multiple optional arguments in Obj-C

    - by The Dark Bug Returns
    I want to be able to update two sets of identical buttons with one function. Also I don't want to update all the buttons, only some of them. Can I have a function like this?: -(void) updateFields{ updateButton1 : (Bool) x updateButton2 : (Bool) y updateButton3 : (Bool) z } The implementation will look like this: [button1_1 setEnabled:x]; [button1_2 setEnabled:x]; //called only if updateButton1 is given an argument [button2_1 setEnabled:y]; etc...

    Read the article

  • what's the job of std::unique_lock when used with std::conditional_variable::wait()

    - by Mike
    I'm quite confused with the need of a std::unique_lock when wait a std::conditional_variable. So I look into the library code in VS 2013 and get more confused. This is how std::conditional_variable::wait() implemented: void wait(unique_lock<mutex>& _Lck) { // wait for signal _Cnd_waitX(&_Cnd, &_Lck.mutex()->_Mtx); } Is this some kind of joke? Wrap a mutex in a unique_lock and do nothing but get it back latter? Why not just use mutex in the parameter list?

    Read the article

  • Javascript/Jquery pop-up window in Asp.Net MVC4

    - by Mark
    Below I have a "button" (just a span with an icon) that creates a pop-up view of a div in my application to allow users to compare information in seperate windows. However, I get and Asp.Net Error as follows: **Server Error in '/' Application. The resource cannot be found. Requested URL: /Home/[object Object]** Does anyone have an Idea of why this is happending? Below is my code: <div class="module_actions"> <div class="actions"> <span class="icon-expand2 pop-out"></span> </div> </div> <script> $(document).ajaxSuccess(function () { var Clone = $(".pop-out").click(function () { $(this).parents(".module").clone().appendTo("#NewWindow"); }); $(".pop-out").click(function popitup(url) { LeftPosition = (screen.width) ? (screen.width - 400) / 1 : 0; TopPosition = (screen.height) ? (screen.height - 700) / 1 : 0; var sheight = (screen.height) * 0.5; var swidth = (screen.width) * 0.5; settings = 'height=' + sheight + ',width=' + swidth + ',top=' + TopPosition + ',left=' + LeftPosition + ',scrollbars=yes,resizable=yes,toolbar=no,status=no,menu=no, directories=no,titlebar=no,location=no,addressbar=no' newwindow = window.open(url, '/Index', settings); if (window.focus) { newwindow.focus() } return false; }); });

    Read the article

  • minimum enclosing rectangle of fixed aspect ratio

    - by Ramya Narasimha
    I have an Image with many rectangles at different positions in the image and of different sizes (both overlapping and non-overlapping). I also have a non-negative scores associated with each of these rectangles. My problem now is to find one larger rectangle *of a fixed (given) aspect ratio* that encloses as many of these rectangles as possible. I am looking for an algorithm to do this, if anyone has a solution, even a partial one it would be helpful. Please note that the positions of the rectangles in the image is fixed and cannot be moved around and there is no orientation issue as all of them are upright.

    Read the article

  • How to remove Modules from a Intellij Maven Project permanently?

    - by herpnderpn
    I am currently working on a larger scale Maven-based project in IntelliJIdea 12.1.6 Ultimate. I have been working with IntelliJIdea since about 5 months. An included module has dependencies on another module. The dependent module's source was also part of my project until recently. Since I removed the dependent module from my project, I get compile errors whenever I am trying to compile the source without maven. The pom.xml of removed modules in Intellij seem to be placed onto the Settings-Maven-Ignored Files. I cant seem to remove it from there, only check or uncheck it. It's not possible to include the module again since IntelliJ will say its still under Ignored Files. 2 ways allow me to compile again: Uncheck the pom from Ignored files, which will include the module again in my project. Or delete the source of the dependent project, so my project will load the dependent module from the maven repository. But whenever I update my project from svn, the source of the dependent module is restored (I don't know why this even happens since its not part my project) and the cycle begins anew. I googled this for a while since it gets really annoying. It became a problem with several excluded modules. I could rebuild the intellij-project but since a lot of IntelliJ settings were made (not related to the problem) I would rather solve this. Any help is appreciated, I guess I must be missing something

    Read the article

  • reorder XML elements or set an explicit template with XSLT

    - by Sash
    I tried the solution in my previous question (flattening XML to load via SSIS package), however this isn't working. I now know what I need to do, however I need some guidance on how to do it. So say I have the following XML structure: <person id="1"> <name>John</name> <surname>Smith</surname> <age>25</age> <comment> <comment_id>1</comment_id> <comment_text>Hello</comment_text> </comment> <comment> <comment_id>2</comment_id> <comment_text>Hello again!</comment_text> </comment> <somethingelse> <id>1</id> </somethingelse> <comment> <comment_id>3</comment_id> <comment_text>Third Item</comment_text> </comment> </person> <person id="2"> <name>John</name> <surname>Smith</surname> <age>25</age> <somethingelse> <id>1</id> </somethingelse> </person> ... ... If I am to load this into a SSIS package, as an XML source, what I will essentially get is a table created for each element, as opposed to get a structured table output such as person table (name, surname, age) somethingelse table (id) comment table (comment_id, comment_text) What I end up getting is: person table (person_Id <-- internal SSIS id) name table surname table age table person_name table person_surname table person_comment_comment_id table etc... What I found was that if each element and all inner elements are not in the same format and consistency, i will get the above anomaly which makes it rather complex especially if I am dealing with 80 - 100+ columns. Unfortunately I have no way of modifying the system (Lotus Notes) that produces these reports, so I was wondering whether I may be able to explicitly have an XSLT template that will be able to align each person sub elements (and the sub collection elements such as comments ? Unless there is a quicker way to realign all inner elements. Seems that SSIS XML source requires a very consistent XML file in the sense of: if the name element is in position 1, then all subsequent name elements within person parent have to be in position 1. SSIS seems to pickup the inconsistencies if there are certain elements missing from one parent to another, however, if their ordering is not right (A, B, C)(A, B, C)(A,C,B), it will chuck a massive fuss! All help is appreciated! Thank you in advance.

    Read the article

  • How to emulate mod_rewrite in PHP

    - by Tyler Crompton
    I have a few URLs that I want to map to certain files via PHP. Currently, I am just using mod_rewrite in Apache. However, my application is getting too large for the rewriting to be done with regular expressions. So I created a file router.php that does the rewriting. I understand to do a redirect I could just send the Location: header. However, I don't always want to do a redirect. For example, I may want /api/item/ to map to the file /herp/derp.php relative to the document root. I need to preserve the HTTP method as well. "No problem," I thought. I made my .htaccess have the following snippet. RewriteEngine On RewriteRule ^api/item/$ /cgi-bin/router.php [L] And my router.php file looks as follows: <?php $uri = parse_url($_SERVER['REQUEST_URI']); $query = isset($uri['query']) ? $uri['query'] ? array(); // some code that modifies the query require_once "{$_SERVER['DOCUMENT_ROOT']}/herp/derp.php?" . http_build_query($query); ?> However, this doesn't work, because the OS is looking for a file named derp.php?some=query. How can I simulate a rewrite rule such as RewriteRule ^api/item/$ /herp/derp/ [L] in PHP. In other words, how do I tell the server to process a different URL than requested and preserve the query and HTTP method without causing a redirect? Note: Using variables set in router.php is less than desirable and is bad structure since it's only supposed to be responsible for handling URLs. I am open to using a light-weight third party solution.

    Read the article

  • LINK : fatal error LNK1104: cannot open file '.obj'

    - by FL3SH
    I have a big problem with building a simple program. I am using many tutorials, instructions and I can't solve it. I edit the variable's path as follows: C/C++-General-Additionals Include Directories-MyOpenCv\build\include Linker-General-Additionals Library Directories-MyOpenCv\build\x86\vc11\lib Linker-Input-Additional Dependencies-*I added .libs The same in Debug and Release.Windows 8 x64, VS2012 x32, OpenCV 2.4.5

    Read the article

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