Search Results

Search found 547 results on 22 pages for 'nathan'.

Page 21/22 | < Previous Page | 17 18 19 20 21 22  | Next Page >

  • Most efficient way to make an activity log

    - by Nathan
    I am making a "recent activity" tab to profiles on my site and I also am going to have a log for moderators to see everything that happens on the site. This would require making an activity log of some sort. I just don't know what would be better. I have 2 options: Make a table called "activity" and then every time someone does something, add a record to it with the type of action, user id, timestamp, etc. Problem: table could get very long. Join all 3 tables (questions, answers, answer_comments) and then somehow show all these on the page in the order in which the action was taken. Problem: this would be extremely hard because I have no clue how I could make it say "John commented on an answer on Question Title Here" by just joining 3 tables. Does anyone know of a better way of making an activity log in this situation? I am using PHP and MySQL. If this is either too inefficient or hard I will probably just forget the Recent Activity tab on profiles but I still need an activity log for moderators. Here's some SQL that I started making for option 2, but this would not work because there is no way of detecting whether the action is a comment, question, or answer when I echo the info in a while loop: SELECT q.*, a.*, ac.* FROM questions q JOIN answers a ON a.questionid = q.qid JOIN answer_comments ac ON c.answerid = a.ans_id WHERE q.user = $userid AND a.userid = $userid AND ac.userid = $userid ORDER BY q.created DESC, a.created DESC, ac.created DESC Thanks in advance for any help!

    Read the article

  • <span> containing 3 overlapping images has 3x the necessary width

    - by Nathan Parrish
    Hi guys, I have a element, containing three overlapping images. Inspecting the element in Chrome shows this: <span id=?"span1">? <img id=?"img1" src=?"images/?progressbar.gif" width=?"120" style=?"position:? relative;? z-index:? 3;?">? <img id=?"img2" src=?"images/?progressbar.gif" style=?"width:? 120px;? height:? 12px;?? position:? relative;? left:? -120px;? z-index:? 2;?">? <img id=?"img3" src=?"images/?progressbar.gif" style=?"width:? 120px;? height:? 12px;? position:? relative;? left:? -240px;? z-index:? 1;?">? </span>? The important point is that the second two images are given a relative position, shifting them to the left so they perfectly overlap the first. But the span itself is still 360 pixels wide (3 x 120 pixels per image). So how can I achieve this effect while keeping the span width tightly bounded around the images? Thanks!

    Read the article

  • How can I remove the head of a main function?

    - by Nathan McDavitt-Van Fleet
    I am trying to move some code from a seperate binary and have it inside my main program. Unfortunately I can't mimic the initialization variables for the main function. How can I create argc and argv by hand? Can someone give me some example assignments. since it looks like this: int main(int argc, char *argv[]) I figured I could assign them like this: int argc=1; char *argv[0]="Example"; But it doesn't work. Can anyone tell me how this might be done?

    Read the article

  • Utilizing a Queue

    - by Nathan
    I'm trying to store records of transactions all together and by category for the last 1, 7, 30 or 360 days. I've tried a couple things, but they've brutally failed. I had an idea of using a queue with 360 values, one for each day, but I don't know enough about queue's to figure out how that would work. Input will be an instance of this class: class Transaction { public string TotalEarned { get; set; } public string TotalHST { get; set; } public string TotalCost { get; set; } public string Category { get; set; } } New transactions can occur at any time during the day, and there could be as many as 15 transactions in a day. My program is using a plain text file as external storage, but how I load it depends on how I decide to store this data. What would be the best way to do this?

    Read the article

  • Controlling processes from Python

    - by Nathan
    Hi, I want to control several subprocesses of the same type from python (I am under linux). I want to: Start them. Stop them. Ask if they are still running. I can start a processes with with spawnl, and get the pid. Using this pid I can stop it with kill. And I am sure there is also a way to ask if it is running with the pid. The problem is, what if the following happens: I start a process, remember the pid. The process ends without me noticing and another completely different process starts getting assigned the same pid. I attempt to kill my process, I kill a completely different one. What is the better way to start and control processes in python? Thanks!

    Read the article

  • Join using combined conditions on one join table

    - by Nathan Wienert
    I have join a table joining songs to genres. The table has a 'source' column that's used to identify where the genre was found. Genres are found from blogs, artists, tags, and posts. So, songs | song_genre | genres id | song_id, source, genre_id | id What I want to build is a song SELECT query that works something like this, given I already have a genre_id: IF exists song_genre with source='artist' AND a song_genre with source='blog' OR exists song_genre with source='artist' AND a song_genre with source='post' OR exists song_genre with source='tag' I'm was going to do it by doing a bunch of joins, but am sure I'm not doing it very well. Using Postgres 9.1.

    Read the article

  • Change jQuery slider option dynamically based on window width

    - by Nathan
    I would like to change a jQuery option based on window width (on load as well as on resize). I've found solutions close to what I need, but I don't understand jQuery or javascript enough to customize them for my needs. Here's my jQuery code: <script type="text/javascript"> var tpj = jQuery; tpj.noConflict(); tpj(document).ready(function () { if (tpj.fn.cssOriginal != undefined) tpj.fn.css = tpj.fn.cssOriginal; tpj('#rev_slider_1_1').show().revolution({ delay: 5000, startwidth: 1920, startheight: 515, hideThumbs: 200, thumbWidth: 100, thumbHeight: 50, thumbAmount: 4, navigationType: "bullet", navigationArrows: "verticalcentered", navigationStyle: "navbar", touchenabled: "on", onHoverStop: "off", navOffsetHorizontal: 0, navOffsetVertical: 20, shadow: 0, fullWidth: "on" }); }); //ready </script> I want to change the startheight based on window width. If the window width is above 1280 I would like the value for the height to be 515, and if it is below 1280 I would like the height to be 615 and if the width is less than 480 make the height 715. With help from another post I am able to change the css I need using this script: $(window).on('load resize', function () { var w = $(window).width(); $("#rev_slider_1_1 #rev_slider_1_1_wrapper") .css('max-height', w > 1280 ? 515 : w > 480 ? 615 : 715); }); But I need to also change the jQuery startheight value on the fly. Can someone help? Thanks!

    Read the article

  • Performance implications of using a variable versus a magic number

    - by Nathan
    I'm often confused by this. I've always been taught to name numbers I use often using variables or constants, but if it reduces the efficiency of the program, should I still do it? Heres an example: private int CenterText(Font font, PrintPageEventArgs e, string text) { int recieptCenter = 125; int stringLength = Convert.ToInt32(e.Graphics.MeasureString(text, font)); return recieptCenter - stringLength / 2; } The above code is using named variables, but runs slower then this code: private int CenterText(Font font, PrintPageEventArgs e, string text) { return 125 - Convert.ToInt32(e.Graphics.MeasureString(text, font) / 2); } In this example, the difference in execution time is minimal, but what about in larger blocks of code?

    Read the article

  • jQuery: Load body of page into variable

    - by Nathan G.
    I'm using jQuery to load the result of a PHP script into a variable. The script is passed something that the user typed with a GET request. I want to take just what the script spit out into its <body> tag. Here's what I've tried: JS: function loader() { var typed = $('#i').val(); //get what user typed in $.get("script.php", {i: typed}, function(loaded) {dataloaded = loaded;}); alert($(dataloaded).find('body')) } But it just displays [Objec object]. How can I get a useful value that is just the contents of the body of a loaded page? I know the PHP works, I just need the JS. The script echos something like 1!!2 (two numbers separated by two exclamation points). Thanks!

    Read the article

  • Different characters take more/less data?

    - by Nathan
    I am working on a personal project and I'm wondering if certain characters take up more data in a text file than others. I need to choose a character to seperate items in my file, but if a 0 uses less bytes than a ! or something, it would be best to do that. I know all characters have an ASCII value, but would a lower ASCII value mean the character can be stored in fewer bytes? This might be an incredibly stupid question, but I don't see any information on the topic online so I came here to check. Thanks!

    Read the article

  • Is it possible to turn a normal date into an ISO 8601 time format?

    - by Nathan
    I am trying to turn this type of format of the date: Thursday, November 10th, 2011 at 10:37 PM Into an ISO 8601 format (with PHP). How can I do this? I've tried: date("c", $row2['time']) Obviously, that's not correct, because the timeago jQuery plugin is saying "41 years ago", and that is definitely not 41 years ago. Is it not possible to turn that kind of date into the ISO 8601 format? I've tried searching for this and I haven't found any solutions on how to turn this format into ISO 8601.

    Read the article

  • Python 3.1: Syntax Error for Everything! (Mac OS X)

    - by Nathan G.
    I updated to Python 3.1.3 (I've got OS X 10.6). If I type python in Terminal, I get a working 2.6.1 environment. If I type python3 in Terminal, I get a 3.1.3 environment. Everything looks fine until I do something. If I try to run print "hello", I get a syntax error. This problem is the same in IDLE. I tried deleting everything for 3.1 and then reinstalling, but it hasn't worked. Ideas? Thanks in advance!

    Read the article

  • Calling a constructor from method within the same class

    - by Nathan
    I'm new to java and I'm learning about creating object classes. One of my homework assignment requires that I call the constructor at least once within a method of the same object class. I'm getting an error that says The method DoubleMatrix(double[][]) is undefined for the type DoubleMatrix Here's my constructor: public DoubleMatrix(double[][] tempArray) { // Declaration int flag = 0; int cnt; // Statement // check to see if doubArray isn't null and has more than 0 rows if(tempArray == null || tempArray.length < 0) { flag++; } // check to see if each row has the same length if(flag == 0) { for(cnt = 0; cnt <= tempArray.length - 1 || flag != 1; cnt++) { if(tempArray[cnt + 1].length != tempArray[0].length) { flag++; } } } else if(flag == 1) { makeDoubMatrix(1, 1);// call makeDoubMatrix method } }// end constructor 2 Here's the method where I try and call the constructor: public double[][] addMatrix(double[][] tempDoub) { // Declaration double[][] newMatrix; int rCnt, cCnt; //Statement // checking to see if both are of same dimension if(doubMatrix.length == tempDoub.length && doubMatrix[0].length == tempDoub[0].length) { newMatrix = new double[doubMatrix.length][doubMatrix[0].length]; // for loop to add matrix to a new one for(rCnt = 0; rCnt <= doubMatrix.length; rCnt++) { for(cCnt = 0; cCnt <= doubMatrix.length; cCnt++) { newMatrix[rCnt][cCnt] = doubMatrix[rCnt][cCnt] + tempDoub[rCnt][cCnt]; } } } else { newMatrix = new double[0][0]; DoubleMatrix(newMatrix) } return newMatrix; }// end addMatrix method Can someone point me to the right direction and explain why I'm getting an error?

    Read the article

  • Windows 7 ODBC Text Driver

    - by nute
    Some software requires me to setup an ODBC Text Driver. In the Windows 7 control panel ODBC Data Source Administrator, the only driver available is "SQL Server". How do I find/download/install a TEXT driver? Thanks Nathan

    Read the article

  • Google I/O 2010 - Opening up Closure Library

    Google I/O 2010 - Opening up Closure Library Google I/O 2010 - Opening up Closure Library Tech Talks Nathan Naze Closure Library is the open-source JavaScript library behind some of Google's big web apps like Gmail and Google Docs. This session will tour the broad library, its object-oriented design, and its namespaced organization. We'll explain how it works and how to integrate it in your setup, both for development and optimized for a live application using Closure Compiler. For all I/O 2010 sessions, please go to code.google.com From: GoogleDevelopers Views: 116 0 ratings Time: 01:00:38 More in Science & Technology

    Read the article

  • Review - Professional Android Programming with Mono for Android and .NET/C#

    - by Wallym
    Mike Riley of Dev Pro Connections Magazine has a review of our Mono for Android book.  You can read the full review on their siteMono for Android has been available for more than a year. The documentation for the product is adequate and has been improving over time, but until recently, finding a good book about the technology was difficult. Such a constraint has been lifted thanks to Wiley's Professional Android Programming with Mono for Android and .NET/C#. Written under the Wrox imprint by several contributors (Wallace B. McClure, Nathan Blevins, John J. Croft, Jonathan Dick, and Chris Hardy), the book is one of the most comprehensive and helpful Mono for Android titles currently on the market. Please buy 8-10 copies of our book for the ones you love, they make great romantic gifts.

    Read the article

  • Mobile: Wrox Cross Platform Mobile Development - iPhone, iPad, Android, and everything with .NET & C#

    - by Wallym
    Wrox has produced a bundle of their 3 best selling mobile development books and it is available as of Today (March 16). A bundle of 3 best-selling and respected mobile development e-books from Wrox form a complete library on the key tools and techniques for developing apps across the hottest platforms including Android and iOS. This collection includes the full content of these three books, at a special price: Professional Android Programming with Mono for Android and .NET/C#, ISBN: 9781118026434, by Wallace B. McClure, Nathan Blevins, John J. Croft, IV, Jonathan Dick, and Chris Hardy Professional iPhone Programming with MonoTouch and .NET/C#, ISBN: 9780470637821, by Wallace B. McClure, Rory Blyth, Craig Dunn, Chris Hardy, and Martin Bowling Professional Cross-Platform Mobile Development in C#, ISBN: 9781118157701, by Scott Olson, John Hunter, Ben Horgen, and Kenny Goers Remember, go buy 8-10 copies of the 3 book set for the ones you love. They will make great and romantic gifts!!

    Read the article

  • Billboard shader without distortion

    - by Nick Wiggill
    I use the standard approach to billboarding within Unity that is OK, but not ideal: transform.LookAt(camera). The problem is that this introduces distortion toward the edges of the viewport, especially as the field of view angle grows larger. This is unlike the perfect billboarding you'd see in eg. Doom when seeing an enemy from any angle and irrespective of where they are located in screen space. Obviously, there are ways to blit an image directly to the viewport, centred around a single vertex, but I'm not hot on shaders. Does anyone have any samples of this approach (GLSL if possible), or any suggestions as to why it isn't typically done this way (vs. the aforementioned quad transformation method)? EDIT: I was confused, thanks Nathan for the heads up. Of course, Causing the quads to look at the camera does not cause them to be parallel to the view plane -- which is what I need.

    Read the article

  • Google I/O 2012 - Powering Your Application's Data using Google Cloud Storage

    Google I/O 2012 - Powering Your Application's Data using Google Cloud Storage Navneet Joneja, Nathan Herring Since opening its doors to all developers at Google I/O last year, the Google Cloud Storage team has shipped several features that let you use Google Cloud Storage for a variety of advanced use cases. This session will open with a quick introduction to the product, and quickly shift focus to implementing a variety of advanced applications using new features in Google Cloud Storage. For all I/O 2012 sessions, go to developers.google.com From: GoogleDevelopers Views: 48 1 ratings Time: 58:32 More in Science & Technology

    Read the article

  • How to install Neatx-Server on ubuntu 12.10?

    - by user111245
    After try: 1. sudo apt-get install python-software-properties && sudo add-apt-repository ppa:freenx-team 2. sudo add-apt-repository ppa:nathan-renniewaldock/ppa && sudo add-apt-repository ppa:freenx-team 3. sudo add-apt-repository ppa:freenx-team None can let the sudo apt-get update to be succeed. Not to mention sudo apt-get install neatx-server. (found no neatx-server) Is there a solution for that? thanks~

    Read the article

  • links worth clicking&hellip;

    - by Chris Williams
    Scanning my Twitter feed almost always proves to be fruitful when looking for cool/interesting links to share. Here are a few of the highlights: I read this blog post from Justin Angel today, pretty interesting stuff: Windows Phone 7 – Unlocked ROMs  Looks like there’s a lot of good stuff floating just under the surface in the latest build of the WP7 Emulator. (Courtesy of @JustinAngel) Next up is this video titled Game Design Tutorials: From Seconds to Hours of Gameplay. If you’re into Indie Game Development, or just like watching videos… this one is pretty short at 5 minutes, but contains some good information about increasing the duration of fun gameplay in your game. (Courtesy of @Kei_tchan) If you are a Firefly (or Castle, or Dr. Horrible’s Singalong Blog) fan, check out this Facebook campaign to get Nathan Fillion to host SNL: http://tinyurl.com/2dh5m67  It worked for Betty White, so why not, right? (Courtesy of @DGalloway42)

    Read the article

  • KCDC 2011

    - by NoReasoning
    Well, Saturday was my presentation on Programming with Windows Azure, and it went well. Everything worked as I had wanted and I got to everything that I had planned. I did not even need my emergency backup filler. I only hope that the folks who attended got something from it. As for the whole conference, I think it was a resounding success. There were a LOT of good sessions to attend and people to meet. I had a great time, and I look forward to next year with great anticipation. Kudos to all (Lee, Jonathan, Boon(?)) and all (Jasmine, Nathan) who put this on. Great job, everyone!

    Read the article

  • Handheld device software - Handheld tuners?

    - by NathanH
    Hey I've been looking around and really don't understand what software some of these company's use for their handheld devices. I've used a lot of Handheld Tuners (Cobb Accessport, Diablo Sport). I've gotten more and more knowledgable of programming and I'm really wanting to understand what software they use on these devices to have a graphical interface. And to hold all the files to flash over to the ecu. I'm just unsure how you would get basically all the components to work together (screen, buttons, memory) without having drivers installed. I could be totally wrong here on using the term drivers, but that's what I would like some help to get more knowledge on (only thing I've really found is making a handheld game boy from scratch,but that was using a emulator.). I've tried looking it up but can't really find a good write up or explanation anywhere I look. Just really would like to put a little device together and have a simple user interface and work from there. Thanks, Nathan

    Read the article

  • A question about Scala Objects

    - by Randin
    In the example for coding with Json using Databinder Dispatch Nathan uses an Object (Http) without a method, shown here: import dispatch._ import Http._ Http("http://www.fox.com/dollhouse/" >>> System.out ) How is he doing this?

    Read the article

< Previous Page | 17 18 19 20 21 22  | Next Page >