Search Results

Search found 2096 results on 84 pages for 'kole odd'.

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

  • How get list of local network computers?

    - by KindDragon
    Hello. I am trying to get a list of local network computers. I tried to use NetServerEnum and WNetOpenEnum API, but both API return error code 6118 (ERROR_NO_BROWSER_SERVERS_FOUND). Active Directory in the local network is not used. Most odd Windows Explorer shows all local computers without any problems. Are there other ways to get a list of computers in the LAN?

    Read the article

  • How to show percentage of 'memory used' in a win32 process?

    - by pj4533
    I know that memory usage is a very complex issue on Windows. I am trying to write a UI control for a large application that shows a 'percentage of memory used' number, in order to give the user an indication that it may be time to clear up some memory, or more likely restart the application. One implementation used ullAvailVirtual from MEMORYSTATUSEX as a base, then used HeapWalk() to walk the process heap looking for additional free memory. The HeapWalk() step was needed because we noticed that after a while of running the memory allocated and freed by the heap was never returned and reported by the ullAvailVirtual number. After hours of intensive working, the ullAvailVirtual number no longer would accurately report the amount of memory available. However, this method proved not ideal, due to occasional odd errors that HeapWalk() would return, even when the process heap was not corrupted. Further, since this is a UI control, the heap walking code was executing every 5-10 seconds. I tried contacting Microsoft about why HeapWalk() was failing, escalated a case via MSDN, but never got an answer other than "you probably shouldn't do that". So, as a second implementation, I used PagefileUsage from PROCESS_MEMORY_COUNTERS as a base. Then I used VirtualQueryEx to walk the virtual address space adding up all regions that weren't MEM_FREE and returned a value for GetMappedFileNameA(). My thinking was that the PageFileUsage was essentially 'private bytes' so if I added to that value the total size of the DLLs my process was using, it would be a good approximation of the amount of memory my process was using. This second method seems to (sorta) work, at least it doesn't cause crashes like the heap walker method. However, when both methods are enabled, the values are not the same. So one of the methods is wrong. So, StackOverflow world...how would you implement this? which method is more promising, or do you have a third, better method? should I go back to the original method, and further debug the odd errors? should I stay away from walking the heap every 5-10 seconds? Keep in mind the whole point is to indicate to the user that it is getting 'dangerous', and they should either free up memory or restart the application. Perhaps a 'percentage used' isn't the best solution to this problem? What is? Another idea I had was a color based system (red, yellow, green, which I could base on more factors than just a single number)

    Read the article

  • Modifying jQuery ajax request Connectino header

    - by Pat
    I'm trying to modify the Connection header with the following code with no success jQuery.ajax ( { url: URL, async: boolVariable, beforeSend: function(xhr) { xhr.setRequestHeader("Connection", "close"); } } ) The request headers via Firebug show: Connection keep-alive X-Requested-With XMLHttpRequest Any odd bugs/problems with setting this particular header known? Or is there something I'm doing wrong?

    Read the article

  • Algorithm: how to check intersections of recurring events definitions?

    - by glaz666
    The question comes from MS Outlook calendar behavior. Imagine I have two recurring events (starting from today): "each second Monday" and "every odd date". Is there any way to check intersections and/or find the first intersecting date algorithmically without brute-forcing over each date? Definitions can be made in CRON's notations or ICal notation. I think it doesn't matter. Are there any solutions for this in Gregorian calendar?

    Read the article

  • Modifying jQuery ajax request Connection header

    - by Pat
    I'm trying to modify the Connection header with the following code with no success jQuery.ajax({ url: URL, async: boolVariable, beforeSend: function(xhr) { xhr.setRequestHeader("Connection", "close"); } }) The request headers via Firebug show: Connection keep-alive X-Requested-With XMLHttpRequest Any odd bugs/problems with setting this particular header known? Or is there something I'm doing wrong?

    Read the article

  • Possible bug with tabified QDockWidget and setFloating()

    - by krunk
    I've run into some odd behavior with tabified QDockWidgets, below is an example program with comments that demonstrates the behavior. Is this a bug or is it expected behavior and I'm missing some nuance in QDockWidget that causes this? Directly, since this does not work, how would one properly "undock" a hidden QDockWidget then display it? #include <QApplication> #include <QMainWindow> #include <QAction> #include <QDockWidget> #include <QMenu> #include <QSize> #include <QMenuBar> using namespace std; int main (int argc, char* argv[]) { QApplication app(argc, argv); QMainWindow window; QDockWidget dock1(&window); QDockWidget dock2(&window); QMenu menu("View"); dock1.setAllowedAreas(Qt::LeftDockWidgetArea | Qt::RightDockWidgetArea); dock2.setAllowedAreas(Qt::LeftDockWidgetArea | Qt::RightDockWidgetArea); dock1.setWindowTitle("Dock One"); dock2.setWindowTitle("Dock Two"); window.addDockWidget(Qt::RightDockWidgetArea, &dock1); window.addDockWidget(Qt::RightDockWidgetArea, &dock2); window.menuBar()->addMenu(&menu); window.setMinimumSize(QSize(800, 600)); window.tabifyDockWidget(&dock1, &dock2); dock1.hide(); dock2.hide(); menu.addAction(dock1.toggleViewAction()); menu.addAction(dock2.toggleViewAction()); window.show(); // Below is where the oddness starts. It seems to only exhibit the // behavior if the dock widgets are tabified. // Odd behavior here // This does not work. the window never shows, though its menu action shows // checked. Not only does this window not show up, but all toggle actions // for all dock windows (e.g. dock1 and dock2) are broken for the duration // of the application loop. // dock1.setFloating(true); // dock1.show(); // This does work. . . of course only if you do _not_ run the above first. // however, you can often get a little lag or "blip" in the rendering as // the dock is shown docked before setFloating is set to true. dock1.show(); dock1.setFloating(true); return app.exec(); }

    Read the article

  • Should the PHP community start using more discriptive Exceptions?

    - by fireeyedboy
    I work with Zend Framework a lot and I just took a peek at Kohana, and it strikes me as odd that this is a typical scenario in these frameworks: throw Some_Componenents_Exception( 'invalid argument' ); Where I believe this wouldn't be mouch more useful: throw Some_Components_InvalidArgumentException( 'whatever discription' ); Because it is easier to catch. I suspect, but immediately admit it's prejudiced, that the former practice is common in the PHP community. Should we, the PHP community, start using these descriptive types of expections more?

    Read the article

  • Jquery alternate row color doesn't seem to work after hover function...

    - by Pandiya Chendur
    I use the following jquery statements, $(".resultsdiv:odd").css("background-color", "#fff"); $(".resultsdiv:even").css("background-color", "#EFF1F1"); $('.resultsdiv').hover(function() { $(this).css('background-color', '#f4f2f2'); }, function() { $(this).css('background-color', '#fff'); }); Alternate seems to be ok initially but after hover over a div element it doesn't work ... Any suggestion...

    Read the article

  • Have Javascript insert a backspace within ContentEditable Div.

    - by DavidR
    An odd request, I know. I want Javascript to pretend the user just pressed the backspace. That's all I really want, if you want more info: My last topic here, gives more explaination. In short: I press a key, javascript converts the key to the greek equivalent, then puts that key in instead. The problem is, when onKeyUp is activated, it starts a function which looks for combinable character pairs put together (for accents) and inserts that key.

    Read the article

  • object expected - jquery

    - by fusion
    i'm getting an error 'Object expected' for some odd reason due to jquery, and this does not 'submit' the form or enter the data into database. without jquery, the data could be entered into the database. but now it doesn't. i've used jquery mainly for validating asp.net controls.

    Read the article

  • Internet Explorer buggy when accessing a custom weblogic provider

    - by James
    I've created a custom Weblogic Security Authentication Provider on version 10.3 that includes a custom login module to validate users. As part of the provider, I've implemented the ServletAuthenticationFilter and added one filter. The filter acts as a common log on page for all the applications within the domain. When we access any secured URLs by entering them in the address bar, this works fine in IE and Firefox. But when we bookmark the link in IE an odd thing happens. If I click the bookmark, you will see our log on page, then after you've successfully logged into the system the basic auth page will display, even though the user is already authenticated. This never happens in Firefox, only IE. It's also intermittent. 1 time out of 5 IE will correctly redirect and not show the basic auth window. Firefox and Opera will correctly redirect everytime. We've captured the response headers and compared the success and failures, they are identical. final boolean isAuthenticated = authenticateUser(userName, password, req); // Send user on to the original URL if (isAuthenticated) { res.sendRedirect(targetURL); return; } As you can see, once the user is authenticated I do a redirect to the original URL. Is there a step I'm missing? The authenticateUser() method is taken verbatim from an example in Oracle's documents. private boolean authenticateUser(final String userName, final String password, HttpServletRequest request) { boolean results; try { ServletAuthentication.login(new CallbackHandler() { @Override public void handle(Callback[] callbacks) throws IOException, UnsupportedCallbackException { for (Callback callback : callbacks) { if (callback instanceof NameCallback) { NameCallback nameCallback = (NameCallback) callback; nameCallback.setName(userName); } if (callback instanceof PasswordCallback) { PasswordCallback passwordCallback = (PasswordCallback) callback; passwordCallback.setPassword(password.toCharArray()); } } } }, request); results = true; } catch (LoginException e) { results = false; } return results; I am asking the question here because I don't know if the issue is with the Weblogic config or the code. If this question is more suited to ServerFault please let me know and I will post there. It is odd that it works everytime in Firefox and Opera but not in Internet Explorer. I wish that not using Internet Explorer was an option but it is currently the company standard. Any help or direction would be appreciated. I have tested against IE 6 & 8 and deployed the custom provider on 3 different environments and I can still reproduce the bug.

    Read the article

  • PSpell in Quercus ?

    - by rat
    Hey, We're running Quercus on Glassfish to serve the odd PHP file. I'm wondering if its possible to get PSpell/ASpell(?) spellchecker(s) working in Quercus? It seems for normal PHP you need to compile it w/ PSpell so I'm not too sure how to go about this in Quercus ... Any pointers greatly appreciated :P

    Read the article

  • Logical equality in C

    - by andrew cooke
    [It seems odd this doesn't exist, so apologies in advance if it's a duplicate] I want to test for logical equality in C. In other words, I want to know whether two values would be equal if both were converted in the normal way associated with logical expressions. In C99, I think that (bool)a == (bool)b gives what I want. Is that correct? What is the normal way of writing this in traditional C?

    Read the article

  • MySQL query being performed when PHP if condition not met?

    - by Ryan
    The script I'm using is if($profile['username'] == $user['username']) { $db->query("UPDATE users SET newcomments = 0 WHERE username = '$user[username]'"); echo "This is a test"; } (Note that $db-query is exactly the same as mysql_query) For some very odd reason, the MySQL query is being performed even if the defined condition is false The "This is a test" works properly and only appears when the condition is met, but the MySQL query is performed anyway Whats the problem with it?

    Read the article

  • Should the PHP community start using more descriptive Exceptions?

    - by fireeyedboy
    I work with Zend Framework a lot and I just took a peek at Kohana, and it strikes me as odd that this is a typical scenario in these frameworks: throw Some_Componenents_Exception( 'invalid argument' ); Where I believe this wouldn't be mouch more useful: throw Some_Components_InvalidArgumentException( 'whatever discription' ); Because it is easier to catch. I suspect, but immediately admit it's prejudiced, that the former practice is common in the PHP community. Should we, the PHP community, start using these descriptive types of expections more?

    Read the article

  • Access element in json having numerical index

    - by hunt
    i have following format of json in which i want to asscess 0.4 , kem , 2 , 2000 values but it seems it doesn't have name index so how one can access it in jquery. when i paste following code in json viewer then i am getting numerical index for 0.4 , kem , 2 "td": [ { "@attributes": { "class": "odd" }, "span": [ "3", "7" ] }, "0.4", "Kem", "24\/04\/2010", "2000", "2", "14000", "Good", "Buckley", "56.0", "2:05.32", "36.65", "54.5" ] }

    Read the article

  • SQL Monitoring Overview

    - by andy
    Hi I currently loook after 20 odd databases in SQL server 2005 and need a tool for monitoring the performance and keep me informed if a database is running slow. Is there anything I can run within Managment studio of any other good third party tool (Pref free) that can do the job. Thanks

    Read the article

  • Make dictionary from list with python

    - by prosseek
    I need to transform a list into dictionary as follows. The odd elements has the key, and even number elements has the value. x = (1,'a',2,'b',3,'c') - {1: 'a', 2: 'b', 3: 'c'} def set(self, val_): i = 0 for val in val_: if i == 0: i = 1 key = val else: i = 0 self.dict[key] = val My solution seems to long, is there a better way to get the same results?

    Read the article

  • Can a math intensive application cause a crash?

    - by philcolbourn
    I have been messing with hash functions and functions to generate primes etc. I had 3 lock-ups in a short period. This was odd since my macbook rarely locks-up and usually only when I run out of memory - which does not happen often. But in this case, I had three in a row and none since (but I also am not generating as much load as before).

    Read the article

  • Unit testing MVC.net Redirection

    - by Dan
    How do I Unit Test a MVC redirection? public ActionResult Create(Product product) { _productTask.Save(product); return RedirectToAction("Success"); } public ActionResult Success() { return View(); } Is Ayende's approach still the best way to go, with preview 5: public static void RenderView(this Controller self, string action) { typeof(Controller).GetMethod("RenderView").Invoke(self,new object[] { action} ); } Seems odd to have to do this, especially as the MVC team have said they are writing the framework to be testable.

    Read the article

  • Can't upload images with Magento 1.4 on Windows/IIS

    - by Jason
    Everything else works in Magento 1.4 but I can't upload images. Running on Windows/IIS. I know it isn't officially supported but seems odd that everything works but something as simple as image uploads. Tried updating the media path and that is correct. Also updated permissions on directories, but nothing has worked. Any other ideas to get this to work? thanks

    Read the article

  • UIPickerView didSelectRow delay

    - by Rob Bonner
    Hello all, I have a UIPickerView implemented in one of my pages that depends on the didSelectRow delegate method. An odd behavior I have noticed is when the user moves a wheel and leaves it between selections, then the wheel will move very slowly to the closest selection. The didSelectRow event will not fire until this is complete, sometimes 3 seconds later. Is there a way to speed this up, or detect when the wheel is being moved, so I can freeze my interface during this time?

    Read the article

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