Search Results

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

Page 27/324 | < Previous Page | 23 24 25 26 27 28 29 30 31 32 33 34  | Next Page >

  • Cocoa Drag and Drop, reading back the data. [Newbie]

    - by kodai
    Ok, I have a NSOutlineView set up, and I want it to capture PDF's if a pdf is dragged into the NSOutlineView. My first question, I have the following code: [outlineView registerForDraggedTypes:[NSArray arrayWithObjects:NSStringPboardType, NSFilenamesPboardType, nil]]; In all the apple Docs and examples I've seen I've also seen something like MySupportedType being an object registered for dragging. What does this mean? Do I change the code to be: [outlineView registerForDraggedTypes:[NSArray arrayWithObjects:@"pdf", NSStringPboardType, NSFilenamesPboardType, nil]]; Currently I have it set up to recognize drag and drop, and I can even make it spit out the URL of the dragged file once the drag is accepted, however, this leads me to my second question. I want to keep a copy of those PDF's app side. I suppose, and correct me if I'm wrong, that the best way to do this is to grab the data off the clipboard, save it in some persistant store, and that's that. (as apposed to using some sort of copy command and literally copying the file to the app director.) That being said, I'm not sure how to do that. I've the code: - (BOOL)outlineView:(NSOutlineView *)ov acceptDrop:(id <NSDraggingInfo>)info item:(id)item childIndex:(NSInteger)childIndex { NSPasteboard *pboard = [info draggingPasteboard]; NSURL *fileURL; if ( [[pboard types] containsObject:NSURLPboardType] ) { fileURL = [NSURL URLFromPasteboard:pboard]; // Perform operation using the file’s URL } NSData *data = [pboard dataForType:@"NSPasteboardTypePDF"]; But this never actually gets any data. Like I said before, it does get the URL, just not the data. Does anyone have any advise on how to get this going? Thanks so much!

    Read the article

  • Cocoa's newbie question: is it possible to bind a NSTableView's selection to another tableview's selection?

    - by cocoaOverloaded
    http://img651.imageshack.us/img651/6999/modelsf.jpg Let'say, I've 2 entities in the Core Data's Model file, one being all "transactions" ever done by X company. The "transactions" entity has among other properties, a "DATE" property and a to-one relationship "COMPANY"(specifying the company with which X company has done that particular transaction). The other entity:"companies" of course contains all the companies' info ,with which X company has done transaction. The "companies" entity has a to-many relationships "TRANSACTIONS" which is an inverse relationship to "transactions" entity's "COMPANY" relationship. So within IB, I created a NSTableView(with its own NSArrayController) showing all the transactions on a particular Date (with the help of NSPredicate). Then I create another table view showing the to-many relationship "TRANSACTIONS" of the company of the selected transaction in the first table view(which shows transactions on a particular date). The 2nd table view's NSArrayController binding is like this: ** bind to: "name of the first tableview's controller", Controller Key: selection, Model Key Path:COMPANY.TRANSACTIONS(the to-many relationship in the "companies" entity)** Everythings work fine up to this moment, the 2nd tableview shows all the transactions X company has done with the company of the selected transactions in the 1st table view. But I have a group of textfields showing details of a particular transactions. Binding the these textfields with the controller of the 1st table view(the one showing transactions on a particular date) is pretty straightforward. But what I want to do are: 1/ Look up the transactions on a particular date in the first table view, select any one of them 2/ Then, check all previous transactions of the company of that transaction( selected in the first table view) from the 2nd table view 3/ Select any previous transactions and check the details of the transaction from that group of textfields So naturally I should have bind the textfields' gp to the 2nd table view's controller. But I found the default selected row in the 2nd table view(the one show all previous transactions of a company) wasn't the transaction I've selected in the 1st tableView for a particular date. Of course, i can manually select that transaction in the 2nd table view again.... So I just want to know if it's possible to have the 2nd table view automatically select the transaction according to the transaction I've selected in the 1st table view thr binding?? After hours of googling, I solved the problem by implementing the tableview Delegate protocol: - (void)tableViewSelectionDidChange:(NSNotification *)aNotification { if (["nameOf1stTableView" selectedRow] > -1) { NSArray *objsArray = ["nameOf2ndTableView'sController" arrangedObjects]; for (id obj in objsArray) { if ([[obj valueForKey:@"DATE"] isEqualToDate: ["nameOf1stTableView'sController".selection valueForKey:@"DATE"]]) { ["nameOf2ndTableView" selectRowIndexes:[NSIndexSet indexSetWithIndex:[objsArray indexOfObject:obj]] byExtendingSelection:NO]; } } } } But,this just look too cumbersome... can it be done with binding alone? Thanks in Advance,

    Read the article

  • finding the total number of distinct shortest paths between 2 nodes in undirected weighted graph in linear time?

    - by logan
    I was wondering, that if there is a weighted graph G(V,E), and I need to find a single shortest path between any two vertices S and T in it then I could have used the Dijkstras algorithm. but I am not sure how this can be done when we need to find all the distinct shortest paths from S to T. Is it solvable on O(n) time? I had one more question like if we assume that the weights of the edges in the graph can assume values only in certain range lets say 1 <=w(e)<=2 will this effect the time complexity?

    Read the article

  • Applescript for a Newbie: Copy file to a new folder.

    - by Mike
    Hi there! I've also posted this on the macnn forums, but thought I may get a better response here. I was hoping to find some help with using applescript (something I have never tried before, though I have a good knowledge of php etc) I need to create an applescript that will copy specified files from one folder to a newly created folder. These files need to be specified in the applescript. so something like: start fileToBeMoved = "Desktop/Test Folder 1/test.doc" newfoldername = "Test Folder 2" make newfolder and name it 'newfoldername' copy 'fileToBeMoved' to 'newfolder' end I'm so sorry for the rubbish description! Hope someone can help! Thanks!

    Read the article

  • Newbie jQuery question: Need slideshow to rotate automatically, not just when clicking navigation.

    - by Justin
    Hi everyone, This is my first post, so please forgive me if this question has been asked a million times. I'm a self professed jQuery hack and I need a little guidance on taking this script I found and adapting it to my needs. Anyway, what I'm making is an image slide show with navigation. The script I found does this, but does not automatically cycle through the images. I'm using jQuery 1.3.2 and would rather stick with that than using the newer library. I would also prefer to edit what is already here rather than start from scratch. Anywho, here's the html: <div id="myslide"> <div class="cover"> <div class="mystuff"> <img alt="&nbsp;" src="http://www.mfhc.com/wp/wp-content/uploads/2010/05/current_Denver-skyline.jpg" /> </div> <div class="mystuff"> <img alt="&nbsp;" src="http://www.mfhc.com/wp/wp-content/uploads/2010/05/pepsi_center-IS42RF-0D111C.jpg" /> </div> <div class="mystuff"> <img alt="&nbsp;" src="http://www.mfhc.com/wp/wp-content/uploads/2010/05/columbine-2689820469_D1104.jpg" /> </div> <div class="mystuff"> <img alt="&nbsp;" src="http://www.mfhc.com/wp/wp-content/uploads/2010/05/ist2_10460354-RedRocks.jpg" /> </div> </div> <!-- end of div cover --> </div> <!-- end of div myslide --> And here's the jQuery: <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script> <script type="text/JavaScript"> $(document).ready(function (){ $('#button a').click(function(){ var integer = $(this).attr('rel'); $('#myslide .cover').css({left:-820*(parseInt(integer)-1)}).hide().fadeIn(); /*----- Width of div #mystuff (here 820) ------ */ $('#button a').each(function(){ $(this).removeClass('active'); if($(this).hasClass('button'+integer)){ $(this).addClass('active')} }); }); }); </script> Here's where I got the script: http://www.webdeveloperjuice.com/2010/04/07/create-lightweight-jquery-fade-manual-slideshow/ Again, if this question is too basic for this site please let me know and possibly provide a reference link or two. Thanks a ton!

    Read the article

  • Is there a way to reliably detect the total number of CPU cores?

    - by John Sheares
    I need a reliable way to detect how many CPU cores are on a computer. I am creating a numerically intense simulation C# application and want to create the maximum number of running threads as cores. I have tried many of the methods suggested around the internet like Environment.ProcessorCount, using WMI, this code: http://blogs.adamsoftware.net/Engine/DeterminingthenumberofphysicalCPUsonWindows.aspx. None of them seem to think a AMD X2 has two cores. Any ideas?

    Read the article

  • Google App Engine/GWT/Eclipse Plugin Newbie Question- how to autobuild client side resources?

    - by Dieter Hanover
    Hi there, I'm tinkering with the default GWT application generated by the Google Eclipse plugin when I click the Google "New Web Application Project" button in Eclipse 3.5. This will no doubt be familiar to many of you.. basically there is an h1 title stating "Web Application Starter Project," a text field, and a Send button. What I've found is that whenever I make changes to the client side resources, e.g. change the text on the Send button to "Submit" in the .java file, Eclipse does not appear to autobuild these resources. In fact I have to rebuild the entire project in order for these changes to be reflected in my browser. I do have "build automatically" selected in eclipse. I should state that this is my second GWT project, the first was almost entirely server side (restlet on GAE) and everything built automatically nicely. When I first tried this new project with updated client resources, on refreshing my browser, the browser stated "you may need to (re)compile your project." I'm not sure if this is relevant but I thought I'd mention it all the same. So what's going on? How do I get Eclipse/GWT to autobuild these client side resources? Cheers for any help you can offer! :-)

    Read the article

  • Java-Hibernate-Newbie: How do I acces the values from this list?

    - by Mes
    I have this class mapped @Entity @Table(name = "USERS") public class User { private long id; private String userName; } and I make a query: Query query = session.createQuery("select id, userName, count(userName) from User order by count(userName) desc"); return query.list(); How can I acces the value returned by the query?

    Read the article

  • The return value should be a list but doesn't return as expected?! - Python newbie

    - by user1432941
    Hi this must be a very simple solution that has eluded me this last hour. I've tried to build this test function where the return value of the test_cases list should match the values in the test_case_answers list but for some reason, test case 1 and test case 2 fail. When i print the return values for the test cases they return the correct answers, but for some reason test case 1 and test case 2 return False. Thanks for your help! import math test_cases = [1, 9, -3] test_case_answers = [1, 3, 0] def custom_sqrt(num): for i in range(len(test_cases)): if test_cases[i] >= 0: return math.sqrt(test_cases[i]) else: return 0 for i in range(len(test_cases)): if custom_sqrt(test_cases[i]) != test_case_answers[i]: print "Test Case #", i, "failed!" custom_sqrt(test_cases)

    Read the article

  • Where does the 'method' implementation go? (I'm a newbie)

    - by Spokane-Dude
    I have this code: #import "SQLiteDB.h" @implementation SQLiteDB @synthesize db, dbPath, databaseKey; @end //-------------- check for database or create it ----------------| - (void)checkForDatabase { NSFileManager *filemanager = [NSFileManager defaultManager]; NSString *databasePath = [[NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) objectAtIndex:0] stringByAppendingString:@"/ppcipher.s3db"]; if(![filemanager fileExistsAtPath:databasePath]) { //Database doesn't exist yet, so we create it... NSString *defaultDBPath = [[[NSBundle mainBundle] resourcePath] stringByAppendingString:@"/ppcipher.s3db"]; sqlite3 *db; if(sqlite3_open(databasePath, db) == SQLITE_OK) { } } } It's complaining that "method definition not in @implementation context". So where does it go? (I tried in the .h file, but still get the error)

    Read the article

  • What is my peak total memory usage? How much of my RAM is actually being actively used?

    - by William C
    Hi, Is there an app or utility in Windows that shows me the peak value of in-use memory (i.e., the total of the shareable and private memory of processes, drivers and the operating system) (not standby nor free)? I've got lots of memory and I'm installing an in-memory file cache, called "eBoostr", and would like an idea how much memory to allocate for it and still avoid deteriorating page faults. Essentially, I want the answer to the question, "How much of my RAM is actually being actively used?" W

    Read the article

  • I need help on my C++ assignment using MS Visual C++

    - by krayzwytie
    Ok, so I don't want you to do my homework for me, but I'm a little lost with this final assignment and need all the help I can get. Learning about programming is tough enough, but doing it online is next to impossible for me... Now, to get to the program, I am going to paste what I have so far. This includes mostly //comments and what I have written so far. If you can help me figure out where all the errors are and how to complete the assignment, I will really appreciate it. Like I said, I don't want you to do my homework for me (it's my final), but any constructive criticism is welcome. This is my final assignment for this class and it is due tomorrow (Sunday before midnight, Arizona time). This is the assignment: Examine the following situation: o Your company, Datamax, Inc., is in the process of automating its payroll systems. Your manager has asked you to create a program that calculates overtime pay for all employees. Your program must take into account the employee’s salary, total hours worked, and hours worked more than 40 in a week, and then provide an output that is useful and easily understood by company management. • Compile your program utilizing the following background information and the code outline in Appendix D (included in the code section). • Submit your project as an attachment including the code and the output. Company Background: o Three employees: Mark, John, and Mary o The end user needs to be prompted for three specific pieces of input—name, hours worked, and hourly wage. o Calculate overtime if input is greater than 40 hours per week. o Provide six test plans to verify the logic within the program. o Plan 1 must display the proper information for employee #1 with overtime pay. o Plan 2 must display the proper information for employee #1 with no overtime pay. o Plans 3-6 are duplicates of plan 1 and 2 but for the other employees. Program Requirements: o Define a base class to use for the entire program. o The class holds the function calls and the variables related to the overtime pay calculations. o Define one object per employee. Note there will be three employees. o Your program must take the objects created and implement calculations based on total salaries, total hours, and the total number of overtime hours. See the Employee Summary Data section of the sample output. Logic Steps to Complete Your Program: o Define your base class. o Define your objects from your base class. o Prompt for user input, updating your object classes for all three users. o Implement your overtime pay calculations. o Display overtime or regular time pay calculations. See the sample output below. o Implement object calculations by summarizing your employee objects and display the summary information in the example below. And this is the code: // Final_Project.cpp : Defines the entry point for the console application. // #include "stdafx.h" #include <iostream> #include <string> #include <iomanip> using namespace std; // //CLASS DECLARATION SECTION // class CEmployee { public: void ImplementCalculations(string EmployeeName, double hours, double wage); void DisplayEmployInformation(void); void Addsomethingup (CEmployee, CEmployee, CEmployee); string EmployeeName ; int hours ; int overtime_hours ; int iTotal_hours ; int iTotal_OvertimeHours ; float wage ; float basepay ; float overtime_pay ; float overtime_extra ; float iTotal_salaries ; float iIndividualSalary ; }; int main() { system("cls"); cout << "Welcome to the Employee Pay Center"; /* Use this section to define your objects. You will have one object per employee. You have only three employees. The format is your class name and your object name. */ std::cout << "Please enter Employee's Name: "; std::cin >> EmployeeName; std::cout << "Please enter Total Hours for (EmployeeName): "; std::cin >> hours; std::cout << "Please enter Base Pay for(EmployeeName): "; std::cin >> basepay; /* Here you will prompt for the first employee’s information. Prompt the employee name, hours worked, and the hourly wage. For each piece of information, you will update the appropriate class member defined above. Example of Prompts Enter the employee name = Enter the hours worked = Enter his or her hourly wage = */ /* Here you will prompt for the second employee’s information. Prompt the employee name, hours worked, and the hourly wage. For each piece of information, you will update the appropriate class member defined above. Enter the employee name = Enter the hours worked = Enter his or her hourly wage = */ /* Here you will prompt for the third employee’s information. Prompt the employee name, hours worked, and the hourly wage. For each piece of information, you will update the appropriate class member defined above. Enter the employee name = Enter the hours worked = Enter his or her hourly wage = */ /* Here you will implement a function call to implement the employ calcuations for each object defined above. You will do this for each of the three employees or objects. The format for this step is the following: [(object name.function name(objectname.name, objectname.hours, objectname.wage)] ; */ /* This section you will send all three objects to a function that will add up the the following information: - Total Employee Salaries - Total Employee Hours - Total Overtime Hours The format for this function is the following: - Define a new object. - Implement function call [objectname.functionname(object name 1, object name 2, object name 3)] /* } //End of Main Function void CEmployee::ImplementCalculations (string EmployeeName, double hours, double wage){ //Initialize overtime variables overtime_hours=0; overtime_pay=0; overtime_extra=0; if (hours > 40) { /* This section is for the basic calculations for calculating overtime pay. - base pay = 40 hours times the hourly wage - overtime hours = hours worked – 40 - overtime pay = hourly wage * 1.5 - overtime extra pay over 40 = overtime hours * overtime pay - salary = overtime money over 40 hours + your base pay */ /* Implement function call to output the employee information. Function is defined below. */ } // if (hours > 40) else { /* Here you are going to calculate the hours less than 40 hours. - Your base pay is = your hours worked times your wage - Salary = your base pay */ /* Implement function call to output the employee information. Function is defined below. */ } // End of the else } //End of Primary Function void CEmployee::DisplayEmployInformation(); { // This function displays all the employee output information. /* This is your cout statements to display the employee information: Employee Name ............. = Base Pay .................. = Hours in Overtime ......... = Overtime Pay Amount........ = Total Pay ................. = */ } // END OF Display Employee Information void CEmployee::Addsomethingup (CEmployee Employ1, CEmployee Employ2) { // Adds two objects of class Employee passed as // function arguments and saves them as the calling object's data member values. /* Add the total hours for objects 1, 2, and 3. Add the salaries for each object. Add the total overtime hours. */ /* Then display the information below. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%% EMPLOYEE SUMMARY DATA%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%% Total Employee Salaries ..... = 576.43 %%%% Total Employee Hours ........ = 108 %%%% Total Overtime Hours......... = 5 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% */ } // End of function

    Read the article

  • I need help on my C++ assignment using Microsoft Visual C++

    - by krayzwytie
    Ok, so I don't want you to do my homework for me, but I'm a little lost with this final assignment and need all the help I can get. Learning about programming is tough enough, but doing it online is next to impossible for me... Now, to get to the program, I am going to paste what I have so far. This includes mostly //comments and what I have written so far. If you can help me figure out where all the errors are and how to complete the assignment, I will really appreciate it. Like I said, I don't want you to do my homework for me (it's my final), but any constructive criticism is welcome. This is my final assignment for this class and it is due tomorrow (Sunday before midnight, Arizona time). This is the assignment: Examine the following situation: Your company, Datamax, Inc., is in the process of automating its payroll systems. Your manager has asked you to create a program that calculates overtime pay for all employees. Your program must take into account the employee’s salary, total hours worked, and hours worked more than 40 in a week, and then provide an output that is useful and easily understood by company management. Compile your program utilizing the following background information and the code outline in Appendix D (included in the code section). Submit your project as an attachment including the code and the output. Company Background: Three employees: Mark, John, and Mary The end user needs to be prompted for three specific pieces of input—name, hours worked, and hourly wage. Calculate overtime if input is greater than 40 hours per week. Provide six test plans to verify the logic within the program. Plan 1 must display the proper information for employee #1 with overtime pay. Plan 2 must display the proper information for employee #1 with no overtime pay. Plans 3-6 are duplicates of plan 1 and 2 but for the other employees. Program Requirements: Define a base class to use for the entire program. The class holds the function calls and the variables related to the overtime pay calculations. Define one object per employee. Note there will be three employees. Your program must take the objects created and implement calculations based on total salaries, total hours, and the total number of overtime hours. See the Employee Summary Data section of the sample output. Logic Steps to Complete Your Program: Define your base class. Define your objects from your base class. Prompt for user input, updating your object classes for all three users. Implement your overtime pay calculations. Display overtime or regular time pay calculations. See the sample output below. Implement object calculations by summarizing your employee objects and display the summary information in the example below. And this is the code: // Final_Project.cpp : Defines the entry point for the console application. // #include "stdafx.h" #include <iostream> #include <string> #include <iomanip> using namespace std; // //CLASS DECLARATION SECTION // class CEmployee { public: void ImplementCalculations(string EmployeeName, double hours, double wage); void DisplayEmployInformation(void); void Addsomethingup (CEmployee, CEmployee, CEmployee); string EmployeeName ; int hours ; int overtime_hours ; int iTotal_hours ; int iTotal_OvertimeHours ; float wage ; float basepay ; float overtime_pay ; float overtime_extra ; float iTotal_salaries ; float iIndividualSalary ; }; int main() { system("cls"); cout << "Welcome to the Employee Pay Center"; /* Use this section to define your objects. You will have one object per employee. You have only three employees. The format is your class name and your object name. */ std::cout << "Please enter Employee's Name: "; std::cin >> EmployeeName; std::cout << "Please enter Total Hours for (EmployeeName): "; std::cin >> hours; std::cout << "Please enter Base Pay for(EmployeeName): "; std::cin >> basepay; /* Here you will prompt for the first employee’s information. Prompt the employee name, hours worked, and the hourly wage. For each piece of information, you will update the appropriate class member defined above. Example of Prompts Enter the employee name = Enter the hours worked = Enter his or her hourly wage = */ /* Here you will prompt for the second employee’s information. Prompt the employee name, hours worked, and the hourly wage. For each piece of information, you will update the appropriate class member defined above. Enter the employee name = Enter the hours worked = Enter his or her hourly wage = */ /* Here you will prompt for the third employee’s information. Prompt the employee name, hours worked, and the hourly wage. For each piece of information, you will update the appropriate class member defined above. Enter the employee name = Enter the hours worked = Enter his or her hourly wage = */ /* Here you will implement a function call to implement the employ calcuations for each object defined above. You will do this for each of the three employees or objects. The format for this step is the following: [(object name.function name(objectname.name, objectname.hours, objectname.wage)] ; */ /* This section you will send all three objects to a function that will add up the the following information: - Total Employee Salaries - Total Employee Hours - Total Overtime Hours The format for this function is the following: - Define a new object. - Implement function call [objectname.functionname(object name 1, object name 2, object name 3)] /* } //End of Main Function void CEmployee::ImplementCalculations (string EmployeeName, double hours, double wage){ //Initialize overtime variables overtime_hours=0; overtime_pay=0; overtime_extra=0; if (hours > 40) { /* This section is for the basic calculations for calculating overtime pay. - base pay = 40 hours times the hourly wage - overtime hours = hours worked – 40 - overtime pay = hourly wage * 1.5 - overtime extra pay over 40 = overtime hours * overtime pay - salary = overtime money over 40 hours + your base pay */ /* Implement function call to output the employee information. Function is defined below. */ } // if (hours > 40) else { /* Here you are going to calculate the hours less than 40 hours. - Your base pay is = your hours worked times your wage - Salary = your base pay */ /* Implement function call to output the employee information. Function is defined below. */ } // End of the else } //End of Primary Function void CEmployee::DisplayEmployInformation(); { // This function displays all the employee output information. /* This is your cout statements to display the employee information: Employee Name ............. = Base Pay .................. = Hours in Overtime ......... = Overtime Pay Amount........ = Total Pay ................. = */ } // END OF Display Employee Information void CEmployee::Addsomethingup (CEmployee Employ1, CEmployee Employ2) { // Adds two objects of class Employee passed as // function arguments and saves them as the calling object's data member values. /* Add the total hours for objects 1, 2, and 3. Add the salaries for each object. Add the total overtime hours. */ /* Then display the information below. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%% EMPLOYEE SUMMARY DATA%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%% Total Employee Salaries ..... = 576.43 %%%% Total Employee Hours ........ = 108 %%%% Total Overtime Hours......... = 5 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% */ } // End of function

    Read the article

  • Apache2 benchmarks - very poor performance

    - by andrzejp
    I have two servers on which I test the configuration of apache2. The first server: 4GB of RAM, AMD Athlon (tm) 64 X2 Dual Core Processor 5600 + Apache 2.2.3, mod_php, mpm prefork: Settings: Timeout 100 KeepAlive On MaxKeepAliveRequests 150 KeepAliveTimeout 4 <IfModule Mpm_prefork_module> StartServers 7 MinSpareServers 15 MaxSpareServers 30 MaxClients 250 MaxRequestsPerChild 2000 </ IfModule> Compiled in modules: core.c mod_log_config.c mod_logio.c prefork.c http_core.c mod_so.c Second server: 8GB of RAM, Intel (R) Core (TM) i7 CPU [email protected] Apache 2.2.9, **fcgid, mpm worker, suexec** PHP scripts are running via fcgi-wrapper Settings: Timeout 100 KeepAlive On MaxKeepAliveRequests 100 KeepAliveTimeout 4 <IfModule Mpm_worker_module> StartServers 10 MaxClients 200 MinSpareThreads 25 MaxSpareThreads 75 ThreadsPerChild 25 MaxRequestsPerChild 1000 </ IfModule> Compiled in modules: core.c mod_log_config.c mod_logio.c worker.c http_core.c mod_so.c The following test results, which are very strange! New server (dynamic content - php via fcgid+suexec): Server Software: Apache/2.2.9 Server Hostname: XXXXXXXX Server Port: 80 Document Path: XXXXXXX Document Length: 179512 bytes Concurrency Level: 10 Time taken for tests: 0.26276 seconds Complete requests: 1000 Failed requests: 0 Total transferred: 179935000 bytes HTML transferred: 179512000 bytes Requests per second: 38.06 Transfer rate: 6847.88 kb/s received Connnection Times (ms) min avg max Connect: 2 4 54 Processing: 161 257 449 Total: 163 261 503 Old server (dynamic content - mod_php): Server Software: Apache/2.2.3 Server Hostname: XXXXXX Server Port: 80 Document Path: XXXXXX Document Length: 187537 bytes Concurrency Level: 10 Time taken for tests: 173.073 seconds Complete requests: 1000 Failed requests: 22 (Connect: 0, Length: 22, Exceptions: 0) Total transferred: 188003372 bytes HTML transferred: 187546372 bytes Requests per second: 5777.91 Transfer rate: 1086267.40 kb/s received Connnection Times (ms) min avg max Connect: 3 3 28 Processing: 298 1724 26615 Total: 301 1727 26643 Old server: Static content (jpg file) Server Software: Apache/2.2.3 Server Hostname: xxxxxxxxx Server Port: 80 Document Path: /images/top2.gif Document Length: 40486 bytes Concurrency Level: 100 Time taken for tests: 3.558 seconds Complete requests: 1000 Failed requests: 0 Write errors: 0 Total transferred: 40864400 bytes HTML transferred: 40557482 bytes Requests per second: 281.09 [#/sec] (mean) Time per request: 355.753 [ms] (mean) Time per request: 3.558 [ms] (mean, across all concurrent requests) Transfer rate: 11217.51 [Kbytes/sec] received Connection Times (ms) min mean[+/-sd] median max Connect: 3 11 4.5 12 23 Processing: 40 329 61.4 339 1009 Waiting: 6 282 55.2 293 737 Total: 43 340 63.0 351 1020 New server - static content (jpg file) Server Software: Apache/2.2.9 Server Hostname: XXXXX Server Port: 80 Document Path: /images/top2.gif Document Length: 40486 bytes Concurrency Level: 100 Time taken for tests: 3.571531 seconds Complete requests: 1000 Failed requests: 0 Write errors: 0 Total transferred: 41282792 bytes HTML transferred: 41030080 bytes Requests per second: 279.99 [#/sec] (mean) Time per request: 357.153 [ms] (mean) Time per request: 3.572 [ms] (mean, across all concurrent requests) Transfer rate: 11287.88 [Kbytes/sec] received Connection Times (ms) min mean[+/-sd] median max Connect: 2 63 24.8 66 119 Processing: 124 278 31.8 282 391 Waiting: 3 70 28.5 66 164 Total: 126 341 35.9 350 443 I noticed that in the apache error.log is a lot of entries: [notice] mod_fcgid: call /www/XXXXX/public_html/forum/index.php with wrapper /www/php-fcgi-scripts/XXXXXX/php-fcgi-starter What I have omitted, or do not understand? Such a difference in requests per second? Is it possible? What could be the cause?

    Read the article

  • dmidecode showing more ram slots than available?

    - by Jestep
    I have some failing RAM in a server and I ran dmidecode to figure out what tyoe of RAM I needed to replace it with. The server has 6 RAM slots, 4 of which are in use. When I run dmidecode this is what I get. dmidecode 2.10 SMBIOS 2.4 present. Handle 0x001F, DMI type 17, 27 bytes Memory Device Array Handle: 0x001E Error Information Handle: No Error Total Width: 72 bits Data Width: 64 bits Size: 2048 MB Form Factor: DIMM Set: 1 Locator: JXXX Bank Locator: DIMM 00 Type: DDR2 Type Detail: Synchronous Speed: 667 MHz Manufacturer: Not Specified Serial Number: Not Specified Asset Tag: Not Specified Part Number: Not Specified Handle 0x0020, DMI type 17, 27 bytes Memory Device Array Handle: 0x001E Error Information Handle: No Error Total Width: 72 bits Data Width: 64 bits Size: 2048 MB Form Factor: DIMM Set: 1 Locator: JXXX Bank Locator: DIMM 01 Type: DDR2 Type Detail: Synchronous Speed: 667 MHz Manufacturer: Not Specified Serial Number: Not Specified Asset Tag: Not Specified Part Number: Not Specified Handle 0x0021, DMI type 17, 27 bytes Memory Device Array Handle: 0x001E Error Information Handle: No Error Total Width: Unknown Data Width: Unknown Size: No Module Installed Form Factor: DIMM Set: 1 Locator: JXXX Bank Locator: DIMM 02 Type: DDR2 Type Detail: Synchronous Speed: 667 MHz Manufacturer: Not Specified Serial Number: Not Specified Asset Tag: Not Specified Part Number: Not Specified Handle 0x0022, DMI type 17, 27 bytes Memory Device Array Handle: 0x001E Error Information Handle: No Error Total Width: Unknown Data Width: Unknown Size: No Module Installed Form Factor: DIMM Set: 1 Locator: JXXX Bank Locator: DIMM 03 Type: DDR2 Type Detail: Synchronous Speed: 667 MHz Manufacturer: Not Specified Serial Number: Not Specified Asset Tag: Not Specified Part Number: Not Specified Handle 0x0023, DMI type 17, 27 bytes Memory Device Array Handle: 0x001E Error Information Handle: No Error Total Width: 72 bits Data Width: 64 bits Size: 2048 MB Form Factor: DIMM Set: 1 Locator: JXXX Bank Locator: DIMM 10 Type: DDR2 Type Detail: Synchronous Speed: 667 MHz Manufacturer: Not Specified Serial Number: Not Specified Asset Tag: Not Specified Part Number: Not Specified Handle 0x0024, DMI type 17, 27 bytes Memory Device Array Handle: 0x001E Error Information Handle: No Error Total Width: 72 bits Data Width: 64 bits Size: 2048 MB Form Factor: DIMM Set: 1 Locator: JXXX Bank Locator: DIMM 11 Type: DDR2 Type Detail: Synchronous Speed: 667 MHz Manufacturer: Not Specified Serial Number: Not Specified Asset Tag: Not Specified Part Number: Not Specified Handle 0x0025, DMI type 17, 27 bytes Memory Device Array Handle: 0x001E Error Information Handle: No Error Total Width: Unknown Data Width: Unknown Size: No Module Installed Form Factor: DIMM Set: 1 Locator: JXXX Bank Locator: DIMM 12 Type: DDR2 Type Detail: Synchronous Speed: 667 MHz Manufacturer: Not Specified Serial Number: Not Specified Asset Tag: Not Specified Part Number: Not Specified Handle 0x0026, DMI type 17, 27 bytes Memory Device Array Handle: 0x001E Error Information Handle: No Error Total Width: Unknown Data Width: Unknown Size: No Module Installed Form Factor: DIMM Set: 1 Locator: JXXX Bank Locator: DIMM 13 Type: DDR2 Type Detail: Synchronous Speed: 667 MHz Manufacturer: Not Specified Serial Number: Not Specified Asset Tag: Not Specified Part Number: Not Specified Does anyone know why it would show 8 slots, with 4 empty instead of 6 slots with 2 empty? Also, but my records and by other tools, the server has 16Gb and not 8Gb in it currently. grep MemTotal /proc/meminfo MemTotal: 16435808 kB The board is a Tyan S5372-LC, running CentOS 5.4 x64. Also, my error log is showing errors in bank 6. Is there any way to determine which slot bank 6 is in via: dmidecode?

    Read the article

  • Web site DNS configuration Without using hosting nameservers

    - by user39110
    Hi, i am publishing my website(www.muratturan.com) by using godaddy's "Total DNS Control". My configuration like this: 1-) I configured my domain to total dns control by setting nameservers to total dns control's. 2-) In total dns control panel i set A host to directly my VPS's ip address. 3-) Also i configured mx records to google apps. Everythings looks good but i am thinking that is this technuqie has any negative effects ? Thanks

    Read the article

  • Where is the used memory in Task Manager & Resource Monitor coming from?

    - by Sam Adams
    On a Windows 7, the working set memory usage plus private memory does not add up to the total used memory in Task Manager and Windows 7 Resource Monitor. How do you find out where the used memory is coming from? The cached memory can't be part of it because sometimes the total cache is greater than the total in use. The commit memory plus the working set also doesn't add up to the total in use - but even that shouldn't be significant if it did, since commit is virtual.

    Read the article

  • SUM condition on one set of columns where another includes certain values

    - by pjp
    I have the following data in Excel where I want a formula that will give me the sum of all of the total rows: A B australia 10 australia total 10 china 1 china 5 china 7 china total 13 I have tried formulae along the lines of =sumif(A:A,"search("total",A:A)>0",B:B) but I cannot get the condition to work. What is the correct way to write this contains condition? Is there also specific a grammar for the condition language? I've been unable to find anything.

    Read the article

  • jqgrid sample using array data, what am I missing

    - by Dennis
    Hello. I'm new in jqgrid, I'm just trying thes example to work. I have a html file only, nothing more. When I ran this file, array data is not showing. What am I missing here? Thanks in advance. <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>jqGrid Demos</title> <link rel="stylesheet" type="text/css" media="screen" href="lib/jquery-ui-1.7.1.custom.css" /> <link rel="stylesheet" type="text/css" media="screen" href="lib/ui.jqgrid.css" /> <link rel="stylesheet" type="text/css" media="screen" href="lib/ui.multiselect.css" /> <style type="text/css"> html, body { margin: 0; /* Remove body margin/padding */ padding: 0; overflow: hidden; /* Remove scroll bars on browser window */ font-size: 75%; } /*Splitter style */ #LeftPane { /* optional, initial splitbar position */ overflow: auto; } /* * Right-side element of the splitter. */ #RightPane { padding: 2px; overflow: auto; } .ui-tabs-nav li {position: relative;} .ui-tabs-selected a span {padding-right: 10px;} .ui-tabs-close {display: none;position: absolute;top: 3px;right: 0px;z-index: 800;width: 16px;height: 14px;font-size: 10px; font-style: normal;cursor: pointer;} .ui-tabs-selected .ui-tabs-close {display: block;} .ui-layout-west .ui-jqgrid tr.jqgrow td { border-bottom: 0px none;} .ui-datepicker {z-index:1200;} </style> <script src="lib/jquery-1.4.2.js" type="text/javascript"></script> <script src="lib/jquery-ui-1.7.2.custom.min.js" type="text/javascript"></script> <script src="lib/jquery.layout.js" type="text/javascript"></script> <script src="lib/grid.locale-en.js" type="text/javascript"></script> <script src="lib/jquery.jqGrid.min.js" type="text/javascript"></script> <script src="lib/jquery.tablednd.js" type="text/javascript"></script> <script src="lib/jquery.contextmenu.js" type="text/javascript"></script> <script src="lib/ui.multiselect.js" type="text/javascript"></script> <script type="text/javascript"> // We use a document ready jquery function. jQuery(document).ready(function(){ jQuery("#list").jqGrid({ datatype: "local", height: 250, colNames:['Inv No','Date', 'Client', 'Amount','Tax','Total', 'Notes'], colModel:[ {name:'id',index:'id', width:60, sorttype:"int"}, {name:'invdate',index:'invdate', width:90, sorttype:"date"}, {name:'name',index:'name', width:100}, {name:'amount',index:'amount', width:80, align:"right",sorttype:"float"}, {name:'tax',index:'tax', width:80, align:"right",sorttype:"float"}, {name:'total',index:'total', width:80,align:"right",sorttype:"float"}, {name:'note',index:'note', width:150, sortable:false} ], pager: '#pager', rowNum:10, rowList:[10,20,30], sortname: 'id', sortorder: 'desc', viewrecords: true, multiselect: true, imgpath: "lib/basic/images", caption: "Manipulating Array Data" }); }); var mydata = [ {id:"1",invdate:"2007-10-01",name:"test",note:"note",amount:"200.00",tax:"10.00",total:"210.00"}, {id:"2",invdate:"2007-10-02",name:"test2",note:"note2",amount:"300.00",tax:"20.00",total:"320.00"}, {id:"3",invdate:"2007-09-01",name:"test3",note:"note3",amount:"400.00",tax:"30.00",total:"430.00"}, {id:"4",invdate:"2007-10-04",name:"test",note:"note",amount:"200.00",tax:"10.00",total:"210.00"}, {id:"5",invdate:"2007-10-05",name:"test2",note:"note2",amount:"300.00",tax:"20.00",total:"320.00"}, {id:"6",invdate:"2007-09-06",name:"test3",note:"note3",amount:"400.00",tax:"30.00",total:"430.00"}, {id:"7",invdate:"2007-10-04",name:"test",note:"note",amount:"200.00",tax:"10.00",total:"210.00"}, {id:"8",invdate:"2007-10-03",name:"test2",note:"note2",amount:"300.00",tax:"20.00",total:"320.00"}, {id:"9",invdate:"2007-09-01",name:"test3",note:"note3",amount:"400.00",tax:"30.00",total:"430.00"} ]; for(var i=0;i<=mydata.length;i++) jQuery("#list").jqGrid('addRowData',i + 1, mydata1[i]); </script> </head> <body> <table id="list" class="scroll"></table> <div id="pager" class="scroll" style="text-align:center;"></div> </body>

    Read the article

  • Reports in ASP.net

    - by Raghu
    Hi, I developed one report, that contains centers, months, and total leads and total sales. Report is executed and working properly. Now the issue with this is i want the report like.... Center1 Center2 Center3.............. SaleDate TotalLeads Total Sales Jan Feb Mrach TotalLeads Total Sales Jan Feb Mrach 03/01/2010 2341 23 2 4 17 ..................................................... But I am Getting the report as Center1 Center2 Center3.............. SaleDate TotalLeads Total Sales Mrach TotalLeads Total Sales Mrach 03/01/2010 2341 23 17 ..................................................... then how to set the properties to it. Please help me, i stuck with this from the past three days.. this is very important and urgent... Please give me sugessionsss......

    Read the article

  • Client side validation of multiple radio buttons groups

    - by absolutely-free
    This is my code: <html> <head> <title>scoreboard</title> <script> function calculate() { var sum=0; var total=0; for (var i=0; i < document.questions.group1.length; i++){ if (document.questions.group1[i].checked){ sum = parseInt(document.questions.group1[i].value) total = parseInt(total + sum);}} for (var i=0; i < document.questions.group2.length; i++){ if (document.questions.group2[i].checked){ sum = parseInt(document.questions.group2[i].value) total = parseInt(total + sum);}} for (var i=0; i < document.questions.group3.length; i++){ if (document.questions.group3[i].checked){ sum = parseInt(document.questions.group3[i].value) total = parseInt(total + sum);}} alert(total) } </script> </head> <body> <form name="questions"> A:<br> answer a1: <input type="radio" name="group1" value="0"> answer a2: <input type="radio" name="group1" value="1"> answer a3: <input type="radio" name="group1" value="2"> answer a4: <input type="radio" name="group1" value="3"><br> B:<br> answer b1: <input type="radio" name="group2" value="0"> answer b2: <input type="radio" name="group2" value="1"> answer b3: <input type="radio" name="group2" value="2"> answer b4: <input type="radio" name="group2" value="3"><br> C:<br> answer c1: <input type="radio" name="group3" value="0"> answer c2: <input type="radio" name="group3" value="1"> answer c3: <input type="radio" name="group3" value="2"> answer c4: <input type="radio" name="group3" value="3"><br><br> <input type="button" value="total" onclick="calculate()"> </form> </body> </html> How can I replace 'group[x]' in my code by a variable, so the three for-loops are replaced by one (because in reality there are a lot more questions and answers) ?

    Read the article

  • Line break in the mailto onclick

    - by malaki1974
    The code below works great except the email has all the text on one line like this: Height: 60 | Diagonal: 123 | Width: 107 | Total SF: 13.92 | Cost Per SF: 450 | Total Cost: $6,264.00 I would like to break after each so it looks like this: Height: 60 Diagonal: 123 Width: 107 Total SF: 13.92 Cost Per SF: 450 Total Cost: $6,264.00 I tried \n \r \n\r etc but none of them work. Any ideas? <a class="emailText" href="mailto:?subject=Screen Dimensions" onclick="this.href='mailto:?subject=Screen Dimensions&body='+'Height: '+document.forms.myform.high.value+' | '+'Diagonal: '+document.forms.myform.diagonal.value+' | '+'Width: '+document.forms.myform.wide.value+' | '+'Total SF: '+document.forms.myform.sf.value+' | '+'Cost Per SF: '+document.forms.myform.csf.value+' | '+'Total Cost: '+document.forms.myform.tc.value">Email</a>

    Read the article

  • Converting "fr_FR" into "French (France)" in both directions. (Objective-C iPhone)

    - by Janice
    I can easily change a short region-code (en_US) into a longer string... but it there an easy way to also move in the other direction? [displayInEnglish displayNameForKey:NSLocaleIdentifier value:regionCountryCode]; "en_US" becomes "English (United States)". "English (United States)" becomes "en_US". I currently store the short region-code in a database.... but when I show some aggregate results... I need to display the longer strings to the user. Or should I just store the longer strings right in the database... and not even worry about "converting" them later? I'm trying to show a "dollars total" for each country. If you were a user... which would you more likely wish to see (for a currency-total list)? A "French" total A "France" total A "French (France)" total A "fr_Fr" total?

    Read the article

< Previous Page | 23 24 25 26 27 28 29 30 31 32 33 34  | Next Page >