Search Results

Search found 2579 results on 104 pages for 'mike krejci'.

Page 85/104 | < Previous Page | 81 82 83 84 85 86 87 88 89 90 91 92  | Next Page >

  • WPF Application with Database.

    - by mike
    Hi, i would like to or need to use a database for my wpf project. It has to store "person" "team" "goals" and maybe 2 more things, nothing very big. Ive already used (worked) with databases in java / php (postgresql), but is there maybe an "easier" way to store the things.. i mean if the db is going to be big than i could use (postgre or mysql), but this one would be small.

    Read the article

  • Adding object to child collection causes entire collection to load in Fluent NHibernate.

    - by Mike C.
    Hello, I have my Parent object, which contains an ICollection of Children objects. The Children are lazy loaded and I do not need them in the context of my scenario. However, when I try to add a new child object to my Children collection, it kicks off the lazy load and loads all 7000 child records. I assume I am making a newbie mistake. Anybody out there know how I can fix this? Thanks!

    Read the article

  • memcached: which is faster, doing an add (and checking result), or doing a get (and set when returni

    - by Mike Sherov
    The title of this question isn't so clear, but the code and question is straightforward. Let's say I want to show my users an ad once per day. To accomplish this, every time they visit a page on my site, I check to see if a certain memcache key has any data stored on it. If so, don't show an ad. If not, store the value '1' in that key with an expiration of 86400. I can do this 2 ways: //version a $key='OPD_'.date('Ymd').'_'.$type.'_'.$user; if($memcache->get($key)===false){ $memcache->set($key,'1',false,$expire); //show ad } //version b $key='OPD_'.date('Ymd').'_'.$type.'_'.$user; if($memcache->add($key,'1',false,$expire)){ //show ad } Now, it might seem obvious that b is better, it always makes 1 memcache call. However, what is the overhead of "add" vs. "get"? These aren't the real comparisons... and I just made up these numbers, but let's say 1 add ~= 1 set ~= 5 get in terms of effort, and the average user views 5 pages a day: a: (5 get * 1 effort) + (1 set * 5 effort) = 10 units of effort b: (5 add * 5 effort) = 25 units of effort Would it make sense to always do the add call? Is this an unnecessary micro-optimization?

    Read the article

  • Will MySQL full-text-search return the results I need?

    - by mike
    I have a keyword field with a list of 5 keywords for each item. example below: 2008, Honda, Accord, Used, Car Will MySQL full text return the item above for the following search requests? 2008 Honda Accord Honda Accord Used Car If so, how well will this hold up when searching through fifty thousand plus records?

    Read the article

  • Perl, "closure" using Hash

    - by Mike
    I would like to have a subroutine as a member of a hash which is able to have access to other hash members. For example sub setup { %a = ( txt => "hello world", print_hello => sub { print ${txt}; }) return %a } my %obj = setup(); $obj{print_hello}; Ideally this would output "hello world"

    Read the article

  • Perl, `push` to array reference

    - by Mike
    Is it possible to push to an array reference in Perl? Googling has suggested I deference the array first, but this doesn't really work. It pushes to the deferenced array, not the referenced array. For example, my @a = (); my $a_ref = [@a]; push(@$a_ref,"hello"); print $a[0]; @a will not be updated and this code will fail because the array is still empty (I'm still learning Perl references, so this might be an incredibly simple question. Sorry if so)

    Read the article

  • break up recursive function in php

    - by Mike
    What is the best way to break up a recursive function that is using a ton of resources For example: function do_a_lot(){ //a lot of code and processing is done here //it takes a lot of execution time if($true){ //if true we have to do all of that processing again do_a_lot(); } } Is there anyway to make the server only have to take the brunt of the first execution and then break up the recursion into separate processes? Or am I dreaming?

    Read the article

  • C# Int and math not returning full value.

    - by Mike
    Int64 c1 = Convert.ToInt64(csvdeep[1]); Int64 division = 1024; string results = Math.Abs(c1 / division / division / division).ToString(); My c1 is 10201841664 and results is "9". I'd perfer to get the 2nd two decimal places so my real result would be 9.50. Any tips on how I could get the 2 decimal places?

    Read the article

  • VS 2010 SQL Update for SQL Statement

    - by Mike Tucker
    Please bear with me as I'm just beginning to learn this stuff. I have a VS 2010 Web project up and I'm trying to understand how I can make a custom UpdateCommand (Because I chose to write my own SQL statement, I do not have the option for VS 2010 to auto generate an update command for me.) Problem is: I don't know what the UpdateCommand should look like. Here is my Select: SELECT * FROM Dbo.MainAsset, dbo.Model, dbo.Hardware WHERE MainAsset.device = Hardware.DeviceID AND MainAsset.model = Model.DeviceID Which, VS 2010 turns into: SELECT MainAsset.pk, MainAsset.img, MainAsset.device, MainAsset.model, MainAsset.os, MainAsset.asset, MainAsset.serial, MainAsset.inyear, MainAsset.expyear, MainAsset.site, MainAsset.room, MainAsset.teacher, MainAsset.FirstName, MainAsset.LastName, MainAsset.Notes, MainAsset.Dept, MainAsset.AccountingCode, Model.Model AS Hardware, Model.pk AS Model, Model.DeviceID, Hardware.Computer, Hardware.pk AS Expr3, Hardware.DeviceID AS Expr4 FROM MainAsset INNER JOIN Hardware ON MainAsset.device = Hardware.DeviceID INNER JOIN Model ON MainAsset.model = Model.DeviceID How would I approach updating one column, say "MainAsset.site" if that's changed in the Gridview DDL? Any help constructive help would be appreciated. Thank you.

    Read the article

  • GWT Editor: How to set last modified time on the entity when saved?

    - by Mike
    Suppose at client side i have an Entity proxy to edit by the UI and when i click save button, the last modified time is save in the entity as a field. //start MyEntityProxy proxy = getProxy();//fetched from server Request<Void> saveRequest = requestFact.myEntityProxyRequest().save(proxy); editorDriver.edit(proxy, saveRequest.getRequestContext()); editorDriver.flush(); //user modifies UI .... //save editorDriver.flush(); saveRequest.fire(); The problem is, where to insert the proxy.setLastModifiedTime(data) call? I always got java.lang.IllegalStateException: The AutoBean has been frozen. Thanks.

    Read the article

  • Why are button sizes on Eclipse vs Device not the same.

    - by Mike Droid
    O.k....this is weird. I had my buttons looking fine last week, now something has changed. My buttons on the eclipse emulator are much larger than on my device (Droid 2.1). I checked my skin settings, screen size permissions, density factors....what am I missing? My skin is set to WVGA854, but when the app goes to the phone the buttons are smaller!? Text and pictures are fine...looking the same as the emulator...just the buttons are shrunk! Hmm....I know it has to be something simple...:)

    Read the article

  • Is there a [Go to file...] in Xcode?

    - by Mike
    In every modern day IDE and text editor, there is an action to open a file without putting your hand on the mouse. For example: Eclipse: Cmd|Ctrl+Shift+R - Open Resource IntellIJ: Cmd|Ctrl+Shift+N - Open File TextMate: Cmd+T - Go to File In Xcode, I have found no such options. Please, please tell me I just overlooked it in my growing frustration. Is there a "Go to file" or "Open File" shortcut in Xcode?

    Read the article

  • How do I create substrings from an array using PHP?

    - by mike
    I have an array of data that looks like this: 2008, Honda, Accord, Used, Car And I'm trying to figure a way to make a number of sub strings from each item in the array. For example, I would like to loop each item and create the following substrings: 2008 2008 Honda 2008 Accord 2008 Used 2008 Car 2008 Honda Accord 2008 Honda Used 2008 Honda Car 2008 Accord Honda 2008 Accord Used 2008 Accord Car 2008 Used Honda 2008 Used Accord 2008 Used Car 2008 Car Honda 2008 Car Accord 2008 Car Used Honda Honda 2008 Honda Accord Honda Used Honda Car Honda 2008 Accord Honda 2008 Used etc ... I need to make sure that there are no duplicates created and I need to prevent it from adding the same word twice (ex: Honda Honda OR 2008 Honda 2008 - i dont want that). Has anyone wrote anything like this or know where I can find a script that works the same way?

    Read the article

  • How to "grep" out specific line ranges of a file

    - by Mike
    There are often times I'll grep -l whatev file to find what I'm looking for. Say the output is 1234: whatev 1 5555: whatev 2 6643: whatev 3 If I want to then just extract the lines between 1234 and 5555, is there a tool to do that? For static files I have a script that does wc -l of the file and then does the math to split it out with tail & head but that doesn't work out so well with log files that are constantly being written to.

    Read the article

  • Fickle IE Issues with Height:100%'

    - by Mike R
    I am trying to set the height to 100% in the viewport for Internet Explorer. As you might imagine, the following code works everywhere else: * { margin: 0; padding: 0; } html, body { height: 100%; } body { font-family: Times New Roman, Times, serif; font-size: 13px; background-color:#E8E8E8; background:url(/images/background.png) repeat-x; } #wrap { margin:0 auto; width: 935px; /* Change to desired width :) */ min-height: 100%; background:url(/images/content.png)repeat-y; } #main { overflow: auto; padding-bottom: 112px; } /* must be same height as the footer */

    Read the article

  • Syncing objects between two devices with different system times

    - by Mike Weller
    Hi there. I'm syncing objects between two devices. Objects have a lastModified property. If both devices have modified an object, then during the next sync the version of the object with the most recent lastModified is chosen on both devices. So we don't do fine-grained merging, only 'most recent version' merging. The problem is this. When one device receives a list of changed objects it can't reliably compare the lastModified of received objects to its own because the system times on the two devices may be different. I considered having each device send its current date/time during the sync. Then each calculates the difference between the remote time and the local time to compare the dates properly. But if there is lag between sending a date and the remote device receiving it, this causes incorrect comparisons with objects that were modified at the same time (or very close together in time). i.e. both devices think the remote object is newer and they end up with different objects. I hope I have explained this clearly enough. There must be a common solution to this kind of problem but my brain isn't coming up with anything. Any suggestions? Thanks in advance...

    Read the article

  • AFTER INVOKE_APPLICATION(5) is being skipped in my h:datatable

    - by Mike
    hi! i have this code: <h:form> <rich:dataTable value="#{my.lreqs}" var="req" id="reqs" width="630px" > <rich:column label="Value" styleClass="schColL" width="90px" style="text-align:center"> <f:facet name="header"> <h:outputText value="#{my.colValue}" /> </f:facet> <h:inputText value="#{req.value}" > </h:inputText> </rich:column> </rich:dataTable> <h:commandButton value="Save" action="#{my.saveChanges}" ></h:commandButton> </h:form> and this is my bean: private List<Detail> lreqs; public List<Detail> getLreqs() { return lreqs; } public void setLreqs(List<Detail> lreqs) { this.lreqs = lreqs; } but when i click save - a new value in req.value field is not being saved! i added phaseTracker and realised that my AFTER INVOKE_APPLICATION(5). why is it?

    Read the article

  • Community based translating system

    - by mike
    Since we don't funds to hire translators for getting multiple languages translated we want the community to do the translation for us. Its a social network. I can't find any good open souce framework to auto do this. Thinking something like: User selects a language, system displays random sentences and user will translate it. Then other users can vote on how good it is. If it's 100 votes + with 95% yes then it becomes official. Site is in PHP. Any ideas?

    Read the article

  • Array/List/Directory of System.Type

    - by Mike
    I have a lot of classes and want to create some kind of 'directory'. So that I can create menus automatically. Clicking a menu-item would then create an instance of the class and shows the window. What I want for this is an array of System.Type where I can stuff in all the classes without instantiating them. Though from my test and (unsuccessful) googling, this doesn't seem possible. Any ideas?

    Read the article

  • Returning binomal as a tuple

    - by Mike
    I want to save the results of my function binomal_aux to a tuple but I don't have an idea how to, here is my code I have right now. def binomal (n): i=0 for i in range(n): binomal_aux(n,i) #want this to be in a tuple so, binomal (2) = (1,2,1) return def binomal_aux (n,k): if (k==0): return 1 elif (n==k): return 1 else: return (binomal_aux(n-1,k) + binomal_aux(n-1,k-1))

    Read the article

< Previous Page | 81 82 83 84 85 86 87 88 89 90 91 92  | Next Page >