Daily Archives

Articles indexed Sunday June 1 2014

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

  • Usefulness of blogs for multi language ecommerce site

    - by jawilson
    I have a multi-language ecommerce site for which I am trying to improve its online marketing. There's currently a blog for the english shop, on a subdomain, which doesn't really get very much traffic. I'd been recommended to set up blogs for each of the different language shops and try to generate traffic to each of the blogs. I'm wondering if this is really worth the effort and cost (blog devt costs and ongoing translations required). Does anyone have any experience/advice on this at all? Perhaps where they've used this approach successfully or otherwise?

    Read the article

  • Is it ok to nofollow all outbound links? [duplicate]

    - by Noam
    This question already has an answer here: Could globally applying rel=“nofollow” to external links have a negative SEO impact 1 answer I'm currently adding a nofollow to almost all of my outbound links thinking this will keep the PR inside my domain. Is this a bad approach?

    Read the article

  • Which MIME type to compress? and what If I omit the `type` attribute from the HTML?

    - by rockyraw
    Per my request, my webhost had turned mod_deflate ON. In my Cpanel I now have an "Optimize Website" button. Inside that menu I could either choose: "Compress all content" or "Compress the specified MIME types" with the following default MIME types: "text/html text/plain text/xml" Which option should I choose and why? If I choose option 2, which types should I add (is there a recommended list with the exact way they should be written)? According to Google recommendations, I have omitted the type="text/css" attributes from all CSS references, as well as the type="text/javascript" attributes from all script references. Would this hinder the "gzipping" process?

    Read the article

  • Sun & Moon Movement

    - by Thomas Mosey
    I'm creating a 2D HTML5 Canvas Game and am stuck on how to go about animating my Sun & Moon. The current setup is basically setting the moon at -1024 on the X-axis and the sun at 0 and animating them at 1 pixel a second. My canvas width is 1024 pixels and whenever the sun/moons X position crosses over the width of the canvas, it's X position is then set to -1024 to repeat the animation. What I am trying to do is get it to sync up with my day/night cycles. Each day is 10000 ticks long (A tick being added every frame) with Day/Night being 50% each (5000 ticks each). What I am trying to calculate is what I'll need to add to the X position of each per frame to get the sun from an X of 0 to 1024 after 5000 ticks/frames. Any help is appreciated.

    Read the article

  • XNA Load/Unload logic (contentmanager?)

    - by Rhinan
    I am trying to make a point-and-click adventure game with XNA, starting off simple. My experience with XNA is about a month old now, know how the classes and inheritance works (basic stuff). I have a problem where I cannot understand how I should load and unload the textures and game objects in the game, when the player transitions to another level. I've googled this 10 times, but all I find is hard coding while I don't even understand the basics of unloading yet. All I want, is transitioning to another level (replacing all the sprites with new ones). Thanks in advance

    Read the article

  • XNA Guide text input - maximum length

    - by simonalexander2005
    so I am using Guide.BeginShowKeyboardInput to get the user to enter their username. I would like this to be limited to 20 characters, and it seems to break expected behaviour to let them input whatever they like and trim it later - so how would I go about limiting what they can input in the text box itself? I have the following code: public string GetKeyboardInput(string title, string description, string defaultText, int maxLength) { if (input.CheckCancel()) { useKeyboardResult = false; KeyboardResult = null; } if (KeyboardResult == null && !Guide.IsVisible) { KeyboardResult = Guide.BeginShowKeyboardInput(PlayerIndex.One, title, description, defaultText, null, null); useKeyboardResult = true; } else if (KeyboardResult != null && KeyboardResult.IsCompleted) { string result = Guide.EndShowKeyboardInput(KeyboardResult); KeyboardResult = null; if (result == null) { useKeyboardResult = false; return null; } if (useKeyboardResult) { KeyboardResult = null; return result; } } else //the user is still entering inputs { } return null; } I assume the code I need would go in that final, empty else{} block, but I can't see any way to do this. Does anyone know how?

    Read the article

  • First time android game development [on hold]

    - by Dave
    My friend and i are developing a android game. This is my first time develop android game, so we don't know how to code The game is 2d game and we develop it without 3rd party engine / framework. Now we got a few questions, hope you can help us. In game play, using 'Surfaceview' only to achieve it. Is it best practice? On 'Surfaceview', a lot of difference button(Menu, pause, game object..etc) is on it, but I don't know how to code it? (actually, i have already done, but...so stupid way. Detect the user touch position (x, y) to identify where they touch[rect(x1,y1,x2,y2).contain(x,y)] Is it right? Teach me how to do if wrong. View / Surfaceview / OpenGL, which is suitable for us? (if like Tetris) Thank you for your help. Ps: My english is not good, hope you can understand what i mean.

    Read the article

  • Displaying and updating score in Android (OpenGL ES 2)

    - by user16547
    I'm using a FrameLayout where I have a GLSurfaceView at the bottom and a few Views on top of it. One of those Views is a TextView that displays the current score. Here's how I'm updating the score TextView based on what happens in my game loop: whenever an event happens that increases the score, I call activity.runOnUiThread(updater), where activity is the activity that has the above FrameLayout (my main game activity) and updater is just a Runnable that increments the score. From my understanding, using runOnUiThread() from the OpenGL thread is standard practice - otherwise you'll get an exception, I can't remember its name. The problem is that there's a very noticeable lag between the event and the score update. For example the character gets a coin, but the coin count is not updated quickly. I tried summing all the score events from my game loop and calling runOnUiThread() only once per loop, but it doesn't seem to make much of a difference - the lag is still noticeable. How can I improve my design to avoid this lag?

    Read the article

  • Bouncing ball slowing down over time

    - by user46610
    I use the unreal engine 4 to bounce a ball off of walls in a 2D space, but over time the ball gets slower and slower. Movement happens in the tick function of the ball FVector location = GetActorLocation(); location.X += this->Velocity.X * DeltaSeconds; location.Y += this->Velocity.Y * DeltaSeconds; SetActorLocation(location, true); When a wall gets hit I get a Hit Event with the normal of the collision. This is how I calculate the new velocity of the ball: FVector2D V = this->Velocity; FVector2D N = FVector2D(HitNormal.X, HitNormal.Y); FVector2D newVelocity = -2 * (V.X * N.X + V.Y * N.Y) * N + V; this->Velocity = newVelocity; Over time, the more the ball bounced around, the velocity gets smaller and smaller. How do I prevent speed loss when bouncing off walls like that? It's supposed to be a perfect bounce without friction or anything.

    Read the article

  • How to import a module from PyPI when I have another module with the same name

    - by kuzzooroo
    I'm trying to use the lockfile module from PyPI. I do my development within Spyder. After installing the module from PyPI, I can't import it by doing import lockfile. I end up importing anaconda/lib/python2.7/site-packages/spyderlib/utils/external/lockfile.py instead. Spyder seems to want to have the spyderlib/utils/external directory at the beginning of sys.path, or at least none of the polite ways I can find to add my other paths get me in front of spyderlib/utils/external. I'm using python2.7 but with from __future__ import absolute_import. Here's what I've already tried: Writing code that modifies sys.path before running import lockfile. This works, but it can't be the correct way of doing things. Circumventing the normal mechanics of importing in Python using the imp module (I haven't gotten this to work yet, but I'm guessing it could be made to work) Installing the package with something like pip install --install-option="--prefix=modules_with_name_collisions" package_name. I haven't gotten this to work yet either, but I'm guess it could be made to work. It looks like this option is intended to create an entirely separate lib tree, which is more than I need. Source Using pip install --target=lockfile_from_pip. The files show up in the directory where I tell them to go, but import doesn't find them. And in fact pip uninstall can't find them either. I get Cannot uninstall requirement lockfile-from-pip, not installed and I guess I will just delete the directories and hope that's clean. Source So what's the preferred way for me to get access to the PyPI lockfile module?

    Read the article

  • Is a Service Bus a good option to communicate with multiple external servers?

    - by PFreitas
    We are developing an application that communicates, via web services or TCP/IP sockets, with multiple servers (up to 50 different external companies). Basically, the exchanged messages are the same (XML), but depending on the inputs of our application we should call 1 or more external servers. The benefits we would expect of introducing a Service Bus in the architecture would be: 1- Remove the need to manage all point-to-point configurations (all the 50 endpoints); 2- Simplify the communication layer of our application by having only one server to talk to; Is a Service Bus a good architectural option for this scenario? What is the best (simplest) Service Bus for this kind of communication? I read a few MSDN articles on Azure Service Bus Relay, but it didn’t seem to fit our needs. Am I wrong? Thanks for your help.

    Read the article

  • Getting rejected value null spring validation

    - by Shabarinath
    Hi in my project when I am trying to validate my form its not showing any error messages even if validation fails (Event Form is not submitted and enters into validation fail block) Here is my code /****************** Post Method *************/ @RequestMapping(value="/property", method = RequestMethod.POST) public String saveOrUpdateProperty(@ModelAttribute("property") Property property, BindingResult result, Model model, HttpServletRequest request) throws Exception { try { if(validateFormData(property, result)) { model.addAttribute("property", new Property()); return "property/postProperty"; } } /********* Validate Block *************/ private boolean validateFormData(Property property, BindingResult result) throws DaoException { if (property.getPropertyType() == null || property.getPropertyType().equals("")) { result.rejectValue("propertyType", "Cannot Be Empty !", "Cannot Be Empty !"); } if (property.getTitle() == null || property.getTitle().equals("")) { result.rejectValue("title", "Cannot Be Empty !", "Cannot Be Empty !"); } return (result.hasFieldErrors() || result.hasErrors()); } But when i debug i can see below one org.springframework.validation.BeanPropertyBindingResult: 1 errors Field error in object 'property' on field 'title': rejected value [null]; codes [Cannot Be Empty !.property.title,Cannot Be Empty !.title,Cannot Be Empty !.java.lang.String,Cannot Be Empty !]; arguments []; default message [Cannot Be Empty !] and this is how i am displaying in jsp file <div class="control-group"> <div class="controls"> <label class="control-label"><span class="required">* </span>Property Type</label> <div class="controls"> <form:input path="title" placeholder="Pin Code" cssClass="form-control border-radius-4 textField"/> <form:errors path="title" style="color:red;"/> </div> </div> </div> Event though when i see the below one when i debug (1 Error its correct) org.springframework.validation.BeanPropertyBindingResult: 1 errors Why it is not displayed in jsp can any one hep me?

    Read the article

  • problems importing ttk from tkinter in python 2.7

    - by Benjimin Boyce
    I'm working with an example file in a tutorial that asks me to first do two imports: from tkinter import * from tkinter import ttk I get an error. I researched a bit and found that in python 2.7.x I need to capitalize the 't'in tkinter, so I change to: from Tkinter import * from Tkinter import ttk. the first line no longer gives and error, but I still get error: ImportError: cannot import name ttk. I have researched this issue on this site and other places, and cannot seem to understand what this ttk is. I'm further confused by the fact that, when I go to the python interpreter, and I type "help()", then "modules", and then "ttk" it seems to know what it is, and gives me a lot of description, for example: "DESCRIPTION This module provides classes to allow using Tk themed widget set." -however, python won't let me import it.

    Read the article

  • In C, during step by step debugging in a function, how can i view the content of an array in the "Autos?" window along with the other variables?

    - by AppsAndGo
    I'm using VS 2012, and I'm working on a bubble sort. After searching I found a nifty trick to see the content of the array in the "Watch 1" tab, (How to view contents of an array while debugging in Code Blocks?), but going from "watch 1" to "Autos" every step to see what's changing in the array isn't practical at all. How can i see the array content within "Autos" along side my other changing variables, where i need it to show?

    Read the article

  • Adding an integer at the end of an input's name to get a specific url

    - by Gadgetster
    I am trying to get a url where I can retrieve the selected values from. For example, if I put a check mark on a and b then sumbit, I will get: index.php?category=1&&category=2 I want to get this instead: index.php?category0=1&&category1=2 So that I can later get this specific value with $_GET['category0'] Is there a way to add a counter for the selected checkboxes and add 0,1,2,3.. at the end of the name of its input? <form action="" method="get"> <!-- this will be a php loop instead of hardcored which will retrieve data from the db --> <label><input type="checkbox" name="category" value="1">a</label> <label><input type="checkbox" name="category" value="2">b</label> <label><input type="checkbox" name="category" value="3">c</label> <label><input type="checkbox" name="category" value="4">d</label> <label><input type="checkbox" name="category" value="5">e</label> <input type="submit"> </form>

    Read the article

  • Convert Java.Util.HashMap to System.Collections.IDictionary

    - by Paul
    In Xamarin I've got a .jar I've imported using a Java Binding Library. One of the callbacks has a Java.Lang.Object parameter which gives me Java.Util.HashMap and Java.Util.ArrayList at runtime. I'm abstracting this SDK behind a cross-platform interface, so I need to convert this to a .NET type. It there anything like the ArrayAdapter except in reverse that can convert the Java types to their .NET equivalents?

    Read the article

  • ASP.NET Windows authentication with wrong identity over VPN

    - by Dilyan Dimitrov
    I have ASP.NET application with windows authentication. When I browse it from home over VPN (Cisco VPN Client) as a username in the windows identity I get "\" not the credentials from the AD of the server (the same that I am using to connect to the VPN) even though I fill them in the prompt for localhost authentication from the browser. This only happens with Firefox. In the IE and Chrome after the prompt I get 401.1 Unauthorized page from IIS. How to make IIS to use the right credentials or the problem is somewhere else? Any ideas?

    Read the article

  • Spawning vim from a node git hook

    - by Lawrence Jones
    I've got a project purely in coffeescript, with git hooks for deployment also written in cs. I don't really want to break away from the language just to use bash for a quick commit message formatter, but I've got a problem spawning vim from the commit-msg hook. I've seen here that when piping to vim, the stdio is not necessarily set correctly to the tty streams. I get how that could cause a problem, but I don't exactly know how to get vim to load correctly using nodes spawn command. At the moment I have... vim = (require 'child_process').spawn('vim', [file], stdio: 'inherit') vim.on 'exit', (err) -> console.log "Exited! [#{err}]" cb?() ...which works fine to spawn a vim process that can r/w from the parents stdio, but when I use this in the hook things go wrong. Vim states that the stdio is not from terminal, and then once opened typing causes escape characters to pop up all over the place. Backspace for example, will produce ^?. Any help would be appreciated!

    Read the article

  • How to open sticky notes from my app?

    - by Riddle
    i want to open windows sticky notes from my app, i already know how to do this for calculator and paint but not sticky notes. (windows form) using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; namespace main { public partial class Form1 : Form { public Form1() { InitializeComponent(); } private void button1_Click(object sender, EventArgs e) { System.Diagnostics.Process.Start("mspaint"); System.Diagnostics.Process.Start("calc"); //sticky notes } } }

    Read the article

  • Connecting grouped dots/points on a scatter plot based on distance

    - by ToNoY
    I have 2 sets of depth point measurements, for example: > a depth value 1 2 2 2 4 3 3 6 4 4 8 5 5 16 40 6 18 45 7 20 58 > b depth value 1 10 10 2 12 20 3 14 35 I want to show both groups in one figure plotted with depth and with different symbols as you can see here plot(a$value, a$depth, type='b', col='green', pch=15) points(b$value, b$depth, type='b', col='red', pch=14) The plot seems okay, but the annoying part is that the green symbols are all connected (though I want connected lines also). I want connection only when one group has a continued data points at 2 m interval i.e. the symbols should be connected with a line from 2 to 8 m (green) and then group B symbols should be connected from 10-14 m (red) and again group A symbols should be connected (green), which means I do NOT want to see the connection between 8 m sample with the 16 m for group A. An easy solution may be dividing the group A into two parts (say, A-shallow and A-deep) and then plotting A-shallow, B, and A-deep separately. But this is completely impractical because I have thousands of data points with hundreds of groups i.e. I have to produce many depth profiles. Therefore, there has to be a way to program so that dots are NOT connected beyond a prescribed frequency/depth interval (e.g. 2 m in this case) for a particular group of samples. Any idea?

    Read the article

  • What is wrong in this bit of MyID3 code? (error code is just Exceptions)

    - by user3697621
    Okay, so, this was supposed to get the paths of all mp3 files in a folder, read their metadata and put in an arraylist. public static List<String> OrgMetadata(List<String> rawgenrelist){ File folder = new File("C:\\SOM\\"); File[] listOfFiles = folder.listFiles(); //File path = listOfFiles; for (int i = 0; i < listOfFiles.length; i++) { String pt = listOfFiles[i].getAbsolutePath(); File src = new File(pt); MusicMetadataSet src_set = new MyID3().read(src); if (src_set != null && listOfFiles[i].isFile()) { IMusicMetadata metadata = src_set.getSimplified(); rawgenrelist.add(metadata.getGenreName()); } } List<String> genrelist; genrelist = new ArrayList(new HashSet(rawgenrelist)); return genrelist; }

    Read the article

  • render json data returned from mvc controller

    - by user1765862
    I'm having js function which calls mvc controller action method which return list of data as json. function FillCountryCities(countryId) { $.ajax({ type: 'GET', url: '/User/FillCityCombo', data: { countryId: countryId }, contentType: 'application/json', success: function (data) { alert(data[0].Name); } error: function () { alert('something bad happened'); } .... format of data which sent back from controller is Name (string) and Id (Guid) Now I just want to alert Name on success first item from collection. Double checked controller sends 20 records, so it should alert first from collection but I'm getting error something bad happened update: public JsonResult FillCityCombo(Guid countryId) { var cities = repository.GetData() .Where(x = x.Country.Id == countryId).ToList(); if (Request.IsAjaxRequest()) { return new JsonResult { Data = cities, JsonRequestBehavior = JsonRequestBehavior.AllowGet }; } else { return new JsonResult { Data = "Not Valid Request", JsonRequestBehavior = JsonRequestBehavior.AllowGet }; } }

    Read the article

  • BATCH - wait for executable to finish before starting next result

    - by user3697573
    I'm pretty much a noob at this, so any help is appreciated. I'm trying to run the video transcoding executable REDline on all .R3D files in a given folder. REDline only accepts single files, which is the issue. I finally got it to search recursively for the files I need, but my problem is the search function passes the next result to REDline before the first one is finished transcoding. I have the search results that need to run in a variable inside REDline. Here's the code: for /r D:\folder\ %%a in (*) do ( "C:/Program Files/REDCINE-X PRO 64-bit/REDLine.exe" --exportPreset "Prores_Intermediate" --i "%%~dpnxa" --useRSX 2 --masterRMDFolder "" -s 0 -e 95 ) After about .7 seconds, REDline reports 'received stop message from client'. I don't think this is a REDline error, as I have been able to transcode single files successfully. Thanks.

    Read the article

  • Submtting data using $.ajax and retrieving values from $_POST array

    - by Linda Keating
    I'm having trouble retrieving my form Data that has been submitted via ajax like this: $( "form" ).on( "submit", function( event ) { var formData = $(this).serializeArray(); console.log("fomData"); $.ajax({ url: window.location.origin+ "/selfservicemanager/localtmfsetup/local_tmf_setup.php", type: "POST", data: JSON.stringify(formData), success : function (){ alert("success"); } }); }); I can see the data being sent over the network like this: But when I try to retrieve the data on the server side the $_POST array is empty. <?php var_dump($_POST); die(); ?> array (size=0) empty Any ideas? I've tried to stringify the data being sent, and also tried to decode the $_POST array but it expects a string.....

    Read the article

  • hosting a webserver locally with apache on windows

    - by user3697598
    I have been searching for a while now and I have not found what i am looking for! I have installed apache on my local server and I have set up port forwarding, but I don't know how to connect my localhost to the internet were everyone can view it. I do have a domain already too. I just need to know how to point it to my local server. If you could tell me or point me in the right direction on what I need to do. It would be much appreciated.

    Read the article

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