Daily Archives

Articles indexed Monday March 22 2010

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

  • Server Problems

    - by nardone25
    Hello everyone in serverfault. I am having a big issue right now and I hope you guys can help. Well I got a call at 7:15am today stating that person can't log in. Then my cell phone start to ring like crazy. So when I got in the server room my ac wasn't working. It was 100 dgrees Luckly I have two UPS that will shutdown my lefthands and servers when it get 95. I am running two left-hand sans, I have two servers machines running VMware ESX. Here is my problem, I booted the server back up when the room was at 68 and only administrator and two IT techs can log on to any desktop. I do get an permissions error from who every logs on. What should I do?

    Read the article

  • Checking Available Memory allocation in C#

    - by Jepe d Hepe
    i need to create a function in my application to set its available memory usage. What i want to do is when the application is running, and it reaches to the set memory settings, i'll have to switch from saving to the memory to saving to a file to the local drive to avoid application hang. Is this a better way to do? What things to consider when doing this in terms of memory allocation? Hope you understand :) Thanks, Jepe

    Read the article

  • ListView GridView column

    - by plotnick
    I got a ListView with GridView and GridViewColumns in it. <ListView> <ListView.View> <GridView> <GridViewColumn> <GridViewColumn.CellTemplate> <DataTemplate> <ComboBox /> </DataTemplate> </GridViewColumn.CellTemplate> </GridViewColumn> Now I want in my code to disable the Combobox or entire column. And I don't know how to do it. Help me please.

    Read the article

  • Function parameter types in Python

    - by Leif Andersen
    Unless I'm mistaken, creating a function in python works like this def my_func(param1, param2): /*stuff*/ However, you don't actually give the types of those parameters. Also, if I remember, python is a strongly typed language, as such, it seams like python shouldn't let you pass in a parameter of a different type then the function creator expected. However, how does python know that the user of the function is passing in the proper types? Or will the program just die if it's the wrong type, assuming the function actually uses the parameter? Or do you have to specify the type/I'm missing something? Thank you.

    Read the article

  • How to create a css rule for all elements except one class?!

    - by Nick
    Hi, I have created a CSS stylesheet for my project. Is there any way I can create a css rule that applies to all table elements EXCEPT table elements belonging to the class "dojoxGrid"? Something like: .not(dojoxGrid) table{ width:100%; border-top:1px solid #dddddd; border-left:1px solid #dddddd; border-right:1px solid #dddddd; margin:1em auto; border-collapse:collapse; } Thanks in advance!

    Read the article

  • PHP returning part of the code document

    - by The.Anti.9
    I have a PHP page that does a couple of different things depending on what action is set to in the GET data. Depending, it is supposed to return some JSON, but instead of doing anything it is supposed to it returns the bottom half of the code document itself, starting in the middle of the line. Heres the snippit from where it starts: ... } elseif ($_GET['action'] == 'addtop') { if (!isset($_GET['pname']) || !isset($_GET['url']) || !isset($_GET['artist']) || !isset($_GET['album']) || !isset($_GET['file'])) { die('Error: Incomplete data!'); } if (!file_exists($_GET['pname'].".txt")) { die('Error: No such playlist!'); } $plist = json_decode(file_get_contents($_GET['pname'].".txt"), true); $fh = fopen($_GET['pname'].".txt", 'w') or die('Could not open playlist!'); array_push($plist, array("artist" => $_GET['artist'], "album" => $_GET['album'], "file" => $_GET['file'], "url" => $_GET['url'])); fwrite($fh,json_encode($plist)); } elseif ($_GET['action'] == 'delfromp') { ... And here is what I get when I go to the page: $_GET['artist'], "album" = $_GET['album'], "file" = $_GET['file'], "url" = $_GET['url'])); fwrite($fh,json_encode($plist)); } elseif ($_GET['action'] == 'delfromp') { if (!isset($_GET['pname']) || !isset($_GET['id'])) { die('Error: Incomplete data!'); } if (!file_exists($_GET['pname'].".txt")) { die('Error: No such playlist!'); } $plist = json_decode(file_get_contents($_GET['pname'].".txt"), true); $fh = fopen($_GET['pname'].".txt", 'w') or die('Could not open playlist!'); unset($plist[$_GET['id']]); $plist = array_values($plist); fwrite($fh,json_encode($plist)); } elseif ($_GET['action'] == 'readp') { if (!file_exists($_GET['pname'].".txt")) { die('Error: No such playlist!'); } $plist = json_decode(file_get_contents($_GET['pname'].".txt"), true); $arr = array("entries" = $plist); $json = json_encode($arr); echo $json; } elseif ($_GET['action'] == 'getps') { $plists = array(); if ($handle = opendir('Playlists')) { while (false !== ($playlist = readdir($handle))) { if ($playlist != "." && $playlist != "..") { array_push($plists, substr($playlist, 0, strripos($playlist, '.')-1)); } } } else { die('Error: Can\'T open playlists!'); } $arr = array("entries"=$plists); $json = json_encode($arr); echo $json; } else { die('Error: No such action!'); } ? It starts in the middle of the array_push(... line. I really can't think of what it is doing. Theres no echos anywhere around it. Any ideas?

    Read the article

  • Removing the obstacle that yields the best path from a map after A* traversal

    - by David Titarenco
    I traverse a 16x16 maze using my own A* implementation. This is exactly what my program does: http://www.screenjelly.com/watch/fDQh98zMP0c?showTab=share All is well. However, after the traversal, I would like to find out what wall would give me the best alternative path. Apart from removing every block and re-running A* on the maze, what's a clever solution? I was thinking give every wall node (ignored by A*), a tentative F-value, and change the node structure to also have a n-sized list of node *tentative_parent where n is the number of walls in the maze. Could this be viable?

    Read the article

  • How do I get a PHP class constructor to call its parent's parent's constructor

    - by Paulo
    I need to have a class constructor in PHP call its parent's parent's (grandparent?) constructor without calling the parent constructor. // main class that everything inherits class Grandpa { public function __construct() { } } class Papa extends Grandpa { public function __construct() { // call Grandpa's constructor parent::__construct(); } } class Kiddo extends Papa { public function __construct() { // THIS IS WHERE I NEED TO CALL GRANDPA'S // CONSTRUCTOR AND NOT PAPA'S } } I know this is a bizarre thing to do and I'm attempting to find a means that doesn't smell bad but nonetheless, I'm curious if it's possible. EDIT I thought I should post the rationale for the chosen answer. The reason being; it most elegant solutionto the problem of wanting to call the "grandparent's" constructor while retaining all the values. It's certainly not the best approach nor is it OOP friendly, but that's not what the question was asking. For anyone coming across this question at a later date - Please find another solution. I was able to find a much better approach that didn't wreak havoc on the class structure. So should you.

    Read the article

  • Why does Joomla debug show 446 queries logged and 446 legacy queries logged?

    - by Darye
    I have been called in to fix the performance of a Joomla site that was already setup. I look at the debug output and it shows the same queries twice, once for queries logged and again for legacy queries logged. My guess is that it is actually running the same queries twice make for just under 900 queries per page (hope I am wrong) The Legacy plugin is disabled, so Legacy mode is not on at all. The site uses VirtueMart as well (which BTW isn't working properly if the cache in the Global Config is turned on) Besides the fact that I don't think it should be running 446 queries anyway (sometimes even up to 650 per page ), has anyone every experienced this issue, and where would I look to fix this. Thanks

    Read the article

  • Mac OS X - configuring ntpd server with on LAN with D-Link DIR-655

    - by Mark C
    Hey all, This question is pretty specific, but I hope someone will have seen this error elsewhere. I a configuring a machine running OS X 10.5.8 to be an NTP server for machines connected to a LAN that is not connected to the Internet. I am not too worried about knowing the "right" time on all the machines, but rather worried about making sure everyone has the same notion of time. I configured the NTP daemon on Mac by turning on the Set date and time automatically in System Preferences, using the server's clock, 127.127.1.0 as the reference clock. I figured I should see if the server can NTP query itself before proceeding to the clients. The weird part is when I run the ntpq -p command in a command-prompt when connected to my D-Link DIR-655 (firmware: 1.33), it hangs for about a minute or so each time before finally giving me some output. I thought the problem might have to do with Port Forwarding, so I configured the router to forward port 123 for the IP of the server, but that did not improve the situation. When I run the ntpq -p command on my school's network, on a Linksys WRT54G router, or with the wireless Airport card turned off - I have absolutely no problems - the command returns a response instantly. Is this normal? I can see why a query might take a minute or so, but I don't understand why one router does it faster than the other. I tried messing around with the ntp.conf file adding the burst, minpoll, and maxpoll options: server 127.127.1.0 burst minpoll 4 maxpoll 5 Figuring that perhaps I am polling too often and the configuration file is slowing me down, but even with this, the ntpq still hangs on the D-Link DIR-655, but does just fine on the other routers. Any thoughts on where the lag is coming from or if the lag is even a problem?

    Read the article

  • Is there any free software to check for issues with a DVD drive?

    - by AgentConundrum
    I don't usually play movies on my laptop (prefer the standalone with the tv), but I tried to watch one the other night, and noticed playback was really choppy and had audio artifacts in places. I thought it could be related to memory issues so I rebooted and tried again, but the results were the same. I considered that it could be an issue with the disc, so I tried to clean it but again there was no change. I don't think the problem is with the disc, because I tried another disc and it also had the same problem. I don't think I've ever watched the second disc since I've had it, so it should have been safe in its jewel case. Also, there were no issues when I watched an episode off the first disc in my standalone player. What I'm wondering is: are there are any (free) utilities that can check for issues with the drive itself? I looked around but most of the software I found focuses on integrity checks for the disc, not the drive. I have had issues with this laptop recently (had to replace the keyboard when the cat damaged it while I was cleaning dust out and the machine was ripped apart, also replaced part of the chassis after I cracked it when I tried to open it not knowing a screw was still in it) so I may have just replaced the drive incorrectly. I'm going to check on this while I await an answer to this question. Thanks.

    Read the article

  • HiLo vs Identity?

    - by Mendy
    This is the same question as: http://stackoverflow.com/questions/803872/hilo-or-identity Let's take the database of this site as an example. Lets say that the site has the following tables: Posts. Votes. Comments. What is the best strategy to use for it: Identity - which is more common. OR HiLo - which give best performance. Edit: if HiLo is the best, how the structure of the DB would be?

    Read the article

  • Still about SSD potentials...write and read speed

    - by Macroideal
    HI Gurus, I have been working on SSD(solid state disk) for several months..Problems and Questions hit my head unexpectedly..Coz i am a virgin in ssd... Esp these days i was testing the write-read speed of ssd, which I was always caring.... however result turned out not good as I expected, or even worse Three kinds of read-write were implemented in my test 1. read and write directly from and into ssd, with openning ssd as a whole device. in windows: _open("\\:g", ***).. It can be very tricky and hairy that you'd write a data with size of folds of 512, at the disk position of folds of 512bytes... So, If you wanto write just a byte or 4 bytes, you'v to write at least a whole sector one time. 2. Read and write data from and into files located in SSD... 3. Read and Write data from and into files in mechanical Disk I compared the pratices below...I found ssd sucks...the ssd performs worse than mechanical disk... so i am wondering where i can get the potential performance of ssd, since ssd is said to a substitute for mechanical disk in the future.. Nevertheless, I test ssd with a pro-hard-disk tools..ssd is like twice speedier than mechanical disk. So, why? Thanx very much...If you know tips of ssd...follow me

    Read the article

  • Value object getter

    - by sarah xia
    Hi, I've got a value object, which stores info for example amount. The getAmount() getter returns amount in cents. However in various places, we need to get amount in dollar. There are 2 approaches I can think of: write a convert method and place it in a utility class. add a getAmountInDollar() getter in the value object. I prefer the second approach. What do you think? What are pros and cons of both approaches?

    Read the article

  • XHTML Validation issue trying to render '&' character inside an ASP.Net control

    - by Micah
    Ok, the description is kind of funky, but here's my problem: <asp:ListItem Value="0">All Leads <i>(include Archive & Trash)</i></asp:ListItem> <asp:ListItem Value="0">All Leads <i>(include Archive &amp; Trash)</i></asp:ListItem> <asp:ListItem Value="0" Text="All Leads <i>(include Archive & Trash)</i>" /> <asp:ListItem Value="0" Text="All Leads <i>(include Archive &amp; Trash)</i>" /> All three versions render the following html All Leads <i>(include Archive & Trash)</i> This of course fails XHTML validation. It needs to render the html like this: All Leads <i>(include Archive &amp; Trash)</i> How can I fix this? Thanks.

    Read the article

  • The subsets-sum problem and the solvability of NP-complete problems

    - by G.E.M.
    I was reading about the subset-sums problem when I came up with what appears to be a general-purpose algorithm for solving it: (defun subset-contains-sum (set sum) (let ((subsets) (new-subset) (new-sum)) (dolist (element set) (dolist (subset-sum subsets) (setf new-subset (cons element (car subset-sum))) (setf new-sum (+ element (cdr subset-sum))) (if (= new-sum sum) (return-from subset-contains-sum new-subset)) (setf subsets (cons (cons new-subset new-sum) subsets))) (setf subsets (cons (cons element element) subsets))))) "set" is a list not containing duplicates and "sum" is the sum to search subsets for. "subsets" is a list of cons cells where the "car" is a subset list and the "cdr" is the sum of that subset. New subsets are created from old ones in O(1) time by just cons'ing the element to the front. I am not sure what the runtime complexity of it is, but appears that with each element "sum" grows by, the size of "subsets" doubles, plus one, so it appears to me to at least be quadratic. I am posting this because my impression before was that NP-complete problems tend to be intractable and that the best one can usually hope for is a heuristic, but this appears to be a general-purpose solution that will, assuming you have the CPU cycles, always give you the correct answer. How many other NP-complete problems can be solved like this one?

    Read the article

  • Rails Deployment: moving static files to S3

    - by Joseph Silvashy
    Someone posted something similar but it didn't really solve the problem. I want to move all my static files (images, javascript, css) to an Amazon S3 bucket when I deploy my app, as well as rewrite those paths in my app, is there a simple way to accomplish this? or am I in for a huge amount of work here?

    Read the article

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