Daily Archives

Articles indexed Thursday April 22 2010

Page 20/123 | < Previous Page | 16 17 18 19 20 21 22 23 24 25 26 27  | Next Page >

  • How can I put all twill commands together into one piece of code in a .py file?

    - by brilliant
    Hello everybody! I have just started exploring TWILL. Twill is an amazing scripting language for Web browsing and it does all I want!!! So far I've been using twill from a Python shell (IDLE (Python GUI) to be precise) and I do things in the way of executing commands one by one (I mean, I type one command, run it, then type the next command): But I don't know how to put all these commands together in one .py file, so that they would all be executed one by one automatically. It seems that there is such possibility in twill. This example from the twill documentation page (you can see it HERE) shows us one piece of code consisting of several commands: So, my question is: How can I put all commands together in twill?

    Read the article

  • Bash Script (Cygwin) to grep a logfile for multiple phrases and output a new file for each phrase.

    - by Chris
    Each logfile is titled based on the date it was created in the format YYYY-MM-DD.txt. I need to search each file for five different keywords and output five files prepended with the specific keyword and then the original logfile name. Example: Test-YYYY-MM-DD.txt grep -i -w 'keyword1' YYYY-MM-DD.txt Keyword1-YYYY-MM-DD.txt If it's also possible to email each new file to a different person, that would be helpful as well.

    Read the article

  • what concepts every .NET developer should understand?

    - by EquinoX
    Please throw in the core concepts of what every .NET developer should know about? I am asking here about concepts specific to .NET and not web developer in general... Maybe concepts that are most likely to be asked in interview? As a general web developer, javascript and css are definitely a must. Share your ideas here guys

    Read the article

  • Silverlight 4 DataBinding: Binding to ObservableCollection<string> not working anymore

    - by Kurt
    Upgrading from SL3 - SL4. First problem: this throws a parser exception: <StackPanel Name={Binding} /> (same with x:Name) Collection is ObservableCollection<string>. Worked fine in SL3. So it seems that SL4 doen't allow binding to the Name property. Huh? So: changed to <StackPanel Tag={Binding} /> ... since I just need to ID the control in code behind. So here's the bug ('cuz this has got to be a bug!): In this frag, AllAvailableItems is an ObservableCollection<string>: <ItemsControl Name="lbItems" ItemsSource="{Binding AllAvailableItems}" Height="Auto" Width="Auto" BorderBrush="Transparent" BorderThickness="0" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="12,6,0,0"> <ItemsControl.ItemTemplate> <DataTemplate> <Grid> <Grid.RowDefinitions> <RowDefinition /> <RowDefinition /> </Grid.RowDefinitions> <CheckBox Tag="{Binding}" Checked="ItemChecked_Click" Unchecked="ItemUnchecked_Click" Style="{StaticResource CheckBoxStyle}" Grid.Row="0"> <CheckBox.Content> <TextBlock Text="{Binding}" Style="{StaticResource FormLJustStyle}" /> </CheckBox.Content> </CheckBox> <StackPanel Tag="{Binding}" Orientation="Vertical" Grid.Row="1"> <configControls:ucLanguage /> <!-- simple user control --> </StackPanel> </Grid> </DataTemplate> </ItemsControl.ItemTemplate> </ItemsControl> In the code behind, I use a recursive function to find the Dependency object with either the Name or Tag property provided: public static T FindVisualChildByName<T>(DependencyObject parent, string name, DependencyProperty propToUse) where T : DependencyObject { for (int i = 0; i < VisualTreeHelper.GetChildrenCount(parent); i++) { var child = VisualTreeHelper.GetChild(parent, i); string controlName = child.GetValue(propToUse) as string; if (controlName == name) { return child as T; } else { T result = FindVisualChildByName<T>(child, name, propToUse); if (result != null) return result; } } return null; } OK, get this: in the code behind, I can get the control that is ORDERED FIRST in the XAML! In other words, if I put the CheckBox first, I can retrieve the CheckBox, but no StackPanel. And vice-versa. This all worked fine in SL3. Any help, ideas ... ? Thanks - Kurt

    Read the article

  • Getting all selected checkboxes values using ajax and jsp/servlets?

    - by A.S al-shammari
    Hi.. I'm developing a jsp/serlvet application. I have a page with a list of inputs as checkboxes . I want to send values of selected buttons to a servlet using ajax/jquery. In the servlet , I want to extract these values and use them . for example: The user checks some checkboxes , for example, list of messages. He/She presses Delete Link to delete selected messages. I searched and found something like this : $("#inboxDeleteSelected").click(function(){ var data = { 'checkBoxList[]' : []}; var list=$(":input:checkbox:checked"); // getting all selected checkboxes. $(list.each(function() { data['checkBoxList[]'].push($(this).val()); })); $.post("servlet?do=deleteSelected",data,function(d){ // do something here }); }); My questions: How can I send selected checkboxes values to a servlet ? How can I extract these values in the servlet ? Note: I don't use submit button to submit the selected checkboxes,Indeed I use link/anchor to send those values .

    Read the article

  • what's wrong with sql statements sqlite3_column_text ??

    - by ahmet732
    if(sqlite3_open([databasePath UTF8String], & database) == SQLITE_OK) { NSLog(@"DB OPENED"); // Setup the SQL Statement and compile it for faster access const char *sqlStatement ="select name from Medicine"; sqlite3_stmt *compiledStatement; int result = sqlite3_prepare_v2(database, sqlStatement, -1, &compiledStatement, nil); NSLog(@"RESULT %d", result); if(result == SQLITE_OK) { NSLog(@"RESULT IS OK..."); // Loop through the results and add them to the feeds array while(sqlite3_step(compiledStatement) == SQLITE_ROW) { // Read the data from the result row NSLog(@"WHILE IS OK"); **araci = [NSString stringWithUTF8String:(char *)sqlite3_column_text(compiledStatement, 1)];** NSLog(@"Data read"); NSLog(@"wow: %",araci); }//while }//if sqlite_prepare v2 // Release the compiled statement from memory sqlite3_finalize(compiledStatement); NSLog(@"compiled stmnt finalized.."); } sqlite3_close(database); NSLog(@"MA_DB CLOSED"); Questions 1 ) Everything is alright until bold code. when i run the app, throws an exception below. I have one table and one row in my db relatively, id (integer), name (varchar), desc (varchar) (I created my table using SQLite Manager). 2-) What is text type in SQLite Manager? Is that NSString? Also how can I put the string values(in table) to an NSMutableArray ? (I am really having difficulty in conversion.) *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** +[NSString stringWithUTF8String:]: NULL cString'

    Read the article

  • Best practice -- Content Tracking Remote Data (cURL, file_get_contents, cron, et. al)?

    - by user322787
    I am attempting to build a script that will log data that changes every 1 second. The initial thought was "Just run a php file that does a cURL every second from cron" -- but I have a very strong feeling that this isn't the right way to go about it. Here are my specifications: There are currently 10 sites I need to gather data from and log to a database -- this number will invariably increase over time, so the solution needs to be scalable. Each site has data that it spits out to a URL every second, but only keeps 10 lines on the page, and they can sometimes spit out up to 10 lines each time, so I need to pick up that data every second to ensure I get all the data. As I will also be writing this data to my own DB, there's going to be I/O every second of every day for a considerably long time. Barring magic, what is the most efficient way to achieve this? it might help to know that the data that I am getting every second is very small, under 500bytes.

    Read the article

  • problem with phpMyAdmin advanced features

    - by typoknig
    Hi all, I am having trouble putting the final touches on my MySQL/Apache/phpMyAdmin install on a Windows XP system. I am trying to get rid of all the error message in phpMyAdmin and I have gotten rid of all of them except the ones related to "advanced features." The exact error message I have is : The additional features for working with linked tables have been deactivated. To find out why click here. I have read up on the cause of the errors but I must be missing something because I still cannot get the warning to go away. Here is what I have done: Created a linked-tables infrastructure (default name "phpmyadmin") per the phpMyAdmin instructions and enabled "pmadb" in my "config.inc.php" file. Specified (enabled) the table names in my "config.inc.php" file (there are 9 tables total). Created a "controluser" and granted only Select privilages per phpMyAdmin instructions Adjusted "controluser" pma and "controlpass" pmapass in "config.inc.php" file From what I can see these are all the instruction phpMyAdmin gives on this subject, and I am unable to locate any tutorials on the specifics of "advanced features" in phpMyAdmin. Any help would be appreciated, and be gentle, this is my first go with MySQL/phpMyAdmin

    Read the article

  • Postfix unable to find local server

    - by Andrew
    I'm working with postfix on fedora 9 and I'm attempting to make some changes to a system setup by my predecessor. Currently the postfix server on [mail.ourdomain.com] is setup to forward mail sent to two addresses to another server for processing. The other server [www01.ourdomain.com] receives the email and sends it to a PHP script to be processed. Then that PHP script generates and sends a response to the user who sent the original email. We're adding more web servers to the system and as a result we've decided to move these processing scripts to our admin [admin.ourdomain.com] server to make them easier to keep track of. I've already setup and tested the processing scripts on [admin.ourdomain.com], and on the mail server doing the forwarding [mail.ourdomain.com] I added [admin.ourdomain.com] to /etc/hosts and also added another, aside from the one for [www01.ourdomain.com], entry to /etc/postfix/transport for [admin.ourdomain.com]. I also restarted postfix as well. I've tested the communication from [mail.ourdomain.com] to [admin.ourdomain.com] using telnet and the [admin.ourdomain.com] domain and everything runs correctly. But as soon as I change the forward address and attempt to send an email to the mail server I get a bounce message stating "Host or domain name not found. Name service error for name=admin.ourdomain.com type=A: Host not found". If I change the forward settings back to [www01.ourdomain.com] then everything works fine. Is there some setting I'm missing in Postfix? The server itself and telnet work fine it just seems to be postfix that's not able to discover the location of [admin.ourdomain.com].

    Read the article

  • How do I reorder the playlist items in the VLC playlist window?

    - by alex
    In the VLC playlist window, I can't seem to drag the items around to change their order. Is that normal? In every other media player I've used before, this is possible. At the moment I'm resorting to clicking the title to sort the list in an order which is what I want, but I can't guarantee I'll always have the titles so correct! UPDATE No one? I'd have though this would be a staple feature...

    Read the article

  • Windows 7 dual boots after upgrade

    - by Paul
    I was running Vista 64, I installed (not upgraded, fresh install) Windows 7 64 bit on the same partition, but since then it's been bringing up a dual boot menu asking if I want to boot to 7 or Vista. Any way to get rid of that, I'm really not interested in rolling back.

    Read the article

  • Why PartCover report shows 0% when mstest runs successfully and all tests pass

    - by SvetlanaM
    Hello, I'm trying to get code coverage with mstest tests. I'm using PartCover 2.2.0.36424. The problem is with real assemblies, I get 0% code coverage (Note: All tests pass). On demo test for demo source that I created, it worked fine (the report makes sense). I noticed that in log file: for demo files, after line "Assembly AAAAAA loaded (MyTestesAssemblyName)", there is line "Class NNNNNN loaded (MyTestesAssemblyName.MyClassname)"; and for the real files ther is no second line (for class) after the line for assembly. Have any ideas what is different in our assemblies? (Note: they are not signed) 10x.

    Read the article

  • Nhibernate exception - No persister for

    - by Muhammad Akhtar
    I am getting exception when calling Stored Procedure using Nhibernate and here is the exception No persister for: ReleaseDAL.ProgressBars, ReleaseDAL, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null here is class file public class ProgressBars { public ProgressBars() { } private Int32 _Tot; private Int32 _subtot; public virtual Int32 Tot {get { return _Tot; } set { _Tot = value; } } public virtual Int32 subtot { get { return _subtot; } set { _subtot = value; }} } here is my mapping file <hibernate-mapping xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="urn:nhibernate-mapping-2.2" assembly="ReleaseDAL" namespace="ReleaseDAL" > <sql-query name="ps_getProgressBarData1" > <return alias="ProgressBars" class="ProgressBars"> <return-property name="Tot" column="Tot"/> <return-property name="subtot" column="subtot"/> </return> exec ps_getProgressBarData1 </sql-query> </hibernate-mapping> Calling Code public List<ProgressBars> getProgressBarData1(Guid ReleaseId) { ISession session = NHibernateHelper.GetCurrentSession(); List< ProgressBars> progressBar = (List<ProgressBars>)session.GetNamedQuery("ps_getProgressBarData1").List<ProgressBars>(); NHibernateHelper.CloseSession(); return progressBar; } I am introuble due to this exception, I did lot Google but no success, Please give idea to solve this problem. Thanks.........

    Read the article

  • cloud and existing enterprise applications technologies

    - by maxxxee
    What is the significance of new cloud platforms and databases like Microsoft Azure and Amazon EC2? Is it a replacement for enterprise application platforms like .net or JEE in a cloud environment? Is it neccessary to use these or other cloud specific platforms, or can we implement .net or JEE on a cloud based environment?

    Read the article

  • how to insert my own words to JSGF grammar

    - by Pradeep
    how to insert my own words to jsgf grammar. i have successfully configured the sphinx and its working fine. and i have added couple of words to the dictionary but when i run it. the application says " WARNING jsgfGrammar Can't find pronunciation for nugegoda" i cant find the jsgfGrammar file in my workspace. how to edit it. please help me.

    Read the article

  • Wrapping Arbitrary XML within XML

    - by Marc C
    I need to embed arbitrary (syntactically valid) XML documents within a wrapper XML document. The embedded documents are to be regarded as mere text, they do not need to be parseable when parsing the wrapper document. I know about the "CDATA trick", but I can't use that if the inner XML document itself contains a CDATA segment, and I need to be able to embed any valid XML document. Any advice on accomplishing this--or working around the CDATA limitation--would be appreciated.

    Read the article

  • C - fork() and sharing memory

    - by Ben
    I need my parent and child process to both be able to read and write the same variable (of type int) so it is "global" between the two processes. I'm assuming this would use some sort of cross-process communication and have one variable on one process being updated. I did a quick google and IPC and various techniques come up but I don't know which is the most suitable for my situation. So what technique is best and could you provide a link to a noobs tutorial for it. Thanks.

    Read the article

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