Search Results

Search found 4344 results on 174 pages for 'mark roberts'.

Page 78/174 | < Previous Page | 74 75 76 77 78 79 80 81 82 83 84 85  | Next Page >

  • Is there a fast way to change all the collation to utf8_unicode?

    - by Mark
    I have realised after making about 20 tables that I need to user utf8_unicode as opposed to utf8_general. What is the fastest way to change it using PHPMyAdmin? I had one idea: Export the database as SQL then using notepad run a find and replace on it and then reimport it... but it sounds like a bit of a headache. Is there a better way?

    Read the article

  • PHP - complete url parser help

    - by Mark
    I have been trying to find an effective url parser, php's own does not include subdomain or extension. On php.net a number of users had contributed and made this: function parseUrl($url) { $r = "^(?:(?P<scheme>\w+)://)?"; $r .= "(?:(?P<login>\w+):(?P<pass>\w+)@)?"; $r .= "(?P<host>(?:(?P<subdomain>[-\w\.]+)\.)?" . "(?P<domain>[-\w]+\.(?P<extension>\w+)))"; $r .= "(?::(?P<port>\d+))?"; $r .= "(?P<path>[\w/]*/(?P<file>\w+(?:\.\w+)?)?)?"; $r .= "(?:\?(?P<arg>[\w=&]+))?"; $r .= "(?:#(?P<anchor>\w+))?"; $r = "!$r!"; // Delimiters preg_match ( $r, $url, $out ); return $out; } Unfortunately it fails on paths with a '-' and I can't for the life of me workout how to amend it to accept '-' in the path name. Thanks

    Read the article

  • How to eliminate authentication on my MVC app that is called from asp.net forms app

    - by Mark Kadlec
    Curious what recommendations anyone has. I have an existing asp.net forms application that does a Forms Authentication and has identity impersonate turned on. The application has a link to a questionnaire that I would like to develop separately in an asp.net MVC application, but I don't want the users to click on the link and be prompted for a username and password, I would like them to be able seamless start filling out the questionnaire. Is there a way to somehow transfer authentication from one .net app to another? I would like to be able to pass stuff like UserRole. What's the best way to do this?

    Read the article

  • rails - caches_action expire_action

    - by mark
    Hi I want to expire a cached action and wondered how to generate the correct reference. #controller caches_action :index, :layout => false #generates this fragment which works fine views/0.0.0.0:3000/article/someid/posts #sweeper ... expire_action article_posts_path(:article_id => post.article) # results in this Expired fragment: views//en/article/someid/posts (0.0ms) So this is almost ok, except the host is missing. What do I do that supplies this to the expire_action method? Thanks in advance.

    Read the article

  • How do you determine how coarse or fine-grained a 'responsibility' should be when using the single r

    - by Mark Rogers
    In the SRP, a 'responsibility' is usually described as 'a reason to change', so that each class (or object?) should have only one reason someone should have to go in there and change it. But if you take this to the extreme fine-grain you could say that an object adding two numbers together is a responsibility and a possible reason to change. Therefore the object should contain no other logic, because it would produce another reason for change. I'm curious if there is anyone out there that has any strategies for 'scoping', the single-responsibility principle that's slightly less objective?

    Read the article

  • LINQ-like or SQL-like DSL for end-users to run queries to select (not modify) data?

    - by Mark Rushakoff
    For a utility I'm working on, the client would like to be able to generate graphic reports on the data that has been collected. I can already generate a couple canned graphs (using ZedGraph, which is a very nice library); however, the utility would be much more flexible if the graphs were more programmable or configurable by the end-user. TLDR version I want users to be able to use something like SQL to safely extract and select data from a List of objects that I provide and can describe. What free tools or libraries will help me accomplish this? Full version I've given thought to using IronPython, IronRuby, and LuaInterface, but frankly they're all a bit overpowered for what I want to do. My classes are fairly simple, along the lines of: class Person: string Name; int HeightInCm; DateTime BirthDate; Weight[] WeighIns; class Weight: int WeightInKg; DateTime Date; Person Owner; (exact classes have been changed to protect the innocent). To come up with the data for the graph, the user will choose whether it's a bar graph, scatter plot, etc., and then to actually obtain the data, I would like to obtain some kind of List from the user simply entering something SQL-ish along the lines of SELECT Name, AVG(WeighIns) FROM People SELECT WeightInKg, Owner.HeightInCm FROM Weights And as a bonus, it would be nice if you could actually do operations as well: SELECT WeightInKg, (Date - Owner.BirthDate) AS Age FROM Weights The DSL doesn't have to be compliant SQL in any way; it doesn't even have to resemble SQL, but I can't think of a more efficient descriptive language for the task. I'm fine filling in blanks; I don't expect a library to do everything for me. What I would expect to exist (but haven't been able to find in any way, shape, or form) is something like Fluent NHibernate (which I am already using in the project) where I can declare a mapping, something like var personRequest = Request<Person>(); personRequest.Item("Name", (p => p.Name)); personRequest.Item("HeightInCm", (p => p.HeightInCm)); personRequest.Item("HeightInInches", (p => p.HeightInCm * CM_TO_INCHES)); // ... var weightRequest = Request<Weight>(); weightRequest.Item("Owner", (w => w.Owner), personRequest); // Indicate a chain to personRequest // ... var people = Table<Person>("People", GetPeopleFromDatabase()); var weights = Table<Weight>("Weights", GetWeightsFromDatabase()); // ... TryRunQuery(userInputQuery); LINQ is so close to what I want to do, but AFAIK there's no way to sandbox it. I don't want to expose any unnecessary functionality to the end user; meaning I don't want the user to be able to send in and process: from p in people select (p => { System.IO.File.Delete("C:\\something\\important"); return p.Name }) So does anyone know of any free .NET libraries that allow something like what I've described above? Or is there some way to sandbox LINQ? cs-script is close too, but it doesn't seem to offer sandboxing yet either. I'd be hesitant to expose the NHibernate interface either, as the user should have a read-only view of the data at this point in the usage. I'm using C# 3.5, and pure .NET solutions would be preferred. The bottom line is that I'm really trying to avoid writing my own parser for a subset of SQL that would only apply to this single project.

    Read the article

  • How to handle expired items?

    - by Mark
    My site allows users to post things on the site with an expiry date. Once the item has expired, it will no longer be displayed in the listings. Posts can also be closed, canceled, or completed. I think it would be be nicest just to be able to check for one attribute or status ("is active") rather than having to check for [is not expired, is not completed, is not closed, is not canceled]. Handling the rest of those is easy because I can just have one "status" field which is essentially an enum, but AFAIK, it's impossible to set the status to "expired" as soon as that time occurs. How do people typically handle this?

    Read the article

  • Drawbacks of using an integer as a bitfield?

    - by Mark
    I have a bunch of boolean options for things like "accepted payment types" which can include things like cash, credit card, cheque, paypal, etc. Rather than having a half dozen booleans in my DB, I can just use an integer and assign each payment method an integer, like so PAYMENT_METHODS = ( (1<<0, 'Cash'), (1<<1, 'Credit Card'), (1<<2, 'Cheque'), (1<<3, 'Other'), ) and then query the specific bit in python to retrieve the flag. I know this means the database can't index by specific flags, but are there any other drawbacks?

    Read the article

  • Opinions on commercial MVC controls

    - by Mark
    We are interested in the communities opinions on commercial MVC controls ie Telerik, Syncfusion. Which is fast, easy to use, stability, documentation, support and all that good stuff. We are about to start our second MVC project and are currently doing research into improving functionality and speed of development to 'standard' MVC. Any of your thoughts are much appreciated...

    Read the article

  • UITabBarController Modify [More ...] Appearance

    - by Mark
    Hello everyone, I would like to know if there is a way to change the text in the [More ...] tab. With the code below I am able to change the text in the view, however the text in the tab remains the same. Is there a way to access it and change it's appearance. tabBarController.moreNavigationController.topViewController.navigationItem.title = NSLocalizedString(@"Meer", ""); My second question is about the [Edit] button in the More view. The code below does not work. tabBarController.moreNavigationController.topViewController.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc] initWithTitle:@"Wijzigen" style:UIBarButtonItemStyleDone target:nil action:nil]; Does anyone have an idea? Cheers.

    Read the article

  • Are fragments of hashes collision-resistent?

    - by Mark
    Let me see if someone would mind clearing up this elementary point about md5 and hashing. If you only use the first 4 bytes of an md5 hash, would that mean theoretically only 1 in 255^4 chance of collision. iow is that the intention with it (and other hash algorithms) - that you only have to use a small portion of the returned hash (say the hash is of a file of some size).

    Read the article

  • Sphinx: some good customization examples?

    - by Mark Harrison
    I've created a Sphinx document using sphinx-quickstart. Are there any good examples/tutorials about customizing the look? Specifically to modify the header and add a logo. Are there some projects with downloadable Sphinx docs? I would like to see how they've customized their look. update: Adding a logo is supported in the default setup, just not particularly well documented. Look in conf.py for the *_logo settings.`

    Read the article

  • JavaScript functions broke my page jumps?

    - by Mark
    Hi everybody, I'm trying to develop a personal website and running into some issues. At the top of my page I had a horizontal table that contained 6 different images (buttons) that linked to different sections of the page. I wanted to spice up the buttons with JavaScript and make the image of the button change onMouseOver and onMouseOut so I found a way to do so online with some JavaScript but the problem now is that the buttons no longer jump to the appropriate section of the page when using Google Chrome or Safari, but in IE 9 they still do work correctly... Here is my old code that worked properly: <html> ... <body> <center> <table border="1" style="color:#D80000;text-align:center"> <tr> <td> <a href="#about"><img src="images/aboutMe.png" alt="About Me"></a> </td> <td> <a href="#courses"><img src="images/courseList.png" alt="Courses"></a> </td> <td> <a href="#work"><img src="images/workHistory.png" alt="Work History"></a> </td> <td> <a href="#places"><img src="images/placesBeen.png" alt="Places I've Been"></a> </td> <td> <a href="#games"><img src="images/gamesPlay.png" alt="Games I Play"></a> </td> <td> <a href="#contact"><img src="images/contactMe.png" alt="Contact"></a> </td> </tr> </table> </center> ... </body> </html> Here is my new code that is now broken: <html> <head> ... <script type="text/javascript"> <!-- if (document.images) { <!-- Preload original Images --> var about_init= new Image(); about_init.src="images/aboutMe.png"; var courses_init= new Image(); courses_init.src="images/courseList.png"; var work_init= new Image(); work_init.src="images/workHistory.png"; var places_init= new Image(); places_init.src="images/placesBeen.png"; var games_init= new Image(); games_init.src="images/gamesPlay.png"; var contact_init= new Image(); contact_init.src="images/contactMe.png"; <!--Preload images for mouseover --> var about_new= new Image(); about_new.src="images/aboutAlt.png"; var courses_new= new Image(); courses_new.src="images/courseAlt.png"; var work_new= new Image(); work_new.src="images/workAlt.png"; var places_new= new Image(); places_new.src="images/placesAlt.png"; var games_new= new Image(); games_new.src="images/gamesAlt.png"; var contact_new= new Image(); contact_new.src="images/contactAlt.png"; } function change_it(the_name) { if (document.images) { document.images[the_name].src= eval(the_name+"_new.src"); } } function change_back(the_name) { if (document.images) { document.images[the_name].src= eval(the_name+"_init.src"); } } //--> </script> </head> <body> ... <center> <table border="1" style="color:#D80000;text-align:center"> <tr> <td> <a href="#about" onMouseOver="change_it('about')" onMouseOut="change_back('about')"><img src="images/aboutMe.png" name="about" id="about" border="0" alt="About Me"></a> </td> <td> <a href="#courses" onMouseOver="change_it('courses')" onMouseOut="change_back('courses')"><img src="images/courseList.png" name="courses" id="courses" border="0" alt="Courses"></a> </td> <td> <a href="#work" onMouseOver="change_it('work')" onMouseOut="change_back('work')"><img src="images/workHistory.png" name="work" id="work" border="0" alt="Work History"></a> </td> <td> <a href="#places" onMouseOver="change_it('places')" onMouseOut="change_back('places')"><img src="images/placesBeen.png" name="places" id="places" border="0" alt="Places I've Been"></a> </td> <td> <a href="#games" onMouseOver="change_it('games')" onMouseOut="change_back('games')"><img src="images/gamesPlay.png" name="games" id="games" border="0" alt="Games I Play"></a> </td> <td> <a href="#contact" onMouseOver="change_it('contact')" onMouseOut="change_back('contact')"><img src="images/contactMe.png" name="contact" id="contact" border="0" alt="Contact"></a> </td> </tr> </table> </center> ... </body> </html> The images properly switch when the mouse is moved over/off them, but the jump to the corresponding page sections seems to be broken, it seems like they're all jumping to the #about section now. Once again, the weirder thing is that this is only the case when I'm using Google Chrome on my laptop running Windows 7 or Safari using my iPhone 4 but when I use the new Internet Explorer 9 on my laptop running Windows 7 all the buttons still link correctly. Any idea what's breaking the links?

    Read the article

  • PayPal debit VISA automatically?

    - by Mark
    If I have a Visa card number saved in my database, is there a way I can charge that Visa automatically through the PayPal API without the user having to enter anything? We want to keep this site as easy and hassle-free to use as possible. It would be a variable amount, based on how they use the site. (Don't worry, proper disclaimers will be in place, and the user will be notified)

    Read the article

  • Proper method to detect device model (iPhone/iPod Touch)?

    - by Mark
    Is this the proper way to detect which device a user is running? NSString *currentModel = [[UIDevice currentDevice] model]; if ([currentModel isEqualToString:@"iPhone"]) { // The user is running on iPhone so allow Call, Camera, etc. } else { // The user is running on a different device (iPod / iPad / iPhone Simulator) disallow Call. }

    Read the article

  • Using SSIS, how do you read a datetime field into a variable that is of Data Type string?

    - by Mark Kadlec
    This one has bugged me for the longest time and a great question to ask the Stackoverflow users I think. I have a rather large SSIS flow that uses a string variable to store the datetime. I would now like to dynamically read the datetime value from the database, but how would you construct the SSIS to do this? My first obvious thought would be to simply execute a SQL task to get the datetime and store it in the variable, but got the "differs from the current variable type" error. Is there a simple way to convert the database datetime into a String variable? Any help from the community would be appreciated,

    Read the article

  • Can two threads of the same process produce the same GUID?

    - by mark
    Dear ladies and sirs. If two threads in a process generate a new GUID concurrently using .NET API (Guid.NewGuid()) is it possible that the two GUIDs will be identical? Thanks. UPDATE I want to get practical. I know that it is widely assumed that GUIDs are unique for all practical purposes. I am wondering if I can treat GUIDS produced by the different threads of the same process in the same manner.

    Read the article

  • Unable to link to opengl libraries? DOS / MSVC

    - by Mark
    Is there something wrong with this link.exe command line? OpenGL32.lib and Glu32.lib are found at both of the LIBPATH directories. Is it possible the libraries are somehow incompatible? Is there a way to have the link.exe say that instead of unresolved external symbol? Googling shows that this error usually means the libraries are not found, but they are there. E:\mvs90\VC\BIN\link.exe /DLL /nologo /INCREMENTAL:no /DEBUG /pdb:None /LIBPATH:E:\code\python\python\py26\libs /LIBPATH:E:\code\python\python\py26\PCbuild opengl32.lib glu32.lib /EXPORT:init_rabbyt build\temp.win32-2.6-pydebug\Debug\rabbyt/rabbyt._rabbyt.obj /OUT:build\lib.win32-2.6-pydebug\rabbyt\_rabbyt_d.pyd /IMPLIB:build\temp.win32-2.6-pydebug\Debug\rabbyt\_rabbyt_d.lib /MANIFESTFILE:build\temp.win32-2.6-pydebug\Debug\rabbyt\_rabbyt_d.pyd.manifest Creating library build\temp.win32-2.6-pydebug\Debug\rabbyt\_rabbyt_d.lib and object build\temp.win32-2.6-pydebug\Debug\rabbyt\_rabbyt_d.exp rabbyt._rabbyt.obj : error LNK2019: unresolved external symbol __imp__glOrtho re ferenced in function ___pyx_f_6rabbyt_7_rabbyt_set_viewport Directory of E:\code\python\python\py26\libs 09/27/2007 02:20 PM 12,672 GlU32.Lib 09/27/2007 02:20 PM 76,924 OpenGL32.Lib

    Read the article

  • Performance of jquery visible

    - by Mark Steudel
    I have a bunch of checkboxes on a page, and I only show a subset of those checkboxes at a time. I then perform some action which loops through all of the checkboxes and sees if they are checked or not: e.g. $(".delete_items").click( function() { $('.checkboxes' ).each(function(){ //do stuff } } Then I was thinking, well since the user can never interact with the hidden checkboxes, that adding :visible to checkboxes would speed up the loop e.g. $(".delete_items").click( function() { $('.checkboxes :visible' ).each(function(){ //do stuff } } But I don't know if adding :visible adds more overhead. Any thoughts?

    Read the article

< Previous Page | 74 75 76 77 78 79 80 81 82 83 84 85  | Next Page >