Search Results

Search found 3312 results on 133 pages for 'david michel'.

Page 13/133 | < Previous Page | 9 10 11 12 13 14 15 16 17 18 19 20  | Next Page >

  • is this a design pattern?

    - by Michel
    Hi all, i have to build some financial data report, and for making the calculation, there are a lot of 'if then' situations: if it's a large client, subtract 10%, if it's postal code equals '10101', add 10%, if the day is on a saturday, make a difficult calculation etc. so i once read about this kind of example, and what they did was (hope i remember well) create a class with some base info and make it possible to add all kinds of calculationobjects to it. So to put what i remembered in pseudo code Basecalc bc = new baseCalc(); //put the info in the bc so other objects can do their if bc.Add(new Largecustomercalc()); bc.Add(new PostalcodeCalc()); bc.add(new WeekdayCalc()); the the bc would run the Calc() methods of all of the added Calc objects. As i type this i think all the Calc objects must be able to see the Basecalc properties to correctly perform their calculation logic. So all the if's are in the different Calc objects and not ALL in the Basecalc. does this make sense? I was wondering if this is some kind of design pattern?

    Read the article

  • Finding Line Beginning using Regular expression in Notepad++

    - by Michel Merlin
    Finding Line Beginning using Regular expression in Notepad++ (Sorry for this newbie question) I want to strip a 4000-line HTML file from all the jQuery "done" stuff, e.g.: <DIV class=menu done27="1" done26="0" done9="1" done8="0" done7="1" done6="0" done4="20"> should be replaced with: <DIV class=menu> In http://www.zytrax.com/tech/web/regex.htm#experiment I can do it with RE: [ ^]done[0-9]+="[0-9]+" but in Notepad++ 5.6.8 UNICODE Search Find, Search mode = Regular expression, putting this RE in the "Find what" field won't work (it will only find the 5 occurrences starting with a space, it will miss the 2 occurrences starting at the beginning of a line; IOW, the caret for line beginning, or the alternating it with a space, fails). How do I? TIA, Versailles, Wed 21 Apr 2010 10:18:20 +0200

    Read the article

  • Finding Line Beginning using Regular expression in Notepad++

    - by Michel Merlin
    Finding Line Beginning using Regular expression in Notepad++ (Sorry if this is a newbie question) I want to strip a 4000-line HTML file from all the jQuery "done" stuff, e.g.: <DIV class=menu done27="1" done26="0" done9="1" done8="0" done7="1" done6="0" done4="20"> should be replaced with: <DIV class=menu> In http://www.zytrax.com/tech/web/regex.htm#experiment I can do it with RE: [ ^]done[0-9]+="[0-9]+" but in Notepad++ 5.6.8 UNICODE, in a .HTM file encoded in ANSI, Search Find, Search mode = Regular expression, putting this RE in the "Find what" field won't work (it will only find the 5 occurrences starting with a space, it will miss the 2 occurrences starting at the beginning of a line; IOW, the caret for line beginning, or the alternating it with a space, fails). How do I? TIA, Versailles, Wed 21 Apr 2010 10:42:20 +0200

    Read the article

  • From me friends, know who is already using the app

    - by Toni Michel Caubet
    I got working to get all friends from 'me' user, like this: FB.api('/me/friends?fields=id,name,updated_time&date_format=U&<?=$access_token?>', {limit:3, function(response){ console.log('Friend name: '+response.data[0].name); } ); But i need to get if the user is in the app already or not, how can I alter the query to get an extra row in the object 'is_in_app' true/false? FB.api('/me/friends?fields=id,name,updated_time&date_format=U&<?=$access_token?>', {limit:3, function(response){ var text = 'is not in app'; if(response.data[0].is_in_app == true) text = 'is in app!!'; console.log('Friend name: '+response.data[0].name + ' ' + text); } ); How can i achieve this?

    Read the article

  • newbee silverlight: how do i load a new Page?

    - by Michel
    Hi, i have multiple Pages (classes which derive from the Page object) in my silverlight app. I can load one in the app.xml with this statement: this.RootVisual = new ZoomData (); But what should i do when i have this page loaded, and i want to navigate to another page?

    Read the article

  • HTML: When i hide a textbox in a Table, is it expected that the table reformats the space?

    - by Michel
    Hi, i have a input type=text in a table (in a TD actually) When a user clicks a checkbox, the input is hidden with Jquery (via the hide method) This makes the style of the input to "display:none;" So far so good. Now, when that has happened, the row where the cell is in is shrunk (the height is lowered) because the only thing left in the row is a <span>, which height is lower than the input height. The net result of this is that the row gets smaller, and when you click the checkbox again the input re-appers and the row gets larger. That doesn't look so nice, so i wondered if there was a way to prevent this? And second: is this the way it should work (the table resizing)?

    Read the article

  • posting data to a site in C#

    - by Michel
    i'm flabbergasted, i've looked at almost every example, but it just doesn't work (the other party says they don't receive my data in the request parameter) I want to do this in code (send some xml data (without the xml declaration) to a uri): <form method="post" action="http://http://100.100.100.100:11111/getinfo"> <input type="text" value="<ps:Balance>100</ps:Balance>" name="request" id="request"> <br><br> <input type="submit" value="go"> </form>

    Read the article

  • $query returns results but not the ones i want: $query looks good to me :S

    - by Toni Michel Caubet
    I'll start again, Lets say My data is: Table element (id,name,....) 1, name element 1, .... 2, name element 2, .... 3, name element 3, .... Table tags (id,name,id_element, ....) 1, happy , 1 2, result, 1 3, very , 1 4, element, 2 5, another, 3 6, element, 1 7, happy, 2 So if search is 'very, happy,element,result': Results i would like 1) element with id = 2 because it has all tags 2) element with id = 1 because it has the tag 'element' and the tag 'happy' (only 2 less taggs) 3) .... (only 3 less taggs) So if search is 'happy,element': Results i would like 1) element with id = 1 because it has all tags (and no more) 2) element with id = 2 because it has the tag 'element' and the tag 'happy' (and two more tags) 3) .... and 3 more tags This is an echo to my query: (it doesn't fit al requirements i wrote, but its first test to find with matched tags) SELECT element.id as id_deseada,tagg.* FROM element,tagg WHERE tagg.id_element = element.id AND tagg.nombre IN ('happy','tagg','result') GROUP BY tagg.id_element ORDER BY element.votos This returns 10 duplicated elements... :S and doen't even have all taggs (and on database there are taggs with 'happy' results) if it helps, thats how i get the elements of a tag (by name and with only one tagg) $query = "SELECT element.id FROM element,tagg WHERE tagg.nombre = '$nombre_tagg' AND tagg.id_element = element.id AND lan = '$lan' GROUP BY tagg.id_element"; I hope it's a bit easier to understand now, excuse my english.. :) Thanks a lot for you possible aportation!

    Read the article

  • How does asp.net MVC remember my false values on postback?

    - by Michel
    Hi, This is working, but how??? I have a controller action for a post: [AcceptVerbs(HttpVerbs.Post )] public ActionResult Edit(Person person) { bool isvalid = ModelState.IsValid; etc. The Person object has a property BirthDate, type DateTime. When i enter some invalid data in the form, say 'blabla' which is obvious not a valid Datetime, it fills all the (other) Person properties with the correct data and the BirthDate property with a new blank DateTime. The bool isvalid has the value 'false'. So far so good. Then i do this: return View(p); and in the view i have this: <%= Html.TextBox("BirthDate", String.Format("{0:g}", Model.BirthDate)) %> <%= Html.ValidationMessage("BirthDate", "*") %> Ant there it comes: i EXPECTED the model to contain the new, blank DateTime because i didn't put any new data in. Second, when the View displays something, it must be a DateTime, because Model.BirthDate can't hold anything but a DateTime. But to my surprise, it shows a textbox with the 'blabla' value! (and the red * behind it) Which ofcourse is nice because the user can seee what he typed wrong, but how can that (blabla)string be transferred to the View in a DateTime field?

    Read the article

  • how to align 4 DIV's right of each other within another DIV

    - by Michel
    Hi, i want to position 4 divs next to each other, at a certain position within the parent div. So the div structure is this (i'll call the top most div the maindiv): <div> <div>1</div> <div>2</div> <div>3</div> <div>4</div> </div> now i want to set div with text '1' at the left in the maindiv now i want to set div with text '2' at 50 px from the left side in the maindiv now i want to set div with text '3' at 150 px from the left side in the maindiv now i want to set div with text '4' at 200 px from the left side in the maindiv I think :-) i have tried ALL possible css constructs, but it didn't work, sadly. Anyone an idea?

    Read the article

  • Problem with routes and mod-rewrite (if not absolute i don't get CSS, JS or images)

    - by Toni Michel Caubet
    hi there! i updated the code from my website to a 'better' veersion i think, it works fine but when i try to implement the friendly URL and load it, works, but with no CSS, Javascript or images, but if i corret the routes for the css to http://website/css/style.css (instead of ./css/style.css) it i do see the CSS properly loaded, any idea why? Example: http://keepyourlinks.com/link1.php?id=25 VS http://keepyourlinks.com/keep/25/series-yonkis (i updated the route of the CSS, but the Javascript is missing an the images asweell) I really would like not to have to correct al routes :(

    Read the article

  • how should i create my own 'now' / DateTime.Now ?

    - by Michel
    Hi all, i'm starting to build a part of a system which will hold a lot of DateTime validations, and a lot of 'if it was done before now' or 'if it will start in an hour etc'. Usual way to go is to use DateTime.Now to get the actual time. I predict however, that during unit test that will give me a real headache because i will have to setup my testdata for the time when the test will run in stead of use a default set of test data. So i thought: why not use my own 'now' so i can set the current datetime to any moment in time. As i don't want to set the testservers internal clock i was thinking about this solution, and i was wondering what you think of it. Base thought is that i use my own DateTime class. That class gives you the current datetime, but you can also set your own time from outside. public static class MyDateTime { private static TimeSpan _TimeDifference = TimeSpan.Zero; public static DateTime Now { get { return DateTime.Now + _TimeDifference; } } public static void SetNewNow(DateTime newNow) { _TimeDifference = newNow - DateTime.Now; } public static void AddToRealTime(TimeSpan timeSpan ) { _TimeDifference = timeSpan; } public static void SubtractFromRealTime(TimeSpan timeSpan) { _TimeDifference = - timeSpan; } }

    Read the article

  • easy way to get the top level domain?

    - by Michel
    Hi, i want to get the domain extention (at least i hope it is called this way) from the site name the user is currently on. so from www.bbc.co.uk it's co.uk and www.google.com = .com http://stackoverflow.com/questions/ask = .com etc. especially the ones with the double name (like co.uk) gives me headaches.... EDIT as i understand from the comments, co.uk is not a top level domain? that makes life easier! EDIT new name (top level domain) in the title

    Read the article

  • Why my autocomplete doesn't whant to be multiple ???

    - by Toni Michel Caubet
    please, give me a hand on this one; i'm trying to use autocomplete so user can enter tags by comma separated, example: 'autocomplete, jquery , next , last' ok, i had the autocomplete working by sending him an $array with all the tags of my website with the previous format aswell, this is my code: <? $a = new etiqueta(0, ''); $b = $a->autocomplete_etiquetas(); mostrar_notificacion('autocomplete_etiquetas_cargado?'); ?> <script type="text/javascript"> function cargar_autocomplete_etiquetas(){ $("#tags").autocomplete({ source: [<? echo $b; ?>] }); } </script> All i want it's user to select a tag, apply the ', ' and the autocomplete to be ready for next tag i'm trying with (i know they are diff id's, also diff inputs): <? $b = new ingrediente(0, ''); $c = $b->autocomplete_ingredientes(); ?> <script type="text/javascript"> function cargar_autocomplete_ingredientes(){ $("#ingredientes").autocomplete({ source: [<? echo $c; ?>], multiple: true, multipleSeparator: ", " }); } </script> But with out success.... 10€ via paypal if answered before 23h (its 21:50 now), it's not much, it's an incentive :P

    Read the article

  • flowplayer plays the video but won't provide controls

    - by Toni Michel Caubet
    i am trying to use flowplayer to play .swf files this is how i am trying: $(function(){ flowplayer("player", "http://d2p65vgzoeytng.cloudfront.net/comun/0720/video/sol_gavilanes.swf "); }); where <a id="player" href="http://pseudo01.hddn.com/vod/demo.flowplayervod/flowplayer-700.flv" style="display:block;width:425px;height:300px;"></a> Firebug won't log any errors; video is playing but without the player Please check here http://jsfiddle.net/HAVtS/5/ what am i missing?

    Read the article

  • Generating ul from array with php fails

    - by Toni Michel Caubet
    Given a $files array I am trying to generate a list, like this: <ul class=""> <? for($i=0;$i < count($files); $i++) { $text = str_replace("http://domain.com/files/uploads/", "", $files[$i]); $file = $files[$i]; $notme = sesion()>0 && $obj['id'] != sesion(); ?> <li> <a target="_blank" href="<?=$file?>"><?=$text?></a> <? if($notme){ ?> <span class="add_to_files" data-file="<?=$file?>">Agregar al gestor</span> <? } ?> </li> <? } ?> </ul> This is the output: Please note how the span html is wrong, <ul class=""> <li> <a href="http://domain.com/files/uploads/388400967232883.jpg" target="_blank">388400967232883.jpg</a> <span target="_blank" href="http://domain.com/files/uploads/388400967232883.jpg" url"="" data-file="&lt;a class=" class="add_to_files">http://domain.com/files/uploads/388400967232883.jpg"&gt;Agregar al gestor</span> </li> </ul> Any idea why?

    Read the article

  • malloc:mmap(size=XX) failed (error code=12)

    - by Michel
    I have a memory problem in an iPhone app, giving me a hard time. Here is the error message I get: malloc: * mmap(size=9281536) failed (error code=12) * error: can't allocate region I am using ARC for this app, in case that might be useful information. The code (below) is just using a file in the Bundle in order to load a core data entity. The strange thing is the crash happens only after more than 90 loops; while it seems to mee that since the size of the "contents" in getting smaller and smaller, the memory request should also get smaller and smaller. Here is the code, if any one can see a flaw please let me know. NSString *path,*contents,*lineBuffer; path=[[NSBundle mainBundle] pathForResource:@"myFileName" ofType:@"txt"]; contents=[NSString stringWithContentsOfFile:path encoding:NSUTF8StringEncoding error:nil]; int counter=0; while (counter<10000) { lineBuffer=[contents substringToIndex:[contents rangeOfCharacterFromSet:[NSCharacterSet newlineCharacterSet]].location]; contents=[contents substringFromIndex:[lineBuffer length]+1]; newItem=[NSEntityDescription insertNewObjectForEntityForName:@"myEntityName" inManagedObjectContext:context]; [newItem setValue:lineBuffer forKey:@"name"]; request=[[NSFetchRequest alloc] init]; [request setEntity: [NSEntityDescription entityForName:@"myEntityName" inManagedObjectContext:context]]; error=nil; [context save:&error]; counter++; }

    Read the article

  • How to retrieve the real height of a #div (including overflowed parts)

    - by Toni Michel Caubet
    The same way i use this to detect when user scolled down the whole page: $(window).scroll(function(){ var diff = $(window).scrollTop() + $(window).height() - $(document).height(); if ($(window).scrollTop() == $(document).height() - $(window).height() || (diff < 5 && diff > -5)){ console.log('yay!'); } }); I wanted to do the same inside a dialog, I am trying like this: $('#dialog').dialog(); $('#dialog').scroll(function(){ var scroll = $('#dialog').scrollTop(); var height = $('#dialog ul').outerHeight(true); if(scroll == height){ $('#dialog').css('background','#999'); }else{ console.log('scrolltop is '+scroll+' and height is: '+height); } }) DEMO: http://jsfiddle.net/AgFXz/ The problem i guess is that i am not retrieving the whole #dialog size but the visible (CSS Defined property) size.. How can i know when user scrolled till the end of the dialog's scroll? Thanks!!

    Read the article

  • communication foundation showing plain text / code behind

    - by Michel
    Hi, i have a wcf service which runs perfectly on my dev machine (vs2010, target 3.5) but once deployed, it shows me the code behind of the service (actually the plain text of the .svc file) and not the normal service page: <%@ ServiceHost Language="C#" Debug="true" Service="SilverlightPoc.Web.FinanceData" CodeBehind="FinanceData.svc.cs" %> Anyone any idea why the .svc file is rendered as plain text and not as wcf service?

    Read the article

  • Issues with Sinatra and Heroku

    - by Brian Michel
    So I've created and published a Sinatra app to Heroku without any issues. I've even tested it locally with rackup to make sure it functions fine. There are a series of API calls to various places after a zip code is consumed from the URL, but Heroku just wants to tell me there is an server error. I've added an error page that tries to give me more description, however, it tells me it can't perform a `count' for #, which I assume means hash. Here's the code that I thin it's trying to execute... if weather_doc.root.elements["weather"].children.count > 1 curr_temp = weather_doc.root.elements["weather/current_conditions/temp_f"].attributes["data"] else raise error(404, "Not A Valid Zip Code!") end If anyone wants to bang on it, it can be reached at, http://quiet-journey-14.heroku.com/ , but there's not much to be had.

    Read the article

  • How can i reuse a color in a stylesheet?

    - by Michel
    Hi, i have a stylesheet and a lot of styles with the same border color (#CCCCCC to be precise). Is there a way to specify some kind of variable and reuse that, so in stead of typing #CCCCCC over and over, i can type border: 1px solid $bordercolor; ps i'm using asp.net mvc

    Read the article

< Previous Page | 9 10 11 12 13 14 15 16 17 18 19 20  | Next Page >