Search Results

Search found 19928 results on 798 pages for 'multiple constructors'.

Page 144/798 | < Previous Page | 140 141 142 143 144 145 146 147 148 149 150 151  | Next Page >

  • Multiple classes in a Python module

    - by ralphL
    I'm very new to Python (I'm coming from a JAVA background) and I'm wondering if anyone could help me with some of the Python standards. Is it a normal or "proper" practice to put multiple class in a module? I have been working with Django and started with the tutorials and they place their database model classes in the same module. Is this something that is normally done or should I stick with 1 class per module? Is their a reason I would do one over the other? Hope I'm being clear and not to generic. Thanks to everyone in advance!

    Read the article

  • Merging multiple array then sorting by array value count

    - by Sofyan
    Hi, Please help me, i need to merge multiple arrays then sorting it by array value count. Below is the problem: $array1 = array("abc", "def", "ghi", "jkl", "mno"); $array2 = array("mno", "jkl", "mno", "ghi", "pqr", "stu"); $array3 = array_merge($array1, $array2); $array4 = ??? print_r($array4); I want the returns of $array4 like this: Array ( [0] => mno [1] => ghi [2] => jkl [3] => abc [4] => def [5] => pqr [6] => stu )

    Read the article

  • Multiple Progress Bar States in WPF

    - by kbo206
    I'm currently developing a WPF application in C# and I want to have a progress bar control that can be in a "paused" state as well as an "error" state. Much like this: http://wyday.com/windows-7-progress-bar/ Unfortunately, that's a Windows Forms control and implementing it via a Windows Forms Host proved to be incompatible. My question is, how can I go about accomplishing a similar effect in WPF? Is it possible to make multiple "states" of a progress bar? Is this kind of operation in WPF but I'm just looking over it? I'm mainly talking about the progress bar itself here, I'm pretty sure I know how to achieve this in the taskbar. All help is appreciated, especially code examples. Thanks!

    Read the article

  • cannot read multiple rows from sqldatareader

    - by amby
    Hi, when i query for only one record/row, sqldatareader is giving correct result but when i query for multiple rows, its giving error on the client side. below is my code. please tell me what is the problem here. string query = "select * from Customer_Order where orderNumber = " + order;//+" OR orderNumber = 17"; DataTable dt = new DataTable(); Hashtable sendData = new Hashtable(); try { using (SqlConnection conn = new SqlConnection(ConnectionString)) { using (SqlCommand cmd = new SqlCommand(query, conn)) { conn.Open(); SqlDataReader dr = cmd.ExecuteReader(CommandBehavior.CloseConnection); dt.Load(dr); } }

    Read the article

  • Insert multiple records from a XML string differing on one parameter in SQL SERVER 2008

    - by Rohit
    Below in a query which inserts records to SimpleDictationProfileMapping table after reading it from a XML string. Now this query inserts a single record in which DictationCaptureProfileID is @dictationCaptureProfileId . Now i want to insert multiple rows in which @dictationCaptureProfileId is different and other 2 values are same. What i want to achieve by this is in case parent changes all child values should also change. INSERT INTO SimpleDictationProfileMapping ( DictationCaptureProfileID, DictationProfileMappingAttributeID, DictationProfileMappingAttributeValue ) SELECT @dictationCaptureProfileId, row.value('@attrId','varchar(max)'), row.value('@value', 'varchar(max)') FROM @simpleDictationCaptureProfileMappings.nodes('/simpleMappingAtribute/attribute') AS d ( row ) ; I want INSERT INTO SimpleDictationProfileMapping ( DictationCaptureProfileID OR (SELECT DictationCaptureProfileID FROM DictationCaptureProfile WHERE SystemDictationCaptureProfileID = @systemDictationCaptureProfileID), DictationProfileMappingAttributeID, DictationProfileMappingAttributeValue ) SELECT @dictationCaptureProfileId , row.value('@attrId','varchar(max)'), row.value('@value', 'varchar(max)') FROM @simpleDictationCaptureProfileMappings.nodes ('/simpleMappingAtribute/attribute') AS d ( row ) ; Please tell how to achieve this.

    Read the article

  • Editing Multiple files in vi with Wildcards

    - by Alan Storm
    When using the programmers text editor vi, I'll often using a wildcard search to be lazy about the file I want to edit vi ThisIsAReallLongFi*.txt When this matches a single file it works great. However, if it matches multiple files vi does something weird. First, it opens the first file for editing Second, when I :wq out of the file, I get a message the bottom of the terminal that looks like this E173: 4 more files to edit Hit ENTER or type command to continue When I hit enter, it returns me to edit mode in the file I was just in. The behavior I'd expect here would be that vi would move on to the next file to edit. So, What's the logic behind vi's behavior here Is there a way to move on and edit the next file that's been matched? And yes, I know about tab completion, this question is based on curiosity and wanting to understand the shell better.

    Read the article

  • Flex LineChart with Multiple Data Providers

    - by Jeremy Mitchell
    Can I create a LineChart with multiple data providers? Since LineSeries has a dataprovider property, I'm assuming the answer is Yes. I would expect something like this to work: <LineChart>     <series>         <LineSeries dataprovider="{dp1}"/>         <LineSeries dataprovider="{dp2}"/>         <LineSeries dataprovider="{dp3}"/>     </series> </LineChart> But, the LineChart only appears to work for me when the dataprovider is assigned to the LineChart. Thanks.

    Read the article

  • C++/MFC: Handling multiple CListCtrl's headers HDN_ITEMCLICK events

    - by raph.amiard
    I'm coding an MFC application in which i have a dialog box with multiple CListCtrls in report view. I want one of them to be sortable. So i handled the HDM_ITEMCLICK event, and everything works just fine .. Except that if i click on the headers of another CListCtrl, it does sort the OTHER CListCtrl, which does look kind of dumb. This is apparently due to the fact that headers have an ID of 0, which make the entry in the message map look like this : ON_NOTIFY(HDN_ITEMCLICK, 0, &Ccreationprogramme::OnHdnItemclickList5) But since all the headers have an id of zero, apparently every header of my dialog sends the message. Is there an easy way around this problem ?

    Read the article

  • Creating multiple markers in Google Maps using XML

    - by Jessica Stanley
    I'm almost sure this question has been asked before, but for the love of me I just can't find the answer anywhere. Basically what I want to do is create multiple markers on a custom Google Map I'm building. I already have an XML file with the coordinates (lat/lng) and title of each item. I'd like to take the data from the XML file and use it to create markers on the map. I've found how to do this using KML files and MySQL/PHP, but I need to know how to do it in Javascript. One more thing: I have a .xml file of my own, so it won't be like I'll be getting the data from a webpage because I believe (from research I've done today) that the code for that may be different. If anyone knows if this has been posted somewhere else before, could you please direct me there? I've literally been searching all day, this is my last resort. Thanks a ton!!!

    Read the article

  • Apply Alloy UI 1.5 datepicker to multiple instances

    - by MyTitle
    I want to create Alloy UI datapickers on multiple form fields: <div id="date_1_wrapper"> <input type="text" class="datepick" id="date_1" /> </div> <div id="date_2_wrapper"> <input type="text" class="datepick" id="date_2" /> </div> Using JQuery I can do it using following code: $('.datepick').each(function(){ $(this).datepicker(); }); But how to achieve same functionality in Alloy UI? For now I use following code, but this code apply DatePickers by ID, not by CSS class in loop: AUI().use( 'aui-datepicker', function(A) { new A.DatePicker ( { calendar: { dateFormat: '%d/%m/%Y' }, trigger: '#date_1' } ).render('#date_1_wrapper'); new A.DatePicker( { calendar: { dateFormat: '%d/%m/% }, trigger: '#date_2' } ).render('#date_2_wrapper'); } ); I think it this code can be used in beginning, but how to deal with input's and div's ID's? (A.all('.datepcik').each(function() {)

    Read the article

  • Sharing user controls acrros multiple websites

    - by Jasper
    Hello, I am currently working on a project which involves three different websites with a lot of common functionality. At the moment the common functionality is placed in a different website full of user controls. The problem is sharing the user controls across the multiple websites. Looking around on SO and other websites, the only solution seems the be using virtual directories. As this is a workable solution (we us this at the moment) it doesn't seem as a "clean" solution. Which "best practices" exist on sharing common functionality (including the GUI/HTML) between different site? Is it (for example) possible to create a single Web Application project and deploy subdirectories (each with their own web.config) to different production environments?

    Read the article

  • Scrollable display of multiple video icons

    - by Tam
    Hello, I want to have multiple video icons at the top my website's front page. I will have about 20 or so which won't fit on one line (I want to keep the videos on one like) so I thought of having two button on the right of the group and on the left of the group where you click to scroll and view more videos. Do you know an easy way to do this? I can pass in the video links from the server in different Divs or anyway that will make it easy. I thought of using AJAX and pass it different set every time from the server with every click (I'm using Rails and it's fairly easy to do it) but that will be an extra load on the server which I'm trying to avoid. I'd rather send all the icons at once and let the JavaScript handle the scrolling. I thought of using iFrame but I don't like the idea of scrollbar and wanted to be more like button Any ideas? Thanks, Tam

    Read the article

  • Unable to get multiple connection to MySql on Windows 7

    - by Hussain
    I have installed MySql on windows 7 ... issue is i'm unable to get multiple connection to MySql . If I connect to MySql through command line and at the same time open an other MySql command line client it goes into wait state, as soon as I disconnect the first one later one gets connected. Because of above issues I'm unable to run tomcat in debug mode as it tries to get more than one connection to MySql in debug mode. Previously I was using same version of MySql i.e. 5.1 on vista and it was working fine.

    Read the article

  • Best practice with respect to NPE and multiple expressions on single line

    - by JRL
    I'm wondering if it is an accepted practice or not to avoid multiple calls on the same line with respect to possible NPEs, and if so in what circumstances. For example: getThis().doThat(); vs Object o = getThis(); o.doThat(); The latter is more verbose, but if there is an NPE, you immediately know what is null. However, it also requires creating a name for the variable and more import statements. So my questions around this are: Is this problem something worth designing around? Is it better to go for the first or second possibility? Is the creation of a variable name something that would have an effect performance-wise? Is there a proposal to change the exception message to be able to determine what object is null in future versions of Java ?

    Read the article

  • Sorting data by relevance, from multiple tables

    - by Oden
    Hey, How is it possible to sort data from multiple tables by relevance? My table structure is following: I have 3 tables in my database, one table contains the name of solar systems, the second for e.g. of planets. There is one more table, witch is a connection between solar systems and planets. If I want to get data of a planet, witch is in the Milky Way, i post this data to the server, and it gives me a multi-dimensional array witch contains: The Milky Way, with every planet in it Every planet, witch name contains the string Milky Way (maybe thats a bat example because i don't think that theres but one planet with this name, but the main concept is on file) But, i want to set the most relevant restaurants to the top of the array. (for the relevance i would check the description of the restaurants or something like that) So, how would you do that kind of data sorting?

    Read the article

  • Using Full-Text Search in SQL Server 2005 across multiple tables, columns

    - by crisgomez
    Hi, I have a problem, I created a full text search query which return a record(s), in which the paramater I have supplied match(es) in every fields(full-text indexed) of multiple tables. The problem is , when the user.id is equal to ceritification.AId it returns a records eventhough it was not satisfied with the parameter supplied. For this example I supplied a value "xandrick" which return an Id=184, but the problem is it returns two ids which is 184 and 154.What is the best way to return an ID(s) that satisfied of the supplied given value? User table Id Firstname Lastname Middlename Email AlternativeEmail 154 Gregorio Honasan Pimentel [email protected] [email protected] 156 Qwerty Qazggf fgfgf [email protected]. [email protected] 184 Xandrick Flores NULL [email protected] null Certification table Id AID Certification School 12 184 sdssd AMA 13 43 web-based and framework 2 Asian development foundation college 16 184 hjhjhj STI 17 184 rrrer PUP 18 154 vbvbv AMA SELECT DISTINCT Users.Id FROM Users INNER JOIN Certification on Users.Id=Certification.aid LEFT JOIN FREETEXTTABLE (Users,(Firstname,Middlename,Lastname,Email,AlternativeEmail), 'xandrick' )as ftUsr ON Users.Id=ftUsr.[KEY] LEFT JOIN FREETEXTTABLE (Certification,(Certification,School), 'xandrick' )as ftCert ON Certification.Id=ftCert.[KEY]

    Read the article

  • adding multiple rows to jquery Datatables dynamically

    - by arrowill12
    I am trying to add multiple rows at once to a jQuery Datatable. I would like to be able to create a string such as the one below and call a function to add these elements as rows in the table. Is there a function that will allow me to do this? var trString = "<tr class='custom class'><td></td><td></td></tr><tr class='custom class'><td></td><td></td></tr><tr class='custom class'><td></td><td></td></tr>" I have seen the fnAddData function but I would not be able to add my custom classes dynamically to the rows using that function. Also I have tried fnAddTr but I keep receiving an error saying my object does not have the method "getelementsByTagName" again, is there a function that will allow me to add a string of "" to a datatable?

    Read the article

  • Multiple robots.txt for subdomains in rails

    - by Christopher
    I have a site with multiple subdomains and I want the named subdomains robots.txt to be different from the www one. I tried to use .htaccess, but the FastCGI doesn't look at it. So, I was trying to set up routes, but it doesn't seem that you can't do a direct rewrite since every routes needs a controller: map.connect '/robots.txt', :controller => ?, :path => '/robots.www.txt', :conditions => { :subdomain => 'www' } map.connect '/robots.txt', :controller => ?, :path => '/robots.club.txt' What would be the best way to approach this problem? (I am using the request_routing plugin for subdomains)

    Read the article

  • nHibernate query by example with multiple associated objects

    - by BurnWithLife
    I'm trying to use nhibernate's query by example to build dynamic queries. I'm stuck on how to code for an example object with multiple associations. Here's an example from NHibernate in Action. Its a User object with Items. Example exampleUser = Example.Create(u).IgnoreCase().EnableLike(MatchMode.Anywhere); Example exampleItem = Example.Create(i).IgnoreCase().EnableLike(MatchMode.Anywhere); return GetSession().CreateCriteria(typeof(User)) .Add( exampleUser ) .CreateCriteria("Items") .Add( exampleItem ) .List<User>(); If the User object has let's say a Category object as a property, how could I add that in to the above example? If i put another CreateCriteria at the end it refers to the Items, not the User.

    Read the article

  • Finding matches between multiple JavaScript Arrays

    - by Chris Barr
    I have multiple arrays with string values and I want to compare them and only keep the matching results that are identical between ALL of them. Given this example code: var arr1 = ['apple', 'orange', 'banana', 'pear', 'fish', 'pancake', 'taco', 'pizza']; var arr2 = ['taco', 'fish', 'apple', 'pizza']; var arr3 = ['banana', 'pizza', 'fish', 'apple']; I would like to to produce the following array that contains matches from all given arrays: ['apple', 'fish', 'pizza'] I know I can combine all the arrays with var newArr = arr1.concat(arr2, arr3); but that just give me an array with everything, plus the duplicates. Can this be done easily without needing the overhead of libraries such as underscore.js? (Great, and now i'm hungry too!) EDIT I suppose I should mention that there could be an unknown amount of arrays, I was just using 3 as an example.

    Read the article

  • Receving multiple multicast feeds on the same port - C, Linux

    - by Gigi
    I have an application that is receiving data from multiple multicast sources on the same port. I am able to receive the data. However, I am trying to account for statistics of each group (i.e. msgs received, bytes received) and all the data is getting mixed up. Does anyone know how to solved this problem? If I try to look at the sender's address, it is not the multicast address, but rather the IP of the sending machine. I am using the following socket options: struct ip_mreq mreq; mreq.imr_multiaddr.s_addr = inet_addr("224.1.2.3"); mreq.imr_interface.s_addr = INADDR_ANY; setsockopt(s, IPPROTO_IP, IP_ADD_MEMBERSHIP, &mreq, sizeof(mreq)); and also: setsockopt(s, SOL_SOCKET, SO_REUSEPORT, &reuse, sizeof(reuse)); I appreciate any help!!!

    Read the article

  • Maven: Multiple class with the same path implemented in different jar

    - by Phuong Nguyen de ManCity fan
    I'm running into trouble with having multiple class with the same path (i.e. same name, same package!!!). For some reason, gwt-dev comes with its own version of org.apache.xerces.jaxp.DocumentBuilderFactoryImpl and javax.xml.parsers.DocumentBuilderFactory. At the same time, spring also depends on these classes but from different jar. I don't know what should be, but look like xalan & xml-api are the two dependencies that spring depends on (these dependency are optional) Funny thing is that eclipse can run the same code (it's a unit test) without problem, but surefire cannot. So I guess the problem is due to the way each runner consider the priority of each jar. Now come to the question: How can I setup my POM so that I can sure that when ever any code running inside my app, then class from a jar will be selected over class from other jar? Thanks.

    Read the article

  • Create multiple TCP Connections in C# then wait for data

    - by Ryan French
    Hi Everyone, I am currently creating a Windows Service that will create TCP connections to multiple machines (same socket on all machines) and then listen for 'events' from those machines. I am attempting to write the code to create a connection and then spawn a thread that listens to the connection waiting for packets from the machine, then decode the packets that come through, and call a function depending on the payload of the packet. The problem is I'm not entirely sure how to do that in C#. Does anyone have any helpful suggestions or links that might help me do this? Thanks in advance for any help!

    Read the article

  • VB .NET Shared Function if called multiple times simultaneously

    - by Mehdi Anis
    Consider I have a shared function:- Public Shared Function CalculateAreaFromRadius(ByVal radius As Double) As Double ' square the radius... Dim radiusSquared As Double radiusSquared = radius * radius ' multiply it by pi... Dim result As Double result = radiusSquared * Math.PI 'Wait a bit, for the sake of testing and 'simulate another call will be made b4 earlier one ended or such for i as Integer = 0 to integer.Max Next ' return the result... Return result End Function My Questions: If I have two or more threads in the same vb .net app and each of them calls the shared function at the same time with different RADIUS, will they each get their own AREA? I want to know for each call to the function if it is using same local variables or each call creates new instances of local variables? Will the answers to above questions be same If I have multiple (2+) single threaded apps and they all call the function at the same time with different RADIUS value? I will appreciate your reponse. Thank you.

    Read the article

  • Working with multiple input and output files in Python

    - by Morlock
    I need to open multiple files (2 input and 2 output files), do complex manipulations on the lines from input files and then append results at the end of 2 output files. I am currently using the following approach: in_1 = open(input_1) in_2 = open(input_2) out_1 = open(output_1, "w") out_2 = open(output_2, "w") # Read one line from each 'in_' file # Do many operations on the DNA sequences included in the input files # Append one line to each 'out_' file in_1.close() in_2.close() out_1.close() out_2.close() The files are huge (each potentially approaching 1Go, that is why I am reading through these input files one at a time. I am guessing that this is not a very Pythonic way to do things. :) Would using the following form good? with open("file1") as f1: with open("file2") as f2: # etc. If yes, could I do it while avoiding the highly indented code that would result? Thanks for the insights!

    Read the article

< Previous Page | 140 141 142 143 144 145 146 147 148 149 150 151  | Next Page >