Search Results

Search found 2850 results on 114 pages for 'andrew 46'.

Page 74/114 | < Previous Page | 70 71 72 73 74 75 76 77 78 79 80 81  | Next Page >

  • Fast find object by string property

    - by Andrew Kalashnikov
    Hello, colleagues. I've got task to fast find object by its string property. Object: class DicDomain { public virtual string Id{ get; set; } public virtual string Name { get; set; } } For storing my object I use List[T] dictionary where T is DicDomain for now . I've got 5-10 such lists, which contain about 500-20000 at each one. Task is find objects by its Name. I use next code now: List<T> entities = dictionary.FindAll(s => s.Name.Equals(word, StringComparison.OrdinalIgnoreCase)); I've got some questions: Is my search speed optimal. I think now. Data structure. It List good for this task. What about hashtable,sorted... Method Find. May be i should use string intern?? I haven't much exp at these tasks. Can u give me good advice for increase perfomance. Thanks

    Read the article

  • Meteor Deps - Running a Client Side Func

    - by Andrew Plummer
    I'm struggling to get a handle on Meteor deps, in order to be specific my use case is: 2) When collection is changed, I want to run a jQuery function on the client side I think deps are what I'm looking for, but at the moment I have only just used: Template.templateName.set () -> return Set.find({}) ...in terms of reactivity. A solution which simply console.log's the collection each time it is changed would be more that enough.

    Read the article

  • Getting ListView values into a string array?

    - by Andrew
    I have a ListView control set up in details mode, and on a button press I would like to retrieve all column values from that row in the ListView. This is my code so far: Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click Dim items As ListView.SelectedListViewItemCollection = _ Me.ManageList.SelectedItems Dim item As ListViewItem Dim values(0 To 4) As String Dim i As Integer = 0 For Each item In items values(i) = item.SubItems(1).Text i = i + 1 Next End Sub But values just comes out as an empty array. Any ideas? I just want the values array to be filled with the data of that ListView row. Cheers.

    Read the article

  • Realtime MySQL search results on an advanced search page

    - by Andrew Heath
    I'm a hobbyist, and started learning PHP last September solely to build a hobby website that I had always wished and dreamed another more competent person might make. I enjoy programming, but I have little free time and enjoy a wide range of other interests and activities. I feel learning PHP alone can probably allow me to create 98% of the desired features for my site, but that last 2% is awfully appealing: The most powerful tool of the site is an advanced search page that picks through a 1000+ record game scenario database. Users can data-mine to tremendous depths - this advanced page has upwards of 50 different potential variables. It's designed to allow the hardcore user to search on almost any possible combination of data in our database and it works well. Those who aren't interested in wading through the sea of options may use the Basic Search, which is comprised of the most popular parts of the Advanced search. Because the advanced search is so comprehensive, and because the database is rather small (less than 1,200 potential hits maximum), with each variable you choose to include the likelihood of getting any qualifying results at all drops dramatically. In my fantasy land where I can wield AJAX as if it were Excalibur, my users would have a realtime Total Results counter in the corner of their screen as they used this page, which would automatically update its query structure and report how many results will be displayed with the addition of each variable. In this way it would be effortless to know just how many variables are enough, and when you've gone and added one that zeroes out the results set. A somewhat similar implementation, at least visually, would be the Subtotal sidebar when building a new custom computer on IBuyPower.com For those of you actually still reading this, my question is really rather simple: Given the time & ability constraints outlined above, would I be able to learn just enough AJAX (or whatever) needed to pull this one feature off without too much trouble? would I be able to more or less drop-in a pre-written code snippet and tweak to fit? or should I consider opening my code up to a trusted & capable individual in the future for this implementation? (assuming I can find one...) Thank you.

    Read the article

  • populate a listbox from a.. function?

    - by andrew
    hello first of all i'm kinda new to C# I'm trying to do something like this in a C# winforms application when my app starts, a form starts minimized in the system tray. when i double click it, it opens and sends a request to a qpid broker for some info. then a message is sent back, and received in a listener in my app (i'm not sure code is relevant but i'll post it anyway) namespace MyApp { public class MyListener : IMessageListener { public void MessageTransfer(IMessage m) { //do stuff with m } } } what i'm trying to do is populate a listbox that's in that form with the message received in that function, but i have no idea how to communicate with that specific form from the MessageTransfer function

    Read the article

  • Infor PM (Business Intelligence solution)

    - by Andrew
    We are currently implementing the commercial Infor PM (Performance Management) package as a business intelligence tool. Infor PM website It is apparently used by over 1,000 companies around the world, but I have found scant information about it on the net except for what's on their own website. It covers the whole range of data warehousing and BI functions with: an OLAP environment an ETL tool a report writer (called Application Studio) an add-on to Excel to connect to the data in the cubes through a pivot table etc Does anyone have any experience with using this package? How does it compare to the big players in BI (Cognos, Microsoft SSAS, Business Objects, etc). Any pitfalls I should know about? On the other hand, does it do anything better than its competitors?

    Read the article

  • Large Video Uploads via a website

    - by Andrew
    Some of the problems that can happen are timeouts, disconnections, and not being able to resume a file and having to start from the beginning. Assuming these files are up to around 5gigs in size, what is the best solution for dealing with this problem? I'm using a Drupal 6 install for the website. Some of my constraints due to the server setup I have to deal with: Shared hosting with max 200 connections at a time (unlimited disk space) Shared hosting. Unable to create users through an API (so can't automatically generate ftp accounts) I do have the ability to run cron-type scripts via a Drupal module. My initial thought was to create ftp users based off of Drupal accounts and requiring them to download an ftp client for their OS of choice. But the lack of API to auto-create ftp accounts and the inability to do it from command line kind of hinder that solution. If there's a workaround someone can think of, let me know! Thanks

    Read the article

  • Having trouble comparing a range of dates entered in a form with records in a mySQL database

    - by Andrew Fox
    I have a table called schedule and a column called Date where the column type is date. In that column I have a range of dates, which is currently from 2012-11-01 to 2012-11-30. I have a small form where the user can enter a range of dates (input names from and to) and I want to be able to compare the range of dates with the dates currently in the database. This is what I have: //////////////////////////////////////////////////////// //////First set the date range that we want to use////// //////////////////////////////////////////////////////// if(isset($_POST['from']) && ($_POST['from'] != NULL)) { $startDate = $_POST['from']; } else { //Default date is Today $startDate = date("Y-m-d"); } if(isset($_POST['to']) && ($_POST['to'] != NULL)) { $endDate = $_POST['to']; } else { //Default day is one month from today $endDate = date("Y-m-d", strtotime("+1 month")); } ////////////////////////////////////////////////////////////////////////////////////// //////Next calculate the total amount of days selected above to use as a limiter////// ////////////////////////////////////////////////////////////////////////////////////// $dayStart = strtotime($startDate); $dayEnd = strtotime($endDate); $total_days = abs($dayEnd - $dayStart) / 86400 +1; echo "Start Date: " . $startDate . "<br>End Date: " . $endDate . "<br>"; echo "Day Start: " . $dayStart . "<br>Day End: " . $dayEnd . "<br>"; echo "Total Days: " . $total_days . "<br>"; //////////////////////////////////////////////////////////////////////////////////// //////Then we're going to see if the dates selected are in the schedule table////// //////////////////////////////////////////////////////////////////////////////////// //Select all of the dates currently in the schedule table between the range selected. $sql = ("SELECT Date FROM schedule WHERE Date BETWEEN '$startDate' AND '$endDate' LIMIT $total_days"); //Run a check on the query to make sure it worked. If it failed then print the error. if(!$result_date_query = $mysqli->query($sql)) { die('There was an error getting the dates from the schedule table [' . $mysqli->error . ']'); } //Set the dates to an array for future use. // $current_dates = $result_date_query->fetch_assoc(); //Loop through the results while a result is being returned. while($row = $result_date_query->fetch_assoc()) { echo "Row: " . $row['Date'] . "<br>"; echo "Start day: " . date('Y-m-d', $dayStart) . "<br>"; //Set this loop to add 1 day to the Start Date until it reaches the End Date for($i = $dayStart; $i <= $dayEnd; $i = strtotime('+1 day', $i)) { $date = date('Y-m-d',$i); echo "Loop Start day: " . date('Y-m-d', $dayStart) . "<br>"; //Run a check to see if any of the dates selected are in the schedule table. if($row['Date'] != $date) { echo "Current Date: " . $row['Date'] . "<br>"; echo "Date: " . $date . "<br>"; echo "It appears as though you've selected some dates that are not in the schedule database.<br>Please correct the issue and try again."; return; } } } //Free the result so something else can use it. $result_date_query->free(); As you can see I've added in some echo statements so I can see what is being produced. From what I can see it looks like my $row['Date'] is not incrementing and staying at the same date. I originally had it set to a variable (currently commented out) but I thought that could be causing problems. I have created the table with dates ranging from 2012-11-01 to 2012-11-15 for testing and entered all of this php code onto phpfiddle.org but I can't get the username provided to connect. Here is the link: PHP Fiddle I'll be reading through the documentation to try and figure out the user connection problem in the meantime, I would really appreciate any direction or advice you can give me.

    Read the article

  • Which library should I use for server-side image manipulation on Node.JS?

    - by Andrew
    I found a quite large list of available libraries on Node.JS wiki but I'm not sure which of those are more mature and provide better performance. Basically I want to do the following: load some images to a server from external sources put them onto one big canvas crop and mask them a bit apply a filter or two Resize the final image and give a link to it Big plus if the node package works on both Linux and Windows.

    Read the article

  • iPhone application build fails with "dyld: Library not loaded: /System/[...]" error? Why?

    - by Andrew J. Brehm
    For my own reasons and not for the app store I am referencing the Apple private framework Apple80211 in an iPhone app. I got the framework from an earlier version of the iPhone SDK. I added the "existing framework", verified that that absolute path to the framework is /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.0.sdk/System/Library/PrivateFrameworks/Apple80211.framework and tried to build the app. But the build (to device) fails with the error dyld: Library not loaded: /System/Library/PrivateFrameworks/Apple80211.framework/Apple80211 Referenced from: /var/mobile/Applications/3691587D-87AF-44EA-A505-F73D17F39B3B/iWire2.app/iWire2 Reason: image not found I cannot figure out why Xcode would look for the library in a /System path (instead of using the path given in the frameworks list) or how to change that behaviour. I tried the tricks I found here and elsewhere for similar (and identical) sitiations: Delete the myusername.* files in the xcodeproj bundle Delete the build directory Clean all targets Start new project Result is always the same. How can I add this (or a) framework to an iPhone project AND get Xcode to at least look at the library located where I point to rather than a location in /System?

    Read the article

  • How to catch a moment when the external editor of TOLEContainer has been closed?

    - by Andrew
    Borland Developer Studio 2006, Delphi: I have a TOLEContainer object with AllowInPlace=False. When the external editor is closed and changed my OLE object I have to do something with this OLE object inside TOLeContainer. The problem is I can't catch a moment when the external editor is closed. OnDeactivate event is not working. Probably I should change the source code of TOLEContainer adding this event myself, but I don't know where is the best place for it. Can you advice some method?

    Read the article

  • JavaScript and error "end tag for element which is not open"

    - by Andrew Spilak
    I have problem with validation such code function show_help_tip(event, element) { var $e = $(element); var pos = $e.offset(); $('.body-balloon',$help_tip_div).html($(' <p>&nbsp;</p> ').html(element.getAttribute('title'))); $help_tip_div.css({position:'absolute',top:530,left:pos.left+$e.width()-20}).show(); } end tag for element "P" which is not open What's wrong?

    Read the article

  • asp.net mvc. Inserting string data from model into javascript. best-practice

    - by Andrew Florko
    Hello everybody, I have to populate javascript code in html layout (hidden fields, method params) with string data from model. Html.Encode is not appropriate for my task because it encodes ' symbol, bypass : (that ruines object attributes declaration) and so on. I wrote static helper class that is used from View like this: alert('<%=ViewHelper.MakeJavaScriptSafe(Model.Message)%>'); I hope there is asp.net in-built function I don't know about for this task. Does it exist really? Thank you in advance.

    Read the article

  • [PHP, CSS, & ?] fixed width div, resizing text on the fly based on length

    - by Andrew Heath
    Let's say you've got a simple fixed-width layout that pulls a title from a MySQL database. CSS: #wrapper { width: 800px; } h1 { width: 100%; } HTML: <html> <body> <div id="wrapper"> <h1> $titleString </h1> </div> </body> </html> But the catch is, the length of the title string pulled from your MySQL database varies wildly. Sometimes it might be 10 characters, sometimes it might be 80. It's possible to establish a min & max character count. How, if at all possible, do I get the text-size of my <h1>$titleString</h1> to enlarge/decrease on-the-fly such that the string is only ever on one line and best fit to that line length? I've seen a lot of questions about resizing the div - but in my case the div must always be 100% (800px) and I want to best-fit the title. Obviously a maximum text-size value would have to be set so 5 character strings don't become gargantuan. Does anyone have a suggestion? I'm only using PHP/MySQL/CSS on this page at the moment, but incorporation of another language is fine if it means I can solve the problem. The only thing I can think of is a bruteforce approach whereby through trial and error I establish acceptable string character count ranges matched with CSS em sizes, but that'd be a pretty ugly implementation from the code side.

    Read the article

  • Use a cat + grep as an included source in bash

    - by Andrew
    I'm on a shared webhost where I don't have permission to edit the global bash configuration file at /ect/bashrc. Unfortunately there is one line in the global file, mesg y, which puts the terminal in tty mode and makes scp and similar commands unavailable. My local ~./bashrc includes the global file as a source, like so: # Source global definitions if [ -f /etc/bashrc ]; then . /etc/bashrc fi My current workaround uses cat and grep to output the global file, sans offending line, into a local file and use that as a source. # Source global definitions if [ -f /etc/bashrc ]; then cat /etc/bashrc | grep -v mesg > ~/.bash_global . ~/.bash_global fi Is there a way to do include a grokked file like this without the intermediate step of creating an actual file? Something like this? . cat /etc/bashrc | grep -v mesg > ~/.bash_global

    Read the article

  • How do i map this in NHibernate

    - by Andrew Smith
    I Have two classes, Survey and Poll classes. Also I have Question and Question Choice classes. How do I map these so I come out with particular table formats. here is the classes involved. public class Survey { public IList<Question> Questions { get; private set; } } public class Poll { public Question Question { get; set; } } public class Question { public string Text { get; set; } public IList<QuestionChocie> Choices { get; private set; } } public class QuestionChoice { public string Text { get; set; } } The resulting tables that I'm shooting for include the following Surveys- a table of survey information. Polls - a table of polls information. SurveyQuestions -a table of survey questions. PollQuestions - a table of poll questions. SurveyChoices - a table of the question choices for the surveys. PollChoices - a table of the question choices for the survey. preferably i really want to know for fluent nhibernate, or just mapping xml is fine too.

    Read the article

  • Reporting system for organization. Architecture advise required

    - by Andrew Florko
    We have several legacy & 3'd-party systems in organization that use several RDBMS vendors (& more specific data storages). Cross-system data reporting (as well as extra-reports that are not implemented in 3'd-party systems) is required with charts and population of templates (winword, excel). Reporting system is visioned as intranet web-site with custom user access to reports. We expect ~50 reports per day. Would you suggest to use BizTalk or any other integration software if commercial-department doesn't plan to buy anything expensive. Would you suggest to create centralized data storage for reporting that is populated regularly or rely on on-demand services that providers always up-to-request data. Thank you in advance!

    Read the article

  • What is the most efficient way to delete all selected items in a ListViewItem collection

    - by Andrew
    My user is able to select multiple items in a ListView collection that is configured to show details (that is, a list of rows). What I want to do is add a Delete button that will delete all of the selected items from the ListViewItem collection associated with the ListView. The collection of selected items is available in ListView.SelectedItems, but ListView.Items doesn't appear to have a single method that lets me delete the entire range. I have to iterate through the range and delete them one by one, which will potentially modify a collection I'm iterating over. Any hints? Edit: What I'm basically after is the opposite of AddRange().

    Read the article

  • pyschool is wrong ?

    - by geekkid
    I'm currently learning python and trying to do exercises at pyschools (if anyone knows what it is). Anyway, i have an exercise that asks me to do the following : Write a function percent(value, total) that takes in two numbers as arguments, and returns the percentage value as an integer. Here's my code: def percent(value, total): percent = value / total * 100 return int(percent) It works great in my Python Idle and it gives all the correct answers. however, when i run it in the pyschools website, it says that , for example , when the function is called with parameters 46 and 90 , the function returns 0. However, in my python idle , it correctly returns 51. What might be the problem ? Thank you very much for your help!

    Read the article

  • what is the best method of concatenating a series of binary files into one file?

    - by Andrew
    hello everyone i have a series of PDF byte arrays in a arraylist files that i wish to concatenate into one file, currently when the PDF application trys to open the file is it corrupted: foreach (byte[] array in files) { using (Stream s = new MemoryStream(downloadbytes)) { s.Write(array, 0, array.Length); } } downloadbytes is the resultant concatenated array of bytes below is another implementation which also failed foreach (byte[] array in files) { System.Buffer.BlockCopy(array, 0, downloadbytes, offset, array.Length); offset += array.Length; } any pointers?

    Read the article

  • Circular NSSlider with stop (non-continuous)

    - by Andrew
    I am not sure how to phrase this better as a title but I need to make an NSSlider that functions as a normal volume knob. At the moment it will spin around as many times as I hold the mouse down and move it around the control. I need it to stop at the "0" position and the "100" position, I cannot have it jumping from 0 to 100 when I drag it the other way. I hope I am making this clear. Does anyone know how to do this or have any suggestions?

    Read the article

  • Formating phone numbers

    - by Sven
    Our customers often fill out "incorrect" formated phone-numbers. Do anyone know if there is any lib or standard to convert numbers into a more international style? This is a Swedish example but we have customers around the globe and i don't what to manually handle implementations for everyone. input often is like this: 0555 11122 and the wanted result is something like this: +46(0)555-11122 I can do the formating myself but different countries have different variations and systems so a C/Java/C# lib or a standard method to handle this would be great.

    Read the article

  • Shortest command to calculate the sum of a column of output on Unix?

    - by Andrew
    I'm sure there is a quick and easy way to calculate the sum of a column of values on Unix systems (using something like awk or xargs perhaps), but writing a shell script to parse the rows line by line is the only thing that comes to mind at the moment. For example, what's the simplest way to modify the command below to compute and display the total for the SEGSZ column (70300)? ipcs -mb | head -6 IPC status from /dev/kmem as of Mon Nov 17 08:58:17 2008 T ID KEY MODE OWNER GROUP SEGSZ Shared Memory: m 0 0x411c322e --rw-rw-rw- root root 348 m 1 0x4e0c0002 --rw-rw-rw- root root 61760 m 2 0x412013f5 --rw-rw-rw- root root 8192

    Read the article

  • Using NSArray for C-type int comparisons

    - by Andrew Barinov
    I would like to iterate through an NSArray of ints and compare each one to a specific int. All ints are C type ints. The code I am using is as follows: -(int)ladderCalc: (NSArray*)amounts: (int)amount { int result; for (NSUInteger i=0; i< [amounts count]; i++) { if (amount < [amounts objectAtIndex:i]); { // do something } // do something } } However I get an error when comparing the int amount to the result of [amounts objectAtIndex:i] because you cannot compare id to int. Why is the id involved in this case? Shouldn't objectAtIndex just return the object at the index specified? Is it possible to cast the object returned to an C int and then do the comparison? Or should I just dispense with NSArray and do this type of thing in C?

    Read the article

< Previous Page | 70 71 72 73 74 75 76 77 78 79 80 81  | Next Page >