Hi
No one said that OrderedDictionary is having two copies of elements, one in a hashtable and other in a list, I can't find complexity measurements at MSDN for OrderedList.
thanks
Hi,
I have a tsv file with many columns like so;
genename X1 X100 X103 X105 X115 X117 X120 X122 X123
Gene20728 0.415049 0.517868 0.820183 0.578081 0.30997 0.395181
I would like to import it into mathematica, and then extract and sort a column.
ie I want to extract column ["X117"] and sort it, and output the sorted list.
Thanks,
Tom
hai everyone........
I am trying to generate dynamic menu according to the user permission given with ACL component in cake php..
ie., if a user logins, i need to check which all actions are permitted for that specific user and according that list of actions i need to generate menu
can any one help me to get all the permitted actions from the acos,aros,acos_aros tables
thanks in advance
When I do the following
ps -aef|grep "asdf"
I get a list of processes that are running. Each one of my process has the following text in the output:
-ProcessName=XXXX
I'd like to be able to format the out put so all I get is:
The following processes are running:
Process A
Process B
etc..
Dear All,
I have a website in front page i m displaying 5 records ,for different options,i want that when user licks more he should be able to view next records.i would i keep track as whicg list has already been shown to user,since i m using an arraylist,can i ipmlement it through that.
From the following list of frameworks, which one would you use to develop a rich web application and why would you choose it over the others?
Sproutcore
GWT
ExtJS
GXT
SmartGWT
Dojo / Dijit
Flex
Capuccino
Grails
I just downloaded Firefox 3.6 today and I noticed in the list of new features they have an Orientation API that can detect the direction that your laptop/computer is tilted. This is clearly a hardware feature of some sort; So if you don't have the hardware to do so is there any way of simulating it so that you can test it out on your projects?
I'm creating a thread that looks for a window. When it finds the window, it overrides its windowproc, and handles WM_COMMAND and WM_CLOSE.
Here's the code that looks for the window and subclasses it:
public void DetectFileDialogProc()
{
Window fileDialog = null;
// try to find the dialog twice, with a delay of 500 ms each time
for (int attempts = 0; fileDialog == null && attempts < 2; attempts++)
{
// FindDialogs enumerates all windows of class #32770 via an EnumWindowProc
foreach (Window wnd in FindDialogs(500))
{
IntPtr parent = NativeMethods.User32.GetParent(wnd.Handle);
if (parent != IntPtr.Zero)
{
// we're looking for a dialog whose parent is a dialog as well
Window parentWindow = new Window(parent);
if (parentWindow.ClassName == NativeMethods.SystemWindowClasses.Dialog)
{
fileDialog = wnd;
break;
}
}
}
}
// if we found the dialog
if (fileDialog != null)
{
OldWinProc = NativeMethods.User32.GetWindowLong(fileDialog.Handle, NativeMethods.GWL_WNDPROC);
NativeMethods.User32.SetWindowLong(fileDialog.Handle, NativeMethods.GWL_WNDPROC, Marshal.GetFunctionPointerForDelegate(new WindowProc(WndProc)).ToInt32());
}
}
And the windowproc:
public IntPtr WndProc(IntPtr hWnd, uint msg, IntPtr wParam, IntPtr lParam)
{
lock (this)
{
if (!handled)
{
if (msg == NativeMethods.WM_COMMAND || msg == NativeMethods.WM_CLOSE)
{
// adding to a list. i never access the window via the hwnd from this list, i just treat it as a number
_addDescriptor(hWnd);
handled = true;
}
}
}
return NativeMethods.User32.CallWindowProc(OldWinProc, hWnd, msg, wParam, lParam);
}
This all works well under normal conditions. But I am seeing two instances of bad behavior in order of badness:
If I do not close the dialog within a minute or so, the app crashes. Is this because the thread is getting garbage collected? This would kind of make sense, as far as GC can tell the thread is done? If this is the case, (and I don't know that it is), how can I make the thread stay around as long as the dialog is around?
If I immediately close the dialog with the 'X' button (WM_CLOSE) the app crashes. I believe its crashing in the windowproc, but I can't get a breakpoint in there. I'm getting an AccessViolationException, The exception says "Attempted to read or write protected memory. This is often an indication that other memory is corrupt." Its a race condition, but of what I don't know. FYI, I had been reseting the old windowproc once I processed the commands, but that was crashing even more often!
Any ideas on how I can solve these issues?
I have a table a with a list of id's, and a user-defined function foo(id) that takes the id and returns a VARCHAR(20).
What I am trying to do is:
SELECT
id,
foo(id) AS 'text field'
FROM a
However, instead of calling the function for each ID number, like I desired, the text comes back the same for every row. I have tested the foo() function manually with the returned ID's and it does not have that problem, so I realize I must not understand something about the evaluation of the query.
Hi All
I have been searching round the internet for days on this matter but I keep coming up against a brick wall.
What I have is a table full of checkboxes inside an admin area acting as a monthly "to-do" list. It's essentially a worksheet of 30 or so things to do each month that must be checked off each month and notes added if applicable.
I have managed to get the checkboxes to update via mysql and be shown somewhere as a list of ticks. I simply did this my setting the value to 1 and on submission it updates the sql table.
I have to cover my bases here and also offer the option to un-tick items if they have been ticked b y mistake. But I cant figure out how this is done.
Below is my checking code... any help on this matter would be great.
<?php
$currentTask = '';
echo "<tr class='tr'>";
while ($seolistRow = mysql_fetch_array($seolistRes)) {
$taskValue = $seolistRow["taskValue"];
$worksheetID = $seolistRow["worksheetID"];
$taskName = $seolistRow["taskName"];
$taskInfo = $seolistRow["taskInfo"];
if ($taskValue == 1) {
$taskDone = "<input type='checkbox' value='1' class='checkbox' name='checkbox".$worksheetID."' id=checkbox'".$worksheetID."' checked='checked' /><div class='taskinfo'>".$taskInfo."</div>";
}
else {
$taskDone = "<input type='checkbox' value='0' class='checkbox' name='checkbox".$worksheetID."' id='checkbox".$worksheetID."' />";
}
if ($currentTask != $taskName) {
echo "</tr>";
echo "<tr class='tr'>";
echo "<td class='task'>".$taskName."</td>";
}
echo "<td class='tick'>".$taskDone."</td>";
$currentTask = $taskName;
}
echo "</tr>";
?>
hi,
i did my project in c# compact framework with visual studio 2008.
now i wanna create a cab file. i follow the instructions at [http://www.mobilepractices.com/2008/02/how-to-create-windows-mobile-smart.html] but im having trouble.
the part that says "Browse and find SampleKindOfResourceFile.xml and press OK.", i cant find any xml in my main folder list. the only xml is found is app.config
is this the correct one?
Hi,
Can anybody help me writting a regular expression to replace these characters with a empty string. Character list is given below.
public static char[] delimiters = { ' ', '\r', '\n', '?', '!', ';', '.', ',', '`', ':', '(', ')', '{', '}', '[', ']', '|', '\'', '\\', '~', '=', '@', '>', '<', '&', '%', '-', '/', '#' };
Thanks.
Subrat.
I'm developing an eclipse plugin and need to list of IMethods that belong to an IResource.
I see IType has a getMethods function but not sure how to go about converting an IResource to an IType
Help appreciated
Nicky
I fill a DataSet and allow the user to enter a search string. Instead of hitting the database again, I set the RowFilter to display the selected data. When the user enters a square bracket ( "[" ) I get an error "Error in Like Operator". I know there is a list of characters that need prefixed with "\" when they are used in a field name, but how do I prevent RowFilter from interpreting "[" as the beginning of a column name?
Is there any standard way of providing list of program switches, so it would be possible for zsh to determine possible completions? Or must it provided directly to zsh developers and only they can add completions to zsh?
I'd like to know how to get a list of the windows requiring user attention from the Windows taskbar. Windows requiring attention appear with a flashing orange color within the Windows taskbar.
Un-focused MSN Messenger conversation windows are a good example of this behavior: they turn orange as soon as a remote user sends an instance message.
My code targets the Windows 7 platform, but working on older Windows OS would be nice too.
I would like for the "List" view content views to have a check added to it to first check that the model has elements, it occurs to me that I have no idea how these views are generated. Can those be changed?
Hi,
i have a listener like this:
$('.delete').click(function() {
...some stuff
});
also, on the same page, another script dinamically add elements to the DOM in this way:
$('#list').append('<tr><td><a class="delete" href="#">delete</a></td></tr>');
my problem is that the listener doesn't "listen" to these dinamically created elements.
anyone can shed a light please :'(
Hi,
I have a question for which I'm sure there must a simple solution. I'm writing a small GWT application where I want to achieve this:
www.domain.com : should serve the welcome page
www.domain.com/xyz : should serve page xyz, where xyz is just
a key for an item in a database. If there is an
item associated with key xyz, I'll load that and show a page, otherwise I'll show a
404 error page.
I was trying to modify the web.xml file accordingly but I just couldn't
make it work. I could make it work with an url-pattern if the key in question is after another /, for example: www.domain.com/search/xyz. However,
I'd like to have the key xyz directly following the root / (http://www.domain.com/xyz).
Something like
<servlet-mapping>
<servlet-name>main</servlet-name>
<url-pattern>/</url-pattern>
</servlet-mapping>
doesn't seem to work as I don't know how to address the main page
index.html (as it's not an actual servlet) which will then load my
main GWT module.
I could make it work with a bad work around (see below): Redirecting a
404 exception to index.html and then doing the look up in the main
entry point, but I'm sure that's not the best practice, also for SEO
purposes.
Can anyone give me a hint on how to configure the web.xml with GWT for
my purpose?
Thanks a lot.
Mike
Work-around via 404:
Web.xml:
<web-app>
<error-page>
<exception-type>404</exception-type>
<location>/index.html</location>
</error-page>
<welcome-file-list>
<welcome-file>index.html</welcome-file>
</welcome-file-list>
</web-app>
index.html -- Main Entry point -- onModuleLoad():
String path = Window.Location.getPath();
if (path == null || path.length() == 0 || path.equalsIgnoreCase("/")
|| path.equalsIgnoreCase("/index.html")) {
... // load main page
} else {
lookup(path.substring(1)); // that's key xyz
I'm using System.DirectoryServices to list the status of websites running on a server. Currently I'm using impersonation of an admin account for this to run but I'd prefer to have a specific user account with the bare minimum privileges.
Can anyone point me in the right direction?
I'm trying to export 2 values from every single item from the combo box field.
I have found two methods to insert items into a combo box:
1) insertItemAt
http://www.verypdf.com/document/acrobat-forms-javascript/pg_0048.htm
2) setItems
http://livedocs.adobe.com/acrobat_sdk/9/Acrobat9_HTMLHelp/wwhelp/wwhimpl/common/html/wwhelp.htm?context=Acrobat9_HTMLHelp&file=JS_API_AcroJS.88.748.html
but neither method allows two parameters (im always get "missing ) after argument list" error from the Acrobat JavaScript Debugger)
Does anyone know of a better solution for this problem? Thanks!
I have some text data in database which I have retrieved in a Cursor, and I am displaying it in a ListView. What I want to do now is that when you select click a particular row in the list its text content should be displayed in full screen and the user should be able to scroll horizontally (like scrolling between iPhone home screens) to view the contents of the Cursor.
We are moving over to using Akamai for all of our large static content so far just flash but are planning to include images, css, and js files in that list.
I am curious what methods others employ to switch all of their local/relative paths to using an external hosting company. Also, how they continue to develop their site so that developers can make changes in development without it having to be pushed to their external hosting servers.
I have the following code:
f = open(path, 'r')
html = f.read() # no parameters => reads to eof and returns string
soup = BeautifulSoup(html)
schoolname = soup.findAll(attrs={'id':'ctl00_ContentPlaceHolder1_SchoolProfileUserControl_SchoolHeaderLabel'})
print schoolname
which gives:
[<span id="ctl00_ContentPlaceHolder1_SchoolProfileUserControl_SchoolHeaderLabel">A B Paterson College, Arundel, QLD</span>]
when I try and access the value (i.e. 'A B Paterson College, Arundel, QLD) by using schoolname['value'] I get the following error:
print schoolname['value'] TypeError: list indices must be integers, not str
What am I doing wrong to get that value?
Hi,
I am able to list Documents from "Public Folders"
Using this sample code :
session.LogonExchangeMailbox("[email protected]", "server");
RDOFolder folder = session.GetFolderFromPath(@"\Public Folders\All Public Folders");
Now i want to Extract this documents to another location.