Search Results

Search found 31 results on 2 pages for 'someones'.

Page 1/2 | 1 2  | Next Page >

  • Update someones birthday with javascript

    - by user2768038
    So far the only mathematical way I can think of doing it is this: var age = 18 var today = new Date(); var myDate = new Date(); myDate.setFullYear(2013,3,13); /* My birthday is april 13th */ var y = (today - myDate); var days = ( y / (1000*60*60*24)); if(days >= 360){ var age = age +1; } if(days >= 720){ var age = age +1; } //etc...... document.write(age); Is there a better way of doing the if statements? so that I don't have to write one out for every year? I can't think!

    Read the article

  • How to calculate the y-pixels of someones weight on a graph? (math+programming question)

    - by RexOnRoids
    I'm not that smart like some of you geniuses. I need some help from a math whiz. My app draws a graph of the users weight over time. I need a surefire way to always get the right pixel position to draw the weight point at for a given weight. For example, say I want to plot the weight 80.0(kg) on the graph when the range of weights is 80.0 to 40.0kg. I want to be able to plug in the weight (given I know the highest and lowest weights in the range also) and get the pixel result 400(y) (for the top of the graph). The graph is 300 pixels high (starts at 100 and ends at 400). The highest weight 80kg would be plot at 400 while the lowest weight 40kg would be plot at 100. And the intermediate weights should be plotted appropriately. I tried this but it does not work: -(float)weightToPixel:(float)theWeight { float graphMaxY = 400; //The TOP of the graph float graphMinY = 100; //The BOTTOM of the graph float yOffset = 100; //Graph itself is offset 100 pixels in the Y direction float coordDiff = graphMaxY-graphMinY; //The size in pixels of the graph float weightDiff = self.highestWeight-self.lowestWeight; //The weight gap float pixelIncrement = coordDiff/weightDiff; float weightY = (theWeight*pixelIncrement)-(coordDiff-yOffset); //The return value return weightYpixel; }

    Read the article

  • Nginx no static files after update

    - by SomeoneS
    First, i must say that i am not expert in server administration, my site was setup by hosting admins (that i cannot contact anymore). Few days ago, i updated Nginx to latest version (admin told me that it is safe to do). But after that, my site serves only html content, no CSS, images, JS. If i try to open some image i get message "Wellcome to Nginx" (same thin if i try to open static.mysitedomain.com). More details: Site has static. subdomain, but static files are in same directory as they used to be before setting up static files. I was googling for some solutions, i tried to change something in /etc/nginx/, but no luck. I feel that this is some minor configuration problem, any ideas? EDIT: Here is /etc/nginx/nginx.conf file content: user www-data; worker_processes 4; pid /var/run/nginx.pid; events { worker_connections 768; # multi_accept on; } http { ## # Basic Settings ## sendfile on; tcp_nopush on; tcp_nodelay on; keepalive_timeout 65; types_hash_max_size 2048; # server_tokens off; # server_names_hash_bucket_size 64; # server_name_in_redirect off; include /etc/nginx/mime.types; default_type application/octet-stream; ## # Logging Settings ## access_log /var/log/nginx/access.log; error_log /var/log/nginx/error.log; ## # Gzip Settings ## gzip on; gzip_disable "msie6"; # gzip_vary on; # gzip_proxied any; # gzip_comp_level 6; # gzip_buffers 16 8k; # gzip_http_version 1.1; # gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript; ## # nginx-naxsi config ## # Uncomment it if you installed nginx-naxsi ## #include /etc/nginx/naxsi_core.rules; ## # nginx-passenger config ## # Uncomment it if you installed nginx-passenger ## #passenger_root /usr; #passenger_ruby /usr/bin/ruby; ## # Virtual Host Configs ## include /etc/nginx/conf.d/*.conf; include /etc/nginx/sites-enabled/*; } Here is /etc/nginx/sites-enabled/default file content: server { #listen 80; ## listen for ipv4; this line is default and implied #listen [::]:80 default ipv6only=on; ## listen for ipv6 root /usr/share/nginx/www; index index.html index.htm; # Make site accessible from http://localhost/ server_name localhost; location / { # First attempt to serve request as file, then # as directory, then fall back to index.html try_files $uri $uri/ /index.html; # Uncomment to enable naxsi on this location # include /etc/nginx/naxsi.rules } location /doc/ { alias /usr/share/doc/; autoindex on; allow 127.0.0.1; deny all; } # Only for nginx-naxsi : process denied requests #location /RequestDenied { # For example, return an error code #return 418; #} #error_page 404 /404.html; # redirect server error pages to the static page /50x.html # #error_page 500 502 503 504 /50x.html; #location = /50x.html { # root /usr/share/nginx/www; #} # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000 # #location ~ \.php$ { # fastcgi_split_path_info ^(.+\.php)(/.+)$; # # NOTE: You should have "cgi.fix_pathinfo = 0;" in php.ini # # # With php5-cgi alone: # fastcgi_pass 127.0.0.1:9000; # # With php5-fpm: # fastcgi_pass unix:/var/run/php5-fpm.sock; # fastcgi_index index.php; # include fastcgi_params; #} # deny access to .htaccess files, if Apache's document root # concurs with nginx's one # #location ~ /\.ht { # deny all; #} } # another virtual host using mix of IP-, name-, and port-based configuration # #server { # listen 8000; # listen somename:8080; # server_name somename alias another.alias; # root html; # index index.html index.htm; # # location / { # try_files $uri $uri/ /index.html; # } #} # HTTPS server # #server { # listen 443; # server_name localhost; # # root html; # index index.html index.htm; # # ssl on; # ssl_certificate cert.pem; # ssl_certificate_key cert.key; # # ssl_session_timeout 5m; # # ssl_protocols SSLv3 TLSv1; # ssl_ciphers ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv3:+EXP; # ssl_prefer_server_ciphers on; # # location / { # try_files $uri $uri/ /index.html; # } #}

    Read the article

  • PHPMailer attachment type and size limit

    - by SomeoneS
    i have one form and i am using PHPMailer to send data from that form to my email. Users can send attachments as well, but i have one rpoblem: how to make PHPMailer to deny attachments larger than 2Mb and to allow only iamge attachments (no other types of documents)? This is code i using for multiply email attachments with PHPMailer: foreach(array_keys($_FILES['fileAttach']['name']) as $key) { $source = $_FILES['fileAttach']['tmp_name'][$key]; $filename = $_FILES['fileAttach']['name'][$key]; $mail->AddAttachment($source, $filename); }

    Read the article

  • Work Time Start / Stop Tracking Software

    - by Shaharyar
    Is there a software that allows you to keep track of someones working time digitally? We are growing to an extent where we work remotely and we would like to have fixed working times. All it should do is kind of register when someone starts working (i.e. someone needs to login somewhere or set a flag.. really it could be anything) Do you have any ideas?

    Read the article

  • Can't do SSH public key under cryptographed home [migrated]

    - by lucasvscn
    Sorry if I post this in the wrong place. I've readed this topic, but I not able to comment on someones answer, so I started a new topic. I can't do ssh public key login to my server and I think this issue is related to the fact my home is using cryptography which set the permissions to 700 on /home/MY-USER I've tried another workstation and everything works fine. I would be glad if someone help me to get out this without revert the cryptography.

    Read the article

  • Questionable ethics regarding closed source softwares which are supposed to be open source.

    - by edem
    Several days ago I heard a sentence "Cracking company name routers are not a crime.". I asked "Why?" and the guy explained to me that company name used a linux distribution on their routers which source can not be closed because of their license but company name closed it. What do you think about this? Doing otherwise unethical "cracking" becomes ethical, or somewhat neutral if the software in question is "cracked" too? By "cracking" I don't mean breaking into a computer through someones' company name router but "cracking" my own router's OS which otherwise would be unethical.

    Read the article

  • fancybox iframe dimension

    - by iperdiscount
    Hi, in the fancybox homepage (http://fancybox.net/home) there is an exemple that opens an iFrame dimensioned as the 75% of the screen. I cant get it by modifing the width and height properties on the .js file as described on the site. Someones can help me? thaaanks

    Read the article

  • ASP.NET Membership Password Reset

    - by Steve
    This is crazy, I have been trying for hours to get this to work. My client wants to be able to reset password for uses who have forgotten them The only parameter he has is the UserName. He does NOT want the user to be able to reset the password themselves, no that would be too easy...ARGHHHHH!! Anyway, if anyone has any suggestions how I could reset someones password or give them a new temp password somehow, that would be greatly appreciated. Thank you, Steve

    Read the article

  • [RESOLVED] ASP.NET Membership Password Reset

    - by Steve
    This is crazy, I have been trying for hours to get this to work. My client wants to be able to reset password for uses who have forgotten them The only parameter he has is the UserName. He does NOT want the user to be able to reset the password themselves, no that would be too easy...ARGHHHHH!! Anyway, if anyone has any suggestions how I could reset someones password or give them a new temp password somehow, that would be greatly appreciated. Thank you, Steve

    Read the article

  • Drupal development workflow for teams

    - by Raul Singahn
    In my last Drupal project we were 5 people doing coding and installing new modules, at the same type our client was putting up content. Since we chose to have only one server for simplicity there were times were many people needed to write to the same files like style.css or page.tpl.php or when someones broken code would prevent others from working Are there any best practises for a team that works with Drupal? How can leverage code repositories or sandboxes?

    Read the article

  • Finding where varables have been declared in what file?

    - by robUK
    Hello, GNU Emacs 23.1.1 I am maintaining someones code. There are many files and directories for the headers and source files. I am wondering if there is a easy way to use emacs that when I highlight a variable name I can go straight to where it is declared? Some of the structures I am working in are declared in other header files, rather than go searching for them, I just want to be taken straight to them. Many thanks for any suggestions,

    Read the article

  • How to sniff for wireless MAC addresses in area - My laptop got stolen

    - by Mr AJL
    A few days ago my apartment got broken in, and they took all the electronics, including my $1500 laptop. We are pretty sure it's an inside job (as in someone from the same building), so I believe that the stuff is in someones apartment. Is there any tool that tells you what wireless adapters are active within range? I have my laptops MAC address, so I could use that to find out who stole it. I think it's worth a shot. Any help is appreciated thanks!

    Read the article

  • Recover from a recover partition when F11 doesn't work and windows is corrupt

    - by jherlitz
    I have someones presario V3000 laptop. It has a D drive which is the recovery partition. The user brought it to me and windows would no longer even boot up. I could only reload XP and try to find a way to recover from the recovery partition. However haven't been able to. I read, hold F11 down when booting up, but that didn't do anything, and the other item I read is to create the CDs from the software installed in the OS from the factory. Well that is the OS that went corrupt and is no longer there. A new reloaded version of XP is there now. Is there still a way I can either create recover CD's/DVD's or boot from the recovery partition?

    Read the article

  • Alternatives to Citrix GoToAssist ?

    - by Evan Carroll
    Citrix GoToAssist is a really nifty little web application for customer support that allows you to take control of someones OSX, or Windows machine. Essentially, it works likes this: You log in to your management console You get a code You give them a code, and a website (fastsupport.com) They go there and enter in the code They accept the browser applet which installs a program on their computer You have control of their desktop You can see their desktop, configure applications, etc. They can also see when you disconnect. It is really rather nifty, but it doesn't support Linux and it is rather expensive (660$ a year). Does anyone know of any alternatives to this? I'm looking for a solution as simple on the user as this one, that doesn't require firewall configuration or setting up ssh/vnc/rdesktop etc.

    Read the article

  • How do I start my career on a 3-year-old degree [on hold]

    - by Gabriel Burns
    I received my bachelor's degree in Com S (second major in math) in December 2011. I didn't have the best GPA (I was excellent at programming projects and had a deep understanding of CS concepts, but school is generally not the best format for displaying my strengths), and my only internship was with a now-defunct startup. After graduation I applied for several jobs, had a fair number of interviews, but never got hired. After a while, I got somewhat discouraged, and though I still said I was looking, and occasionally applied for something, my pace slowed down considerably. I remain convinced that software development is the right path for me, and that I could make a real contribution to someones work force, but I'm at a loss as to how I can convince anyone of this. My major problems are as follows. Lack of professional experience-- a problem for every entry-level programmer, I suppose, but everyone seems to want someone with a couple of years under their belt. Rustiness-- I've not really done any programming in about a year, and since school all I've really done is various programming competitions and puzzles. (codechef, hackerrank, etc.) I need a way to sharpen my skills. Long term unemployment-- while I had a basic fast-food job after I graduated, I've been truly unemployed for about a year now. Furthermore, no one has ever hired me as a programmer, and any potential employer is liable to wonder why. Old References-- my references are all college professors and one supervisor from my internship, none of whom I've had any contact with since I graduated. Confidence-- I have no doubt that I could be a good professional programmer, and make just about any employer glad that they hired me, but I'm aware of my red flags as a candidate, and have a hard time heading confidently into an interview. How can I overcome these problems and keep my career from being over before it starts?

    Read the article

  • Changing text size on a ggplot bump plot

    - by Tom Liptrot
    Hi, I'm fairly new to ggplot. I have made a bumpplot using code posted below. I got the code from someones blog - i've lost the link.... I want to be able to increase the size of the lables (here letters which care very small on the left and right of the plot) without affecting the width of the lines (this will only really make sense after you have run the code) I have tried changing the size paramater but that always alter the line width as well. Any suggestion appreciated. Tom require(ggplot2) df<-matrix(rnorm(520), 5, 10) #makes a random example colnames(df) <- letters[1:10] Price.Rank<-t(apply(df, 1, rank)) dfm<-melt(Price.Rank) names(dfm)<-c( "Date","Brand", "value") p <- ggplot(dfm, aes(factor(Date), value, group = Brand, colour = Brand, label = Brand)) p1 <- p + geom_line(aes(size=2.2, alpha=0.7)) + geom_text(data = subset(dfm, Date == 1), aes(x = Date , size =2.2, hjust = 1, vjust=0)) + geom_text(data = subset(dfm, Date == 5), aes(x = Date , size =2.2, hjust = 0, vjust=0))+ theme_bw() + opts(legend.position = "none", panel.border = theme_blank()) p1 + theme_bw() + opts(legend.position = "none", panel.border = theme_blank())

    Read the article

  • iPhone SDK/General Xcode question.

    - by user354779
    In the iPhone SDK, in my .n, I can say: -(IBOutlet) UITextField *MyNameIs; -(IBOutlet) UILabel *DisplayMyNameIsHere; } -(IBAction)PressButtonToDisplayYourName; Then in my .m, I'll do: -(IBAction)PressButtonToDisplayYourName { DisplayMyNameIsHere = MyNameIs.text; } But now how would I translate that to making a Mac application. If I wanted to display someones name from a textfield in a label? I have been trying to figure this out, but the ".text" extension only works in the iPhone SDK, not the Mac SDK. Someone please help! Thanks!

    Read the article

  • Retrieving data from facebook in a winform

    - by gillyb
    Hey, I understand that using the facebook API I need an api key to connect, but I still don't understand how i would go about doing this, and how can i retrieve information upon users using the API (i'm only interested in retrieving the information that is publicly available e.g: username, birthdate, and other info that a specific user left public) I downloaded the facebook development kit, and tried adding the FacebookService control, but i don't get it... All the examples/samples i found on the internet are older than the version i have and therefore work a little different.. Can someone please post an example of how i would connect, using a certain API key, and retrieve someones public info/public photos (if there are any) ?? Thanks. :)

    Read the article

  • Code igniter authentication code in controller security question

    - by Prime Studios
    I have a main controller to handle the very front-end of my authentication system, it handles login, logout, update user info, etc. functions that I anticipate calling by POST'ing from views/forms. What about something like a "delete_user" function though? My thoughts are a button in someones admin panel would say "Delete Account" and it would post to "/auth/delete", and the function would delete the user based on their session username or id. This seems a bit open ended, you could send out a link to someone and when they opened it while in that application it would delete their account.. Whats the best way to handle this?

    Read the article

  • Can I prevent iPhone from using 3G under any circumstances?

    - by dageshi
    I'm writing a travel guide related app that will download large databases (60meg) potentially overseas, with the reachability code I can tell when a host is reachable via wifi or 3g BUT I'm worried that if for some reason the wifi connection breaks for a minute or so as some DSL connections are likely to do on occasion the iphone will switch transparently to 3G and without realising I could be racking up someones phone bill with overseas data charges! So I'm wondering if anyone has any experience, in the event of such break in wifi connectivity (wifi still works but it's connection to the net is down) would the reachability code report ReachableViaWWAN? So I could wait till my download code returns, check how the host is currently reachable and if it's via 3g I could abort? Is it possible to select what type of connection I can use aka 3g or wifi exclusively?

    Read the article

  • Android ImageButton / Custom-Button?

    - by user568306
    Hi everyone, I am new to android development. So far I could help myself in all matters by reading threads here on stackoverflow. Now I am stuck and need someones help. Unfortunately I am not allowed to post an image of a screenshot because I am a new mamber, so I try to descripe it. I have a Samsung Galasy S and the clock app that ships with it has an button called "+ Create alarm". I want to create a similar button for my app. I've been experimenting with ImageButton. I do know how to get that "+"-Icon onto an ImageButton, but only centered and without text. I guess this is a custom button. Does anyone know how to do this? Can I do it in xml or do I need to extend the view-class and make it my own view?

    Read the article

  • How big can a SQL Server row be before it's a problem?

    - by John Leidegren
    Occasionally I run into this limitation using SQL Server 2000 that a row size can not exceed 8K bytes. SQL Server 2000 isn't really state of the art, but it's still in production code and because some tables are denormalized that's a problem. However, this seems to be a non issue with SQL Server 2005. At least, it won't complain that row sizes are bigger than 8K, but what happens instead and why was this a problem in SQL Server 2000? Do I need to care about my rows growing? Should I try and avoid large rows? Are varchar(max) and varbinary(max) a solution or expensive, in terms of size in database and/or CPU time? Why do I care at all about specifying the length of a particular column, when it seems like it's just a matter of time before someones going to hit that upper limit?

    Read the article

1 2  | Next Page >