Search Results

Search found 3489 results on 140 pages for 'chris welsh'.

Page 88/140 | < Previous Page | 84 85 86 87 88 89 90 91 92 93 94 95  | Next Page >

  • PHP Post Count in Forum

    - by Chris
    I'm currently desiging a forum application, I considered using a premade but decided against it as it's useful for me to learn some of the techniques. So I've written a fairly full featured forum... great. One of the problems I want to solve is to include user data for each post, at the minute the post table includes the poster ID (obviously) and I added the poster's username at a later date so I didn't have to query the User DB for X number of posts in a thread. However, it's become apparent I now want to do this, usernames don't need to update retrospectively, however avatars, sigs, and especially post counts need to update actively, so data in some form needs keeping up to date somewhere... What would be a good way of implementing this? I obviously don't want to include any more user data on the Posts DB table than necessary, but I'm struggling to find an easy way to do this short of querying the DB for each post in a thread, which is potentially going to create a lot of traffic. How have other people solved this, I've been examining the code on some other open source apps but I can't find what I'm looking for. Is it possible to select multiple records in one query? In which case I could build an array dynamically on each page request (eg 'SQL blah blah' then a for each loop to insert the ID's). Could I join the tables each time? Do I submit a query for each post? Hmm.

    Read the article

  • mysql innodb max size of transaction

    - by chris
    Using mysql 5.1.41 and innodb I'm doing some data import, but can't use load data infile, so I'm manually issuing insert statements. I found that it's much faster to disable auto commit and issue say, 100 insert statements and then commit, instead of the implicit commit after each insert. It got me thinking, what limits are there to how much data I can put into a transaction? Is there a limit on the number of statements, or does it have to do with the size in bytes etc...?

    Read the article

  • Winelib & XCode

    - by Chris Becke
    Does anyone have any experience and/or tips wrt using Xcode to build winlib binaries on the Mac? As part of a Windows - Mac OS X crossplatform port i'm looking at an initial winelib port of the app before reworking the windowing to use Cocoa. None of the winelib tutorials ive seen so far mention anything other than command line builds using make files and winegcc, so Im wondering if its worth bothering at all trying to get an Xcode project built linking against winelib.

    Read the article

  • Is it possible to write map/reduce jobs for Amazon Elastic MapReduce using .NET?

    - by Chris
    Is it possible to write map/reduce jobs for Amazon Elastic MapReduce (http://aws.amazon.com/elasticmapreduce/) using .NET languages? In particular I would like to use C#. Preliminary research suggests not. The above URL's marketing text suggests you have a "choice of Java, Ruby, Perl, Python, PHP, R, or C++", without mentioning .NET languages. This Amazon thread (http://developer.amazonwebservices.com/connect/thread.jspa?messageID=136051 -- "Support for C# / F# map/reducers") explicitly says that "currently Amazon Elastic MapReduce does not support Mono platform or languages such as C# or F#." The above suggests that it can't be done. I'm wondering if there are any workarounds, though. For example, can I modify the Elastic MapReduce machine image for my account, and install Mono on there? An alternative, suggested by Amazon FAQs "Using Other Software Required by Your Jar" (http://docs.amazonwebservices.com/ElasticMapReduce/latest/DeveloperGuide/index.html?CHAP_AdvancedTopics.html) and "How to Use Additional Files and Libraries With the Mapper or Reducer" (http://docs.amazonwebservices.com/ElasticMapReduce/latest/DeveloperGuide/index.html?addl_files.html), is to make the first step of the Map/Reduce job be to install Mono on the local instance. That sounds kind of inefficient, but maybe it could work? Maybe a saner alternative would be to try to forgo the convenience of Elastic MapReduce, and manually set up my own Hadoop cluster on EC2. Then I assume I could install Mono without difficulty.

    Read the article

  • .Net Entity objectcontext thread error

    - by Chris Klepeis
    I have an n-layered asp.net application which returns an object from my DAL to the BAL like so: public IEnumerable<SourceKey> Get(SourceKey sk) { var query = from SourceKey in _dataContext.SourceKeys select SourceKey; if (sk.sourceKey1 != null) { query = from SourceKey in query where SourceKey.sourceKey1 == sk.sourceKey1 select SourceKey; } return query.AsEnumerable(); } This result passes through my business layer and hits the UI layer to display to the end users. I do not lazy load to prevent query execution in other layers of my application. I created another function in my DAL to delete objects: public void Delete(SourceKey sk) { try { _dataContext.DeleteObject(sk); _dataContext.SaveChanges(); } catch (Exception ex) { Debug.WriteLine(ex.Message + " " + ex.StackTrace + " " + ex.InnerException); } } When I try to call "Delete" after calling the "Get" function, I receive this error: New transaction is not allowed because there are other threads running in the session This is an ASP.Net app. My DAL contains an entity data model. The class in which I have the above functions share the same _dataContext, which is instantiated in my constructor. My guess is that the reader is still open from the "Get" function and was not closed. How can I close it?

    Read the article

  • reverse colortransform alpha AS3

    - by Chris Porter
    I'm fading out a Bitmap in AS3 by repeatedly applying a ColorTransform every frame to its BitmapData; _bitmap.colorTransform(_bitmap.rect, new ColorTransform(1, 1, 1, .9, 0, 0, 0, 1)); When applying the apparent reverse to fade it back in I get a discoloured image. _bitmap.colorTransform(_bitmap.rect, new ColorTransform(1, 1, 1, 1.1, 0, 0, 0, 1)); The problem appears to occur only to fully faded-out images. If I only go part way it is recoverable. fading out: faded back

    Read the article

  • Is it possible to dynamically add webcontrols via jQuery???

    - by Chris Conway
    Currently I have a webform that has a series of links. What I'd like to be able to do is add a webcontrol's content when one of the links is clicked. Is this kind of thing even possible? If not, what's the best strategy for loading a set of controls (one textbox and one dropdown with values from one link, two textboxes and a checkbox from another link, etc.). I'd need to be able get the values of each of these controls on postback. Ideally, I'd like to be able to add that new content to an acordian control, most likely the jQuery UI acordian. So each clickable link would add new content to an acordian control. What's everybody's thoughts on this?

    Read the article

  • GitHub Api: How to get Root :tree_sha of a repository?

    - by Chris Jacob
    How do I get the Root :tree_sha of a GitHub repository via the GitHub API? The GitHib API help pages don't seem to explain this critical piece of information: http://develop.github.com/p/object.html Can get the contents of a tree by tree SHA tree/show/:user/:repo/:tree_sha To get a listing of the root tree for the facebox project from our commit listing, we can call this: $ curl http://github.com/api/v2/yaml/tree/show/defunkt/facebox/a47803c9ba26213ff194f042ab686a7749b17476

    Read the article

  • h:commandButton action not working inside a h:datatable.

    - by Chris
    I'm stuck with this piece of jsf code that I don't understand why it's working when used outside a datatable and doesn't inside a datatable... <h:dataTable id="myTable" rendered="true" value="#{bean.selectedItemsList}" var="items"> <h:column> <h:commandButton action="#{bean.removeItemFromList}" image="/resources/images/deleterow.gif"> <f:actionListener binding="#{bean.actionListenerImpl}" type="com.mycorp.ActionListenerImpl"/> </h:commandButton> </h:column> <h:column> <h:outputText value="#{items}" /> </h:column> </h:dataTable> I read around the net to put value="#{items}" inside the action listener so the action can get the items in the row like this: <f:actionListener value="#{items}" binding="#{bean.actionListenerImpl}" type="com.mycorp.ActionListenerImpl"/> But it's doesn't work either. Bu if I do the action outside the data table everything work fine. <h:commandButton action="#{bean.removeItemFromList}" image="/resources/images/deleterow.gif"> <f:actionListener binding="#{bean.actionListenerImpl}" type="com.mycorp.ActionListenerImpl"/> </h:commandButton> Side note I also tried a4j:commandButton and didn't so I guess my problem is probably the actionlistener or how the bean handling it.

    Read the article

  • help('modules') crashing?

    - by Chris
    I was trying to install a module for opencv and added an opencv.pth file to the folder beyond my sites.py file. I have since deleted it and no change. When I try to run help('modules'), I get the following error: Please wait a moment while I gather a list of all available modules... /System/Library/Frameworks/Python.framework/Versions/2.5/Extras/lib/python/twisted/words/im/init.py:8: UserWarning: twisted.im will be undergoing a rewrite at some point in the future. warnings.warn("twisted.im will be undergoing a rewrite at some point in the future.") /System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/pkgutil.py:110: DeprecationWarning: The wxPython compatibility package is no longer automatically generated or actively maintained. Please switch to the wx package as soon as possible. import(name) Traceback (most recent call last): File "", line 1, in File "/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site.py", line 348, in call return pydoc.help(*args, **kwds) File "/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/pydoc.py", line 1644, in call self.help(request) File "/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/pydoc.py", line 1681, in help elif request == 'modules': self.listmodules() File "/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/pydoc.py", line 1802, in listmodules ModuleScanner().run(callback) File "/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/pydoc.py", line 1853, in run for importer, modname, ispkg in pkgutil.walk_packages(): File "/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/pkgutil.py", line 110, in walk_packages import(name) File "/BinaryCache/wxWidgets/wxWidgets-11~262/Root/System/Library/Frameworks/Python.framework/Versions/2.5/Extras/lib/python/wxaddons/init.py", line 180, in import_hook File "/Library/Python/2.5/site-packages/ctypes_opencv/init.py", line 19, in from ctypes_opencv.cv import * File "/BinaryCache/wxWidgets/wxWidgets-11~262/Root/System/Library/Frameworks/Python.framework/Versions/2.5/Extras/lib/python/wxaddons/init.py", line 180, in import_hook File "/Library/Python/2.5/site-packages/ctypes_opencv/cv.py", line 2567, in ('desc', CvMat_r, 1), # CvMat* desc File "/Library/Python/2.5/site-packages/ctypes_opencv/cxcore.py", line 114, in cfunc return CFUNCTYPE(result, *atypes)((name, dll), tuple(aflags)) AttributeError: dlsym(0x2674d10, cvCreateFeatureTree): symbol not found What gives?!

    Read the article

  • Windows API Programming

    - by Chris
    I found this site, http://www.apitalk.com/document.php?id=1184207999_1 and I'm not sure if this site is using ATL, STL, MFC, or just calling API functions directly. I have done console programming with C++ and graphics programmign with C++ in Borland, but I've have never done Win32 C++ programming and I'm curious if anyone knows of a good site to start with? Does anyone know of any good sites to recommend about getting up and going fast with Win32 API C++?

    Read the article

  • set static member pointer variables

    - by Chris
    I'm trying to set a static pointer variable in a class but I'm getting these errors for each variable I try to set. error C4430: missing type specifier - int assumed. Note: C++ does not support default-int error C2040: 'xscroll' : 'int' differs in levels of indirection from 'float *' error C2440: 'initializing' : cannot convert from 'float **' to 'int' Here is the code Enemy.h #include <windows.h> #include "Player.h" class Enemy { public: Enemy(float xPos, float yPos); Enemy(void); ~Enemy(void); //update the position of the user controlled object. void updatePosition(float timeFactor); //loads all the enemy textures void static loadTextures(); //creates a set number of enemies void static createEnemies(int numEnemies, Enemy * enemyArray); GLuint static enemyTex; static float * xscroll; static float * yscroll; static Player * player; private: bool checkCollison(float x, float y, int radius); float XPos; float YPos; }; trying to set variables Enemy::xscroll = &xscroll; Enemy::yscroll = &yscroll; Enemy::player = &player;

    Read the article

  • basic boost date_time input format question

    - by Chris H
    I've got a pointer to a string, (char *) as input. The date/time looks like this: Sat, 10 Apr 2010 19:30:00 I'm only interested in the date, not the time. I created an "input_facet" with the format I want: boost::date_time::date_input_facet inFmt("%a %d %b %Y"); but I'm not sure what to do with it. Ultimately I'd like to create a date object from the string. I'm pretty sure I'm on the right track with that input facet and format, but I have no idea how to use it. Thanks.

    Read the article

  • Start applescript when itunes starts

    - by Chris
    Any way to bind an applescript to iTunes so that when iTunes is started the applescript is run? I have a script that runs continuously monitoring iTunes but it seems a waste to have it running even if iTunes is not running. Thanks

    Read the article

  • Compiling Glib Code on Ubuntu

    - by Chris S
    I'm trying to compile ARCCC (https://sourceforge.net/projects/arccc/) on Ubuntu 9.10, but I'm getting the make error "glib.h: No such file or directory", and the autoconfig script reports that Glib isn't installed. However, I have the libglib2.0-dev package installed, which appears to provide all the glib headers. Is there something missing/wrong with the Ubuntu package, or the Autoconf script incorrect?

    Read the article

  • SL3 TreeView Not Programmatically Scrolling

    - by Chris
    I have a treeview in Silverlight 3. The treeview is bound to a observable collection - which contains a list of hierarchical data. When the page loads initially, all nodes, by default, in the treeview, are collapsed. I have functionality that allows a certain item in the treeview to be selected programmatically. The problem that I am running into is when an item is selected that isn't immediately visible (i.e. one or more parent nodes are collapsed). I programmatically expand them, but, when I try to programmatically scroll into view, so the user can see the selected item, it doesn't work. I looked into this further, and I believe that it has to do with the calculated viewport height for the scroll viewer. It almost seems like a timing issue, as, if the item's parent node is expanded, and then the item is programmatically selected, the code that scrolls the treeview into view for that selected treeview item works perfectly. Please refer to the extension method below that I am using to scroll the treeview into view. Any help or suggestions on how to correct this would be greatly appreciated. Thanks. public static void BringIntoViewForScrollViewer(this FrameworkElement frameworkElement, ScrollViewer scrollViewer) { var transform = frameworkElement.TransformToVisual(scrollViewer); var positionInScrollViewer = transform.Transform(new Point(0, 0)); if (positionInScrollViewer.Y < 0 || positionInScrollViewer.Y > scrollViewer.ViewportHeight) scrollViewer.ScrollToVerticalOffset(scrollViewer.VerticalOffset + positionInScrollViewer.Y - ScrollPadding); }

    Read the article

  • How to send windows messages to non-main forms

    - by Chris
    How do I go about sending a Windows Message to a form in my application that is not the MainForm? Using the code below gives me an Access Violation. procedure TMainForm.SendMessageToAnotherForm; begin SendMessage(MyForm.Handle,WM_MY_MESSAGE,0,0); end; MyForm has already been created and is the top most window.

    Read the article

  • Lexing partial SQL in C#

    - by Chris T
    I'd need to parse partial SQL queries (it's for a SQL injection auditing tool). For example '1' AND 1=1-- Should break down into tokens like [0] => [SQL_STRING, '1'] [1] => [SQL_AND] [2] => [SQL_INT, 1] [3] => [SQL_AND] [4] => [SQL_INT, 1] [5] => [SQL_COMMENT] [6] => [SQL_QUERY_END] Are their any at least lexers for SQL that I base mine off of or any good tools like bison for C# (though I'd rather not write my own grammar as I need to support most if not all the grammar of MySQL 5)

    Read the article

  • Silverlight Assembly.Load() only works with the full/strong name

    - by chris
    Apparently the implementation of Assembly.Load() in Silverlight needs a full/strong name. E.g. this works: Assembly.Load("MyAssembly, Version=1.0.0.0, Culture=neutral, PublicKeyToken=..."); while this will fail even if MyAssembly is already loaded: Assembly.Load("MyAssembly"); Is there a workaround so that it's possible to use the simple name?

    Read the article

  • C# String.Replace with a start/index (Added my (slow) implementation)

    - by Chris T
    I'd like an efficient method that would work something like this EDIT: Sorry I didn't put what I'd tried before. I updated the example now. // Method signature, Only replaces first instance or how many are specified in max public int MyReplace(ref string source,string org, string replace, int start, int max) { int ret = 0; int len = replace.Length; int olen = org.Length; for(int i = 0; i < max; i++) { // Find the next instance of the search string int x = source.IndexOf(org, ret + olen); if(x > ret) ret = x; else break; // Insert the replacement source = source.Insert(x, replace); // And remove the original source = source.Remove(x + len, olen); // removes original string } return ret; } string source = "The cat can fly but only if he is the cat in the hat"; int i = MyReplace(ref source,"cat", "giraffe", 8, 1); // Results in the string "The cat can fly but only if he is the giraffe in the hat" // i contains the index of the first letter of "giraffe" in the new string The only reason I'm asking is because my implementation I'd imagine getting slow with 1,000s of replaces.

    Read the article

  • Facebook.php Changed ?

    - by Chris
    I am making my first Facebook App and nothing is working as stated in the documentation. As an example, I have facebook.php on my server and am calling this line: $friends = $facebook->api_client->friends_get(); but I get a "call to undefined function friends_get()" I see that there is no "friends_get()" function in the facebook.php. I do see there is a friends.get in that long array... but I'm not sure how to access it?

    Read the article

  • getting boost::gregorian dates from a string

    - by Chris H
    I asked a related question yesterday http://stackoverflow.com/questions/2612343/basic-boost-date-time-input-format-question It worked great for posix_time ptime objects. I'm have trouble adapting it to get Gregorian date objects. try { stringstream ss; ss << dateNode->GetText(); using boost::local_time::local_time_input_facet; //using boost::gregorian; ss.imbue(locale(locale::classic(), new local_time_input_facet("%a, %d %b %Y "))); ss.exceptions(ios::failbit); ss>>dayTime; } catch (...) { cout<<"Failed to get a date..."<<endl; //cout<<e.what()<<endl; throw; } The dateNode-GetText() function returns a pointer to a string of the form Sat, 10 Apr 2010 19:30:00 The problem is I keep getting an exception. So concretely the question is, how do I go from const char * of the given format, to a boost::gregorian::date object? Thanks again.

    Read the article

  • JQuery UI + tabs : How to kow to get the selected tab with imbricated tabs

    - by chris
    Hi, I'm new to Jquery. I'm using JQuery UI and i have imbricated Tabs : Tabs in tabs. ____ tab 1 | tab 2 | tab 3 | tab 4| tab 5 ______ tab 1-1 | tab 1-2 | tab 1-3 | tab 1-4| tab 1-5 I'm using $('#div').bind('tabsselect', function(event, ui) { selectedTab = ui.index; alert('selectedTab : ' + selectedTab); }); to kown the selected index. If i click on "tab "1 the selected index returned is correct. But when click on tabs in the second level ("tab 1-xx") the event is fired too. I want to resctriced the bind('tabsselect', function(event, ui) on the first level of tab (tab x). How can i do that ? Thanks

    Read the article

< Previous Page | 84 85 86 87 88 89 90 91 92 93 94 95  | Next Page >