Search Results

Search found 21991 results on 880 pages for 'going crazy'.

Page 22/880 | < Previous Page | 18 19 20 21 22 23 24 25 26 27 28 29  | Next Page >

  • How to get the page in a variable which is going to be displayed in Wordpress ?

    - by KPL
    I want to get the content which are displayed by a particular page in WordPress back-end. Say, for [ROOT]/wp-admin/profile.php I want to remove the First Name and Last Name fields from this page. So, I can run a str_replace() to remove the lines. In this case, I have $search and $replace ... but I need $subject [Ref - http://php.net/manual/en/function.str-replace.php] How to get the $subject ? OR, anybody know any other way to do this?

    Read the article

  • How to deal with symbolic links when going between Linux and Windows?

    - by Jesse Beder
    I have a django project that runs on a Linux server, and I've been working on it both on Linux and OS X. I've noticed that some of the pages are a bit off, to put it politely, in Internet Explorer, and so I checked out the subversion repository on Windows and tried to run a local server. My media directory has symbolic links to all of the media from each different app, and obviously Windows doesn't know what to do with them. I could simply hard-copy or link everything manually in Windows, but then I wouldn't be able to check that in (since the site runs on a Linux server), so it'd be a pain in the neck. What is typically done in this case?

    Read the article

  • Why would I want to install node.js in my Rails Application?

    - by Crazy JIm
    Okay guys, I'm super confused. I thought node.js was a sever side framwork, basically the js version of Ruby's Rails or PHP's Zend. However, I'm having some difficulty with turbolinks, and it seems to be the way to fix it is through installing node.js I mean, I don't understand this at all. How can two frameworks work together like this? Also, it's not a gem (that REALLY would have confused me), you have to install node.js it onto your local machine by running (in the case of Ubuntu) sudo apt-get install nodejs Firstly, how does this totally separate framwork have any bearing on rails? Secondly, surely this isn't fixing the problem forever? When you specify a gem in your gemfile, the server knows what external libraries to install. How does the server know to install nodejs?

    Read the article

  • Finding direction of travel in a world with wrapped edges

    - by crazy
    I need to find the shortest distance direction from one point in my 2D world to another point where the edges are wrapped (like asteroids etc). I know how to find the shortest distance but am struggling to find which direction it's in. The shortest distance is given by: int rows = MapY; int cols = MapX; int d1 = abs(S.Y - T.Y); int d2 = abs(S.X - T.X); int dr = min(d1, rows-d1); int dc = min(d2, cols-d2); double dist = sqrt((double)(dr*dr + dc*dc)); Example of the world : : T : :--------------:--------- : : : S : : : : : : T : : : :--------------: In the diagram the edges are shown with : and -. I've shown a wrapped repeat of the world at the top right too. I want to find the direction in degrees from S to T. So the shortest distance is to the top right repeat of T. but how do I calculate the direction in degreed from S to the repeated T in the top right? I know the positions of both S and T but I suppose I need to find the position of the repeated T however there more than 1. The worlds coordinates system starts at 0,0 at the top left and 0 degrees for the direction could start at West. It seems like this shouldn’t be too hard but I haven’t been able to work out a solution. I hope somone can help? Any websites would be appreciated.

    Read the article

  • Install gcc on Ubuntu 12.04 LTS

    - by Brian M. Hunt
    When I try to install gcc on Ubuntu 12.04 LTS Server with apt-get install gcc, I get the following error: The following packages have unmet dependencies: gcc : Depends: cpp (>= 4:4.6.1-2ubuntu5) but it is not going to be installed Depends: gcc-4.6 (>= 4.6.1-1) but it is not going to be installed Recommends: libc6-dev but it is not going to be installed or libc-dev When I delve deeper (i.e. try to apt-get install gcc-4.6), I get: gcc-4.6 : Depends: gcc-4.6-base (= 4.6.1-9ubuntu3) but 4.6.3-1ubuntu5 is to be installed Depends: cpp-4.6 (= 4.6.1-9ubuntu3) but it is not going to be installed Depends: libgomp1 (>= 4.6.1-9ubuntu3) but it is not going to be installed Depends: libquadmath0 (>= 4.6.1-9ubuntu3) but it is not going to be installed Recommends: libc6-dev (>= 2.13-0ubuntu6) but it is not going to be installed So when I try to install gcc-4.6=4.6.1-9ubuntu3 I get a list of 366 packages to remove (including e.g. apt). Which is craziness. This is an essentially vanilla installation of Ubuntu 12.04 LTS Server (i.e. I installed nginx, python-flup, python-yaml, rsync, python-pkg-resources, lsof, fontconfig, iptables, ufw, scons, and grc). It is very surprising to me that I cannot install gcc, so I am somewhat confused as to why attempting to install gcc fails. The only apparent fix would seem to be uninstalling 366 packages, many of which are central to the operation of Ubuntu. Something doesn't add up, and I would be very grateful for assistance. EDIT The above is with the latest packages of course, having used apt-get update; apt-get upgrade before attempting the above. Sorry, I should have mentioned that.

    Read the article

  • Can't declare even the most simple class in PHP - Am I going insane?

    - by Phil
    I'm getting this error whenever I attempt to declare a class: Parse error: syntax error, unexpected T_VARIABLE, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /home3/foundloc/public_html/booka/page2.php on line 7 (line 7 is the class declaration by the way). Here's the incredibly simple class I am attempting to declare: Class abc { $a = “Hello!”; } Is there some setting on PHP that i need to turn on? I feel like this is one of those 'did you check if the TV is plugged in' type of issues....

    Read the article

  • What is going on with the "return fibonacci( number-1 ) + fibonacci( number-2 )"?

    - by user1478598
    I have problem understanding what the return fibonacci( number-1 ) + fibonacci( number-2 ) does in the following program: import sys def fibonacci( number ): if( number <= 2 ): return 1 else: return fibonacci( number-1 ) + fibonacci( number-2 ) The problem is that I can't imagine how this line works: return fibonacci( number-1 ) + fibonacci( number-2 ) Does the both of the "fibonacci( number-1 )" and "fibonacci( number-2 )" being processed at the same time? or the "fibonacci( number-1 )" is the first to be processed and then the second one? I only see that processing both of them would eventually return '1' so the last result I expect to see it is a '1 + 1' = '2' I would appreciate a lot, If someone can elaborately explain the process of its calculation. I think this is a very newb question but I can't really get a picture of its process.

    Read the article

  • Configuring zend to use gmail smtp: Windows Apache dev-environment: "Could not open socket" error - repeatedly - going mad

    - by confused
    My dev environment is Win XP SP2 / Apache 2.something PHP 5.something_or_other My prod env is Linux Ubuntu / Apache 2.something_else PHP 5.something_or_other_else The code is all Zend Framework Version: 1.11.1 I can telnet to: smtp.gmail.com 465 from the PC. I have Mercury configured on my PC to use gmail as it's smtp host and it works just fine. (MercuryC SMTP Client). Mercury is set to use port 465 and SSL on smtp.gmail.com -- No problem. Zend mail works just fine on my production environment using the production mail server to send out mail. It's the same basic application.ini but with different values in the mail variables. On my local PC dev setup, my application.ini contains: (same values as I use in Mercury) mail.templatePath = APPLICATION_PATH "/emails" mail.sender.name = "myAccount" mail.sender.email = "[email protected]" mail.host = smtp.gmail.com mail.smtp.auth = "login" mail.smtp.username = "[email protected]" mail.smtp.password = "myPassWord" mail.smtp.ssl = "ssl" mail.smtp.port = 465 I have been doing trial and error for hours trying to get a single email out with no success. In every case, regardless of server or port settings it throws an error and reports: Could not open socket. Both Apache and Mercury Core are exceptions in my Windows Firewall config. Mercury seems to be having no problem. I have searched stackoverflow before posting this and have been googling for hours -- with no success. I am slowly losing my mind I would be very much obliged for any tip as to what might be wrong. Thanks for reading. =================== BTW When I use the SAME application.ini values on my local PC as on the production host, I get the same "Could not open socket" error. Those values are: mail.templatePath = APPLICATION_PATH "/emails" mail.sender.name = "otherUser" mail.sender.email = "[email protected]" mail.host = smtp.otherServer.com mail.smtp.auth = "login" mail.smtp.username = "[email protected]" mail.smtp.password = "otherPAssWord" mail.smtp.ssl = "ssl" mail.smtp.port = 465 I know these work in the production (Ubuntu) environment. I'm utterly baffled.

    Read the article

  • Customer won't decide, how to deal?

    - by Crazy Eddie
    I write software that involves the use of measured quantities, many input by the user, most displayed, that are fed into calculation models to simulate various physical thing-a-majigs. We have created a data type that allows us to associate a numeric value with a unit, we call these "quantities" (big duh). Quantities and units are unique to dimension. You can't attach kilogram to a length for example. Math on quantities does automatic unit conversion to SI and the type is dimension safe (you can't assign a weight to a pressure for example). Custom UI components have been developed that display the value and its unit and/or allow the user to edit them. Dimensionless quantities, having no units, are a single, custom case implemented within the system. There's a set of related quantities such that our target audience apparently uses them interchangeably. The quantities are used in special units that embed the conversion factors for the related quantity dimensions...in other words, when using these units converting from one to another simply involves multiplying the value by 1 to the dimensional difference. However, conversion to/from the calculation system (SI) still involves these factors. One of these related quantities is a dimensionless one that represents a ratio. I simply can't get the "customer" to recognize the necessity of distinguishing these values and their use. They've picked one and want to use it everywhere, customizing the way we deal with it in special places. In this case they've picked one of the dimensions that has a unit...BUT, they don't want there to be a unit (GRR!!!). This of course is causing us to implement these special overrides for our UI elements and such. That of course is often times forgotten and worse...after a couple months everyone forgets why it was necessary and why we're using this dimensional value, calling it the wrong thing, and disabling the unit. I could just ignore the "customer" and implement the type as the dimensionless quantity, which makes most sense. However, that leaves the team responsible for figuring it out when they've given us a formula using one of the other quantities. We have to not only figure out that it's happening, we have to decide what to do. This isn't a trivial deal. The other option is just to say to hell with it, do it the customer's way, and let it waste continued time and effort because it's just downright confusing as hell. However, I can't count the amount of times someone has said, "Why is this being done this way, it makes no sense at all," and the team goes off the deep end trying to figure it out. What would you do? Currently I'm still attempting to convince them that even if they use terms interchangeably, we at the least can't do that within the product discussion. Don't have high hopes though.

    Read the article

  • Programmer Health - how to avoid going blind and sick!

    - by stefanyko
    Hi All! this is my very first time here! so nice to meet you guys! ;-) When i was starting with this job, ( when i have chosed of doing this for the rest of my life) i have thinked also, one day, before or after, i would become blind or at least sick by drinking 5 or more coffee per day and of course by sitting down on my pc for hours!!! ;-\ From many years now, i'm asking myself how my eyes can stay in front o the monitor for so many hours per day!? well now i'm to a point of no return!!! i feel my eyes each day more tired, and my productivity is waning, but i can't change work now and i don't want do this!!!! what i need to do for prevent this to become a more serious problem for me and for my eyes!? any suggestion will be really appreciated!!! Thanks!

    Read the article

  • How much effort should you put into a junior developer?

    - by Crazy Eddie
    At what point should one give up? I've tried helping them out by having them shadow me. We agree to break a minute, and then they go missing in action for a while...then just go back to their desk. Even when I know they've done this, part of me feels like I shouldn't have to go get them but that they should be showing interest in learning. Frankly, it's a bunch of time I don't have explaining things as I go when I could just do it. Am I expecting too much to expect that if they want to learn they'll make sure I know they're ready and willing? They go to meetings that they where not told they had to, good, but then sit in the corner and sleep...bad. I don't even know what to do with that. Sometimes I give them something small to do and they do it great, so I give them something just a touch harder and they totally fail, hard. Check in things without testing them. Part of me thinks that maybe I should be spending more time with them but at the same time I don't see a lot of interest and I really, honestly don't have time teaching the same things over and over. Sometimes I get asked questions that are really, really easy to answer if you just do a little bit of your own work trying to find out. Other times I'm not asked anything. I'm sure I could be doing better but honestly...I don't really want to anymore.

    Read the article

  • Creating a list in Python- something sneaky going on?

    - by GlenCrawford
    Apologies if this doesn't make any sense, I'm very new to Python! From testing in an interpreter, I can see that list() and [] both produce an empty list: >>> list() [] >>> [] [] From what I've learned so far, the only way to create an object is to call its constructor (__init__), but I don't see this happening when I just type []. So by executing [], is Python then mapping that to a call to list()?

    Read the article

  • How can I detect device orientation going back and forth through tabs and views?

    - by JoshD
    My application goes back and forth between Portrait and Landscape. I have all of my content(labels, uiimageviews, uilabels) lined up to relocate for both orientations. However, the only change when the device is actually rotated. When I cycle between tabs after it has been rotated it just shows up autosized and not the way I have it setup when the user rotates it. How can I detect the orientation of the device and display the view to reflect the orientation when the taps different tabs?

    Read the article

  • First site going live real soon. Last minute questions

    - by user156814
    I am really close to finishing up on a project that I've been working on. I have done websites before, but never on my own and never a site that involved user generated data. I have been reading up on things that should be considered before you go live and I have some questions. 1) Staging... (Deploying updates without affecting users). I'm not really sure what this would entail, since I'm sure that any type of update would affect users in some way. Does this mean some type of temporary downtime for every update? can somebody please explain this and a solution to this as well. 2) Limits... I'm using the Kohana framework and I'm using the Auth module for logging users in. I was wondering if this already has some type of limit (on login attempts) built in, and if not, what would be the best way to implement this. (save attempts in database, cookie, etc.). If this is not whats meant by limits, can somebody elaborate. 3) Caching... Like I said, this is my first site built around user content. Considering that, should I cache it? 4) Back Ups... How often should I backup my (MySQL) database, and how should I back it up (MySQL export?). The site is currently up, yet not finished, if anybody wants to look at it and see if something pops out to you that should be looked at/fixed. Clashing Thoughts. If there is anything else I overlooked, thats not already in the list linked to above, please let me know. Thanks.

    Read the article

  • How do I determine whether I am going "forward" or "backward" through my History in GWT?

    - by Stephen Cagle
    I am looking at History and History JavaDocs in GWT and I notice that there is no way to tell whether the forward or backward button was pressed (either pragmatically or by the user). The "button press" is handled by your registered addValueChangeHandler, but the only thing passed to the handler is a string on your history stack. There is no indication as to whether the "History" is moving "back" (using the back arrow button) or "forward" (using the right arrow button). Is there any way to determine this?

    Read the article

  • Adjust sprite bounds of the visible part of texture

    - by Crazy D0G
    Is there any way to adjust the boundaries of the visible part of the sprite? To make it easier to understand: I have a texture, such as shown at figure 1. Then I break it into pieces and fill the resulting fragments using PRKit (wood texture on figure 2 and 3). But the resulting fragments have the transparent (green color on figure 2 and 3) and when creating a sprite from the fragments they have the size of the initial texture. Is there a way to get rid of this transparency and to adjust the size of the visible part (wood texture), openGL or cocos2d-x means? Maybe it help - draw() method from PRKit: void PRFilledPolygon::draw() { //CCNode::draw(); glDisableClientState(GL_COLOR_ARRAY); // we have a pointer to vertex points so enable client state glBindTexture(GL_TEXTURE_2D, texture->getName()); glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_ONE_MINUS_SRC_ALPHA); glVertexPointer(2, GL_FLOAT, 0, areaTrianglePoints); glTexCoordPointer(2, GL_FLOAT, 0, textureCoordinates); glDrawArrays(GL_TRIANGLES, 0, areaTrianglePointCount); glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE); //Restore texture matrix and switch back to modelview matrix glEnableClientState(GL_COLOR_ARRAY);}

    Read the article

  • Can you explain what's going on in this Ruby code?

    - by samoz
    I'm trying to learn Ruby as well as Ruby on Rails right now. I'm following along with Learning Rails, 1st edition, but I'm having a hard time understanding some of the code. I generally do work in C, C++, or Java, so Ruby is a pretty big change for me. I'm currently stumped with the following block of code for a database migrator: def self.up create_table :entries do |t| t.string :name t.timestamps end end Where is the t variable coming from? What does it actually represent? Is it sort of like the 'i' in a for(i=0;i<5;i++) statement? Also, where is the :entries being defined at? (entries is the name of my controller, but how does this function know about that?)

    Read the article

  • Double Slash at end of URL when going to HTTPS?

    - by J M 4
    My site currently uses http and https sections based on the data being collected on the site (form data uses https). On my index page, I have the PHP code at the top: <?php session_start(); ob_start(); if( $_SERVER['SERVER_PORT'] == 443) { header('Location:http://'.$_SERVER['HTTP_HOST'].dirname($_SERVER['PHP_SELF'])); die(); } ?> However, the page will not load and I get a 404 error. Similarly, when i visit the sections with https security using the head code: <?php session_start(); ob_start(); if( $_SERVER['SERVER_PORT'] == 80) { header('Location:https://'.$_SERVER['HTTP_HOST'].dirname($_SERVER['PHP_SELF']).'/'.basename($_SERVER['PHP_SELF'])); die(); } ?> The site does not respond AND for some reason creates a double slash when switching from http to https. Example: http://www.abc.com/, then clicking button which should route to enroll.php shows http://www.abc.com//enroll.php why the need for the double slash and can anybody help with the 404 errors?

    Read the article

  • Use WampServer's MySQL as a real MySQL for going on the net.

    - by Auxiliary
    Is this a right thing to do? I am using the Apache/Tomcat that comes with the liferay portal bundle and I used the MySQL that comes with WampServer at home but now I want to transfer my portal to a real Server and I wanted to know whether I could still use the Wamp's MySQL or should I install a real MySQL (What's the difference?) Thanks in advance.

    Read the article

  • http requests, using sprites and file sizes -

    - by crazy sarah
    Hi all I'm in the process of finding out all about sprites and how they can speed up your pages. So I've used spriteMe to create a overall sprite image which is 130kb, this is made up of 14 images with a combined total size of about 65kb So is it better to have one http request and a file size of 130kb or 14 requests for a total of 65kb? Also there is a detailed image which has been put into the spite which caused it's size to go up by about 60kb odd, this used to be a seperate jpg image which was only 30kb. Would I be better off having it seperate and suffering the additional request?

    Read the article

  • Validating Internationalized URLs - Is this going to be a problem?

    - by VirtuosiMedia
    After reading about the new Arabic URLs, and with more languages to come, how should URL validation be done for internationalized applications? Does the validation change at all and will existing solutions break? Is regex still a good approach? If so, what would that regex look like? If not, what's a good strategy? What are some good resources to read more on the topic? I ask this because it has the potential to cause a good many localized applications to have to be rewritten if they have to validate URLs at any point.

    Read the article

  • In Ruby, how does one get their IP octet without going through DNS?

    - by user30997
    I can, on some of my systems, get my IP address (192.68.m.n format) by doing this: addr = IPSocket::getAddress(Socket.gethostname()) ...the trouble is that this only works if the name the local machine uses for itself is the name the DNS server associates with it. How *&#( hard can it be for ruby to just return its primary interface's IP address? I have to do this in a platform-independant way or I'd just call ifconfig or ipconfig and parse it.

    Read the article

  • I need to know inside of "while(fscanf != EOF){blah}" if the next fscanf is going to return EOF-- be

    - by Rancur3p1c
    I've got some code executing in a while(fscanf != EOF) loop. However, even when fscanf has finished executing, I need to keep running that code until some conditions are met. I mean I guess I could copy/paste the code to outside the while(fscanf) loop, and only use global variables, but that seems messy. Surely someone has encountered something like this before and has a cleaner solution.

    Read the article

< Previous Page | 18 19 20 21 22 23 24 25 26 27 28 29  | Next Page >