Search Results

Search found 557 results on 23 pages for 'darren young'.

Page 6/23 | < Previous Page | 2 3 4 5 6 7 8 9 10 11 12 13  | Next Page >

  • How do I pass a custom field to a hook (Invision Power Board [ipb] / PHP)

    - by Julian Young
    A long shot but here's hoping someone has some experience coding PHP hooks for Invisions Power Board forum. I'm attempting to code a status addition and the PHP works fine on it's own, it's the passing of the IPB's reference to my hook that is the issue. I.E. You setup a custom field in your forum for MSN Username, then from within a skin / template hook you pass the custom field to the hook and then use your PHP code to check on the status. Here is the IPB skin code I am hooking into on Global-userInfoPane... <if test="authorcfields:|:$author['custom_fields'] != """> <foreach loop="customFieldsOuter:$author['custom_fields'] as $group => $data"> <foreach loop="customFields:$author['custom_fields'][ $group ] as $field"> <if test="$field != ''"> <li> {$field} </li> </if> </foreach> </foreach> </if> Although I could easily add my own skin hook here. i.e. <if test="myHookHere:|:1===1"></if> Literally all I need is a single custom field entry from here passed to my hook. If I query every member when the hook is run then that will result in many extra sql queries per page view. All I want to do is pass that specific custom field to the hook... i.e. myHookHere( $customfield['msn_username'] ) Is this possible? How do you reference the customfield? Can I execute pure PHP from here? Appreciate anyone that can help! I tried the official invision forums but not had much luck.

    Read the article

  • Is there a 'RadLabel' from Telerik?

    - by Young Ninja
    I use the "Label" attribute in Telerik quite frequently. I like it because it helps me consistently structure tables. An example: <ul class="box"> <li><telerik:RadTextBox runat="server" Label="Name:" LabelCssClass="label" Enabled="false" Width="100%" /></li> <li><telerik:RadTextBox runat="server" ID="MachineSize" Label="Password:" LabelCssClass="label" Width="100%" /></li> </ul> I've run into a problem. I would like to continue with the above layout/structure, but in some cases I have tables that simply dump output (ie no user input). To be consistent, I need a RadLabel, which takes an input of "Label" and "Text", and then aligns them appropriately in the overall table format. Is there such a thing?

    Read the article

  • How to require fullscreen mode in a jQTouch application?

    - by Christopher Young
    I'm using jQTouch to develop a version of a website optimized for safari on the iphone. The jQTouch demo helpfully shows how to show an "install this" message for users not using full screen mode and hide it for those who are. When in fullscreen mode, the body should have the class "fullscreen." So you can hide the "install this" message for people who have already added your app to their home page by adding this css rule to your stylesheet: body.fullscreen #home .info { display: none; } What I'd like to do is require users to use the app in fullscreen mode only. When viewed from the regular browser, they should only see a message asking them to install the app. That message should of course be hidden otherwise. This ought to be really, really easy, so I must just be missing something obvious. I thought one way to do this would be to simply test for the class "fullscreen" on the body: if it's not there, use goTo to get to another div, or hide the other divs, or something like that. Strangely, however, this doesn't work. As a test, I've still got the original "info" message, as in the jQTouch demo, and it doesn't show up when I launch in fullscreen mode. So the body must have the fullscreen class. And yet I can't find any other trace of it: when I put this alert to test things after the document has loaded, I get nothing when launching in fullscreen mode: alert($("body").attr("class")); I also thought I might test for fullscreen mode by checking for the value of the fullScreen boolean. But this doesn't seem to work either. What am I missing? What is the best way to do this?

    Read the article

  • In WebBrowser control get Silverlight Canvas

    - by darren
    I have a webbrowser control that loads an html page which contains a silverlight object. I want to use the webbrowser control to get the silverlight canvas so that I can pass it to a WriteableBitmap() object. The silverlight is being loaded into a div called SilverlightHostControl and I am trying to get it like this in C#: object element = webBrowser.Document.GetElementById("SilverlightControlHost"); This returns a {System.Windows.Forms.HtmlElement} which contains the silverlight object but I don't know how to get the Silverlight object so I can use it the WriteableBitmap() object.

    Read the article

  • StructureMap Class Chaining - Stack Overflow or other errors

    - by Jason Young
    This has completely baffled me on a number of configurations. I keep reading the documentation, and I just don't get it. Here is my registration code: ForRequestedType<SimpleWorkItemProcessor>().TheDefault.Is.OfConcreteType<SimpleWorkItemProcessor>(); ForRequestedType<WorkItemRetryProcessor>().TheDefault.Is.OfConcreteType<WorkItemRetryProcessor>() .CtorDependency<IWorkItemProcessor>().Is(x => x.OfConcreteType<SimpleWorkItemProcessor>()) .WithCtorArg("busyDelay").EqualTo(TimeSpan.FromMilliseconds(20)) .WithCtorArg("overallTimeout").EqualTo(TimeSpan.FromSeconds(60)); ForRequestedType<WorkItemQueue>().TheDefault.Is.OfConcreteType<WorkItemQueue>() .CtorDependency<IWorkItemProcessor>().Is(x => x.OfConcreteType<WorkItemRetryProcessor>()); As it is, it says there's no default instance for IWorkItemProcessor (which is correct). Switching the last line to this: ForRequestedType<IWorkItemProcessor>().TheDefault.Is.OfConcreteType<WorkItemQueue>() .CtorDependency<IWorkItemProcessor>().Is(x => x.OfConcreteType<WorkItemRetryProcessor>()); ...Makes a stack overflow exception. How do you chain classes together that both implement an interface, and take in that same interface in their constructor?

    Read the article

  • De-dupe a list of hundreds of thousands of first name/last name/address/date of birth

    - by Darren
    I have a large data set which I know contains many dupicate records. Basically I have data on first name, last name, different address components and date of birth. I think the best way to do this is to use the name and date of birth as chances are if these things match, it's the same person. There are probably lots of instances where there are slight differences in spelling (like typos missing a single letter) or use of name (ie: some might have a middle initial in first name column) which would be good to account for, but I'm not sure how to approach this. Are there any tools or articles on going about this process? The data is all in a MySQL database and I have a basic proficiency in SQL.

    Read the article

  • keeping references to inflated custom views

    - by darren
    Hi While researching how to create custom compound views in Android, I have come across this pattern a lot (example comes from the Jteam blog) : public class FirstTab extends LinearLayout { private ImageView imageView; private TextView textView; private TextView anotherTextView; public FirstTab(Context context, AttributeSet attributeSet) { super(context, attributeSet); LayoutInflater inflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE); inflater.inflate(R.layout.firstTab, this); } } I mostly understand how this is working, except for the part where inflate() is called. The documentation says that this method returns a View object, but in this example the author does not store the result anywhere. After inflation, how is the new View created fromt eh XML associated with this class? I thought about assigning it to "this", but that seems very wrong. thanks for any clarification.

    Read the article

  • Resources related to data-mining and gaming on social networks

    - by darren
    Hi all I'm interested in the problem of patterning mining among players of social networking games. For example detecting cheaters of a game, given a company's user database. So far I have been following the usual recipe for a data mining project: construct a data warehouse that aggregates significant information select a classifier, and train it with a subsectio of records from the warehouse validate classifier with another test set lather, rinse, repeat Surprisingly, I've found very little in this area regarding literature, best practices, etc. I am hoping to crowdsource the information gathering problem here. Specifically what I'm looking for: What classifiers have worked will for this type of pattern mining (it seems highly temporal, users playing games, users receiving rewards, users transferring prizes etc). Are there any highly agreed upon attributes specific to social networking / gaming data? What is a practical amount of information that should be considered? One problem I've run into is data overload, where queries and data cleansing may take days to complete. Related to point above, what hardware resources are required to produce results? I've found it difficult to estimate the amount of computing power I will require for production use. It has become apparent that a white box in the corner does not have enough horse-power for such a project. Are companies generally resorting to cloud solutions? Are they buying clusters? Basically, any resources (theoretical, academic, or practical) about implementing a social networking / gaming pattern-mining program would be very much appreciated. Thanks.

    Read the article

  • How to dispose NHibernate ISession in an ASP.NET MVC App

    - by Joe Young
    I have NHibernate hooked up in my asp.net mvc app. Everything works fine, if I DON'T dispose the ISession. I have read however that you should dispose, but when I do, I get random "Session is closed" exceptions. I am injecting the ISession into my other objects with Windsor. Here is my current NHModule: public class NHibernateHttpModule : IHttpModule { public void Init(HttpApplication context) { context.BeginRequest += context_BeginRequest; context.EndRequest += context_EndRequest; } static void context_EndRequest(object sender, EventArgs e) { CurrentSessionContext.Unbind(MvcApplication.SessionFactory); } static void context_BeginRequest(object sender, EventArgs e) { CurrentSessionContext.Bind(MvcApplication.SessionFactory.OpenSession()); } public void Dispose() { // do nothing } } Registering the ISession: container .Register(Component.For<ISession>() .UsingFactoryMethod(() => MvcApplication.SessionFactory.GetCurrentSession()).LifeStyle.Transient); The error happens when I tack the Dispose on the unbind in the module. Since I keep getting the session is closed error I assume this is not the correct way to do this, so what is the correct way? Thanks, Joe

    Read the article

  • Error using nservicebus with nettiers

    - by Darren
    I'm using the nservicebus springbuilder(below) with compiles and runs fine. However once I add a single DataRepository entry in the code to call nettiers the project compiles but throws an exception on the line below: IBus Bus = Configure.With().SpringBuilder() .XmlSerializer() .MsmqTransport() .IsTransactional(true) .PurgeOnStartup(false) .UnicastBus() .ImpersonateSender(false) .LoadMessageHandlers() .CreateBus() .Start(); Exception: {"Could not load file or assembly 'Microsoft.Practices.Unity, Version=1.2.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.":"Microsoft.Practices.Unity, Version=1.2.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"}

    Read the article

  • Decision Tree code golf

    - by Chris Jester-Young
    In Google Code Jam 2009, Round 1B, there is a problem called Decision Tree that lent itself to rather creative solutions. Post your shortest solution; I'll update the Accepted Answer to the current shortest entry on a semi-frequent basis, assuming you didn't just create a new language just to solve this problem. :-P Current rankings: 107 Perl 121 PostScript (binary) 136 Ruby 154 Arc 160 PostScript (ASCII85) 170 PostScript 192 Python 199 Common Lisp 214 LilyPond 222 JavaScript 273 Scheme 280 R 312 Haskell 314 PHP 339 m4 346 C 406 Fortran 462 Java 476 Java (well, kind of) 718 OCaml 759 F# 1741 sed C++ not qualified for now

    Read the article

  • PHP Explode with an Unicode character as separator

    - by Young Roger
    XPDFs pdftotext converts pdf to text and outputs it at command line level. If needed it inserts PageBreaks between the pages as specified in TextOutputDev.cc: eopLen = uMap->mapUnicode(0x0c, eop, sizeof(eop)); This Unicode symbol is encoding independent, -enc ASCII7 wouldn't change it. I'm currently willing to use PHP for converting and splitting the PDF file into several TXT pages for database storage. However, the following function does work, but takes twice as long as a conversion of the whole book in one time. for($i = 1; $i <= $pages[0]; $i++) $page[$i] = shell_exec('/usr/bin/pdftotext sample.pdf -f '.$i.' -l '.$i.' -'); How am I supposed to explode(0x0c, $wholePDF) with an Unicode character as separator? Currently, page[$i] doesn't seem to retrieve those weird Unicode PageBreak characters from the shell_exec(). I tried several headers for encoding (UTF-8 especially) but it didn't work out so far.

    Read the article

  • VS2010 and local databases

    - by Darren
    Is it possible to connect to a local database (in the app_data folder) using the Data - Transact SQL Editor in Visual Studio 2010? When I launch the Transact SQL Editor from VS2010 I get the "Microsoft SQL Server 2008 RC" connect to server dialog. The options I have for Server type are "Database Engine" and "SQL Server Compact"

    Read the article

  • is_tarfile() returns True for a blank file

    - by Zachary Young
    Hello all, I am testing some logic to handle a user uploading a TAR file. When I feed a blank file to tarfile.is_tarfile() it returns True, which is not what I am expecting: $ touch tartest $ cat tartest $ python -c "import tarfile; print tarfile.is_tarfile('tartest')" True If I add some text to the file, it returns False, which I am expecting: $ echo "not a tar" > tartest $ python -c "import tarfile; print tarfile.is_tarfile('tartest')" False I could add a check at the beginning to check for a zero-length file, but based on the documentation for tarfile.is_tarfile(name) I think this is unecessary: Return True if name is a tar archive file, that the tarfile module can read. I went so far as to check the source, tarfile.py, and I can see that it is checking header blocks but I do not fully understand how it is evaluating those blocks. Am I misreading the documentation and therefore setting unfair expectations? Thank you, Zachary

    Read the article

  • How do I silence the following RightAWS messages when running tests

    - by Laurie Young
    I'm using the RighAWS gem, and mocking at the http level so that the RightAWS code is being executed as part of my tests. When this happens I get the following output ....New RightAws::S3Interface using per_request-connection mode Opening new HTTP connection to s3.amazonaws.com:80 .New RightAws::S3Interface using per_request-connection mode . Even though all the tests pass, when I do have errors its harder to scan them because of this output. is there a nice way to silence it?

    Read the article

  • How to manage a MotionEvent going from one View to another?

    - by Darren
    I have a SurfaceView that takes up part of the screen, and some buttons along the bottom. When a button is pressed and the user drags, I want to be able to drag a picture (based on the button) onto the SurfaceView and have it drawn there. I want to be able to use clickListeners and the like, and not just have a giant SurfaceView with me writing code to detect where the user pressed and if it's a button, etc. I have somewhat of a solution, but it seems a bit of a hack to me. What is the best way to accomplish this using the framework intelligently? Part of my XML: <RelativeLayout android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent" android:background="@drawable/background"> <!-- Place buttons along the bottom --> <RelativeLayout android:id="@+id/bottom_bar" android:orientation="horizontal" android:layout_width="fill_parent" android:layout_height="40dip" android:layout_alignParentBottom="true" android:background="@null"> <ImageButton android:id="@+id/btn_1" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_centerVertical="true" android:background="@null" android:src="@drawable/btn_1"> </ImageButton> <!-- More buttons here... --> </RelativeLayout> <!-- Place the SurfaceView in a frame so we can stack on top of it --> <FrameLayout android:layout_width="fill_parent" android:layout_height="0px" android:layout_weight="1" android:layout_above="@id/bottom_bar"> <com.project.question.MySurfaceView android:id="@+id/my_view" android:layout_width="fill_parent" android:layout_height="fill_parent" /> </FrameLayout> And the relevant Java code in MySurfaceView, which extends SurfaceView. mTouchX and Y are used in the onDraw method to draw the image: @Override public boolean onTouchEvent(MotionEvent event){ mTouchX = (int) event.getX(); mTouchY = (int) event.getY(); return true; } public void onButtonTouchEvent(MotionEvent event){ event.setLocation(event.getX(), event.getY() + mScreenHeight); onTouchEvent(event); } Finally, the activity: @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); requestWindowFeature(Window.FEATURE_NO_TITLE); setContentView(R.layout.my_surface); mView = (MySurfaceView) findViewById(R.id.my_view); mSurfaceHeight = mView.getHeight(); mBtn = (ImageButton) findViewById(R.id.btn_1); mBtn.setOnTouchListener(mTouchListener); } OnTouchListener mTouchListener = new OnTouchListener() { public boolean onTouch(View v, MotionEvent event) { int [] location = new int[2]; v.getLocationOnScreen(location); event.setLocation(event.getX() + location[0], event.getY()); mView.onButtonTouchEvent(event); return true; } }; Strangely, one has to add to the x-coordinate in the activity, then add to the y coordinate in the View. Otherwise, it doesn't show up in the correct position. If you add nothing, something drawn using mTouchX and mTouchY will show up in the upper left corner of the SurfaceView. Any direction would be greatly appreciated. If I'm going about this completely the wrong way, that would be good information too.

    Read the article

  • Logging with Quartz.net

    - by Young Ninja
    I will shamelessly state that I have little experience with Log4Net... I only just installed it, but it won't capture log events from Quartz.net, which is a scheduling library. Apparently Quartz.net uses Commons Logging and that needs to be configured to point to my Log4Net settings. Unfortunately, it doesn't seem to work. Help is appreciated: <configSections> ... <section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler, log4net" /> <section name="quartz" type="System.Configuration.NameValueSectionHandler, System, Version=1.0.5000.0,Culture=neutral, PublicKeyToken=b77a5c561934e089" /> <section name="commonLogging" type="Common.Logging.ConfigurationSectionHandler, Common.Logging"/> </configSections> <!-- Log4net error handling --> <log4net> <appender name="LogFileAppender" type="log4net.Appender.FileAppender"> <param name="File" value="Admin/LabSlice.log" /> <param name="AppendToFile" value="true" /> <layout type="log4net.Layout.PatternLayout"> <param name="ConversionPattern" value="%d [%t] %-5p %c %m%n" /> </layout> </appender> <root> <level value="INFO" /> <appender-ref ref="LogFileAppender" /> </root> </log4net> <!-- Commons logging (Quart.net logs) --> <commonLogging> <logging> <factoryAdapter type="Common.Logging.Log4Net.Log4NetLoggerFactoryAdapter, Common.Logging.Log4net"> <arg key="configType" value="INLINE" /> </factoryAdapter> </logging> </commonLogging>

    Read the article

  • Matrices of "long"s in Java/COLT?

    - by Darren Wilkinson
    I'm very new to Java/COLT so apologies if this is a dumb question... But, is it possible to define (2d) matrices of type "long" using the cern.colt.matrix stuff? If so, how?! I can find an abstract class for "Object" and a concrete implementation for "double", but then I am stuck... Thanks,

    Read the article

  • Stack overflow code golf

    - by Chris Jester-Young
    To commemorate the public launch of Stack Overflow, what's the shortest code to cause a stack overflow? Any language welcome. ETA: Just to be clear on this question, seeing as I'm an occasional Scheme user: tail-call "recursion" is really iteration, and any solution which can be converted to an iterative solution relatively trivially by a decent compiler won't be counted. :-P ETA2: I've now selected a “best answer”; see this post for rationale. Thanks to everyone who contributed! :-)

    Read the article

  • Getting a full list of the URLS in a rails application

    - by Laurie Young
    How do I get a a complete list of all the urls that my rails application could generate? I don't want the routes that I get get form rake routes, instead I want to get the actul URLs corrosponding to all the dynmically generated pages in my application... Is this even possible? (Background: I'm doing this because I want a complete list of URLs for some load testing I want to do, which has to cover the entire breadth of the application)

    Read the article

  • Where to specify line height for sIFR

    - by Darren
    I have not had any luck changing the line height for sIFR. I have tried changing the sIFR css and config file as well as my general style sheet. Is there a special trick? GENERAL CSS h1 { font-family: Georgia, Times, serif; font-size: 24px; font-style: normal; line-height: 16px; (has had zero impact, even when I go negative) color: #000000; text-transform: uppercase; margin: 0; padding: 0; outline: none; } CONFIG FILE sIFR.replace(minionpro, { selector: 'h1', wmode: 'transparent', css: '.sIFR-root { color:#000000; text-transform: uppercase; }' });

    Read the article

  • Phantomjs creating black output from SVG using page.render

    - by Neil Young
    I have been running PhantomJS 1.9.6 happily on a turnkey Linux server for about 4 months now. Its purpose is to take an SVG file and create different sizes using the page.render function. This has been doing this but since a few days ago has started to generate a black mono output. Please see below: The code: var page = require('webpage').create(), system = require('system'), address, output, ext, width, height; if ( system.args.length !== 4 ) { console.log("{ \"result\": false, \"message\": \"phantomjs.rasterize: error need address, output, extension arguments\" }"); //console.log('phantomjs.rasterize: error need address, output, extension arguments'); phantom.exit(1); } else if( system.args[3] !== "jpg" && system.args[3] !== "png"){ console.log("{ \"result\": false, \"message\": \"phantomjs.rasterize: error \"jpg\" or \"png\" only please\" }"); //console.log('phantomjs.rasterize: error "jpg" or "png" only please'); phantom.exit(1); } else { address = system.args[1]; output = system.args[2]; ext = system.args[3]; width = 1044; height = 738; page.viewportSize = { width: width, height: height }; //postcard size page.open(address, function (status) { if (status !== 'success') { console.log("{ \"result\": false, \"message\": \"phantomjs.rasterize: error loading address ["+address+"]\" }"); //console.log('phantomjs.rasterize: error loading address ['+address+'] '); phantom.exit(); } else { window.setTimeout(function () { //--> redner full size postcard page.render( output + "." + ext ); //--> redner smaller postcard page.zoomFactor = 0.5; page.clipRect = {top:0, left:0, width:width*0.5, height:height*0.5}; page.render( output + ".50." + ext); //--> redner postcard thumb page.zoomFactor = 0.25; page.clipRect = {top:0, left:0, width:width*0.25, height:height*0.25}; page.render( output + ".25." + ext); //--> exit console.log("{ \"result\": true, \"message\": \"phantomjs.rasterize: success ["+address+"]>>["+output+"."+ext+"]\" }"); //console.log('phantomjs.rasterize: success ['+address+']>>['+output+'.'+ext+']'); phantom.exit(); }, 100); } }); } Does anyone know what can be causing this? There have been no server configuration changes that I know of. Many thanks for your help.

    Read the article

  • Images not responsive although in responsive container

    - by Darren Sweeney
    I have the following: <div id="hp_imgs"> <img src="/images/hp/1.jpg"> <img src="/images/hp/2.jpg"> <img src="/images/hp/3.jpg"> <img src="/images/hp/4.jpg"> <img src="/images/hp/5.jpg"> <img src="/images/hp/6.jpg"> <img src="/images/hp/7.jpg"> <img src="/images/hp/8.jpg"> </div> The images were sized when created to form a grid of sorts, so need to be in the order where they are. Consequently, when/if the page is resized I want the images to resize and stay where they are. Here's what I'm trying but images are simply staying the same size and not resizing: #hp_imgs { width:66%; float:left; } #hp_imgs img { float:left; margin:2px; border-radius:4px; display: block; max-width:100%; height:100%; } Is there a better/different way to achieve this? FIDDLE Here's a sample to play with: Fiddle

    Read the article

  • Using Subsonic 2.2 on Windows Mobile 5 with SQL Server CE 3.5

    - by Darren
    I have seen comments stating that Subsonic currently does nt support MS SQL Server CE (http://stackoverflow.com/questions/1130863/subsonic-and-ms-sql-server-compact-data-provider). The link provided is for Subsonic 3. So my question is, does Subsonic 2.2 support MS SQL Server CE? And if so, is there any documentation on how to use sonic.exe to generate Subsonic's classes and controllers from the database file?

    Read the article

< Previous Page | 2 3 4 5 6 7 8 9 10 11 12 13  | Next Page >