Given this maze, how could i represent it using adjacency matrix?. I have read lots of tutorials, post, slides, etc but i cant get my head round it, i just need that little push. Thanks
I'm very new to Java/COLT so apologies if this is a dumb question... But, is it possible to define (2d) matrices of type "long" using the cern.colt.matrix stuff? If so, how?! I can find an abstract class for "Object" and a concrete implementation for "double", but then I am stuck... Thanks,
Hi,
Say I have two rotation matrices. One is taken before any rotations in my loop update method, while the second is taken after my rotation matrix update. I'm looking to use these two matrices to work out the direction of travel. Could anyone provide me with this algorithm?
Thanks
-James
I jave a 2D array like this, just like a matrix:
{{1, 2, 4, 5, 3, 6},
{8, 3, 4, 4, 5, 2},
{8, 3, 4, 2, 6, 2},
//code skips... ...
}
I want to get all the "4" position, instead of searching the array one by way, and return the position, how can I search it faster / more efficient? thz in advance.
Hi all,
just wondering if there is a simple way in java to display the contents of say 16x16 array of doubles [0..1] as a greyscale image (ala matlab)? using an unfamiliar matrix library, so I'd like to check that I'm on the right track. don't really care if it is slow or ugly, or if it requires external library - it's just there for a quick look, so as long as it works, I'm fine.
Given graph, how could i represent it using adj matrix?. I have read lots of tutorials, post, slides, etc but i cant get my head round it, i just need that little push.
I want to test functions that have non-scalar parameters and return types, e.g., "given a matrix M, check that M times its inverse is the appropriate identity" or "given a row vector V, check that transpose(V) is the correct column vector.
Do I need a clever use of TableTable?
Inspired by Raymond Chen's post, say you have a 4x4 two dimensional array, write a function that rotates it 90 degrees. Raymond links to a solution in pseudo code, but I'd like to see some real world stuff.
[1][2][3][4]
[5][6][7][8]
[9][0][1][2]
[3][4][5][6]
Becomes:
[3][9][5][1]
[4][0][6][2]
[5][1][7][3]
[6][2][8][4]
Update: Nick's answer is the most straightforward, but is there a way to do it better than n^2? What if the matrix was 10000x10000?
For solving spare matrices,
in general, how big does the matrix have to be (as a rule of thumb)
for methods like congraduate descent to be faster than brute force solvers (that do not take advantage o sparsity)?
I am using DJGPP compiler for DOS in that i have to use WINDOWS.h which is a win32 api for conversion of system time to file time for NTFS file system.As windows.h is win32 api it is giving error "windows.h-no such file or directory".So how to convert system time to file time (i.e.8 byte structure) in NTFS file system for NTFS file system in DOS.
What Xaml is required to display a DataGrid of this dictionary of dictionaries?
Public Property CharMatrix As SortedDictionary(Of Char, SortedDictionary(Of Char, Single))
It's intended as a n by n matrix of Singles.
Why System.Web.UI.WebControls.HyperLink doesn't inherit System.Web.UI.ITextControl?
But System.Web.UI.WebControls.Label, System.Web.UI.WebControls.Literal, System.Web.UI.LiteralControl, etc -- does? How can it be?
Sometimes when my computer running Windows 7 wakes up from sleep, it has to adjust the time. When this happens the following system event is logged:
<Event xmlns='http://schemas.microsoft.com/win/2004/08/events/event'>
<System>
<Provider Name='Microsoft-Windows-Kernel-General' Guid='{A68CA8B7-004F-D7B6-A698-07E2DE0F1F5D}'/>
<EventID>1</EventID>
<Version>0</Version>
<Level>4</Level>
<Task>0</Task>
<Opcode>0</Opcode>
<Keywords>0x8000000000000010</Keywords>
<TimeCreated SystemTime='2010-03-06T19:09:57.500000000Z'/>
<EventRecordID>10672</EventRecordID>
<Correlation/>
<Execution ProcessID='4' ThreadID='56'/>
<Channel>System</Channel>
<Computer>GAME</Computer>
<Security/>
</System>
<EventData>
<Data Name='NewTime'>2010-03-06T19:09:57.500000000Z</Data>
<Data Name='OldTime'>2010-03-06T17:34:32.870117200Z</Data>
</EventData>
<RenderingInfo Culture='sl-SI'>
<Message>The system time has changed to ?2010?-?03?-?06T19:09:57.500000000Z from ?2010?-?03?-?06T17:34:32.870117200Z.</Message>
<Level>Information</Level>
<Task></Task>
<Opcode>Info</Opcode>
<Channel>System</Channel>
<Provider>Microsoft-Windows-Kernel-General</Provider>
<Keywords>
<Keyword>Time</Keyword>
</Keywords>
</RenderingInfo>
</Event>
When this happens (I noticed it twice until now) the old time always corresponds to the time when computer entered sleep. The problem is that if Windows Media Center is scheduled for recording during this time, it just skips it as if the computer was turned off. I never had this problem running Windows Vista on the same machine.
Any ideas what could be causing this problem and how to solve it are welcome.
A while back I noticed on one of our laboratory computers (Windows 7, very little extra software installed) that the network connection icon in the system tray would claim that it had no network connection, even though it did. This issue would go away after the computer was rebooted, but would surface again the next time I looked at the computer (a few days later).
Upon opening the Network and Sharing Center I am shown an actual error message, but not one that seems to give me a lot of information about what the problem is. In the place of the usual information about network adapters and whether you are connected to the Internet it simply says: "No more threads can be created in the system."
The Event Viewer shows hundreds of events from different services also with the same message. "Volume Shadow Copy Service error: Unexpected error calling routine CoCreateInstance. hr = 0x800700a4, No more threads can be created in the system."; "The WinHTTP Web Proxy Auto-Discovery Service service failed to start due to the following error: A thread could not be created for the service."; "The IP Helper service terminated with the following error: No more threads can be created in the system."
As far as I can tell, this message seems to mean that there is some sort of resource leak in Windows where something is creating a large number of threads and those threads are not being killed off? I've tried restarting WMI and several services related to networking, without avail. Can anyone provide more information on what "No more threads can be created in the system" might mean and what I might be able to do to fix the issue? Currently the only solution appears to be restarting.
Environment:
Windows 7 Professional 64-bit Operating System
Problem:
(ODBC Data Source Administrator)
Opening Administrative Tools - Data Sources (ODBC) - Click "System DSN" tab.
Error:
ODBC System DSN Warning
You are logged on with non-Administrative privileges.
System DSNs could not be created or modified.
Failed Troubleshooting so far:
Enabled local Administrator account logged in under this account.
Navigated to C:\Windows\System32\ right clicked odbcad32.exe Run as Administrator
Notes:
I am an Administrator on this machine.
The 32-bit version runs fine if I open C:\Windows\SysWoW64\odbcad32.exe
However, I need the data source to be 64-bit.
I am not experiencing this problem on any of my other 64-bit machines.
Any help would be greatly appreciated.
I accidentally overwrote system.dbf in /usr/lib/oracle/xe/oradata/XE/system.dbf
Well I did not actually do it accidentally, however I overwrote it because of other failures in the database.
And when I try running the following:
SQL> shutdown
ORA-01109: database not open
Database dismounted.
ORACLE instance shut down.
SQL> startup
ORACLE instance started.
Total System Global Area 289406976 bytes
Fixed Size 1258488 bytes
Variable Size 92277768 bytes
Database Buffers 192937984 bytes
Redo Buffers 2932736 bytes
Database mounted.
ORA-01589: must use RESETLOGS or NORESETLOGS option for database open
Now I want to try to Recover the database because starting it in mounted or standard surely doesn't work.
SQL> recover database using backup controlfile;
ORA-00283: recovery session canceled due to errors
ORA-01110: data file 1: '/usr/lib/oracle/xe/oradata/XE/system.dbf'
ORA-01122: database file 1 failed verification check
ORA-01110: data file 1: '/usr/lib/oracle/xe/oradata/XE/system.dbf'
ORA-01206: file is not part of this database - wrong database id
How do I solve this? Is it even possible?
My "real" problem was that I ran the /etc/init.d/oracle-xe configure and it overwrote my old configuration and probably removed passwords and such so my tables were gone, however I found the mytablespace.dbf so I hope that it is possible to recover?
Please shed some light on this.
Sometimes when my computer running Windows 7 wakes up from sleep, it has to adjust the time. When this happens the following system event is logged:
<Event xmlns='http://schemas.microsoft.com/win/2004/08/events/event'>
<System>
<Provider Name='Microsoft-Windows-Kernel-General' Guid='{A68CA8B7-004F-D7B6-A698-07E2DE0F1F5D}'/>
<EventID>1</EventID>
<Version>0</Version>
<Level>4</Level>
<Task>0</Task>
<Opcode>0</Opcode>
<Keywords>0x8000000000000010</Keywords>
<TimeCreated SystemTime='2010-03-06T19:09:57.500000000Z'/>
<EventRecordID>10672</EventRecordID>
<Correlation/>
<Execution ProcessID='4' ThreadID='56'/>
<Channel>System</Channel>
<Computer>GAME</Computer>
<Security/>
</System>
<EventData>
<Data Name='NewTime'>2010-03-06T19:09:57.500000000Z</Data>
<Data Name='OldTime'>2010-03-06T17:34:32.870117200Z</Data>
</EventData>
<RenderingInfo Culture='sl-SI'>
<Message>The system time has changed to ?2010?-?03?-?06T19:09:57.500000000Z from ?2010?-?03?-?06T17:34:32.870117200Z.</Message>
<Level>Information</Level>
<Task></Task>
<Opcode>Info</Opcode>
<Channel>System</Channel>
<Provider>Microsoft-Windows-Kernel-General</Provider>
<Keywords>
<Keyword>Time</Keyword>
</Keywords>
</RenderingInfo>
</Event>
When this happens (I noticed it twice until now) the old time always corresponds to the time when computer entered sleep. The problem is that if Windows Media Center is scheduled for recording during this time, it just skips it as if the computer was turned off. I never had this problem running Windows Vista on the same machine.
Any ideas what could be causing this problem and how to solve it are welcome.
Question for which I'm having trouble finding an answer on Google or Technet...
Does granting the SYSTEM user permissions to DFS-shared files and folders have any effect on DFS replication? (And while we're at it, is there any good reason not to let SYSTEM have permissions to DFS-shared files?)
It comes up because I have a collection of DFS namespaces and folders that I'm not able to make someone else's problem, and while troubleshooting a problem where one DFS replica just wasn't replicating with another for no discernible reason, I observed that the SYSTEM didn't have any permissions granted to any of the files or folders in the folder in question.
So I set SYSTEM to have full control and propagated it down, and our DFS health diagnostic reports went from showing a backlog of ~80 files to a backlog of ~100,000... and things started replicating, including a number of files that had been missing on one server or the other (so more than just the permissions changes started replicating).
Naturally, this made me curious as to whether or not DFS needs the SYSTEM account to have permissions to do its work, or if perhaps it was just any change to folder tree in question that prompted DFS to jump into action. If it matters, our DFS namespaces were set up under 2000/2003, and I have just recently finished upgrading all the servers to 2008 R2 or 2012 (with UAC enabled, blech), but have not yet gotten around to raising the DFS namespace functional levels to Server 2008.
(And bonus points if anyone has an official Microsoft article on NTFS file permissions and the SYSTEM account as it pertains to DFS or network files.)
We have a pretty simple system setup, where I get text messages when there is a system problem. It's nothing fancy. I send an email to my phone number within my logging class for alert levels. It works well enough, but it has one major flaw: A small hiccup in the system/site can turn into dozens of rapid fire text messages. Sometimes non-stop text messages until I log into the system and fix the problem.
So I'm looking for pointers on software or services I can use that deal with alerts in a smarter way. Perhaps something that only sends me alerts X number of times within Y number of minutes. I'm not looking for a full monitoring suite. We already deal with that in house. I'm only looking to tackle this single problem.
I am looking for a FREE tool to perform analyses on the NTFS file system of my Windows 7 PC. I want to easily see the amount of data distributed throught out the entire file system. The following applications seem very good, but they are not free and probably overkill for my requirements:
FolderSizes 5
MailMeter Windows File System Reporting Tool
I am aware that some applications (like Folder Size 2.5) can add a column in Windows Explorer to show the size of each folder, but I am looking for something more like a reporting tool.
Thank you for your suggestions.
I have 2 systems; Windows 7 & Windows 8. Both are connected to WiFi router. They have been assigned address 192.168.2.8 & 192.168.2.9 respectively. I have added them to home group. I am able to ping and connect Windows 8 system from Windows 7. I am having trouble connecting Windows 7 system from Windows 8 system. I can't even ping Windows 7 system. Windows 7 system's user is administrator (default administrator account from secpol.msc). File sharing, Remote Access, network discovery are all enabled. Someone please help me connect.
EDIT : I found that this is the issue of Kaspersky Internet Security 2012. If I disable firewall, it works. I tried opening port 3389 in Kaspersky. It is still blocking access.
I have a system that was originally had Win NT. I added System Commander (SC7) and then added W2K. The relevant partitions are:
0 - Primary - MultiFAT (Has Win NT, mapped to C:)
1 - Extended - with many logical partitions:
1.1 NTFS which has W2K and is mapped to D:
1.2 other logical partitions which are irrelevant to this
D: was getting full. It needed room for virus definitions and Windows upgrades. In the past, I had simple used SC7 to resize D: without problems. So I did it again this time. However, upon finishing, I got the message "Unable to create partition". It also marked the partition as unformatted. I checked that the files on the disk were still there using SC7's Partition Explorer, and they were there. I continued and the system managed to boot up fine anyways.
Then I rebooted the system again. This time, I got a message saying "INACCESSIBLE_BOOT_DEVICE". I went back in to SC7 and to Partition Commander, and it was still saying that the partition was unformatted but the Partition Explorer still showed the files on the system. I finally decided to resize the partition again, figuring that this would force a rewrite of the partition information.
That seemed to work, until I had to reboot again. Now I can't see the files using Partition Explorer, and the Resize button is now disabled.
What now?
I have a system with two identical 1TB harddrives, where I image to a backup drive using the dd command. When I boot up, though, despite setting harddrive priority in the BIOS, the system sometimes boots the main drive, sometimes boots the backup. My system dual-boots Xubuntu and Windows XP, if that means anything to you.
Any ideas?
One of the CPU fans on my Compaq Presario laptop running Ubuntu 9.10 seems to have bit the dust. The fan is deep within the case and I intend to replace the laptop in the next 6 months so it's not worth replacing it. I have the laptop on a cooling pad and most of the time the system is fine, CPU temps around 90°-110°F. Occasionally, however, I'm seeing random lockups which I believe is due to the system overheating. How can I configure the system to:
Lower the CPU speed when the temperature reaches a certain level? (I.E. 110°F)
Shutdown the system when the tempature reaches a critical level? (And what would that be? 130°?)