Daily Archives

Articles indexed Wednesday June 2 2010

Page 13/120 | < Previous Page | 9 10 11 12 13 14 15 16 17 18 19 20  | Next Page >

  • Looking for ideas on automatically arranging a set of objects (furniture) in a virtual room in AS3

    - by raf
    First of all, I don't want to visually arrange 3D models dragging them with the mouse, all I want is: Given a room of certain dimensions (L,W,H) and given a set of elements like beds, chairs, etc (with L,W,H dimensions, of course) I want to automatically arrange those elements to take advantage of the space as much as I can. So I want to be able to put as much furniture as I can in a given room. At the end I need to represent the arranged items visually, inside the room. My first thought was to use an array of items and sorting it with array.sortOn(["l","w","h"] Array.NUMERIC) and then define a gap between the objects and make the maths to put the objects one next to another, etc. but that isn't a good approach because some items may be placed on top of another ones (boxes of the same size, boxes on top of tables, etc). I really don't have experience on 3D programming, that's why I'm asking for help. Thanks in advance.

    Read the article

  • Proper way of utilizing gearman with my php application.

    - by luckytaxi
    For now I just want to use Gearman for background processing. For example, I need to email a recipient that they have a private message waiting for them once the sender submits their message into the DB. I assume I can run the worker/client and server on my primary server but I have no problems offloading some of the tasks to a different web server. Anyways, my question is how do I handle multiple "functions?" Let's say I need a job that handles the email portion and a job to handle image manipulation. Can I have multiple functions in the worker? I've followed a couple of examples I found online but each example only shows one function being initialized. Do I have to start up multiple "workers" to handle multiple functions?

    Read the article

  • Building a Store Locator ASP.NET Application Using Google Maps API (Part 3)

    Over the past two weeks I've showed how to build a store locator application using ASP.NET and the free <a href="http://code.google.com/apis/maps/">Google Maps API</a> and Google's geocoding service. <a href="http://www.4guysfromrolla.com/articles/051910-1.aspx">Part 1</a> looked at creating the database to record the store locations. This database contains a table named <code>Stores</code> with columns capturing each store's address and <a href="http://en.wikipedia.org/wiki/Latitude">latitude</a> and <a href="http://en.wikipedia.org/wiki/Longitude">longitude</a> coordinates. Part 1 also showed how to use Google's geocoding service to translate a user-entered address

    Read the article

  • Can I make the shift+right-click the default right-click action on tasks in the task menu?

    - by fostandy
    When I right click on a running task in my start menu I usually get 3 options: Launch a new copy of this - I don't use this Pin this program to the taskbar - I don't use this Close window - I use this. Lots. So much so that in Windows XP I used to right click and press 'c'. Which I can no longer do because while it hilights the close MenuItem, it doesn't actually invoke it. If I shift+right-click on the task, I get the old menu upon which I can just hit C. This old menu is also generally much more useful as it has many more options I use considerably more frequently. Is there a way I can make this menu pop up as the default right-click menu? This is also proving to be a real pain to google. As I'm always up for improving my goo-fu, if you do google a fix to this problem I would appreciate it if you could share the keywords/phrases used.

    Read the article

  • What Are the Top 4 Search Engine Optimization Techniques of Today?

    Today, with the over-whelming competitions among the web masters in competing for customers to increase their sales and profit, finding ways to increase to optimize their websites is not really very difficult. There are whole lots of SEO (Search engine optimization) techniques which can be found over the internet today, which majority of them are really very user friendly which even a novice web-master with limited HTML knowledge find it not that difficult to get the most out of it as long as they have the will to learn and improve in their search ranking.

    Read the article

  • The Evolution of Search Engine Optimisation

    But, search engine rankings evolve constantly. Once enough people catch on to the latest ideas of what is needed to get to the top of the search engines spammers start to stuff websites to force them to the top. So search engines evolve their techniques and move on to newer rankings that are harder to fake.

    Read the article

  • T-SQL Tuesday #007 and T-SQL Tuesday Has a Logo

    - by Adam Machanic
    This month’s T-SQL Tuesday is hosted by Jorge Segarra, the “SQL Chicken.” The topic is rather open ended: What is your favorite new(ish) SQL Server feature? Love the DACPAC? Can’t wait for PDW? Post about it and tell us why! In other T-SQL Tuesday news, we now have a logo. Those of you who are participating in the event, take notice; the rules have changed. Now that we have a logo we’re simplifying the linkback and subject guidelines a bit. Henceforth you can title your post however you want. It...(read more)

    Read the article

  • the use of private keyword

    - by LAT
    Hi everyone I am new to programming. I am learning Java now, there is something I am not really sure, that the use of private. Why programmer set the variable as private then write , getter and setter to access it. Why not put everything in public since we use it anyway. public class BadOO { public int size; public int weight; ... } public class ExploitBadOO { public static void main (String [] args) { BadOO b = new BadOO(); b.size = -5; // Legal but bad!! } } I found some code like this, and i saw the comment legal but bad. I don't understand why, please explain me.

    Read the article

  • How can i look at executed queries?

    - by taiga
    Hello, can anyone tell me how to view executed queries in SharePoint? I couldn't find a way to show query logs with SQL Server. As you know, SharePoint framework hides all queries from programmers. I would like to look into the queries and understand the mechanisms. http://www.infoq.com/articles/SharePoint-Andreas-Grabner In above article, i can see some windows showing methods and arguments(Queries). But i could not figure out where this window come from...(looks like a window from visual studio) Does anyone know how to show this window? or any alternative way to display executed queries? My working environment. Windows Server 2008 Enterprise MOSS 2007 SQL Server 2008 Enterprise Visual Studio 2008 with VSeWSS 1.2 Thank you in advance. Taiga

    Read the article

  • HTML 5 Video OnEnded Event not Firing

    - by Eric J.
    I'm trying to react to the HTML 5 onended event for the video tag without success. In the code snippet below I added the mouseleave event to be sure the jQuery code is correct and that event does activate the alert() box. The video plays just fine but onended does not cause my alert() to fire off. Testing in Chrome, updated today to version 5.0.375.55. <html> <head> <script src="http://code.jquery.com/jquery-1.4.2.min.js"></script> <script> $(document).ready(function(){ $("#myVideoTag").bind('mouseleave onended', function(){ alert("All done, function!"); }); }); </script> </head> <body> <video id="myVideoTag" width="640" height="360" poster="Fractal-zoom-1-04-Snowflake.jpg" controls> <source src="Fractal-zoom-1-04-Snowflake.mp4" type="video/mp4"></source> <source src="Fractal-zoom-1-04-Snowflake.ogg" type="video/ogg"></source> </video> <body> <html>

    Read the article

  • html & javascript: How to store data referring to html elements

    - by Dan
    Hello, I'm working on a web application that uses ajax to communicate to the server. My specific situation is the following: I have a list of users lined out in the html page. On each of these users i can do the following: change their 'status' or 'remove' them from the account. What's a good practice for storing information in the page about the following: the user id the current status of the user P.S.: I'm using jQuery.

    Read the article

  • HOw to find specific child node in XML using AS3 flash

    - by Mirage
    I have this xml var testXML:XML = <family> <father name1="tom" age="5" ><father1 name1="test1"/><father2 name1="test2"/></father> <mother name1="tomylee" age="55" ><mother1/><mother2/></mother> <sister name1="sister1" age="35" ><sister1/><sister2/></sister> </family>; I want to get the child node with name1 = test1 but i only know family so is there something like trace (testXML.children(@name1="test1"); I only know the family node , i don't know where that node is inside the father or not is there any filter can be applied on root node to find something

    Read the article

  • GridView: How can I get rid of extra space from my GirdView object?

    - by Lajos Arpad
    Hello, I'm writing an application for Android phones for Human vs. Human chess play over the internet. I was looking at some tutorials, to learn how to develop Android applications and found a very nice example of making galleries (it was a GridView usage example for making a gallery about dogs) and the idea came to draw the chess table using a GridView, because the example project also handled the point & click event and I intended to use the same event in the same way, but for a different purpose. The game works well (currently it's a hotseat version), however, I'm really frustrated by the fact that whenever I rotate the screen of the phone, my GridView gets hysterical and puts some empty space in my chess table between the columns. I realized that the cause of this is that the GridView's width is the same as its parent's and the GridView tries to fill its parent in with, but there should (and probably is) be a simple solution to get rid of this problem. However, after a full day of researching, I haven't found any clue to help me to make a perfect drawing about my chess table without a negative side effect in functionality. The chess table looks fine if the phone is in Portrait mode, but in Landscape mode it's far from nice. This is how I can decide whether we are in Portrait or Landscape mode: ((((MainActivity)mContext).getWindow().getWindowManager().getDefaultDisplay().getWidth()) < ((MainActivity)mContext).getWindow().getWindowManager().getDefaultDisplay().getHeight()) In the main.xml file the GridView is defined in the following way: <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent" > <GridView xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/gridview" android:layout_width="wrap_content" android:layout_height="wrap_content" android:numColumns="8" android:verticalSpacing="0dp" android:horizontalSpacing="0dp" android:stretchMode="columnWidth" android:gravity="center" > </GridView> ... </LinearLayout> I appreciate any help with the problem and thank you for reading this.

    Read the article

  • Explicit construction of entity type [MyClass] in query is not allowed.

    - by Code Sherpa
    Hi. Like the title says, I have the following exception: Description: Event code: 3005 Event message: An unhandled exception has occurred. Exception information: Exception type: NotSupportedException Exception message: Explicit construction of entity type 'Company.Project.Core.Domain.Friend' in query is not allowed. I am using LINQ and have the following code in my datacontext: var friends2 = (dc.Friends .Where(f => f.MyFriendsAccountId == accountId && f.AccountId != accountId) .Select(f => new { f.FriendId, AccountId = f.MyFriendsAccountId, MyFriendsAccountId = f.AccountId, f.CreateDate, f.Timestamp })).Distinct(); result.AddRange(friends2 .Select(o => new Friend { FriendId = o.FriendId, AccountId = o.AccountId, CreateDate = o.CreateDate, MyFriendsAccountId = o.MyFriendsAccountId, Timestamp = o.Timestamp })); the final code block is throwing the error and I am pretty sure it is this statement that is the culprit: .Select( o => **new Friend** How should I be reworking my code to avoid this error? Code illustration appreciated. Thanks.

    Read the article

  • Process data BEFORE a 301 Redirect?

    - by Jesse
    So, I've been working on a PHP link shortener (I know, just what the world needs). Basically when the page loads, php determines where it needs to go and sends a 301 Header to redirect the browser, like so... Header( "HTTP/1.1 301 Moved Permanently" ); header("Location: http://newsite.com"; Now, I'm trying to add some tracking to my redirects and insert some custom analytics data into a MySQL table before the redirect happen. It works perfectly if I don't specify the a redirect type and just use: header("Location: http://newsite.com"; But, of course as soon as you add in the 301 header, nothing else gets processed. Actually, on the first request, it sends the data to MySQL, but on any subsequent requests there's no communication with the database. I assume it's a browser caching issue, once it's seen the 301 it decides they're no reason to parse anything on future requests. But, does anyone know if there's any way to get around this? I'd really like to keep it as a 301 for SEO purposes (I believe if you don't specify it sends a 404 by default?). I thought about using .htaccess to prepend a file to the page that will do the MySQL work, but with the 301, wouldn't that just get ignored as well? Anyway, I'm not sure if there's any solution other than using a different type of redirect, but I'm ready to give up just yet. So, any suggestions would be much appreciated. Thanks!

    Read the article

  • Is SiteCore slow and buggy?

    - by Larsenal
    I've seen plenty of negative comments regarding performance and general bugginess. However, to be fair, most of these look like they were within the v5.3 timeframe. Have they fixed all of those issues in v6.0? Is it an excellent product? Some examples of the complaints: Maybe it’s just a case of user error, but this guy says, “some pages take as much as 20s to render…” Source Here, in the comments, one fellow remaks, “Sitecore backend is incredible slow. Sitecore developement is really pain, it takes from 2 minutes to start sitecore and many many seconds to do small backend operations. They claim to have a quick client, but that is a BIG LIE. All developers in my company really hate sitecore for being so slow.” Source Another search yielded, “Sitecore’s users listed three issues as number one: licensing, the server as a resource hog, and the site’s slow responsiveness.” Source

    Read the article

  • How do I make defensive copy of an object?

    - by kunjaan
    How do I make defensive copies of a Mutable Object which contains a mutable field in an Immutable Object? class ImmutableObject { private final MutableObject immutable_field; ImmutableObject(MutableObject y) { this.immutable_field = y; } MutableObject return_immutable_field() { return immutable_field; } } class MutableObject { public int mutable_field; } The MutableObject does not have a constructor that lets me set the field. The MutableObject's current state should be captured in the Immutable Object and never changed.

    Read the article

  • Installing The ruby-gmail rubygem on Mac OS Snow Leopard

    - by johnnygoodman
    I'm working off these instructions: http://github.com/dcparker/ruby-gmail From the home directory I do a standard install and good stuff happens: Johnny-Goodmans-MacBook-Pro:gmail johnnygoodman$ sudo gem install ruby-gmail Successfully installed ruby-gmail-0.2.1 1 gem installed Installing ri documentation for ruby-gmail-0.2.1... Installing RDoc documentation for ruby-gmail-0.2.1... I head over to my ~/www dir where I run scripts that include other rubygems successfully and create a gmail directory. I create a script that includes rubygems and gmail, but does nothing else: Johnny-Goodmans-MacBook-Pro:gmail johnnygoodman$ pwd /Users/johnnygoodman/www/gmail Johnny-Goodmans-MacBook-Pro:gmail johnnygoodman$ ls test-send.rb Johnny-Goodmans-MacBook-Pro:gmail johnnygoodman$ cat test-send.rb require 'rubygems' require 'gmail' I run this script and the errors begin: Johnny-Goodmans-MacBook-Pro:gmail johnnygoodman$ ruby test-send.rb /Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in `gem_original_require': no such file to load -- mime/message (LoadError) from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in `require' from /Library/Ruby/Gems/1.8/gems/ruby-gmail-0.2.1/lib/gmail/message.rb:1 from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in `gem_original_require' from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in `require' from /Library/Ruby/Gems/1.8/gems/ruby-gmail-0.2.1/lib/gmail.rb:168 from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:36:in `gem_original_require' from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:36:in `require' from test-send.rb:2 Johnny-Goodmans-MacBook-Pro:gmail johnnygoodman$ Here's my gem env: Johnny-Goodmans-MacBook-Pro:gmail johnnygoodman$ gem environment RubyGems Environment: - RUBYGEMS VERSION: 1.3.7 - RUBY VERSION: 1.8.7 (2009-06-08 patchlevel 173) [universal-darwin10.0] - INSTALLATION DIRECTORY: /Library/Ruby/Gems/1.8 - RUBY EXECUTABLE: /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby - EXECUTABLE DIRECTORY: /usr/bin - RUBYGEMS PLATFORMS: - ruby - universal-darwin-10 - GEM PATHS: - /Library/Ruby/Gems/1.8 - /Users/johnnygoodman/.gem/ruby/1.8 - /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8 - GEM CONFIGURATION: - :update_sources => true - :verbose => true - :benchmark => false - :backtrace => false - :bulk_threshold => 1000 - :sources => ["http://rubygems.org/", "http://gems.github.com"] - REMOTE SOURCES: - http://rubygems.org/ - http://gems.github.com The path that the errors give when I run the script is not the same as the GEM PATHS given in the env output. However, I don't know how to make them match or if that's the significant thing here.

    Read the article

  • How to convert a video via ffmpeg to an mp4 format that will stream and/or download to iPhone and Bl

    - by Yegor
    I have a site where people upload videos, which are converted to .flv format. Simple. I wanted to also convert to an mp4 format that will "stream" to an iphone and blackberry, or allowed to be downloaded to either, for later viewing. Can someone post a working ffmpeg line to accomplish this task? Closest I got was this (which doesn't work) ffmpeg -i in.avi -f mp4 -vcodec libx264 -maxrate 1000 -qmin 3 -qmax 5 -bufsize 4096 -g 300 -acodec libfaac -s 480x320 -ab 128k -qscale 7 out.mp4

    Read the article

  • Using an iterator without its container

    - by User1
    I am mixing some C and C++ libraries and have only a single pointer available to do some work in a callback function. All I need to do is iterate through a vector. Here's a simplified, untested example: bool call_back(void* data){ done=... if (!done) cout << *data++ << endl; return done; } Note that this function is in an extern "C" block in C++. call_back will be called until true is returned. I want it to cout the next element each time it's called. data is a pointer to something that I can pass from elsewhere in the code (an iterator in the above example, but can be anything). Something from data will likely be used to calculate done. I see two obvious options to give to data: Have data point to my vector. Have data point to an iterator of my vector. I can't use an iterator without having the .end() method available, right? I can't use a vector alone (unless maybe I start removing its data). I could make a struct with both vector and iterator, but is there a better way? What would you do?

    Read the article

< Previous Page | 9 10 11 12 13 14 15 16 17 18 19 20  | Next Page >