Search Results

Search found 45013 results on 1801 pages for 'example'.

Page 42/1801 | < Previous Page | 38 39 40 41 42 43 44 45 46 47 48 49  | Next Page >

  • Is there an example how to catch the event when I click the icon on taskbar with right button of the

    - by Gtker
    #include <gtk/gtk.h> int main( int argc, char *argv[]) { GtkWidget *window; gtk_init(&argc, &argv); window = gtk_window_new(GTK_WINDOW_TOPLEVEL); gtk_widget_show(window); gtk_main(); return 0; } The above can pop up a window and a corresponding icon on taskbar. I googled a lot but can't find any article that handles this problem. So any information is greatly appreciated!

    Read the article

  • jquery selector help... thought I followed the example correctly...but can't get it to work..

    - by Ronedog
    I'm trying to do the following in jquery but can't make it work . I want to select all the DIV tags that have a custom attribute called NODE_ID that have a value of 49_3. then select the and change the src attribute to a different image. Here's the HTML: <div style="display: block;" id="71_7_sub_p_div" node_id="49_3"> <span> <img src="../images/maximize.png"> &nbsp;Greenfield Industrial Park </span> </div> Here's the script: <script type="text/javascript"> $(document).ready(function(){ $("div[node_id='49_3']:has(img)").attr("src","../images/folder_closed.png"); }); </script> Any ideas are appreciated. thanks.

    Read the article

  • Why did Steve Sanderson in his "Pro ASP.NET MVC 2 Framework" book change an example IoC container?

    - by rem
    I like Steve Sanderson's "Pro ASP.NET MVC Framework" book. It helped me a lot. I have been waiting for its new edition and it is ready now, as we can see in this Steve's blog post It is updated a lot taking into account all new features of ASP.NET MVC 2, .NET 4 and Visual Studio 2010. In addition, "SportsStore" tutorial of this edition uses Ninject instead of first edition's Castle Windsor for DI. I wonder, why? Does it mean that Castle Windsor became a little outdated?

    Read the article

  • JAVA Inheritance Generics and Casting.

    - by James Moore
    Hello, I have two classes which both extends Example. public class ClassA extends Example { public ClassA() { super("a", "class"); } .... } public class ClassB extends Example { public ClassB() { super("b", "class"); } .... } public class Example () { public String get(String x, String y) { return "Hello"; } } So thats all very well. So suppose we have another class called ExampleManager. With example manager I want to use a generic type and consequently return that generic type. e.g. public class ExampleManager<T extends Example> { public T getExample() { return new T("example","example"); // So what exactly goes here? } } So where I am returning my generic type how do i get this to actually work correctly and cast Example as either classA or classB? Many Thanks

    Read the article

  • How do I use Some/None Options in this F# example?

    - by Phobis
    I am new to F# and I have this code: if s.Contains("-") then let x,y = match s.Split [|'-'|] with | [|a;b|] -> int a, int b | _ -> 0,0 Notice that we validate that there is a '-' in the string before we split the string, so the match is really unnecessary. Can I rewrite this with Options? I changed this code, it was originally this (but I was getting a warning): if s.Contains("-") then let [|a;b|] = s.Split [|'-'|] let x,y = int a, int b NOTE: I am splitting a range of numbers (range is expressed in a string) and then creating the integer values that represent the range's minimum and maximum.

    Read the article

  • Using Python to get a CSV output for the following example.

    - by Az
    Hi there, I'm back again with my ongoing saga of Student-Project Allocation questions. Thanks to Moron (who does not match his namesake) I've got a bit of direction for an evaluation portion of my project. Going with the idea of the Assignment Problem and Hungarian Algorithm I would like to express my data in the form of a .csv file which would end up looking like this in spreadsheet form. This is based on the structure I saw here. | | Project 1 | Project 2 | Project 3 | |----------|-----------|-----------|-----------| |Student1 | | 2 | 1 | |----------|-----------|-----------|-----------| |Student2 | 1 | 2 | 3 | |----------|-----------|-----------|-----------| |Student3 | 1 | 3 | 2 | |----------|-----------|-----------|-----------| To make it less cryptic: the rows are the Students/Agents and the columns represent Projects/Task. Obviously ONE project can be assigned to ONE student. That, in short, is what my project is about. The fields represent the preference weights the students have placed upon the projects (ranging from 1 to 10). If blank, that student does not want that project and there's no chance of him/her being assigned such. Anyway, my data is stored within dictionaries. Specifically the students and projects dictionaries such that: students[student_id] = Student(student_id, student_name, alloc_proj, alloc_proj_rank, preferences) where preferences is in the form of a dictionary such that preferences[rank] = {project_id} and projects[project_id] = Project(project_id, project_name) I'm aware that sorted(students.keys()) will give me a sorted list of all the student IDs which will populate the row labels and sorted(projects.keys()) will give me the list I need to populate the column labels. Thus for each student, I'd go into their preferences dictionary and match the applicable projects to ranks. I can do that much. Where I'm failing is understanding how to create a .csv file. Any help, pointers or good tutorials will be highly appreciated.

    Read the article

  • Quick example of multi-column results with jQueryUI's new Autocomplete?

    - by Lance May
    I just found out that the jQueryUI now has it's own built-in auto-complete combo box. Great news! Unfortunately, the next thing I found is that making it multi-column doesn't seem nearly that simple (at least via documentation). There is a post here where someone mentions that they've done it (and even gives code), but I'm having trouble understanding what some of their code is doing. I'm just curious if anyone has ran across this before and could post a quick and easy sample of making a multi-column result set. Thanks much in advance.

    Read the article

  • How do I get the Jetty 6 FileServerXml example to work?

    - by Norm
    I have followed along with the Tutorial and the examples. Yet I always get this error when I copy and paste the code: Exception in thread "main" java.lang.NullPointerException at net.test.FileServerXml.main(FileServerXml.java:13) In Eclipse I have the directory structured as such: package net.test -FileServerXml.java -fileserver.xml -index.html FileServerXml.java package net.test; import org.mortbay.jetty.Server; import org.mortbay.resource.Resource; import org.mortbay.xml.XmlConfiguration; public class FileServerXml { public static void main(String[] args) throws Exception { Resource fileserver_xml = Resource.newSystemResource("fileserver.xml"); XmlConfiguration configuration = new XmlConfiguration(fileserver_xml.getInputStream()); Server server = (Server)configuration.configure(); server.start(); server.join(); } } ` fileserver.xml `<?xml version="1.0"?> <Call name="addConnector"> <Arg> <New class="org.eclipse.jetty.server.nio.SelectChannelConnector"> <Set name="port">8080</Set> </New> </Arg> </Call> <Set name="handler"> <New class="org.eclipse.jetty.server.handler.HandlerList"> <Set name="handlers"> <Array type="org.eclipse.jetty.server.Handler"> <Item> <New class="org.eclipse.jetty.server.handler.ResourceHandler"> <Set name="directoriesListed">true</Set> <Set name="welcomeFiles"> <Array type="String"><Item>index.html</Item></Array> </Set> <Set name="resourceBase">.</Set> </New> </Item> <Item> <New class="org.eclipse.jetty.server.handler.DefaultHandler"> </New> </Item> </Array> </Set> </New> </Set> ` Thanks for your input. Norm

    Read the article

  • Is there a simple way to "roll your own forms" for mysql in php, for example in jquery?

    - by talkingnews
    I've been googling around for a really simple way of making what is, in effect, nothing more than an enhanced phpMySql. In a mysql database, I have: Name, address, phone, website etc, plus 2 or 3 custom fields. This data is pulled out to make a website. All I want is to be able to make a freeform form, a bit like Access, but for the web, and the only thing I want to do over and above normal field editing would be to have a list of when I contact them, what was said, and perhaps a reminder when the next action is due. I've looked at so many CRMs my mind is boggling, and they all do WAY more than I need. I don't have leads or accounts, all I have is the need to make sure than when I update the person's details, and for that data to be in the same DB as my site is generate from. I'm happy to learn if I can get pointed in the right direction, and I have a feeling that something like what I want might lie in the direction of jquery. It's just that there's so much good jquery stuff about, I can't see the wood for the trees! Thanks.

    Read the article

  • Get a DB result with a value between two column values

    - by vitto
    Hi, I have a database situation where I'd like to get a user profile row by a user age range. this is my db: table_users username age email url pippo 15 [email protected] http://example.com pluto 33 [email protected] http://example.com mikey 78 [email protected] http://example.com table_profiles p_name start_age_range stop_age_range young 10 29 adult 30 69 old 70 inf I use MySQL and PHP but I don't know if there is some specific tacnique to do this and of course if it's possible. # so something like: SELECT * FROM table_profiles AS profiles INNER JOIN table_users AS users # can I do something like this? ON users.age IS BETWEEN profiles.start_age_range AND profiles.stop_age_range

    Read the article

  • Forum board example schema in YAML format - modify for Nested set?

    - by takeshin
    I have created a forum board app, based on YAML schema found in 'real world examples' of Doctrine Manual, which looks similar to this: --- Forum_Category: columns: root_category_id: integer(10) parent_category_id: integer(10) name: string(50) description: string(99999) relations: Subcategory: class: Forum_Category local: parent_category_id foreign: id Rootcategory: class: Forum_Category local: root_category_id foreign: id Forum_Board: columns: category_id: integer(10) name: string(100) description: string(5000) relations: Category: class: Forum_Category local: category_id foreign: id Threads: class: Forum_Thread local: id foreign: board_id Forum_Entry: columns: author: string(50) topic: string(100) message: string(99999) parent_entry_id: integer(10) thread_id: integer(10) date: integer(10) relations: Parent: class: Forum_Entry local: parent_entry_id foreign: id Thread: class: Forum_Thread local: thread_id foreign: id Forum_Thread: columns: board_id: integer(10) updated: integer(10) closed: integer(1) relations: Board: class: Forum_Board local: board_id foreign: id Entries: class: Forum_Entry local: id foreign: thread_id How to modify this schema, to use NestedSet (Tree structure of threads and entries)?

    Read the article

  • Why does this textbox binding example work in WPF but not in Silverlight?

    - by Edward Tanguay
    Why is it in the following silverlight application that when I: change the default text in the first textbox move the cursor to the second text box (i.e. take focus off first textbox) click the button that inside the button handler, it still has the old value "default text"? What do I have to do to get the binding to work in Silverlight? The same code works fine in WPF. XAML: <UserControl x:Class="TestUpdate123.MainPage" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d" d:DesignWidth="640" d:DesignHeight="480"> <StackPanel Margin="10" HorizontalAlignment="Left"> <TextBox Text="{Binding InputText}" Height="200" Width="600" Margin="0 0 0 10"/> <StackPanel HorizontalAlignment="Left"> <Button Content="Convert" Click="Button_Convert_Click" Margin="0 0 0 10"/> </StackPanel> <TextBox Height="200" Width="600" Margin="0 0 0 10"/> <TextBlock Text="{Binding OutputText}"/> </StackPanel> </UserControl> Code Behind: using System.Windows; using System.Windows.Controls; using System.ComponentModel; namespace TestUpdate123 { public partial class MainPage : UserControl, INotifyPropertyChanged { #region ViewModelProperty: InputText private string _inputText; public string InputText { get { return _inputText; } set { _inputText = value; OnPropertyChanged("InputText"); } } #endregion #region ViewModelProperty: OutputText private string _outputText; public string OutputText { get { return _outputText; } set { _outputText = value; OnPropertyChanged("OutputText"); } } #endregion public MainPage() { InitializeComponent(); DataContext = this; InputText = "default text"; } private void Button_Convert_Click(object sender, RoutedEventArgs e) { OutputText = InputText; } #region INotifiedProperty Block public event PropertyChangedEventHandler PropertyChanged; protected void OnPropertyChanged(string propertyName) { PropertyChangedEventHandler handler = PropertyChanged; if (handler != null) { handler(this, new PropertyChangedEventArgs(propertyName)); } } #endregion } }

    Read the article

  • Do you know of a good F# and C# interop example available?

    - by Ivan
    I am going to write a C# WinForms application which will run a long data-crunching task in a BackgroundWorker, show progress in a ProgressBar and have buttons to start, pause, resume and cancel the operation. I'd like to write the calculation in F#. Do you know of any good examples or readings available in the Web which can help me?

    Read the article

  • How do I assign by "reference" to a class field in c#?

    - by Jamie
    I am trying to understand how to assign by "reference" to a class field in c#. I have the follwing example to consider: public class X { public X() { string example = "X"; new Y( ref example ); new Z( ref example ); System.Diagnostics.Debug.WriteLine( example ); } } public class Y { public Y( ref string example ) { example += " (Updated By Y)"; } } public class Z { private string _Example; public Z( ref string example ) { this._Example = example; this._Example += " (Updated By Z)"; } } var x = new X(); When running the above code the output is: X (Updated By Y) And not: X (Updated By Y) (Updated By Z) As I had hoped. It seems that assigning a "ref parameter" to a field loses the reference. Is there any way to keep hold of the reference when assigning to a field? Thanks.

    Read the article

  • Get a DB result with a value between two columns values

    - by vitto
    Hi, I have a database situation where I'd like to get a user profile row by a user age range. this is my db: table_users username age email url pippo 15 [email protected] http://example.com pluto 33 [email protected] http://example.com mikey 78 [email protected] http://example.com table_profiles p_name start_age_range stop_age_range young 10 29 adult 30 69 old 70 inf I use MySQL and PHP but I don't know if there is some specific tacnique to do this and of course if it's possible. # so something like: SELECT * FROM table_profiles AS profiles INNER JOIN table_users AS users # can I do something like this? ON users.age IS BETWEEN profiles.start_age_range AND profiles.stop_age_range

    Read the article

< Previous Page | 38 39 40 41 42 43 44 45 46 47 48 49  | Next Page >