Search Results

Search found 1210 results on 49 pages for 'positive'.

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

  • Is it posible to use "confirmit" to open new url in the same window?

    - by Dan Peschio
    I'm using a the confirmit java script function to redirect to a new url with a positive response. It doesn't do exactly what I want - and maybe I can't have exactly what I want. Here's what it does - onunload, with a positive response it opens the new url in a new window, which can be blocked by a pop-up blocker without the user even knowing, giving the impression that nothing happened. When it does open the new URL it opens in a new window making the desktop crowded. Its just not a great solution. What I want it to do - onunload I'd like it to open the new url in the same window and have it not be classified as a "pop-up" to be blocked. I tried switching to onbeforeunload.... nuthin. Is there a simple solution? here's my current code: <script language=javascript> function confirmit() { var closeit= confirm("My message"); if (closeit == true) {window.open("http://MyDestinationURL");} else {window.close();} } window.onunload = confirmit </script>

    Read the article

  • Schema for storing "binary" values, such as Male/Female, in a database

    - by latentflip
    Intro I am trying to decide how best to set up my database schema for a (Rails) model. I have a model related to money which indicates whether the value is an income (positive cash value) or an expense (negative cash value). I would like separate column(s) to indicate whether it is an income or an expense, rather than relying on whether the value stored is positive or negative. Question: How would you store these values, and why? Have a single column, say Income, and store 1 if it's an income, 0 if it's an expense, null if not known. Have two columns, Income and Expense, setting their values to 1 or 0 as appropriate. Something else? I figure the question is similar to storing a person's gender in a database (ignoring aliens/transgender/etc) hence my title. My thoughts so far Lookup might be easier with a single column, but there is a risk of mistaking 0 (false, expense) for null (unknown). Having seperate columns might be more difficult to maintain (what happens if we end up with a 1 in both columns? Maybe it's not that big a deal which way I go, but it would be great to have any concerns/thoughts raised before I get too far down the line and have to change my code-base because I missed something that should have been obvious! Thanks, Philip

    Read the article

  • cURL cookie negative cookie expire

    - by Joe Doe
    I have problems with cookies with cURL. After problems I turned on verbose function and figured out cURL sets them negative expire date even if server sends positive date. Example: * Added cookie _c_sess=""test"" for domain test.com, path /, expire -1630024962 < Set-Cookie: _c_sess="test"; Domain=test.com; HttpOnly; expires=Mon, 26-Mar-2012 14:52:47 GMT; Max-Age=1332773567; Path=/ As you can see both expires and max-age are positive, but cURL sets expire to negative value. Somebody has idea? EDIT: Here is php code I use. $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, "http://site.com/"); curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows NT 6.1; rv:11.0) Gecko/20100101 Firefox/11.0'); curl_setopt($ch, CURLOPT_COOKIEJAR, $cookiepath); curl_setopt($ch, CURLOPT_COOKIEFILE, $cookiepath); curl_setopt($ch, CURLOPT_HEADER ,1); curl_setopt($ch, CURLOPT_VERBOSE ,1); curl_setopt($ch, CURLOPT_STDERR ,$f); curl_setopt($ch, CURLOPT_RETURNTRANSFER ,1); curl_setopt($ch, CURLOPT_FOLLOWLOCATION ,1); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0); $data = curl_exec($ch); Data from cookie jar: #HttpOnly_.test.com TRUE / FALSE -1630016318 _test_sess "test"

    Read the article

  • C# Recursion SumOfOnlyNeg Elements

    - by Chris
    Hello, A array gets filled up with random elements (negative and positive). Now i want to calculate the sum of ONLY the postive elements. Iterative there is no problem, but in the recursion version i can only get the sum of both negative and postive. How can i "check" in the recursive version that it only sums up the Postive elements? Best Regards. Iterative version: public int IterSomPosElem(int[] tabel, int n) { n = 0; for (int i = 0; i < tabel.Length; i++) { if (tabel[i] >= 0) { n += tabel[i]; } } return n; } Recursive version atm (sums up all the elements insteed, of only the positive) public int RecuSomPosElem(int[] tabel, int n) { if(n == 1) return tabel[0]; //stopCriterium else { return (tabel[n - 1] + RecuSomPosElem(tabel, n - 1)); // how to check, so it only sums up the postive elements and "ignores" the negative elements. } }

    Read the article

  • Error in bisection method code in Matlab

    - by Amanda Collins
    I need to write a proper implementation of the bisection method, which means I must address all possible user input errors. Here is my code: function [x_sol, f_at_x_sol, N_iterations] = bisection(f, xn, xp, eps_f, eps_x) % solving f(x)=0 with bisection method % f is the function handle to the desired function, % xn and xp are borders of search, % f(xn)<0 and f(xp)>0 required, % eps_f defines how close f(x) should be to zero, % eps_x defines uncertainty of solution x if(f(xp) < 0) error('xp must be positive') end; if(f(xn)>0) error('xn must be negative') end; if (xn >= xp) error ('xn must be less than xp') end; xg=(xp+xn)/2; %initial guess fg=f(xg); % initial function evaluation N_iterations=1; while ( (abs(fg) > eps_f) & (abs(xg-xp) > eps_x) ) if (fg>0) xp=xg; else xn=xg; end xg=(xp+xn)/2; %update guess fg=f(xg); %update function evaluation N_iterations=N_iterations+1; end x_sol=xg; %solution is ready f_at_x_sol=fg; if (f_at_x_sol > eps_f) error('No convergence') end and here is the error message I receive when I try to test this in Matlab: >> bisection(x.^2, 2, -1, 1e-8, 1e-10) Attempted to access f(-1); index must be a positive integer or logical. Error in bisection (line 9) if(f(xp)<0) I was attempting to see if my error codes worked, but it doesn't look like they do. I get the same error when I try to test it on a function that should work.

    Read the article

  • PHP variable equals true no matter what the value, even 0

    - by kaigoh
    This is the var_dump: object(stdClass)#27 (8) { ["SETTING_ID"]=> string(2) "25" ["SETTING_SOURCE"]=> string(2) "XV" ["SETTING_FLEET"]=> string(3) "313" ["SETTING_EXAM"]=> string(1) "A" ["SETTING_HIDE"]=> string(1) "0" ["SETTING_THRESHOLD"]=> string(1) "0" ["SETTING_COUNT"]=> string(8) "POSITIVE" ["SETTING_USAGE"]=> string(7) "MILEAGE" } The variable I am testing is SETTING_HIDE. This is being pulled from MySQL using the Code igniter framework. I don't know if it is just me being thick after a rather long day at work or what, but no matter what value the variable holds, any if statement made against it returns true, even when typecast as a boolean or a direct string comparison, ie. == "0" or == "1". Anyone with a fresh pair of eyes care to make me feel silly!?! :) Just to clarify: Have tried the following: if($examSetting->SETTING_HIDE == "1") { $showOnABC = "checked=\"checked\""; } if((bool)$examSetting->SETTING_HIDE) { $showOnABC = "checked=\"checked\""; } if($examSetting->SETTING_COUNT == "POSITIVE") further on in my code works perfectly.

    Read the article

  • C++ Multi Monitor - Find All Visible/Open Windows

    - by Paul
    I'm trying to find all the windows of ANY kind that are open (and have a taskbar 'button'). I have no problems finding the list processes/hWnd's, and then cycling through those, but how do I determine if a process/hwnd has a window open? (even if minimized). I've tried doing different combinations of the window parameters (such as WS_POPUP etc) but none of the parameters (or combinations of parameters) that I could find would give me all the open windows without some sort of false positives. As an example of a false positive was the fact that it gives me two 'windows' for google talk (even though one was open). Another false positive is considering the start menu as an open window. Any ideas? Solutions? I've been working on this for a while and its been driving me a bit insane. Note: I'm doing this for windows 7 (at this point). I'm not sure if there's any difference between how you would do this between XP and 7, but I thought it might be relevant.

    Read the article

  • EventHandlers saved to databases.

    - by Stacey
    In a database application (using Sql Server right now, in C#, with Entity Framework 4.0) I have a situation where I need to trigger events when some values change. For instance assume a class "Trackable". class Trackable { string Name { get; set; } int Positive { get; set; } int Negative { get; set; } int Total { get; set; } // event OnChanged } Trackable is represented in the database as follows; table Trackables Id | guid name | varchar(32) positive | int negative | int Total is of course, calculated at runtime. When a trackable event changes, I want to inspect its previous value, and then see what it is changing to, and be capable of reacting accordingly. However different trackables need to trigger different events (to avoid a huge, massive cascading switch/if block). If this were just only C# code it would be easy - but they have to be saved to the database. I can't divide up each different trackable into a different table/class, that would be silly - they are all identical, but the event raised is different based on how they are made. So I guess my question is, is there any way to store an event handler in a database such that.. Trackable t1 = new Trackable() { Name = "Trackable1" OnChange += TrackableChangedEventHandler(OnTrackable1Change) } Trackable t2 = new Trackable() { Name = "Trackable2", OnChange += TrackableChangedEventHandler(OnTrackable2Change) }

    Read the article

  • C++ Perfect Number. Need some help revising.

    - by user278330
    I need some help revising this. It keeps only displaying 0s as the temp. Thank you. // A program to determine whether the input number is a perfect number // A perfect number is defined by the sum of all its positive divisors excluding itself // 28: 1+2+3+7+14 = 28. int perfect, limit, divisor; cout << "Please enter a positive integer in order to define whether it is a perfect integer or not: " ; cin >> perfect; cout << endl; int temp = 0; int prevtemp = 0; limit = 1; divisor = 1; while (limit < perfect) { if ((perfect % divisor) == 0) divisor = prevtemp; limit++; divisor++; temp = prevtemp + temp; cout << temp << endl; } if (perfect == temp) cout << "Your number is a perfect number!" << endl; else cout << "Your number is not a perfect number" << endl; return 0;

    Read the article

  • Google Chrome install fails with error 0x80004002

    - by zneak
    I'm using Windows 7 64 bits and I'm trying to install Google Chrome. However, every time I do, I get this error message: Google Update installation failed with error 0x80004002. There is a Show me help for this issue link, but it does nothing. I tried the standalone installer to no avail. I also tried to delete the HKEY_CURRENT_USER\Software\Google registry key, as suggested by other answers, with no more positive effects.

    Read the article

  • RT database scaling

    - by rplevy
    Recently I heard someone suggest that RT request tracker may have scalability issues due to its non-normalized database (someone at a Perl meeting I went to referred to it in a positive light as hyper-normalized, but I think he may have misunderstood what normalization is all about). On the other hand I know that large scale enterprises such as Perl's CPAN use RT. Do es this level of scale require special measures to be taken to handle what happens when the db grows too large? What have your experiences been?

    Read the article

  • problem with enabling remote management of hyper-v server 2008 r2

    - by Pai Gaudêncio
    Howdy, I just recently installed hyper-v server 2008 r2 on a dedicated server i have, but i'm having trouble enabling remote management. Running the HVRemote - http://code.msdn.microsoft.com/HVRemote - tool seems to have yielded some positive results, and all tests on the server pass (firewall, permissions, etc), but client-side things are not working. I'm stuck at this step : 5: - Simple query to root\cimv2 WMI namespace FAIL - Simple query failed Cannot perform simple query against root\cimv2 Anyone could help me figure this out? I'm almost giving up and installing XenServer... Thanks

    Read the article

  • Spam daily report on servers using sendmail

    - by Simone Magnaschi
    Hello, we'd like to implement a daily spam report to our users like Dreamhost does. Basically we need to send a daily mail (at midnight for example) to inform a single user of all the emails currently in his spam folder with the related score to let them look right away if there's a false positive. We use a basic sendmail server with procmail to redirect spam to the spam folder in each home directory. Do you know if is there a perl script or some other tool that does just that? Thank you very much

    Read the article

  • Force10 layer 3 switches

    - by ALQ
    We've been running Cisco and dell layer 3 switches. The former are expensive and reliable, the latter a lot cheaper and fraught with issues. Anyone has positive experience with the core Force10 switches (and edge switches as well)?

    Read the article

  • Force Finder to log in as Guest to a SMB share

    - by slhck
    I have a QNAP NAS that offers a few SMB shares. As I'm in a trusted environment, my shares are accessible as guest rather than with a combination of username and password. Problem Now, when I click the name of the device in Finder's sidebar, I get the black "Connection failed" bar, with the option "Connect as...". When I click that, I receive: I can however press ? + K and enter the server's name manually, which gets me to this window: Here, I have to select "guest". Now, I can select one of the shares to connect to, and I'm finally connected to the server. If I select it in the sidebar, I get a list of all shares available, because I'm connected as "guest", obviously: What I need Well, as soon as I unmount all shares, I have to go through the same procedure of manually logging in as "guest" again, which I find quite annoying. Is there any way I could get Finder (or the underlying SMB client) to know which credentials to use? Or should I look for the solution rather on the server side? (I know that other SMB shares seem to work fine in my network) Diagnostics The only thing I can get out of Console.app is: 5/15/11 7:36:40 PM /System/Library/CoreServices/Finder.app/Contents/MacOS/Finder[200] SharePointBrowser::handleOpenCallBack returned 64 This message occurs when I click the name of the SMB server in the Finder sidebar. Here's the output of `smbclient -L meredith -U guest -d=2 charon:~ werner$ smbclient -L meredith -U guest -d=2 added interface ip=192.168.100.11 bcast=192.168.100.255 nmask=255.255.255.0 tdb(unnamed): tdb_open_ex: could not open file /private/var/samba/gencache.tdb: Permission denied Got a positive name query response from 192.168.100.100 ( 192.168.100.100 ) Password: Domain=[MEREDITH] OS=[Unix] Server=[Samba 3.5.2] Sharename Type Comment --------- ---- ------- music Disk movies Disk photos Disk software Disk archive Disk backups Disk IPC$ IPC IPC Service (NAS Server) Got a positive name query response from 192.168.100.100 ( 192.168.100.100 ) Domain=[MEREDITH] OS=[Unix] Server=[Samba 3.5.2] Server Comment --------- ------- Workgroup Master --------- ------- WORKGROUP MEREDITH Also, things I've tried: There is no relevant entry in the Keychain (but why would it, I'm only connecting as guest) Connecting with user name "Guest" and empty password logs me in but still after ejecting the last share, I get the same "Connection failed" error as before. The appropriate entry is made in the Keychain but obviously has no effect.

    Read the article

  • Force Finder to log in as Guest to a SMB share

    - by slhck
    I have a QNAP NAS that offers a few SMB shares. As I'm in a trusted environment, my shares are accessible as guest rather than with a combination of username and password. Problem Now, when I click the name of the device in Finder's sidebar, I get the black "Connection failed" bar, with the option "Connect as...". When I click that, I receive: I can however press ? + K and enter the server's name manually, which gets me to this window: Here, I have to select "guest". Now, I can select one of the shares to connect to, and I'm finally connected to the server. If I select it in the sidebar, I get a list of all shares available, because I'm connected as "guest", obviously: What I need Well, as soon as I unmount all shares, I have to go through the same procedure of manually logging in as "guest" again, which I find quite annoying. Is there any way I could get Finder (or the underlying SMB client) to know which credentials to use? Or should I look for the solution rather on the server side? (I know that other SMB shares seem to work fine in my network) Diagnostics The only thing I can get out of Console.app is: 5/15/11 7:36:40 PM /System/Library/CoreServices/Finder.app/Contents/MacOS/Finder[200] SharePointBrowser::handleOpenCallBack returned 64 This message occurs when I click the name of the SMB server in the Finder sidebar. Here's the output of `smbclient -L meredith -U guest -d=2 charon:~ werner$ smbclient -L meredith -U guest -d=2 added interface ip=192.168.100.11 bcast=192.168.100.255 nmask=255.255.255.0 tdb(unnamed): tdb_open_ex: could not open file /private/var/samba/gencache.tdb: Permission denied Got a positive name query response from 192.168.100.100 ( 192.168.100.100 ) Password: Domain=[MEREDITH] OS=[Unix] Server=[Samba 3.5.2] Sharename Type Comment --------- ---- ------- music Disk movies Disk photos Disk software Disk archive Disk backups Disk IPC$ IPC IPC Service (NAS Server) Got a positive name query response from 192.168.100.100 ( 192.168.100.100 ) Domain=[MEREDITH] OS=[Unix] Server=[Samba 3.5.2] Server Comment --------- ------- Workgroup Master --------- ------- WORKGROUP MEREDITH Also, things I've tried: There is no relevant entry in the Keychain (but why would it, I'm only connecting as guest) Connecting with user name "Guest" and empty password logs me in but still after ejecting the last share, I get the same "Connection failed" error as before. The appropriate entry is made in the Keychain but obviously has no effect.

    Read the article

  • Hooking up my power switch/reset switch/LEDs

    - by David Oneill
    I'm working on building a computer (first time for me). There are several plugs that I need to connect to the motherboard (Power LED, reset switch, etc). Of the two wires, they are either: Color and white (reset switch, power LED, HDD LED) red and black (speaker, power switch) The manual for the motherboard has a nice diagram of where to plug them in, but has them labeled + or -. Which colors are positive, and which are negative?

    Read the article

  • How to convert image into unicode

    - by Zahida Raeesi
    Hello there: I have created a Baluchi keyboard via ARABIC keyboard. But there are few keys not available in Arabic too. I tried different combination of keys to fulfill my requirement but now issue is that for a specific key there is no unicode combination available in UNICODE chart. plz help me out to covert this image in proper UNICODE text so that I can update my Baluchi keyboard Looking forward for your prompt and positive response with best regards, Raji Baloch

    Read the article

  • Are there any well known anti-patterns in the field of system administration?

    - by ojblass
    I know a few common patterns that seem to bedevil nearly every project at some point in its life cycle: Inability to take outages Third party components locking out upgrades Non uniform environments Lack of monitoring and alerting Missing redundancy Lack of Capacity Poor Change Management Too liberal or tight access policies Organizational changes adversely blur infrastructure ownership I was hoping there is some well articulated library of these anti-patterns summarized in a book or web site. I am almost positive that many organizations are learning through trial by fire methods. If not let's start one.

    Read the article

  • Password Reset Self Service Portal

    - by Corey
    I’m looking for an affordable solution to offer a “self-service” password reset portal on the web for my active directory users. (about 150 of them) Many of them don’t use Windows workstations and therefore can’t reset there own password. I’ve been Googling, and have found so many options, that I’m not sure how to sort them all out. Has anyone had positive (or negative) experiences with any particular products?

    Read the article

  • Microsoft Word Plugin for Web Mail

    - by PinkFlaminigo
    I am 100% positive that I recently saw on the Internet a new plugin for MS Word which allowed the user to choose a Web Mail service such as Gmail or Ymail instead of Outlook or Live. Am I totally losing my sanity, and "it's just my 'magination runnin' away with me"? Thanks!

    Read the article

  • Password Reset Self Service Portal

    - by Corey
    I’m looking for an affordable solution to offer a “self-service” password reset portal on the web for my active directory users. (about 150 of them) Many of them don’t use Windows workstations and therefore can’t reset there own password. I’ve been Googling, and have found so many options, that I’m not sure how to sort them all out. Has anyone had positive (or negative) experiences with any particular products?

    Read the article

  • Prime Numbers Code Help

    - by andrew
    Hello Everybody, I am suppose to "write a Java program that reads a positive integer n from standard input, then prints out the first n prime number." It's divided into 3 parts. 1st: This function will return true or false according to whether m is prime or composite. The array argument P will contain a sufficient number of primes to do the testing. Specifically, at the time isPrime() is called, array P must contain (at least) all primes p in the range 2 p m . For instance, to test m = 53 for primality, one must do successive trial divisions by 2, 3, 5, and 7. We go no further since 11 53 . Thus a precondition for the function call isPrime(53, P) is that P[0] = 2 , P[1] = 3 , P[2] = 5, and P[3] = 7 . The return value in this case would be true since all these divisions fail. Similarly to test m =143 , one must do trial divisions by 2, 3, 5, 7, and 11 (since 13 143 ). The precondition for the function call isPrime(143, P) is therefore P[0] = 2 , P[1] = 3 , P[2] = 5, P[3] = 7 , and P[4] =11. The return value in this case would be false since 11 divides 143. Function isPrime() should contain a loop that steps through array P, doing trial divisions. This loop should terminate when 2 either a trial division succeeds, in which case false is returned, or until the next prime in P is greater than m , in which case true is returned. Then there is the "main function" • Check that the user supplied exactly one command line argument which can be interpreted as a positive integer n. If the command line argument is not a single positive integer, your program will print a usage message as specified in the examples below, then exit. • Allocate array Primes[] of length n and initialize Primes[0] = 2 . • Enter a loop which will discover subsequent primes and store them as Primes[1] , Primes[2], Primes[3] , ……, Primes[n -1] . This loop should contain an inner loop which walks through successive integers and tests them for primality by calling function isPrime() with appropriate arguments. • Print the contents of array Primes[] to stdout, 10 to a line separated by single spaces. In other words Primes[0] through Primes[9] will go on line 1, Primes[10] though Primes[19] will go on line 2, and so on. Note that if n is not a multiple of 10, then the last line of output will contain fewer than 10 primes. The last function is called "usage" which I am not sure how to execute this! Your program will include a function called Usage() having signature static void Usage() that prints this message to stderr, then exits. Thus your program will contain three functions in all: main(), isPrime(), and Usage(). Each should be preceded by a comment block giving it’s name, a short description of it’s operation, and any necessary preconditions (such as those for isPrime().) And hear is my code, but I am having a bit of a problem and could you guys help me fix it? If I enter the number "5" it gives me the prime numbers which are "6,7,8,9" which doesn't make much sense. import java.util.; import java.io.; import java.lang.*; public class PrimeNumber { static boolean isPrime(int m, int[] P){ int squarert = Math.round( (float)Math.sqrt(m) ); int i = 2; boolean ans=false; while ((i<=squarert) & (ans==false)) { int c= P[i]; if (m%c==0) ans= true; else ans= false; i++; } /* if(ans ==true) ans=false; else ans=true; return ans; } ///****main public static void main(String[] args ) { Scanner in= new Scanner(System.in); int input= in.nextInt(); int i, j; int squarert; boolean ans = false; int userNum; int remander = 0; System.out.println("input: " + input); int[] prime = new int[input]; prime[0]= 2; for(i=1; i ans = isPrime(j,prime); j++;} prime[i] = j; } //prnt prime System.out.println("The first " + input + " prime number(s) are: "); for(int r=0; r }//end of main } Thanks for the help

    Read the article

  • Windows Phone 7 review

    - by Jeff
    I finally got around to composing some thoughts on what I think about Windows Phone 7, and I posted those impressions on my personal blog. I'll save a few bytes and not repost it here.It should be obvious that my general impression is overwhelmingly positive. What I don't go into very deeply is how much I enjoy developing stuff for it. Baby Stopwatch was not even remotely hard to build, because it wasn't complex, but also because the platform itself is so easy to deal with. I've been messing around and building something a little more involved, and it too has been fun to work with. Sure, you have the quirks of Silverlight to work out, and then the phone-specific quirks after that, but it really is a lot of fun. If you haven't come up with a science project for the phone, I would encourage you to do so.Now if only I could find a gig here at Microsoft where people just build phone apps all day! (But not games... I know we already do that quite a bit.)

    Read the article

  • Oracle and ATG: The Next Generation of Customer Experience

    - by divya.malik
    Oracle today announced that it has completed the acquisition of Art Technology Group (ATG), Inc. In a webcast this morning, Thomas Kurian, Executive Vice President, Oracle Anthony Lye, Senior Vice President, CRM at Oracle and  Ken Volpe, Senior Vice President of Products and Technology from ATG, presented the rationale, strategy and future direction with this acquisition, ATG is a leading E-Commerce service provider and Oracle is a leading CRM and Retail Applications provider, which makes it a winning team. There has been a lot of positive feedback from the analysts, press as well as customers. “As a customer of both Oracle and ATG, we view the integration of the two companies as a natural fit,” said Kevin Cunnington, Global Head of Online, Vodafone Group. “We look forward to new efficiencies that address our online and cross-channel business strategies and help us further provide superior customer experiences.” For more information about Oracle and ATG: Overiew and FAQs Webcast Press Release Technorati Tags: oracle,oracle siebel crm,atg,crm

    Read the article

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