Search Results

Search found 904 results on 37 pages for 'andy dent'.

Page 19/37 | < Previous Page | 15 16 17 18 19 20 21 22 23 24 25 26  | Next Page >

  • MySql select by column value. Separeta operator for columns.

    - by andy
    Hi all, i have a mysql table like this +-----+---------+-----------+-----------------+-------+ | id | item_id | item_type | field_name | data | +-----+---------+-----------+-----------------+-------+ | 258 | 54 | page | field_interests | 1 | | 257 | 54 | page | field_interests | 0 | | 256 | 54 | page | field_author | value | +-----+---------+-----------+-----------------+-------+ And, I need build query like this SELECT * FROM table WHERE `field_name`='field_author' AND `field_author.data` LIKE '%jo%' AND `field_name`='field_interests' AND `field_interests.data`='0' AND `field_name`='field_interests' AND `field_interests.data`='1' This is sample query. MySql can't do queries like that. I mean than SELECT * FROM table WHERE name='jonn' AND name='marry' will return 0 rows. Cant anybody help me. Thanks.

    Read the article

  • Need some advice on Core Data modeling strategy

    - by Andy
    I'm working on an iPhone app and need a little advice on modeling the Core Data schema. My idea is a utility that allows the user to speed-dial their contacts using user-created rules based on the time of day. In other words, I would tell the app that my wife is commuting from 6am to 7am, at work from 7am to 4pm, commuting from 4pm to 5pm, and home from 5pm to 6am, Monday through Friday. Then, when I tap her name in my app, it would select the number to dial based on the current day and time. I have the user interface nearly complete (thanks in no small part to help I've received here), but now I've got some questions regarding the persistent store. The user can select start- and stop-times in 5-minute increments. This means there are 2,016 possible "time slots" in week (7 days * 24 hours * 12 5-minute intervals per hour). I see a few options for setting this up. Option #1: One array of time slots, with 2,016 entries. Each entry would be a dictionary containing a contact identifier and an associated phone number to dial. I think this means I'd need a "Contact" entity to store the contact information, and a "TimeSlot" entity for each of the 2,016 possible time slots. Option #2: Each Contact has its own array of time slots, each with 2,016 entries. Each array entry would simply be a string indicating which phone number to dial. Option #3: Each Contact has a dictionary of time slots. An entry would only be added to the dictionary for time slots with an active rule. If a search for, say, time slot 1,299 (Friday 12:15pm) didn't find a key @"1299" in the dictionary, then a default number would be dialed instead. I'm not sure any of these is the "right" way or the "best" way. I'm not even sure I need to use Core Data to manage it; maybe just saving arrays would be simpler. Any input you can offer would be appreciated.

    Read the article

  • C# console application

    - by Andy
    I have sample exe say console.exe on "programfiles\myAppFolder" .It serves the purpose of logging the message to eventviewer EventLog.WriteEntry(sSource, sEvent, EventLogEntryType.Warning, 234); But whenever I click on the exe I need to call this exe on un-install of appcn from NSIS script .However it gives me an error always that "thisappConsole has encountered a problem and needs to close. We are sorry for the inconvenience." Can anyone help me with this. If I put any other sample consoleapp without any additional "using statements". it works ..

    Read the article

  • Docking *inside* an editor

    - by Andy Thomas-Cramer
    I have a document type which has multiple presentations. Say I want to display the document in an RCP editor with a customizable subset of those presentations, in a layout chosen by the user. One option that has come up is docking-like behavior for the panels inside an individual editor, with drag-and-drop, resizing, closing, maybe rollover and floating. Clearly this would need usability testing, but my question here is of feasibility. Are there any existing libraries or e4 plans to support behavior like this?

    Read the article

  • What's the best visual merge tool for Git?

    - by andy
    Title says it. What's the best tool for viewing and editing a merge in Git? I'd like to get a 3-way merge view, with "mine", "theirs" and "output" in separate panels. Also, instructions for invoking said tool would be great. (I still haven't figure out how to start kdiff3 in such a way that it doesn't give me an error) edit: My OS is Ubuntu.

    Read the article

  • How can I make a career in Formal Methods programming in USA?

    - by A5al Andy
    I've found that my (USA) professors recoil with a near-disgust when I ask them about how to pursue a career in Formal Methods programming. They say, "Oh, that stuff! That stuff is anal. You don't need that European POS to get a job." I'm sure I'll get a job without it, but Formal Methods interests me so much that I bet I'd like to make a career of it. I'd like to learn about Formal Methods at an American University and then work in that field here. I've found that even professors at more important universities than mine don't seem to welcome Formal Methods. Almost all FM research project webpages are semi-abandoned and moldering. Europe is where the action seems to be for this. Can anyone suggest a plan of attack, and along the way explain the antipathy to Formal Methods in the US? I'm a sophomore at a public university in the South.

    Read the article

  • Accessing protected REST endpoint with JQuery

    - by Andy
    I have a site where members login to their account (FormsAuth). I would like to set up a RESTful service that I can access using jQuery. I would like to protect these services using the same FormsAuth. How would a third-party site be able to access these services? They would need to pass in the Principal/Identity to the service, right? I've only seen examples of Basic Authentication (which Twitter uses and jQuery supports). I'm very new to WCT/REST, so not sure how this should be done.

    Read the article

  • Circular dependencies in StructureMap - can they be broken with property injection?

    - by Andy
    Hi, I've got the simplest kind of circular dependency in structuremap - class A relies on class B in its constructor, and class B relies on class A in its constructor. To break the dependency, I made class B take class A as a property, rather than a constructor argument, but structuremap still complains. I've seen circular dependencies broken using this method in other DI frameworks - is this a problem with Structuremap or am I doing something wrong? Edit: I should mention that class B's property is an array of class A instances, wired up like this: x.For<IB>().Singleton().Use<B>().Setter(y => y.ArrayOfA).IsTheDefault();

    Read the article

  • Using the FreeType lib to create text bitmaps to draw in OpenGL 3.x

    - by Andy
    At the moment I not too sure where my problem is. I can draw loaded images as textures no problem, however when I try to generate a bitmap with a char on it I just get a black box. I am confident that the problem is when I generate and upload the texture. Here is the method for that; the top section of the if statement just draws an texture of a image loaded from file (res/texture.jpg) and that draws perfectly. And the else part of the if statement will try to generate and upload a texture with the char (variable char enter) on. Source Code, I will add shaders and more of the C++ if needed but they work fine for the image. void uploadTexture() { if(enter=='/'){ // Draw the image. GLenum imageFormat; glimg::SingleImage image = glimg::loaders::stb::LoadFromFile("res/texture.jpg")->GetImage(0,0,0); glimg::OpenGLPixelTransferParams params = glimg::GetUploadFormatType(image.GetFormat(), 0); imageFormat = glimg::GetInternalFormat(image.GetFormat(),0); glGenTextures(1,&textureBufferObject); glBindTexture(GL_TEXTURE_2D, textureBufferObject); glimg::Dimensions dimensions = image.GetDimensions(); cout << "Texture dimensions w "<< dimensions.width << endl; glTexImage2D(GL_TEXTURE_2D, 0, GL_RGB8, dimensions.width, dimensions.height, 0, params.format, params.type, image.GetImageData()); }else { // Draw the char useing the FreeType Lib FT_Init_FreeType(&ft); FT_New_Face(ft, "arial.ttf", 0, &face); FT_Set_Pixel_Sizes(face, 0, 48); FT_GlyphSlot g = face->glyph; glGenTextures(1,&textureBufferObject); glBindTexture(GL_TEXTURE_2D, textureBufferObject); glPixelStorei(GL_UNPACK_ALIGNMENT, 1); FT_Load_Char(face, enter, FT_LOAD_RENDER); FT_Bitmap theBitmap = g->bitmap; int BitmapWidth = g->bitmap.width; int BitmapHeight = g->bitmap.rows; cout << "draw char - " << enter << endl; cout << "g->bitmap.width - " << g->bitmap.width << endl; cout << "g->bitmap.rows - " << g->bitmap.rows << endl; int TextureWidth =roundUpToNextPowerOfTwo(g->bitmap.width); int TextureHeight =roundUpToNextPowerOfTwo(g->bitmap.rows); cout << "texture width x height - " << TextureWidth <<" x " << TextureHeight << endl; GLubyte* TextureBuffer = new GLubyte[ TextureWidth * TextureWidth ]; for(int j = 0; j < TextureHeight; ++j) { for(int i = 0; i < TextureWidth; ++i) { TextureBuffer[ j*TextureWidth + i ] = (j >= BitmapHeight || i >= BitmapWidth ? 0 : g->bitmap.buffer[ j*BitmapWidth + i ]); } } glTexImage2D(GL_TEXTURE_2D, 0, GL_RGB8, TextureWidth, TextureHeight, 0, GL_RGB8, GL_UNSIGNED_BYTE, TextureBuffer); } }

    Read the article

  • using a texture mesh and wireframe mesh in threejs

    - by Andy Poes
    I'm trying to draw a wireframe mesh and a textured mesh in threeJS but when I have both added to my scene the textured mesh doesn't display. Code below: I'm having trouble creating two meshes that share the same geometry where one of the materials is wireframe and the other is a texture. If one of the materials is wireframe and the other is just a color fill it works fine- but as soon as I make the second material a texture it stops working. If I comment out scene.add( wireMesh ); then the textured mesh shows up. var wireMat = new THREE.MeshBasicMaterial( { color:0x00FFFF, wireframe: true, transparent: true, overdraw:true } ); var wireMesh = new THREE.Mesh(geometry, wireMat); scene.add( wireMesh ); var texture = texture = THREE.ImageUtils.loadTexture( 'textures/world.jpg' ); var imageMat = new THREE.MeshBasicMaterial( {color:0xffffff, map: texture } ); var fillMesh = new THREE.Mesh(geometry, imageMat); scene.add( fillMesh );

    Read the article

  • UAC elevation- NSIS script

    - by Andy
    I created installer via NSIS. "c:\program files\myapp" is default folder for my application.Included script to run myapp on startUp.I'm having windows 7 But it always fail to start on start-up of machine. How can I elevate the user privileges to call it on startup from Program files/myapp.exe. or Is any other alternative to achieve above goal.

    Read the article

  • Calling Facebook API without authenticating user/"connecting"

    - by Andy
    Hi, I am working with facebook's API and I want to call the links.prevew method. http://wiki.developers.facebook.com/index.php/Links.preview Is it possible to call this method without having my user authenticate or "connect"? For example, not all of my users have hooked up their facebook accounts to my website, but I still want to use this API method. I am getting the following error: Fatal error: Uncaught Exception: 453: A session key is required for calling this method thrown in /public_html/libs/facebook.php on line 413 But on the wiki it says that the method does not require a session key? If it is not possible to make API calls without such a key, is there anyway I can make calls on behalf of my account or my applications account (rather then a users account)? Any help is appreciated, thanks!

    Read the article

  • Newbie T-SQL dynamic stored procedure -- how can I improve it?

    - by Andy Jones
    I'm new to T-SQL; all my experience is in a completely different database environment (Openedge). I've learned enough to write the procedure below -- but also enough to know that I don't know enough! This routine will have to go into a live environment soon, and it works, but I'm quite certain there are a number of c**k-ups and gotchas in it that I know nothing about. The routine copies data from table A to table B, replacing the data in table B. The tables could be in any database. I plan to call this routine multiple times from another stored procedure. Permissions aren't a problem: the routine will be run by the dba as a timed job. Could I have your suggestions as to how to make it fit best-practice? To bullet-proof it? ALTER PROCEDURE [dbo].[copyTable2Table] @sdb varchar(30), @stable varchar(30), @tdb varchar(30), @ttable varchar(30), @raiseerror bit = 1, @debug bit = 0 as begin set nocount on declare @source varchar(65) declare @target varchar(65) declare @dropstmt varchar(100) declare @insstmt varchar(100) declare @ErrMsg nvarchar(4000) declare @ErrSeverity int set @source = '[' + @sdb + '].[dbo].[' + @stable + ']' set @target = '[' + @tdb + '].[dbo].[' + @ttable + ']' set @dropStmt = 'drop table ' + @target set @insStmt = 'select * into ' + @target + ' from ' + @source set @errMsg = '' set @errSeverity = 0 if @debug = 1 print('Drop:' + @dropStmt + ' Insert:' + @insStmt) -- drop the target table, copy the source table to the target begin try begin transaction exec(@dropStmt) exec(@insStmt) commit end try begin catch if @@trancount > 0 rollback select @errMsg = error_message(), @errSeverity = error_severity() end catch -- update the log table insert into HHG_system.dbo.copyaudit (copytime, copyuser, source, target, errmsg, errseverity) values( getdate(), user_name(user_id()), @source, @target, @errMsg, @errSeverity) if @debug = 1 print ( 'Message:' + @errMsg + ' Severity:' + convert(Char, @errSeverity) ) -- handle errors, return value if @errMsg <> '' begin if @raiseError = 1 raiserror(@errMsg, @errSeverity, 1) return 1 end return 0 END Thanks!

    Read the article

  • inline block ie7 on h2

    - by Andy
    I think im going to kill someone high up in microsoft very very soon: Please can someone help me get my head around this bug: http://www.yellostudio.co.uk/tm/selection.html# I'd like the top h2 to display inline block alongside the help icons on the right. The issue only exists in ie7 and its doing my sweed in... Any help would be very very much appreciated

    Read the article

  • Wordpress Template get_the_tags() help

    - by Andy
    Hi Guys, I am using this code to get the tags in my wordpress posts for a theme `<?php $posttags = get_the_tags(); if ($posttags) { foreach ($posttags as $tag) { $tagnames[count($tagnames)] = $tag->name; } $comma_separated_tagnames = implode(", ", $tagnames); print_r($comma_separated_tagnames); } ?>` The PROBLEM is that it is returning tags for "all posts" not just individual posts, and I think the problem is that if a post DOESNT have tags - it just inserts tags anyway. Can anyone help modify this so: It return tags only for a post - not all tags If there are no tags for a post, dont return anything ? Really appreciate any help P.S - Can check out here for the wordpress docs

    Read the article

  • How to stop IE7 clearing floats because of width property

    - by Andy Hume
    I have a containing element with a number of floated elements in it. That containing element also has a percentage width value applied to it. In IE7, content following the element containing the floats is cleared because of the width value which gives it hasLayout (I think!). I don't want the containing element to haveLayout, but I do need it to have an explicit width. Is there a way of working around this problem in IE7, effectively forcing hasLayout=false.

    Read the article

  • Differences between 'Add web site/solution to source control...'

    - by Andy Rose
    I have opened a website website hosted on my workstation in Visual Studio 2008 and saved it as solution. I now want to add this to source contol and I am being given the option to either 'Add solution to source control...' or 'Add web site to source control...'. This solution needs to be accessed, worked on and run locally by several other developers so I was wondering what the key differences are between each option and which would be the best to choose?

    Read the article

  • If you're not supposed to use Regular Expressions to parse HTML, then how are HTML parsers written?

    - by Andy E
    I see questions every day asking how to parse or extract something from some HTML string and the first answer/comment is always "Don't use RegEx to parse HTML, lest you feel the wrath!" (that last part is sometimes omitted). This is rather confusing for me, I always thought that in general, the best way to parse any complicated string is to use a regular expression. So how does a HTML parser work? Doesn't it use regular expressions to parse. One particular argument for using a regular expression is that there's not always a parsing alternative (such as JavaScript, where DOMDocument isn't a universally available option). jQuery, for instance, seems to manage just fine using a regex to convert a HTML string to DOM nodes. Not sure whether or not to CW this, it's a genuine question that I want to be answered and not really intended to be a discussion thread.

    Read the article

  • XML Parseing Error when serving a PDF

    - by Andy
    I'm trying to serve a pdf file from a database in ASP.NET using an Http Handler, but every time I go to the page I get an error XML Parsing Error: no element found Location: https://ucc489/rc/NoteFileHandler.ashx?noteId=1,msdsId=3 Line Number 1, Column 1: ^ Here is my HttpHandler code: public class NoteFileHandler : IHttpHandler { public void ProcessRequest(HttpContext context) { if (context.Request.QueryString.HasKeys()) { if (context.Request.QueryString["noteId"] != null && context.Request.QueryString["msdsId"] != null) { string nId = context.Request.QueryString["noteId"]; string mId = context.Request.QueryString["msdsId"]; DataTable noteFileDt = App_Models.Notes.GetNoteFile(nId, mId); if (noteFileDt.Rows.Count > 0) { try { context.Response.Clear(); context.Response.AddHeader("content-disposition", "attachment;filename=" + noteFileDt.Rows[0][0] + ".pdf"); context.Response.ContentType = "application/pdf"; byte[] file = (byte[])noteFileDt.Rows[0][1]; context.Response.BinaryWrite(file); context.Response.End(); } catch { context.Response.ContentType = "text/plain"; context.Response.Write("File Not Found"); context.Response.StatusCode = 404; } } } } } public bool IsReusable { get { return false; } } } Is there anything else I need to do (server configuration/whatever) to get my pdf file to load?

    Read the article

  • WPF - ListBox ignores Style When ItemsSource is bound

    - by Andy T
    Hi, I have created styled a ListBox in WPF so that it is rendered as a checkbox list. When I populate the ListBox's items manually, the styling works perfectly. However, when I instead bind the ItemsSource of the ListBox to a static resource (an ItemsControl containing the required items), the styling is completely dropped. Here's the style: <Style x:Key="CheckBoxListStyle" TargetType="ListBox"> <Style.Resources> <Style TargetType="ListBoxItem"> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="ListBoxItem"> <Grid Margin="2"> <Grid.ColumnDefinitions> <ColumnDefinition Width="Auto" /> <ColumnDefinition /> </Grid.ColumnDefinitions> <CheckBox IsChecked="{Binding IsSelected, RelativeSource={RelativeSource TemplatedParent}, Mode=TwoWay}"/> <ContentPresenter Grid.Column="1" Margin="2,0,0,0" /> </Grid> </ControlTemplate> </Setter.Value> </Setter> </Style> </Style.Resources> <Setter Property="ItemsPanel"> <Setter.Value> <ItemsPanelTemplate> <WrapPanel Orientation="Vertical" /> </ItemsPanelTemplate> </Setter.Value> </Setter> <Setter Property="BorderThickness" Value="0" /> <Setter Property="Background" Value="Transparent" /> </Style> Here's the code for the ListBox that shows the style correctly: <ListBox x:Name="ColumnsList" Grid.Column="0" Grid.Row="0" Style="{StaticResource CheckBoxListStyle}" BorderThickness="1"> <ListBox.Items> <ListBoxItem>Test</ListBoxItem> <ListBoxItem>Test2</ListBoxItem> <ListBoxItem>Test3</ListBoxItem> </ListBox.Items> </ListBox> Here's the code for the ListBox that ignores the style: <ListBox x:Name="ColumnsList2" Grid.Column="0" Grid.Row="0" Style="{StaticResource CheckBoxListStyle}" BorderThickness="1" ItemsSource="{Binding Source={StaticResource Test1}, Path=Items}"> </ListBox> Hoping someone can help - I'm pretty new to all this and have tried everything I can think of, but everything I've read leads me to believe that setting ItemsSource should have the same outcome as setting the items manually, so I can't see any reason why this would not work. Thanks, AT

    Read the article

  • Conventions for order of parameters in a function

    - by Andy
    In writing functions my brain always spends a few milliseconds to check which order of parameters would be best for a given function. should I write: public Comment AddComment(long userID, string title, string text) Or probably: public Comment AddComment(string title, string text, long userID) Why not: public Comment AddComment(string title, long userID, string text) Do you follow any rules when ordering the parameters for your functions? Which parameter would you place first and which would follow?

    Read the article

  • error wordpress, adjusted sidebar.php to show latest 10 posts

    - by Andy
    Hi, I'm trying to edit my sidebar.php file in my current them WP is using to display the last # of posts (only the titles) as links. I tried using the example of http://codex.wordpress.org/Integrating_WordPress_with_Your_Website but I always get the error on the line that states where the file wp-blog-header can be found. the error when opening the index blog page where the sidebar should be shown: // Get the last 3 posts. Warning: require(/blog/folder/wp-blog-header.php) [function.require]: failed to open stream: No such file or directory in /blog/folder/wp-content/themes/default/sidebar.php on line 7 So what is wrong? Is there a way to permanently embed a function in my html template page that retrieves the latest few posts everytime an article is displayed on the template page? the code: <?php require('/the/path/to/your/wp-blog-header.php'); ?> <?php $posts = get_posts('numberposts=10&order=ASC&orderby=post_title'); foreach ($posts as $post) : start_wp(); ?> <?php the_title(); ?> <?php the_excerpt(); ?> <?php endforeach; ?>

    Read the article

  • make website page get news articles from feeds

    - by Andy
    Hi, I would like to start publishing some news articles from time to time. An option would be to create a new web page for every article but this sounds like it can be done easier. For instance I noticed clear channel uses some kind of feed, like: http://www.z100.com/cc-common/news/sections/newsarticle.html?feed=104650&article=7011404 I don't know what it means and how it works but looks like a nice way to get the article from some kind of database I guess? Does someone knows how this works, or some other way to create new articles etc, some dynamical functionality for instance to generate links to the articles and get the right article from a database for example. thanks!

    Read the article

< Previous Page | 15 16 17 18 19 20 21 22 23 24 25 26  | Next Page >