Daily Archives

Articles indexed Tuesday November 5 2013

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

  • Uploading images to a post like on the stackexchange websites [on hold]

    - by Loko
    Stackexchange uses imgur link to show the image to their website, but how do I do this? I am really curious on what ways I can upload an image to a file and show it immediatly again. Like webshops where you can post your products are also uploading images to show them immediatly. What way are there to do this and what is the best / most secure?(I assume how stackexchange does it), but I also have no idea how to do that.

    Read the article

  • Why google return soft 404 when I redirect on signup page?

    - by Hettomei
    Since one month, I've got an increased "soft 404" reported by google webmaster tools but work well for users. I made some fix but can't figure out how to solve it. Configuration (maybe useless): I have a website built with rails 3.1 Authentication is handled by the gem Devise Problem: On this page http://en.bemyboat.com/yacht-charter/9965-sailboat-beneteau-oceanis-43 when you click on "Ask a Boat request" (a simple form, in GET to : http://en.bemyboat.com/boat_requests/new/9965) you are redirected with the http status 302 to sign in, and then sent back to the new page if successfully sign in. Google tells me that the link on "ask a boat request" returns a soft 404. I can't make this form in "POST" (which will solve the problem) because we need to automatically redirect user to the good page after sign in. (the Gem Devise memorize the "get" link) To simplify, the question is: how to protect a private page with authentication, reached with a simple "get" and not to be penalized by google with "soft 404". Thank you. PS : this website suffer a lot about english translation... please don't care.

    Read the article

  • Why will Google Analytics not allow our URL?

    - by Linda H
    In Google Analytics we're trying to add a property for each website of a WordPress multisite network. It works well for all of the sub-site but one. In the Default URL field we used the following: www.mywebsite.no/ - works www.mywebsite.no/nurse - works, as does a few other sub-sites www.mywebsite.no/doctor - doesn't work In the last case we get the following error: Value is not a valid domain. (e.g. example.com, www.example.com) We can't change the name of the sub-site but GA just won't accept the URL. Why is this and what can we do to solve this?

    Read the article

  • Should my URLs be lowercase?

    - by Rowan Freeman
    According to this blog ("Understanding SEO Friendly URL Syntax Practices") I should change http://example.com/Hello-Dolly To http://example.com/hello-dolly The reasons given are: URLs, in general, are case-sensitive it will simplify any case sensitive SEO and analytics reports According to this GIF that I found on Wikipedia's article on URL Normalization I should convert my URLs from any uppercase to all lowercase. However I use ASP.NET MVC4 and by default my URLs are structured like this (CamelCase): http://www.domain.com/Controller/Action/Parameter http://www.greatsite.com/Categories/List/Bicycles I've skimmed through the RFC1738 but I didn't see any definitive answers to this. Should I go out of my way to force the framework to change everything to lower case? Why did Microsoft choose to design their framework like this if everybody is telling me to use lowercase?

    Read the article

  • Transfer websites and domains to new server

    - by Albert
    We have currently around 40 websites and 80+ domains/sub-domains in a shared 1&1 hosting package, and we just acquired a managed dedicated server with 1&1 as well. Now it's time to start transferring everything over to the new server. Transferring just the websites and databases wouldn't be a problem, it would take time but it's pretty straight forward. The problem comes when transferring the domains, let me explain why. Many of the websites we have are accessible via sub-domains of a parent domain. Ideally, we would like to transfer the sites one by one, in order to check for each one that everything works fine in the new server. However, since we also need to transfer the domain so it's managed in the new server, once we do that means that all the websites using that domain need to be already in the new server before transferring that domain, thus not allowing the "one by one" philosophy. Another issue is the downtime when transferring the domain, from the moment it stops working in the hosting package and becomes active in the new server. I believe there's nothing we can do here. So my question is if there's any way we can do the "one by one" transferring of the websites (and their corresponding sub-domains) in the circumstances described above. One idea I had would be: 1. Let's say we have website A, which is accessible using subdomain.mydomain.com (and there are many other websites accessible via other sub-domains of mydomain.com) 2. Transfer the files of website A to the new server 3. Point a test domain in the new server to the website A's folder (the new server comes with a "test" domain) 4. Test if website A works with that "test" domain 5. In the old hosting, somehow point the real sub-domain (subdomain.mydomain.com) to the new location of website A, in a way that user always see the same URL as always 6. Repeat 2-5 for every website belonging to the same domain 7. Once all are working in the new server, do the actual transfer of the domain to the new server, and then re-create all the sub-domains and point them to their corresponding website That way, users wouldn't notice that there's been a change (except for a small down time of the websites when doing the domain transfer). The part I'm not sure about is point 5 of the above. Is there any way to do that? I mean do it in a way that users see the original domain all the time in their browser, even for internal pages (so not only for the "home page", which would be sub-domain.mydomain.com, but also for example for the contact page, which would be sub-domain.mydomain.com/contact.php). Is there any way to do this? Or are we SOL and we're going to have to transfer all at the same time?

    Read the article

  • CPanel - Wild card SSL - How to point *.domain.com to one root and sub.domain.com to another root

    - by Harry Muscle
    I have a wildcard (*.domain.com) SSL certificate installed on my CPanel server. I have domain.com configured to point to /domain.com as its document root and use this wildcard SSL certificate. I also have sub.domain.com configured to point to /sub.domain.com as its document root. Btw, I have not explicitly configured configured sub.domain.com to use the wildcard SSL certificate. When I go to "http://sub.domain.com" it goes to the correct document root, however my problem is that when I go to "https://sub.domain.com" it goes to the incorrect root, it goes to the root configured for the wildcard SSL. I've been trying to find information on how to go about configuring sub.domain.com to use the SSL certificate and go to the correct document root, however, so far I haven't found anything concrete. Do I use the same steps that I used for configuring the certificate for domain.com, but use the same certificate again and specify dev.domain.com as the domain that this certificate is for (instead of *.domain.com)? Or is there something else I should be doing? This is a production server, so I don't want to play around too much. I'm hoping to find the correct information before proceeding.

    Read the article

  • Will loading meta tags dynamically from a database hurt the site?

    - by Nalaka526
    I have a website (ASP.NET MVC) which has its contents mainly in Sinhala language. So the search engines will list my site only when someone searches for Sinhala words. But,I need to list my site's pages in search results when searched with appropriate English words too. So I'm planning to save HTML meta tags (in English) in database and load them dynamically with appropriate page contents. Will loading the meta tags dynamically affect the site adversely?

    Read the article

  • Standard ratio of cookies to "visitors"?

    - by Jeff Atwood
    As noted in a recent blog post, We see a large discrepancy between Google Analytics "visitors" and Quantcast "visitors". Also, for reasons we have never figured out, Google Analytics just gets larger numbers than Quantcast. Right now GA is showing more visitors (15 million) on stackoverflow.com alone than Quantcast sees on the whole network (14 million): Why? I don’t know. Either Google Analytics loses cookies sometimes, or Quantcast misses visitors. Counting is an inexact science. We think this is because Quantcast uses a more conservative ratio of cookies-to-visitors. Whereas Google Analytics might consider every cookie a "visitor", Quantcast will only consider every 1.24 cookies a "visitor". This makes sense to me, as people may access our sites from multiple computers, multiple browsers, etcetera. I have two closely related questions: Is there an accepted standard ratio of cookies to visitors? This is obviously an inexact science, but is there any emerging rule of thumb? Is there any more accurate way to count "visitors" to a website other than relying on browser cookies? Or is this just always going to be kind of a best-effort estimation crapshoot no matter how you measure it?

    Read the article

  • Multilingual Publishing Pack (MLP): make a link to the corresponding page in the another language?

    - by lyle
    I am helping to build a bilingual website using MLP on TextPattern. It's trivial to put a link to the top level page of another language, but how to put a link to the current page in another language? Eg. /en/contact should link to /de/kontakt (the same article in another language). I'm sure there are some variables somewhere that I could put into the template that would be filled with the correct links.

    Read the article

  • How exactly to implement multiple threads in a game

    - by xerwin
    So I recently started learning Java, and having a interest in playing games as well as developing them, naturally I want to create game in Java. I have experience with games in C# and C++ but all of them were single-threaded simple games. But now, I learned how easy it is to make threads in Java, I want to take things to the next level. I started thinking about how would I actually implement threading in a game. I read couple of articles that say the same thing "Usually you have thread for rendering, for updating game logic, for AI, ..." but I haven't (or didn't look hard enough) found example of implementation. My idea how to make implementation is something like this (example for AI) public class AIThread implements Runnable{ private List<AI> ai; private Player player; /*...*/ public void run() { for (int i = 0; i < ai.size(); i++){ ai.get(i).update(player); } Thread.sleep(/* sleep until the next game "tick" */); } } I think this could work. If I also had a rendering and updating thread list of AI in both those threads, since I need to draw the AI and I need to calculate the logic between player and AI(But that could be moved to AIThread, but as an example) . Coming from C++ I'm used to do thing elegantly and efficiently, and this seems like neither of those. So what would be the correct way to handle this? Should I just keep multiple copies of resources in each thread or should I have the resources on one spot, declared with synchronized keyword? I'm afraid that could cause deadlocks, but I'm not yet qualified enough to know when a code will produce deadlock.

    Read the article

  • Difference between Sound and Music

    - by Southpaw Hare
    What are the key differences between the Sound and Music classes in Pygame? What are the limitations of each? In what situation would one use one or the other? Is there a benefit to using them in an unintuitive way such as using Sound objects to play music files or visa-versa? Are there specifically issues with channel limitations, and do one or both have the potential to be dropped from their channel unreliably? What are the risks of playing music as a Sound?

    Read the article

  • what are the problems in game development that requires scientific research? [on hold]

    - by Anmar
    I been into Game Development for approximately 2 years for now mostly prototype development and testing ideas. Im in a point of my carrier where I am in a need to publish a research paper I would love to start doing research about game development however my lack of experience in actual game development in a commercial set of environment brings me into Game development in stackexchange My question is for the experience game developers out there What are the problems related to software engineering that you have faced or your team faced while developing games? Example Problems ? The lack of a strong technique for Fun detection in a game in an early stage of development A strong tailored Software Development Life Cycle for game development Agile methodology as a game development methodology Narrowing the goals gap between team members (Editors, Story Designers, Programmers, 3D artists, 2D Artists) - Community Suggestions Indie game marketing requirements for success by Yakyb Any problems you could define it I would be more than happy to take it into consideration for future research. My experience and work mostly involve process related basically SDLC (Waterfall, Spiral, Agile, RUP .Etc) Thank you for any input.

    Read the article

  • Z axis trouble with glTranslatef(...) - LWJGL

    - by Zarkopafilis
    Here is the code: private static boolean up = true , down = false , left = false , right = false, reset = false, in = false , out = false; public void start() { try { Display.setDisplayMode(new DisplayMode(800,600)); Display.create(); } catch (LWJGLException e) { e.printStackTrace(); System.exit(0); } GL11.glMatrixMode(GL11.GL_PROJECTION); GL11.glLoadIdentity(); GL11.glOrtho(0, 800, 0, 600, 0.00001f, 1000); GL11.glMatrixMode(GL11.GL_MODELVIEW); Keyboard.enableRepeatEvents(true); while (!Display.isCloseRequested()) { GL11.glClear(GL11.GL_COLOR_BUFFER_BIT); input(); if(up){ GL11.glTranslatef(0,0.1f,0); } if(down){ GL11.glTranslatef(0,-0.1f,0); } if(left){ GL11.glTranslatef(-0.1f,0,0); } if(right){ GL11.glTranslatef(0.1f,0,0); } if(in){ GL11.glTranslatef(0, 0, 1f); } if(out){ GL11.glTranslatef(0, 0, -1f); } if(reset){ GL11.glLoadIdentity(); } GL11.glBegin(GL11.GL_QUADS); GL11.glColor3f(255, 255, 255); GL11.glVertex3f(800/2, 600/2, 0); GL11.glVertex3f(800/2 + 200, 600/2, 0); GL11.glVertex3f(800/2 + 200, 600/2 + 200, 0); GL11.glVertex3f(800/2, 600/2 + 200, 0); GL11.glColor3f(0, 255, 0); GL11.glVertex3f(800/2, 600/2, 1); GL11.glVertex3f(800/2 + 200, 600/2, 1); GL11.glVertex3f(800/2 + 200, 600/2 + 200, 1); GL11.glVertex3f(800/2, 600/2 + 200, 1); GL11.glEnd(); Display.update(); } Display.destroy(); } public static void main(String[] argv){ new main().start(); } public void input(){ up = false; down = false; left = false; right = false; reset = false; in = false; out = false; if(Keyboard.isKeyDown(Keyboard.KEY_SPACE)){ reset = true; } if(Keyboard.isKeyDown(Keyboard.KEY_W)){ up = true; } if(Keyboard.isKeyDown(Keyboard.KEY_S)){ down = true; } if(Keyboard.isKeyDown(Keyboard.KEY_A)){ left = true; } if(Keyboard.isKeyDown(Keyboard.KEY_D)){ right = true; } if(Keyboard.isKeyDown(Keyboard.KEY_Q)){ in = true; } if(Keyboard.isKeyDown(Keyboard.KEY_E)){ out = true; } } As you can see I am creating 2 quads , a white one at z 0 and a green one at z 1. WASD keys function correctly. Also when I hit SPACEBAR the white quad is being shown. If I then press E , I can see the green quad. But if I press Q afterwards , I dont see the white one again!(Space Works everytime). Also if I render the green one at Z = -1 everything works perfectly BUT you may need up to 3 key presses Q/E to see the other quad. Why is that happening?

    Read the article

  • How to calculate new velocities between resting objects (AABB) after accelerations?

    - by Tiedye
    lately I have been trying to create a 2D platformer engine in C++ with Direct2D. The problem I am currently having is getting objects that are resting against each other to interact correctly after accelerations like gravity have been applied to them. Right now I can detect collisions and respond to them correctly (I think) and when objects collide they remember what other objects they're resting against so objects can be pushed by other objects (note that there is no bounce in any collisions so when objects collide they are guaranteed to become resting until something else happens). Every time the simulation advances, the acceleration for objects is applied to their velocities (for example vx += ax * t, where t is time elapsed since last advancement). After these accelerations are applied, I want to check if any objects that are resting against each other are moving at different speeds than their counterparts (as different objects can have different accelerations) and depending on that difference either unlink the two objects so they are no longer resting, or even out their velocities so they are moving at the same speed once again. I am having trouble creating an algorithm that can do this across many resting objects. Here's a diagram to help explain my problem

    Read the article

  • Basic Connections Through Socket Server

    - by Walrus
    I'm designing a simple 2 player RTS with Stencyl, a program that uses blocks for coding. The current code updates lists whenever an actor moves (new X and Y), and I'd want the server to update the game state with each change to the list. However, to start off: I don't even know how to set up a socket server. Stencyl has taught me the basics of logic, but I've yet to learn any programming languages. I've downloaded a Smartfox 2X socket server that I'm intending to use. Right now I'm only looking to make baby steps; I want to do something to this effect: "When someone connects to the server, open insert file here". How can I do this? My intention is to have this file be the game client. Is this "open file when connected" method the best way to go about this? When answering: assume that I know nothing, because really, though I have done research (I know that UDPTCP for real time), implementation-wise I know nothing.

    Read the article

  • Should the networking of my game be a component or a service?

    - by aalcutt
    I am working on a windows game and I am trying to understand the XNA GameComponents and GameServices classes and use. From what I understand about a component is that it has an Update method that gets call in every frame, and a service can be referenced from other components if needed. So the way I think a network component would work is that in its Update method it would receive and send data. It probably makes sense to receive the network data once per frame, but it doesn't for sending it. Shouldn't the game send its own updates to others the moment it has it to cut down on lag?

    Read the article

  • Need a bounding box for CCSprite that includes all children/subchildren

    - by prototypical
    I have a CCSprite that has CCSprite children, and those CCSprite children have CCSprite children. The contentSize property doesn't seem to include all children/subchildren, and seems to only work for the base node. I could write a recursive method to traverse a CCSprite for all children/subchildren and calculate a proper boundingbox, but am curious as to if I am missing something and it's possible to get that information without doing so. I'l be a little surprised if such a method doesn't exist, but I can't seem to find it.

    Read the article

  • Onclick starts gif animation and .mp3, how to sync across browsers

    - by user2958163
    So I am using a text-based jplayer (http://jplayer.org/latest/demo-04/) that I want to sync with a gif animation. Onclick the text link does two things -1. feed the jplayer an mp3 and 2. trigger an animation (via SwapImage). It is important for these two to start at the same time. Right now, this works perfectly in chrome/firefox but in IE and mobile browsers the audio lags considerably. I have tried with the audio preloaded (it is a small 40K mp3) and it makes no difference. I dont think its a bandwidth problem because the problem is the same on repeat clicks. Any pointers on how I can resolve this...

    Read the article

  • In listview,Viewstub cannot be found after the previous one is inflate

    - by user2958132
    I am using some list item layout and in the item layout, there is a Viewstub where I want to put some image in.I don't have the source of list item layout and just know there are some TextViews and ViewStubs in it. My purpose is to find the ViewStub first and set my personal layout and play with it. However, some of the ViewStub cannot be found. public class TJAdapter extends CursorAdapter { .... public void bindView(View view, Context context, Cursor cursor) { ViewStub contentstub = (ViewStub)item.findViewById(R.id.content_stub); if (contentstub == null){ LOG.error("TJ,contentstub is null"); } else { LOG.error("TJ,contentstub is not null"); contentstub.setLayoutResource(R.layout.icon_image); View iconImage = contentstub.inflate(); } .... } public View newView(Context context, Cursor cursor, ViewGroup parent) { final View view = mInflater.inflate(R.layout.list_item, parent, false); bindView(view, context, cursor); } And the log output is like this: TJ,bindView is called TJ,contentstub is not null TJ,bindView is called TJ,contentstub is null TJ,bindView is called TJ,contentstub is not null TJ,bindView is called TJ,contentstub is not null TJ,bindView is called TJ,contentstub is null TJ,bindView is called TJ,contentstub is not null I spent a lot of time on it and have no idea why this happens. Can some body help?

    Read the article

  • How to add Transparency information to a HEX color code?

    - by TK123
    I have to modify some code and the previous developer left this comment: color: color, // e.g. '#RRGGBBFF' - Last 2 digits are alpha information On the page there is a color picker that let's the user change text color. It gives HEX values like so: #RRGGBB And there is a slider that allows the user to change a text's transparency. It runs from 0.1 to 1 Somehow I need to get a 2 digit letter from this transparency amount and append it to the HEX value for it to work. Does anyone know how to append Alpga information to HEX color codes? What is the math formula for it? I guess the question can also be answered if anyone knows how to concert RGBA color values with transparency into HEX: rgba(255, 255, 255, 0.6)

    Read the article

  • Changing brightness in bufferedImage with DataBufferInt

    - by user2958025
    I must read some image and then I have to change brightness and contrast of this image I create main class and constructor where are panels, sliders and other stuff, I added changeListener to slider to take current value. My imagePanel is new Object of that class: public class Obrazek extends JPanel{ public static BufferedImage img = null; public Obrazek() { super(); try { img = ImageIO.read(new File("D:\\ja.jpg")); } catch (IOException e) {} } @Override public void paint(Graphics g) { g.drawImage(img, 0, 0, null); } } This is my load button private void przyciskWczytaj(java.awt.event.ActionEvent evt) { int odpowiedz = jFileChooser1.showOpenDialog(this); if (odpowiedz == jFileChooser1.APPROVE_OPTION) { File file = jFileChooser1.getSelectedFile(); try { BufferedImage im = ImageIO.read(new File(file.getAbsolutePath())); Obrazek.img = im; } catch (IOException ex) { System.out.println("Error"); } } } And now I want to create class where I will change that brightness. I have to use but I don't know how to use that thing: BufferedImage(256, 256, Bufferedmage.TYPE_INT_RGB) and to get each pixel of image I need to do something like: int rgb []=((DataBufferInt)img.getRaster().getDataBuffer()).getData(); And here I is next problem: How can I change the value of each r,g,b and show that new image on my panel

    Read the article

  • Symfony use NativeSQL to JOIN unrelated tables

    - by keybored
    I'd like to run a query like this: $rsm = new ResultSetMappingBuilder($this->em); $rsm->addRootEntityFromClassMetadata('myBundle:Foo', 'f'); $rsm->addRootEntityFromClassMetadata('myBundle:Bar', 'b'); $sql = 'SELECT l.*, b.* FROM foos f INNER JOIN FROM bars b ON b.baz_id = f.baz_id WHERE l.bam = 1'; $query = $this->em->createNativeQuery($sql, $rsm); $fooBarQuery= $query->getResult(); Unfortunately this is not a situation where I can set up a proper relationship in the entity. Is not going to be possible for me to do this? Thanks.

    Read the article

  • MySQL Access denied error

    - by dancingbush
    I am trying to install mySQL on a Mac OS 10.8 and set up a user account. NOTE I am a abs beginner when it comes to using the command line in Terminal window. I used these instructions to install: http://www.macminivault.com/mysql-mountain-lion/ I set my own password for all users here: GRANT ALL ON *.* TO 'root'@'localhost' IDENTIFIED BY 'mypass' WITH GRANT OPTION; quit Every time i try to execute mySQL as a root user on the command line i get this: Ciarans-MacBook-Pro:~ callanmooneys$ mysql -u root ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO) I read around on the net and tried various things including tried this to change password: mysqladmin -u root -pyourcurrentmysqlrootpassword password yournewmysqlrootpassword, it returns -> -> USE mysql -> If i simply type 'mysql' and launch the mySQL monitor then try to crete a user account: mysql> USE mysql ERROR 1044 (42000): Access denied for user ''@'localhost' to database 'mysql' mysql> Also tried answers on forum: access is denied for user 'root'@localhost mysql error 1045 returned '[email protected] command not found And MySQL - ERROR 1045 - Access denied: Ciarans-MacBook-Pro:~ callanmooneys$ mysqld_safe --skip-grant-tables 131105 21:44:41 mysqld_safe Logging to '/usr/local/mysql/data/Ciarans-MacBook-Pro.local.err'. 131105 21:44:41 mysqld_safe Starting mysqld daemon with databases from /usr/local/mysql/data /usr/local/mysql/bin/mysqld_safe: line 129: /usr/local/mysql/data/Ciarans-MacBook-Pro.local.err: Permission denied /usr/local/mysql/bin/mysqld_safe: line 166: /usr/local/mysql/data/Ciarans-MacBook-Pro.local.err: Permission denied 131105 21:44:41 mysqld_safe mysqld from pid file /usr/local/mysql/data/Ciarans-MacBook-Pro.local.pid ended /usr/local/mysql/bin/mysqld_safe: line 129: /usr/local/mysql/data/Ciarans-MacBook-Pro.local.err: Permission denied Ciarans-MacBook-Pro:~ callanmooneys$ mysql -u root ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2) Ciarans-MacBook-Pro:~ callanmooneys$ Feedback appreciated.

    Read the article

  • FIFO dequeueing in python?

    - by Aaron Ramsey
    hello again everybody— I'm looking to make a functional (not necessarily optimally efficient, as I'm very new to programming) FIFO queue, and am having trouble with my dequeueing. My code looks like this: class QueueNode: def __init__(self, data): self.data = data self.next = None def __str__(self): return str(self.data) class Queue: def__init__(self): self.front = None self.rear = None self.size = 0 def enqueue(self, item) newnode = QueueNode(item) newnode.next = None if self.size == 0: self.front = self.rear = newnode else: self.rear = newnode self.rear.next = newnode.next self.size = self.size+1 def dequeue(self) dequeued = self.front.data del self.front self.size = self.size-1 if self.size == 0: self.rear = None print self.front #for testing if I do this, and dequeue an item, I get the error "AttributeError: Queue instance has no attribute 'front'." I guess my function doesn't properly assign the new front of the queue? I'm not sure how to fix it though. I don't really want to start from scratch, so if there's a tweak to my code that would work, I'd prefer that—I'm not trying to minimize runtime so much as just get a feel for classes and things of that nature. Thanks in advance for any help, you guys are the best.

    Read the article

< Previous Page | 8 9 10 11 12 13 14 15 16 17 18  | Next Page >