Search Results

Search found 13889 results on 556 pages for 'results'.

Page 233/556 | < Previous Page | 229 230 231 232 233 234 235 236 237 238 239 240  | Next Page >

  • How to make a macro which gives back a string into the source code?

    - by mystify
    Example: I want to do this: METHODNAME(5) { // do something } which results in: - (void)animationStep5 { // do something } Is there any way to do this? Basically, what I need is a way to generate a real source code string before the program is compiled, so the compiler does see - (void)animationStep5... Or maybe there's something different than a macro, which can help here to auto-generate method names (not at run-time)?

    Read the article

  • Looping over ILookup, accessing values

    - by Jono
    I've got a ILookup< string, List<CustomObject> > from some linq I've done. I'd like to now iterate over the results: foreach(IGrouping<string, List<CustomObject>> groupItem in lookupTable) { groupItem.Key; //You can access the key, but not the list of CustomObject } I know I must be misrepresenting a IGrouping as a KeyValuePair, but now I'm not sure how to access it properly.

    Read the article

  • WCF Compare objects on client

    - by Petoj
    Well i have a WCF service and has to methods one that gives a list of a object and one that gives a list of objects.. the object returned from method one is part of the list from method two. Im using wpf and binding a combo box to the two the results.. but the problem is that the combo box dosent know how to compare the objects as WCF did not generate this for me.. is there some way to fix this??

    Read the article

  • How to load image in correct pixel depth

    - by extropy
    I have a bunch of monochrome (1bpp) PNG images I want to load, and pass to pdfSharp. Using Image.FromFile loads images fine, but it alawys uses 32BPP, regardless of the pixel depth of the file. That results in very large PDF files generated. Is there a way to load images in their native pixel depth?

    Read the article

  • Can I make a web based video recording?

    - by Roman
    I want to have a web site which switches the web camera of users, makes a video recording and send results to my web server. Is it possible to do that? I think it should be. For example such sites as chatroulette.com starts web camera. Should it be done with the Adobe Flash technologies? Is it hard to do that?

    Read the article

  • Python and IronPython on same machine?

    - by rudimenter
    I am a total newbie in the Python world. I want to start to experiment with Python and IronPython and compare the results. Is it possible to install Python and IronPython on the same machine with interfering each other or is it besser to this in the virtual machine. Thx in advance.

    Read the article

  • Conditional Join In LINQ?

    - by Soo
    I am trying to write a query that grabs information from one database and joins it to information in a different database. TableA idA valueA idB TableB idB valueB The tricky part is that in TableA, idB isn't always defined, so when I do a normal join, I only get results where TableA has a idB value. What I want is to be able to grab all of the information from TableA even if it doesn't have a corresponding idB value.

    Read the article

  • How to resolve merging conflicts in Mercurial (v1.0.2)?

    - by lajos
    I have a merging conflict, using Mercurial 1.0.2: merging test.h warning: conflicts during merge. merging test.h failed! 6 files updated, 0 files merged, 0 files removed, 1 files unresolved There are unresolved merges, you can redo the full merge using: hg update -C 19 hg merge 18 I can't figure out how to resolve this. Google search results instruct to use: hg resolve but for some reason my Mercurial (v1.0.2) doesn't have a resolve command: hg: unknown command 'resolve' How can I resolve this conflict?

    Read the article

  • Jquery Autocomplete after space press

    - by Limpep
    I am having an issue with my auto-complete feature such as when a user presses the space button the auto-complete doesn't show up again. Here is my code script type="text/javascript"> function lookup(inputString) { if(inputString.length == 0) { // Hide the suggestion box. $('#suggestions').hide(); } else { $.post("autocomplete.php", { queryString: ""+inputString+"" }, function(data){ if(data.length >0) { $('#suggestions').show(); $('#autoSuggestionsList').html(data); } }); } } // lookup function fill(thisValue) { $('#tag').val(thisValue); setTimeout("$('#suggestions').hide();", 200); } here my php code <?php require_once('config.php'); $db = new mysqli(DB_HOST, DB_USER, DB_PASSWORD,DB_DATABASE); if(!$db) { // Show error if we cannot connect. echo 'ERROR: Could not connect to the database.'; } else { // Is there a posted query string? if(isset($_POST['queryString'])) { $queryString = $db->real_escape_string($_POST['queryString']); // Is the string length greater than 0? if(strlen($queryString) >0) { // Run the query: We use LIKE '$queryString%' // The percentage sign is a wild-card, in my example of countries it works like this... // $queryString = 'Uni'; // Returned data = 'United States, United Kindom'; $query = $db->query("SELECT name FROM tag WHERE name LIKE '$queryString%' ORDER BY name LIMIT 10"); if($query) { // While there are results loop through them - fetching an Object (i like PHP5 btw!). while ($result = $query ->fetch_object()) { // Format the results, im using <li> for the list, you can change it. // The onClick function fills the textbox with the result. echo '<li onClick="fill(\''.$result->name.'\');">'.$result->name.'</li>'; } } else { echo 'ERROR: There was a problem with the query.'; } } else { // Dont do anything. } // There is a queryString. } else { echo 'There should be no direct access to this script!'; } } ? Any help would be great, thanks.

    Read the article

  • Trying to write junit test missing some basisc

    - by Gandalf StormCrow
    When I try to use assertNotLesser or assertNotGreater I get compile error .. and eclipse suggest me to create a new method called like this .. http://junit-addons.sourceforge.net/junitx/framework/ComparableAssert.html I found it here I never used these options before but I need to write this test, I can do it jmock as well but I don't know how .. I need to compare my expected results let say 0, if the real result is greater that the test should fail.

    Read the article

  • Adding additional sorting attributes to array of records...then sorting!

    - by keruilin
    Let's say I run an ActiveRecord query and it returns 3 results, with a bunch of attributes. I want to add 3 attributes to each record in the Array so I can do sorting at a code-level. These 3 include: num_comments, num_views, last_view. How do I add these attributes? How do I then sort the records, in order of precendence, by num_comments AND by num_views AND by last_view?

    Read the article

  • sql generate unique table/view name

    - by Claudiu
    I want to create some mad robust code. I want to take a query as a string, create a temporary view / table to store the results, use it, then drop the table. I want to use a name that is guaranteed to not already exist in the database. Is there an SQL command to generate a unique table name? I'm using postgresql if this is implementation-specific.

    Read the article

  • WINCE problem LoadLibraryEx

    - by Courdi95
    Hello, I am using a WINCE framework for development called WINDEV. This framework has some DLLs that are to be loaded, but on some WINCE platforms, the loading (tested with a c program with the LoadLibraryEx instruction) does not work .... The results vary from one platform to another .... What are the hypothesis to be checked ? Thank for your help.

    Read the article

  • Hyperlink for each record

    - by shantanuo
    I need a link for each depotname that will bring up a child window with the details of the last 10 backup status. while($data=mysql_fetch_array($res)) { if(is_null($depot_array) || !in_array($data['depotname'],$depot_array )) { $depot_array[$r]=$data['depotname']; if($data['SCP_status'] <> 'success') { echo "<tr id='fail'>"; The results of the following query should be displayed in a child window. select * from backup_log where depotname = $data['depotname']

    Read the article

  • mysql multi count() in one query

    - by atno
    Hi, I'm trying to count several joined tables but without any luck, what I get is the same numbers for every column (tUsers,tLists,tItems). My query is: select COUNT(users.*) as tUsers, COUNT(lists.*) as tLists, COUNT(items.*) as tItems, companyName from users as c join lists as l on c.userID = l.userID join items as i on c.userID = i.userID group by companyID The result I want to get is --------------------------------------------- # | CompanyName | tUsers | tlists | tItems 1 | RealCoName | 5 | 2 | 15 --------------------------------------------- what modifications do i have to do to my query to get those results? Cheers

    Read the article

  • jQuery selector .not() NOT working

    - by Niko M.
    I've built a jQuery selector for a function which looks like this: $('html').not('.table-main tr[selected]').mousedown( function( e ) { But somehow it is not filtering at all and i do not quite understand why. Even if i just leave ('.table-main') for the selector i still trigger the function when clicking into the table... What is wrong with that? Using document or 'body' instead of 'html' does not help, as document is not triggering at all with .not() and 'body' results in the same.

    Read the article

  • A quick way to map unordered list of longs to buffer location ?

    - by alhazen
    I have a large number of points (indexed by long) that are processed by multiple threads and I'm using a buffer to hold the output results in order. As the number of points processed is huge, what would be an efficient way to map the indexes of the points to the corresponding ordered position in the buffer ? Example: long bufferIndex bufferIndex index (if BufferSize = 2) (if BufferSize = 4) ---------------------------------------------- 2938 0 0 2939 1 1 2941 1 3 2940 0 2 Thanks.

    Read the article

  • Techniques for querying a set of object in-memory in a Java application

    - by Edd Grant
    Hi All, We have a system which performs a 'coarse search' by invoking an interface on another system which returns a set of Java objects. Once we have received the search results I need to be able to further filter the resulting Java objects based on certain criteria describing the state of the attributes (e.g. from the initial objects return all objects where x.y z && a.b == c). The criteria used to filter the set of objects each time is partially user configurable, by this I mean that users will be able to select the values and ranges to match on but the attributes they can pick from will be a fixed set. The data sets are likely to contain <= 10,000 objects for each search. The search will be executed manually by the application user base probably no more than 2000 times a day (approx). It's probably worth mentioning that all the objects in the result set are known domain object classes which have Hibernate and JPA annotations describing their structure and relationship. Off the top of my head I can think of 3 ways of doing this: For each search persist the initial result set objects in our database, then use Hibernate to re-query them using the finer grained criteria. Use an in-memory Database (such as hsqldb?) to query and refine the initial result set. Write some custom code which iterates the initial result set and pulls out the desired records. Option 1 seems to involve a lot of toing and froing across a network to a physical Database (Oracle 10g) which might result in a lot of network and disk activity. It would also require the results from each search to be isolated from other result sets to ensure that different searches don't interfere with each other. Option 2 seems like a good idea in principle as it would allow me to do the finer query in memory and would not require the persistence of result data which would only be discarded after the search was complete. Gut feeling is that this could be pretty performant too but might result in larger memory overheads (which is fine as we can be pretty flexible on the amount of memory our JVM gets). Option 3 could be very performant but is something I would like to avoid as any code we write would require such careful testing that the time taken to acheive something flexible and robust enough would probably be prohibitive. I don't have time to prototype all 3 ideas so I am looking for comments people may have on the 3 options above, plus any further ideas I have not considered, to help me decide which idea might be most suitable. I'm currently leaning toward option 2 (in memory database) so would be keen to hear from people with experience of querying POJOs in memory too. Hopefully I have described the situation in enough detail but don't hesitate to ask if any further information is required to better understand the scenario. Cheers, Edd

    Read the article

  • All non-prime factorings

    - by Tony Veijalainen
    Let's say we have numbers factors, for example 1260: >>> factors(1260) [2, 2, 3, 3, 5, 7] Which would be best way to do in Python combinations with every subproduct possible from these numbers, ie all factorings, not only prime factoring, with sum of factors less than max_sum? If I do combinations from the prime factors, I have to refactor remaining part of the product as I do not know the remaining part not in combination. Example results would be: [4, 3, 3, 5, 7] (one replacement) [3, 6, 14, 5] (two replacements)

    Read the article

  • problem in getting desired date format in loop

    - by Rishi2686
    Hi there, I have a date format like this : $date1 = "Sun May 09 20:07:50 +0000 2010"; and I have to convert it to: 09-05-2010 I am using date("d-m-Y", $date1)); When I print this individually it gives proper result but I am using it in loop it gives me results like: 31-12-1969 I don't understand why this is so? Can you help, please?

    Read the article

< Previous Page | 229 230 231 232 233 234 235 236 237 238 239 240  | Next Page >