Search Results

Search found 736 results on 30 pages for 'benjamin lee'.

Page 16/30 | < Previous Page | 12 13 14 15 16 17 18 19 20 21 22 23  | Next Page >

  • parse search string

    - by Benjamin Ortuzar
    I have search strings, similar to the one bellow: energy food "olympics 2010" Terrorism OR "government" OR cups NOT transport and I need to parse it with PHP5 to detect if the content belongs to any of the following clusters: AllWords array AnyWords array NotWords array These are the rules i have set: If it has OR before or after the word or quoted words if belongs to AnyWord. If it has a NOT before word or quoted words it belongs to NotWords If it has 0 or more more spaces before the word or quoted phrase it belongs to AllWords. So the end result should be something similar to: AllWords: (energy, food, "olympics 2010") AnyWords: (terrorism, "government", cups) NotWords: (Transport) What would be a good way to do this?

    Read the article

  • doubleton pattern in C++

    - by benjamin button
    I am aware of the singleton pattern in C++. but what is the logic to get two instances of the object? is there any such pattern where we could easily get 2 pattern. for the logic i could think of is that i can change the singleton pattern itself to have two objects created inside the class.this works. but if the requirement grows like if i need only 3 or only 4 what is the deswign pattern that i could think of to qualify such requirement?

    Read the article

  • Wordpress sidebar classes

    - by Chris J. Lee
    There any way i could add a class for the specific order of widget item? i.e. the class name would be widgetorder-1 (for the first appearing widget), widgetorder-2 (for the widget appearing in the 2nd order), etc. I looked into filters but wasn't sure how that worked.

    Read the article

  • Is there a best-practice approach for internationalization of an application?

    - by Lee Warner
    We need to have our apps be translated into other languages. This entails renaming the .text properties of our visible controls as well as other literals found within our apps to whatever language we need to translate into. Is this something that can easily be accomplished with .resx files? I was thinking of creating a master resx key/value list where the key would be the fully qualified name of the control/variable/constant etc. and then refactor our apps to look into this file to get their values based on the cultureinfo found at runtime? Is there a standard or simpler approach to this problem?

    Read the article

  • XAMPP is caching .html files running as PHP

    - by Lee
    I have XAMPP (latest version) installed on my Mac OS 10.6.3 I've added the following to .htaccess because I want .html to be interpreted as PHP. AddType application/x-httpd-php .php .html The problem is that the default XAMPP config seems to be caching .html files as static... so even though the PHP statements inside are being called (for example, 'echo time()' in index.html displays the dynamic output)... the actual file is being cached. When I make changes to a .html file, I've having to restart Apache for it to load the newest changes. Looking at httpd.conf, it looks like it's loading the following cache mods.. LoadModule file_cache_module modules/mod_file_cache.so LoadModule cache_module modules/mod_cache.so LoadModule disk_cache_module modules/mod_disk_cache.so LoadModule mem_cache_module modules/mod_mem_cache.so Any idea how to implement a system whereby it checks the timestamp of the file, before loading it from cache? Thanks!

    Read the article

  • Options for non-native form inputs for the web?

    - by Sam Lee
    I'm wondering if there are any good non-native form inputs for web development? I am currently using the built in <input> controls. They work just fine, but for my application they are too big (especially on OS X). I am wondering if there are any libraries that I can drop in as replacements. I am especially interested in ones that: Are a close to native control behavior as possible. Support for tabbing, highlighting current textbox, pressing up/down in <select>, etc. Have something that replicates <select> Look good and are compact I am aware that you can use CSS for some styling, but it's pretty minimal and looks different depending on the browser. Thanks for your help.

    Read the article

  • Silverlight MVVM ListBoxItem IsSelected

    - by Lee
    I have a collection of ViewModels bound to a ListBox. I am trying to bind the IsSelected properties of each together. In WPF it works by setting the style: <Style TargetType="{x:Type ListBoxItem}"> <Setter Property="IsSelected" Value="{Binding Path=IsSelected, Mode=TwoWay}" /> </Style> This does not work in Silverlight. How can I accomplish this?

    Read the article

  • Handler for change of value using SliderBar in GWT

    - by Lee
    I'm using the SliderBar from the GWT Incubator in one of my current projects. I want to add a handler which fires whenever the value of the slider changes, but I'm not sure which handler I need to add to get this to work, or whether I need to write one of my own. Thanks

    Read the article

  • Is there a boolean literal in SQLite?

    - by Benjamin Oakes
    I know about the boolean column type, but is there a boolean literal in SQLite? In other languages, this might be true or false. Obviously, I can use 0 and 1, but I tend to avoid so-called "magic numbers" where possible. From this list, it seems like it might exist in other SQL implementations, but not SQLite. (I'm using SQLite 3.6.10, for what it's worth.)

    Read the article

  • MYSQL Event to update another database table

    - by Lee
    Hey All, I have just taken over a project for a client and the database schema is in a total mess. I would like to rename a load of fields make it a relationship database. But doing this will be a painstaking process as they have an API running of it also. So the idea would be to create a new database and start re-writing the code to use this instead. But I need a way to keep these tables in sync during this process. Would you agree that I should use MYSQL EVENT's to keep updating the new table on Inserts / updates & deletes?? Or can you suggest a better way?? Hope you can advise !! thanks for any input I get

    Read the article

  • Getting A File's Mime Type In Java

    - by Lee Theobald
    I was just wondering how most people fetch a mime type from a file in Java? So far I've tried two utils: JMimeMagic & Mime-Util. The first gave me memory exceptions, the second doesn't close its streams off properly. I was just wondering if anyone else had a method/library that they used and worked correctly?

    Read the article

  • Crazy interview question

    - by benjamin button
    I was asked this crazy question. I was out of my wits. Can a method in base class which is declared as virtual be called using the base class pointer which is pointing to a derived class object? Is this possible?

    Read the article

  • Why does setting this member in C fail?

    - by Lee Crabtree
    I'm writing a Python wrapper for a C++ library, and I'm getting a really weird when trying to set a struct's field in C. If I have a struct like this: struct Thing { PyOBJECT_HEAD unsigned int val; }; And have two functions like this: static PyObject* Thing_GetBit(Thing* self, PyObject* args) { unsigned int mask; if(!PyArg_ParseTuple(args, "I", &mask) Py_RETURN_FALSE; if((self->val & mask) != 0) Py_RETURN_TRUE; Py_RETURN_FALSE; } static PyObject* Thing_SetBit(Thing* self, PyObject* args) { unsigned int mask; bool on; if(!PyArg_ParseTuple(args, "Ii", &mask, &on)) Py_RETURN_FALSE; if(on) thing->val |= mask; else thing->val &= ~mask; Py_RETURN_TRUE; } Python code that calls the first method works just fine, giving back the value of the struct member. Calls to the SetBit method give an error about an object at address foo accessing memory at address bar, which couldn't be "written". I've poked around the code, and it's like I can look at the value all I want, both from C and Python, but the instant I try to set it, it blows up in my face. Am I missing something fundamental here?

    Read the article

  • Appending Dataset in Core Data execution of Update through iTuneStore

    - by Yoon Lee
    So I have completed my code work. This is first time releasing the app through iTuneStore. Current state of reading Core Data (.sqlite) file is already prefetched (already has information like apple's 'Reciepie' program). Assuming I have successfully released through apple store, and decide to update my application to existing users. Say I have sqlite contents but it contains bit more information than previous SQLite file under same structure. Question 1. Every time update held to the existing user, does it removes previous ones and move new updated application? Question 2. if it is not, then HOW can I append the existing sql value?

    Read the article

  • jQuery animate on an image replacement

    - by Lee
    Hey All Hope you can advise I would like to add some simple fade in out of an image replacement which I have hooked into a select menu.ie, $("#vehicle").change(function(){ var selected = $(this).val(); $("#selectedVehicle").attr('src', '/assets/images/mini/'+selected+'.png'); }); <img id="selectedVehicle" src="/assets/v2/images/select-vehicle.png"> any suggestions how I can do it? Thanks in advanced

    Read the article

  • Rendering to a single Bitmap object from multiple threads

    - by Lee Treveil
    What im doing is rendering a number of bitmaps to a single bitmap. There could be hundreds of images and the bitmap being rendered to could be over 1000x1000 pixels. Im hoping to speed up this process by using multiple threads but since the Bitmap object is not thread-safe it cant be rendered to directly concurrently. What im thinking is to split the large bitmap into sections per cpu, render them separately then join them back together at the end. I haven't done this yet incase you guys/girls have any better suggestions. Any ideas? Thanks

    Read the article

  • Next track or shuffle in M3U playlist?

    - by Benjamin Oakes
    I have a M3U playlist that has URLs for some MP3s around the web. It's on a server so I can open it on other computers and my iPhone. Unfortunately, all the players I've tried don't let me hit the "next" button to go to the next song in the playlist. Is there a way to specify that ability in the M3U file? Or, if not that, can I make a media player automatically shuffle the playlist? I could always make a script to shuffle it myself, but I'd like to use something built into M3U if it exists.

    Read the article

  • Quick MySQLi security question

    - by Benjamin Falk
    I have a quick MySQLi security related question... For example, take a look at this code (gets in put from the user, checks it against the database to see if the username/password combination exist): $input['user'] = htmlentities($_POST['username'], ENT_QUOTES); $input['pass'] = htmlentities($_POST['password'], ENT_QUOTES); // query db if ($stmt = $mysqli->prepare("SELECT * FROM members WHERE username=? AND password = ?")) { $stmt->bind_param("ss", $input['user'], md5($input['pass'] . $config['salt'])); $stmt->execute(); $stmt->store_result(); // check if there is a match in the database for the user/password combination if ($stmt->num_rows > 0) {} } In this case, I am using htmlentities() on the form data, and using a MySQLi prepared statement. Do I still need to be using mysql_real_escape_string()?

    Read the article

  • Authenticate username and password

    - by Alice Lee
    I have a MMC client that runs on a .Net system, that invokes web methods on a server running on a linux box. The first task the client needs to do is to perform user login. It prompts the user for username and password. What is the best way for the client to authenticate the user's credentials. The password cannot be sent as plain text. The web server implements a web method called ValidateUser().

    Read the article

  • Windows Batch file to echo a specific line number

    - by Lee
    So for the second part of my current dilemma, I have a list of folders in c:\file_list.txt. I need to be able to extract them (well, echo them with some mods) based on the line number because this batch script is being called by an iterative macro process. I'm passing the line number as a parameter. @echo off setlocal enabledelayedexpansion set /a counter=0 set /a %%a = "" for /f "usebackq delims=" %%a in (c:\file_list.txt) do ( if "!counter!"=="%1" goto :printme & set /a counter+=1 ) :printme echo %%a which gives me an output of %a. Doh! So, I've tried echoing !a! (result: ECHO is off.); I've tried echoing %a (result: a) I figured the easy thing to do would be to modify the head.bat code found here: http://stackoverflow.com/questions/130116/dos-batch-commands-to-read-first-line-from-text-file except rather than echoing every line - I'd just echo the last line found. Not as simple as one might think. I've noticed that my counter is staying at zero for some reason; I'm wondering if the set /a counter+=1 is doing what I think it's doing.

    Read the article

  • sql query problem

    - by benjamin button
    why this query give me an error:ORA-01790 SELECT TO_CHAR(logical_date,'MM') MONTH FROM logical_date WHERE logical_date_type='B' UNION SELECT TO_CHAR(logical_date,'MM')+1 MONTH FROM logical_date WHERE logical_date_type='B' but when i run them separately,they give the proper output.

    Read the article

< Previous Page | 12 13 14 15 16 17 18 19 20 21 22 23  | Next Page >