Search Results

Search found 8083 results on 324 pages for 'total newbie'.

Page 172/324 | < Previous Page | 168 169 170 171 172 173 174 175 176 177 178 179  | Next Page >

  • RSpec: Expectation on model's not working while testing controller

    - by gmile
    I'm trying to write a functional test. My test looks as following: describe PostsController do it "should create a Post" do Post.should_receive(:new).once post :create, { :post => { :caption => "ThePost", :category => "MyCategory" } } end end My PostsController (a part of it actually) looks as following: PostController < ActiveRecord::Base def create @post = Post.new(params[:post]) end end Running the test I'm always receiving a failure, which says that the Post class expected :new but never got it. Still, the actual post is created. I'm a newbie to RSpec. Am I missing something?

    Read the article

  • Warning: XXX may not respond to YYY

    - by Aurel300
    Hey, I am making some stuff in Objective-C++... And I must say that I am a total newbie when it comes to the Objective-C part... I don't really want to learn it, I kinda just need it for accessing a few Mac APIs (ObjC is such a dumb language). So - compiling with g++ -x objective-c++ - and I somehow keep getting this warning: XXX may not respond to YYY First it was with a NSScreen, now it is with a NSWindow: NSWindow may not respond to +initWithContentRect:styleMask:backing:defer: I saw somewhere that I should cast it to id, but didn't work, throwing absolutely cryptic errors... So - WHAT does this warning actually mean and HOW am I supposed to make it stop?

    Read the article

  • Determine Server specs for a Rails with MySQL database (on AWS)

    - by Rogier
    I developed a intranet applications with Rails (3.2) for one of my customers. There will be around 30-40 employees working with it. Backend is MySQL (5). What would be the best way to determine the servers specs needed? Given: max. load will be roughly 2400 (40*60) HTTP requests (mixed GET / POST) per hour. 15% of these calls are JSON calls (iOS) avg request will make between 5-10 database calls 500-800 SQL INSERTS per day webpages are fairly simple (no images, just text) avg webpage is 15 request (css/js/etc) and total size is 35-45 KB More specific, since they need access from multiple geographical locations, we are thinking of running a bitnami Ruby stack in the AWS cloud (uptime is important). Any thoughts on a AWS Instance (small/medium) and Utilization (light/medium/heavy) ? Thanks!

    Read the article

  • TTL and traceroute showing different values for same domain

    - by Cray XT3
    y am i getting two different output for tracert and ping. Ping Result showing total hops of 20 and tracert showing 8. default ttl value on my linux machine 64,icmp echo reply ttl value 44. 64-44=20 but tracert is showing only 8 hops. What can be the reason? If tracert is implemented using ttl then why am i getting different values for same domain.no matter how many times i tried. Fo google and google services,ttl value and tracrt are same,but for other domains its different.

    Read the article

  • Missing disk space in Windows XP

    - by Jørn Schou-Rode
    On my mother's Lenovo laptop, Windows XP claims that the hard drive is almost full. According to the properties window, 52.7 out of 55.2 GB is in use: By deleting temp files from Internet Explorer, System Restore, Recycle bin, Windows Update, System Cleanup, I managed to free up about one GB. That's still 50 GB in use, which still is a lot more than I expected. Hence, I gave good old WinDirStat a spin, and here's the output: It might be hard to read here, but the first line says that the total amount of disk space in use on drive C is 24.3 GB. So Windows claims usage of 52.7 GB and WinDirStat can only account for 24.3 GB. Where is the other half of that disk space being used? I hope someone has an answer, or some tricks or tips to do further research. UPDATE: The laptop in question has an SSD hard drive. I am aware that these disk (at least the earlier ones) have a limited life-time. Could the symptoms described be caused by wear and tear on the SSD?

    Read the article

  • Gridview : Hyperlink and description in the same column cell

    - by John McNamara
    Hi Guys, Apologies for the newbie question. My client wishes me to make a small change to the gridview on his http://www.flogitdonegal.com/SearchPage.aspx page. Note the way the Title column is a hyperlink to view more information. This comes from a 'BriefDescription' field in the database. How can I add 250 chars from the 'FullDescription' underneath the Title in the same cell, but I dont want it be a hyperlink. Essentially it will be 2 fields coming into the same column. Thanks in advance for all help. John

    Read the article

  • ajax/jquery disables links after submit

    - by Chocho
    i am working on this form. i am using lightbox and dhtml fade effects. the content in my lightbox is a form. i am using jquery to validate the form. once the form is submitted, i redirect a user back to a thank you page. what i am noticing is that, once all the above events has taken place, i cannot click anywhere on my screen, all the links/buttons are sort of disable. i need to press F5 to refresh the page to be able to click anywhere on the page again? is this happening because i am using jquery validation and an events already took place, how do i resolve this as i am a newbie to jquery. thanks

    Read the article

  • OCZ Agility 3 SSD - Incorrect capacity displayed

    - by Chris
    Just installed a 60GB OCZ Agility 3 SSD, put Windows, and other various applications on there. All working fine. However, when I look at the drive in Windows 7, it says that I have 1.5GB free, but when I select all folders on the drive and view the properties to see the combined file size it says that the total is 28.9GB. So I'm effectively losing half of my capacity!! Any ideas on what this could be? PC Spec: Windows 7 60GB OCZ Agility 3 SSD Thanks, Chris

    Read the article

  • Apache Prefork Configuration

    - by user1618606
    I'm newbie on VPS configuration. So, I've installed apache, php and mysql and now I need to know how to configure Prefork to optimize Apache. The system configuration is: CPU Cores 2 x 2 Ghz @ 4 Ghz RAM Memory 2304 MB DDR3 Burst Memory 3 GB DDR3 Disk Space 30 GB SSD Bandwidth 3 TB SwitchPort 1 Gbps Actually, after linux, mysql, apache and php, there are 250 MB memory in use. Well, I don't have idea to calculate. I saw in some websistes, some vars like: KeepAlive On KeepAliveTimeout 1 MaxKeepAliveRequests 100 StartServers 15 MinSpareServers 15 MaxSpareServers 15 MaxClients 20 MaxRequestsPerChild 0 or StartServers 2 MaxClients 150 MinSpareThreads 25 MaxSpareThreads 75 ThreadsPerChild 25 MaxRequestsPerChild 0 How I could to do: Prefork or worker? Where and how the vars are placed? In httpd.conf? Big hug, Claudio.

    Read the article

  • I need some MySQL lookup table advice

    - by Gary Beam
    I have a MySQL database with about 200 tables. 50 of these are small 2-field 'id-data' lookup tables. Several of these DB's are hosted on a shared server. I have been informed that I need to reduce the total number of tables in the shared hosting environment because of performance issues relating to too many tables. My question is: Could/Should the 50 2-Field lookup tables be combined into a single 3-field table with 'id-field_name-data' Fields? Even if this can be done, I will have a lot of work to do on the PHP user application. My other choice is moving the DB's to a dedicated server at much higher hosting cost. I don't believe my 200 table DB's are actually causing any performance issues on this shared hosting server, at least not from the user application standpoint. There are never more than 10 of these tables joined in any single query; although I have seen some very-slow queries generated by phpmyadmin on these DB's.

    Read the article

  • Do large folder sizes slow down IO performance?

    - by Aaron
    We have a Linux server process that writes a few thousand files to a directory, deletes the files, and then writes a few thousand more files to the same directory without deleting the directory. What I'm starting to see is that the process doing the writing is getting slower and slower. My question is this: The directory size of the folder has grown from 4096 to over 200000 as see by this output of ls -l. root@ad57rs0b# ls -l 15000PN5AIA3I6_B total 232 drwxr-xr-x 2 chef chef 233472 May 30 21:35 barcodes On ext3, can these large directory sizes slow down performance? Thanks. Aaron

    Read the article

  • Create an own "OpenID-like system" Provider

    - by user502052
    I know that Facebook use their own OpenID-like system called "Facebook connect", which you can use to authenticate users on your site, among other features. In my case I have multiple Ruby on Rails applications: users.example.com profiles.example.com photos.example.com ... I would like to use 'users.example.com' as a web service that allows users to authenticate to all my other applications the same way as works "Facebook connect" or OpenID. In few words, 'users.example.com' must works as a "OpenID-like system" for my applications in 'example.com'. Can anyone give me tips and links to some useful resources? P.S.: since I am a newbie in this matter, I do not know if I'm saying things that make sense. So someone could help me to understand (if I am wrong) ...

    Read the article

  • What is the advantage of using static methods in Python?

    - by Curious2learn
    I ran into unbound method error in python with the code class Sample(object): '''This class defines various methods related to the sample''' def drawSample(samplesize,List): sample=random.sample(List,samplesize) return sample Choices=range(100) print Sample.drawSample(5,Choices) After reading many helpful posts here, I figured how I could add @staticmethod above to get the code working. I am python newbie. Can someone please explain why one would want to define static methods? Or, why are not all methods defined as static methods. Thanks in advance.

    Read the article

  • apache requests failing

    - by Josh
    I'm trying to figure out why sometimes the client fails to load objects/requests from a dynamic page served from Apache/MySql/Debian machine. Let's say 13 objects are to be loaded for a total of 185.3 KB load, with no external objects (no DNS lookups) and no other traffic at the same time, randomly some of those object do not load. However, if I perform a refresh, sometimes all of them load or some might fail again. I only have 1Mbps/up and my DNS is been hosted externally (everydns). What could be the reason of this issue? Any comments will be appreciated.

    Read the article

  • Problem with displaying graphs on a Qt canvas

    - by Michal Nowotka
    Let's say I'm a Qt newbie. I want a good Qt library for displaying simple graphs. I've found the quanava library. But there is a problem. When I compiled a basic example it looks like graph edges are not painted properly when moving nodes. I don't have any idea where is a bug but this code seems to be rather simple. I think this is a problem with paint method in NodeItem class. Maybe someone has already solved this problem because this library is quite popular.

    Read the article

  • Optimal Disk Setup for OLTP SQL Server

    - by Chris
    We have a high transaction (lots of reads and writes) database server (running SQL 2005) that is currently set up with a RAID 1 OS partition (C:) and a RAID 5 data/log/tempdb partition (D:). The C: has 2 drives and the D: has 4 drives. The server has around 300 databases ranging from 10MB to 2GB in size. I have been reading up on best practices for partioning the disks, but would like some opinions on our setup since we are so limited in the number of disks. It seems like RAID 10 is popular, but I dont think we could use it with only 6 total disks to work with. Thanks. Update I went with 3 RAID 1 Partitions (2 disks each) Partition 1: OS, TempDB, Backups Partition 2: Logs Partition 3: Data

    Read the article

  • subversion instillation on centos 5.8

    - by user57221
    I am trying to install subversion on centos 5.8 usingyum install subversion and it is throwing the error below. ..... .... Total size: 7.3 M Is this ok [y/N]: y Downloading Packages: Running rpm_check_debug ERROR with rpm_check_debug vs depsolve: libapr-1.so.0()(64bit) is needed by subversion-1.6.11-10.el5_8.x86_64 libaprutil-1.so.0()(64bit) is needed by subversion-1.6.11-10.el5_8.x86_64 libapr-1.so.0()(64bit) is needed by (installed) mod_perl-2.0.4-6.el5.x86_64 apr is needed by (installed) httpd-2.2.22-12051516.x86_64 /usr/lib64/libapr-1.so.0 is needed by (installed) httpd-2.2.22-12051516.x86_64 libaprutil-1.so.0()(64bit) is needed by (installed) mod_perl-2.0.4-6.el5.x86_64 apr-util is needed by (installed) httpd-2.2.22-12051516.x86_64 /usr/lib64/libaprutil-1.so.0 is needed by (installed) httpd-2.2.22-12051516.x86_64 Complete! (1, [u'Please report this error in http://bugs.centos.org/yum5bug']) How do i resolve this?

    Read the article

  • Production Instance : CLOSE_WAIT Connection Issue

    - by rajnikant
    I am using 10EC2 Instances behind 1 ELB. And ELB configured 80 to 8080 and 443 to 8080 port. And all 10EC2 instances having installed with Apache Tomcat, total request on ELB around 8000 to 10000 in 1 minute. I am facing problem for CLOSE_WAIT connection on 10 EC2 Instance, having Apache Tomcat. EC2 Instance Type : m1.xlarge When we restart the Apache Tomcat, all CLOSE_WAIT connections are lost, but its not proper way to work on Production Instances. Please help me out.

    Read the article

  • Laptop overheating within minutes of start up

    - by Spik330
    I have a Dell Windows 7 Home Prem with an I7-720QM. More information on the computer can be found here http://www.dell.com/support/home/us/en/04/product-support/servicetag/51CVCN1/configuration The Problem I am having is the computer will over heat unnaturally fast. From the time it takes from boot to when i can run my diagnostic tools which takes about two minutes the cpu temp is 86c after a few more minutes the cpu temp will reach 100 and the computer will black screen shut down. In total the the laptop can only be run for 3-5 minutes before completely shutting off. During this time there is nothing extensive running. After the laptop shuts down you have to wait for it to cool down or it will shut off even faster sometimes 7-15 seconds well still in the boot screen. Does anyone know what could be the problem maybe a sensor or is the computer fried?

    Read the article

  • MRTG: Switch Port Throughput

    - by amazinghorse24
    I currently have MRTG running in a Debian box. It currently polls a Netgear Switch for the speeds of 7 or so ports and then makes the graphs of them. It currently only records the bits/sec. I would like to set up MRTG to record and display the total amount of data that has gone through the port, not just the speed of it. I am somewhat new to MIBS and SNMP and so I need some help. The switch is a Netgear GS748AT and am not quite sure where to find the MIBS for it, or which MIBS I need to accomplish my task. Any and all help is appreciated!

    Read the article

  • How to navigate through folders without opening a new buffer in Emacs?

    - by Vivi
    (I don't know if it is important, but I am using Aquamacs - and yeah, I am a newbie) When I want to open a file I use C-x C-f and usually just chose my home folder. From there I go clicking on folders until I find the file I want. I really don't like thought that each new file I open creates a new buffer. This is especially annoying because I am using Aquamacs with the window (tab) option enabled. I know I could simply get rid of the window option, but I quite like it, except of course for when I open a file and a zillion tabs are created. So my question is: is there a way to disable the new buffer creation when "navigating" through folders? Thanks :)

    Read the article

  • Looking to eventually build a smartphone app...

    - by Brian L
    Hi all- I'm a young, inexperienced programmer (I've had a year of Java, some MATLAB, and HTML/CSS in school) but I've decided that to get better, I'm making it my goal to produce a simple smartphone app of some kind this year- probably either webOS or Android since I'm on a PC and can't afford a Mac just to write an iPhone app. So my question is, where do I start? I've read the threads about How to Write for Android and such, but I'm not sure I have enough Java experience to just jump right in. And then there's webOS which is based on JavaScript, correct? I guess I'd just like some input from more experienced folks. I have some Barnes and Noble book credit I'm looking to get rid of too, so if there's a guide you think would be useful, feel free to request. tl;dr: Programming newbie ultimately wants to build a simple smartphone app. Where do I start?

    Read the article

  • Various problems with software raid1 array built with Samsung 840 Pro SSDs

    - by Andy B
    I am bringing to ServerFault a problem that is tormenting me for 6+ months. I have a CentOS 6 (64bit) server with an md software raid-1 array with 2 x Samsung 840 Pro SSDs (512GB). Problems: Serious write speed problems: root [~]# time dd if=arch.tar.gz of=test4 bs=2M oflag=sync 146+1 records in 146+1 records out 307191761 bytes (307 MB) copied, 23.6788 s, 13.0 MB/s real 0m23.680s user 0m0.000s sys 0m0.932s When doing the above (or any other larger copy) the load spikes to unbelievable values (even over 100) going up from ~ 1. When doing the above I've also noticed very weird iostat results: Device: rrqm/s wrqm/s r/s w/s rsec/s wsec/s avgrq-sz avgqu-sz await svctm %util sda 0.00 1589.50 0.00 54.00 0.00 13148.00 243.48 0.60 11.17 0.46 2.50 sdb 0.00 1627.50 0.00 16.50 0.00 9524.00 577.21 144.25 1439.33 60.61 100.00 md1 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 md2 0.00 0.00 0.00 1602.00 0.00 12816.00 8.00 0.00 0.00 0.00 0.00 md0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 And it keeps it this way until it actually writes the file to the device (out from swap/cache/memory). The problem is that the second SSD in the array has svctm and await roughly 100 times larger than the second. For some reason the wear is different between the 2 members of the array root [~]# smartctl --attributes /dev/sda | grep -i wear 177 Wear_Leveling_Count 0x0013 094% 094 000 Pre-fail Always - 180 root [~]# smartctl --attributes /dev/sdb | grep -i wear 177 Wear_Leveling_Count 0x0013 070% 070 000 Pre-fail Always - 1005 The first SSD has a wear of 6% while the second SSD has a wear of 30%!! It's like the second SSD in the array works at least 5 times as hard as the first one as proven by the first iteration of iostat (the averages since reboot): Device: rrqm/s wrqm/s r/s w/s rsec/s wsec/s avgrq-sz avgqu-sz await svctm %util sda 10.44 51.06 790.39 125.41 8803.98 1633.11 11.40 0.33 0.37 0.06 5.64 sdb 9.53 58.35 322.37 118.11 4835.59 1633.11 14.69 0.33 0.76 0.29 12.97 md1 0.00 0.00 1.88 1.33 15.07 10.68 8.00 0.00 0.00 0.00 0.00 md2 0.00 0.00 1109.02 173.12 10881.59 1620.39 9.75 0.00 0.00 0.00 0.00 md0 0.00 0.00 0.41 0.01 3.10 0.02 7.42 0.00 0.00 0.00 0.00 What I've tried: I've updated the firmware to DXM05B0Q (following reports of dramatic improvements for 840Ps after this update). I have looked for "hard resetting link" in dmesg to check for cable/backplane issues but nothing. I have checked the alignment and I believe they are aligned correctly (1MB boundary, listing below) I have checked /proc/mdstat and the array is Optimal (second listing below). root [~]# fdisk -ul /dev/sda Disk /dev/sda: 512.1 GB, 512110190592 bytes 255 heads, 63 sectors/track, 62260 cylinders, total 1000215216 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0x00026d59 Device Boot Start End Blocks Id System /dev/sda1 2048 4196351 2097152 fd Linux raid autodetect Partition 1 does not end on cylinder boundary. /dev/sda2 * 4196352 4605951 204800 fd Linux raid autodetect Partition 2 does not end on cylinder boundary. /dev/sda3 4605952 814106623 404750336 fd Linux raid autodetect root [~]# fdisk -ul /dev/sdb Disk /dev/sdb: 512.1 GB, 512110190592 bytes 255 heads, 63 sectors/track, 62260 cylinders, total 1000215216 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0x0003dede Device Boot Start End Blocks Id System /dev/sdb1 2048 4196351 2097152 fd Linux raid autodetect Partition 1 does not end on cylinder boundary. /dev/sdb2 * 4196352 4605951 204800 fd Linux raid autodetect Partition 2 does not end on cylinder boundary. /dev/sdb3 4605952 814106623 404750336 fd Linux raid autodetect /proc/mdstat root # cat /proc/mdstat Personalities : [raid1] md0 : active raid1 sdb2[1] sda2[0] 204736 blocks super 1.0 [2/2] [UU] md2 : active raid1 sdb3[1] sda3[0] 404750144 blocks super 1.0 [2/2] [UU] md1 : active raid1 sdb1[1] sda1[0] 2096064 blocks super 1.1 [2/2] [UU] unused devices: Running a read test with hdparm root [~]# hdparm -t /dev/sda /dev/sda: Timing buffered disk reads: 664 MB in 3.00 seconds = 221.33 MB/sec root [~]# hdparm -t /dev/sdb /dev/sdb: Timing buffered disk reads: 288 MB in 3.01 seconds = 95.77 MB/sec But look what happens if I add --direct root [~]# hdparm --direct -t /dev/sda /dev/sda: Timing O_DIRECT disk reads: 788 MB in 3.01 seconds = 262.08 MB/sec root [~]# hdparm --direct -t /dev/sdb /dev/sdb: Timing O_DIRECT disk reads: 534 MB in 3.02 seconds = 176.90 MB/sec Both tests increase but /dev/sdb doubles while /dev/sda increases maybe 20%. I just don't know what to make of this. As suggested by Mr. Wagner I've done another read test with dd this time and it confirms the hdparm test: root [/home2]# dd if=/dev/sda of=/dev/null bs=1G count=10 10+0 records in 10+0 records out 10737418240 bytes (11 GB) copied, 38.0855 s, 282 MB/s root [/home2]# dd if=/dev/sdb of=/dev/null bs=1G count=10 10+0 records in 10+0 records out 10737418240 bytes (11 GB) copied, 115.24 s, 93.2 MB/s So sda is 3 times faster than sdb. Or maybe sdb is doing also something else besides what sda does. Is there some way to find out if sdb is doing more than what sda does? UPDATE Again, as suggested by Mr. Wagner, I have swapped the 2 SSDs. And as he thought it would happen, the problem moved from sdb to sda. So I guess I'll RMA one of the SSDs. I wonder if the cage might be problematic. What is wrong with this array? Please help!

    Read the article

  • Add opening and closing balance columns

    - by user1862899
    i have a table like this: StockNumber|InventoryName|Year|Month|Adj|iss|piss|Tsfr|return|rdj|rpo|xefr alb001 clinic1 2010 1 4 5 5 5 6 5 4 10 alb001 Clinic1 2010 2 10 2 2 3 3 4 4 4 alb001 Clinic1 2010 4 11 3 5 77 90 78 9 6 alb001 Clinic1 2010 5 10 2 2 3 3 4 4 4 i want to add a closing balance column which will be sum(return+rdj+rpo+xefr) - sum(adj+iss+piss+tsfr) i also want to add the opening balance column which will be the be the closing balance of the previous month. i will then calculate the current months balance as OpeningBalance + sum(return+rdj+rpo+xefr) - sum(adj+iss+piss+tsfr) = ClosingBalance NB.The Year and Month columns are floats and also want to change them to date format. i am newbie to sql and crystal reports....i want a query to help me achieve the tasks of developing a report that has the opening and closing balance columns,the opening balance being the previous closing balance.....thank you for your help....

    Read the article

  • Windows 7 Recurring Blue Screens: MEMORY_MANAGEMENT 0x1A

    - by Chris C.
    I have recurring BSODs that really have me scratching my head. Here's a look at the errors: MEMORY_MANAGEMENT 0x1A (ntoskrnl.exe) - I've seen this 9 times since April 2012 NTFS_FILE_SYSTEM 0x24 (Ntfs.sys) - this one's new, happend 4 days ago BAD_POOL_HEADER 0x19 (win32k.sys) - also new, happened 7 days ago My system specs: Intel Core i5 2500K @ 3.30GHz ASUS Sabertooth P67 Motherboard (Rev 2) * RMA'd my Rev 1 due to recall 16GB (4 x 4GB) Kingston HyperX 1600 MHz DDR3 RAM 2 x 640GB Western Digital Caviar Black 64MB SATA HDD EVGA NVIDIA GeForce GTS450 1GB PCI-E 2.0 Graphics Card I've got Windows 7 Home Premium and it's completely patched. I'm also running Microsoft Security Essentials, which is up-to-date and always present. I've run MemTest86+ from a USB drive for up to nine hours, giving my RAM a total of 6 passes, and it didn't detect a single error. I've used chkdsk in Windows 7 to scan the C:/ drive on boot (twice) and it found no problems. How can I find out what's causing all these blue screens?

    Read the article

< Previous Page | 168 169 170 171 172 173 174 175 176 177 178 179  | Next Page >