Search Results

Search found 2399 results on 96 pages for 'alex gosselin'.

Page 59/96 | < Previous Page | 55 56 57 58 59 60 61 62 63 64 65 66  | Next Page >

  • SQL Count in View as column

    - by alex
    I'm trying to get the result of a COUNT as a column in my view. Please see the below query for a demo of the kind of thing I want (this is just for demo purposes) SELECT ProductID, Name, Description, Price, (SELECT COUNT(*) FROM ord WHERE ord.ProductID = prod.ProductID) AS TotalNumberOfOrders FROM tblProducts prod LEFT JOIN tblOrders ord ON prod.ProductID = ord.ProductID This obviously isn't working... but I was wondering what the correct way of doing this would be?

    Read the article

  • How to parse a binary file using Javascript and Ajax

    - by Alex Jeffery
    I am trying to use JQuery to pull a binary file from a webserver, parse it in Javascript and display the contents. I can get the file ok and parse some of the file correctly. How ever I am running into trouble with one byte not coming out as expected. I am parsing the file a byte at a time, it is correct until I get to the hex value B6 where I am getting FD instead of B6. Function to read a byte data.charCodeAt(0) & 0xff; File As Hex: 02 00 00 00 55 4C 04 00 B6 00 00 00 The format I want to parse the file out into. short: 0002 short: 0000 string: UL short: 0004 long: 0000B6 Any hints as to why the last value is incorrect?

    Read the article

  • Images are overflowing their container in IE8 with Fancybox

    - by alex
    In a sort of follow up to this question, I have another problem in IE8. When clicking the gallery and the lightbox appears, the images are overflowing their containing element (by the looks of things). Has anyone ever experienced this before? Of course, the good guys (Firefox/Safari/etc) display it perfectly. How do I fix this? Thanks UPDATE Should I just got with a new Lightbox?

    Read the article

  • Is it practical to learn and use Forth?

    - by Workshop Alex
    When I was still a young developer, I started to focus on the many available programming languages. But in 1980 to 1990 there weren't many freely available compilers. So I started with several BASIC dialects for home computers, Pascal and C on my PC, I did an exam in COBOL and dabbled a bit in Assembly and a few other languages. And at one point I took a short look at Forth. That's over 20 years ago and I've learned a lot ever since. I know that Forth is still used these days. It's still a good programming language but since I focus mostly on Windows development, I just wonder if knowing Forth could be helpful for future projects of mine. So, would it be practical for an experienced developer to learn more about Forth?

    Read the article

  • Emulating Button Press Using Kinect/SimpleOpenNI + Processing Depth

    - by Alex Lu
    I am using Kinect with Simple OpenNI and Processing, and I was trying to use the Z position of a hand to emulate a button press. So far when I try it using one hand it works really well, however, when I try to get it to work with a second hand, only one of the hands work. (I know it can be more efficient by moving everything except the fill out of the if statements, but I kept those in there just in case I want to change the sizes or something.) irz and ilz are the initial Z positions of the hands when they are first recognized by onCreateHands and rz and lz are the current Z positions. As of now, the code works fine with one hand, but the other hand will either stay pressed or unpressed. If i comment one of the sections out, it works fine as well. if (rz - irz > 0) { pushStyle(); fill(60); ellipse(rx, ry, 10, 10); popStyle(); rpressed = true; } else { pushStyle(); noFill(); ellipse(rx, ry, 10, 10); popStyle(); rpressed = false; } if (lz - ilz > 0) { pushStyle(); fill(60); ellipse(lx, ly, 10, 10); popStyle(); lpressed = true; } else { pushStyle(); noFill(); ellipse(lx, ly, 10, 10); popStyle(); lpressed = false; } I tried outputting the values of rz - irz and lz - ilz and the numbers range from small negative values to small positive values (around -8 to 8) for lz - ilz. But rz - irz outputs numbers from around 8-30 depending on each time I run it and is never consistent. Also, when I comment out the code for the lz-ilz, the values for rz-irz look just fine and it operates as intended. Is there a reason tracking both Z positions throws off one hand? And is there a way to get it to work? Thanks!

    Read the article

  • Tag Cloud JS + Flash. Actual Tags In Cloud Not Clickable?

    - by Alex
    Hello all, I've implemented a tag cloud on a site of mine, and I'm using a JS script to populate it, but for some reason, the actual text in the tag cloud is not clickable. It displays and works correctly, but the actual text of the cloud is not getting treated as a link for some odd reason. My question is: In my script below, do you see anything that I need to fix in order to make my tag cloud's text actually be links? The site I've implemented it on is a stackexhange site that I run, it is supposed to be a cloud of the "recent tags." CloudPopulator.js <script type="text/javascript"> var divRecentTags = document.getElementById("recent-tags"); if (divRecentTags) { var cloud = new SWFObject("some/swfObject/url", "tagcloudflash", "200", "200", "9", "#ffffff"); cloud.addParam("allowScriptAccess", "always"); cloud.addVariable("tcolor", "0x0a94d6"); cloud.addVariable("tcolor2", "0xC0C0C0"); cloud.addVariable("hicolor", "0x000000"); cloud.addVariable("tspeed", "150"); cloud.addVariable("distr", "true"); cloud.addVariable("mode", "tags"); var aTags = divRecentTags.getElementsByTagName("a"); var tagHtml = ""; for(var i = 0; i < aTags.length; i++) { var hrefText = aTags[i].getAttribute("href"); var cssText = aTags[i].className; var tagName = $(aTags[i]).text(); var styleText = "style=\'font-size: 8pt;\'"; if (cssText == "post-tag pop1") { var styleText = "style=\'font-size: 15pt;\'"; } else if (cssText == "post-tag pop2") { var styleText = "style=\'font-size: 22pt;\'"; } var newLinkText = "<a href=\'"+hrefText+"\'"+styleText+">"+tagName+"</a>"; tagHtml = tagHtml + newLinkText; } cloud.addVariable("tagcloud", escape("<tags>" + tagHtml + "</tags>")); cloud.write("recent-tags"); } </script>

    Read the article

  • What is the current status of LOGO? (The programming language)

    - by Workshop Alex
    In another Q I saw someone mention LOGO and it reminded me of some programming language from the past, mostly used for educational purposes. Basically, you would have to program a turtle with a pen through it's back. By telling it where to move, the pen would draw lines. It could also lift the pen to move without drawing lines. I have fond memories of this language, since it was one of the first I've ever used, about 30 years ago. (Yeah, I'm old.) Well, I only programmed with LOGO for two days or so, but it got me hooked to programming. But I wonder if the LOGO information on it's Wikipedia page is still correct. And more importantly, are there versions that will create .NET binaries? Are there only LOGO Interpreters and no compilers? What is the current status of this educational language? And more interestingly, are there more experts here at SO who have experimented with LOGO in the past? Yeah, I know. Nowadays this language is a bit antique but I got some warm and comfortable memories when I remembered this interesting language from my history. For a teenager back then, it was fun!

    Read the article

  • Facebook Photo Contest App Against FB's TOS ??

    - by Alex D
    What would be possible/best practice for a Photo Contest app? Saving photos to a database and refreshing the contents with an "infinite session"? Exporting photos to my site getting written consent from my user? I've gathered that it won't be possible to present users with a number of photos to vote on because the permissions for user's photos will often not allow just anyone (the public) to view them. I've looked at SnapIt! Photo Contest on Facebook and it appears they are successful with what I'm trying to do. Are they breaking the Facebook TOS? http://apps.facebook.com/snapitphoto I'm new to Facebook development and want to be sure it is possible to do what I want before I become very invested. Any advice would be much appreciated! Thanks

    Read the article

  • MySQL query does not return any data

    - by Alex L
    Hi, I need to retrieve data from a specific time period. The query works fine until I specify the time period. Is there something wrong with the way I specify time period? I know there are many entries within that time-frame. This query returns empty: SELECT stop_times.stop_id, STR_TO_DATE(stop_times.arrival_time, '%H:%i:%s') as stopTime, routes.route_short_name, routes.route_long_name, trips.trip_headsign FROM trips JOIN stop_times ON trips.trip_id = stop_times.trip_id JOIN routes ON routes.route_id = trips.route_id WHERE stop_times.stop_id = 5508 HAVING stopTime BETWEEN DATE_SUB(stopTime,INTERVAL 1 MINUTE) AND DATE_ADD(stopTime,INTERVAL 20 MINUTE); Here is it's EXPLAIN: +----+-------------+------------+--------+------------------+---------+---------+-------------------------------+------+-------------+ | id | select_type | table | type | possible_keys | key | key_len | ref | rows | Extra | +----+-------------+------------+--------+------------------+---------+---------+-------------------------------+------+-------------+ | 1 | SIMPLE | stop_times | ref | trip_id,stop_id | stop_id | 5 | const | 605 | Using where | | 1 | SIMPLE | trips | eq_ref | PRIMARY,route_id | PRIMARY | 4 | wmata_gtfs.stop_times.trip_id | 1 | | | 1 | SIMPLE | routes | eq_ref | PRIMARY | PRIMARY | 4 | wmata_gtfs.trips.route_id | 1 | | +----+-------------+------------+--------+------------------+---------+---------+-------------------------------+------+-------------+ 3 rows in set (0.00 sec) The query works if I remove the HAVING clause (don't specify time range). Returns: +---------+----------+------------------+-----------------+---------------+ | stop_id | stopTime | route_short_name | route_long_name | trip_headsign | +---------+----------+------------------+-----------------+---------------+ | 5508 | 06:31:00 | "80" | "" | "FORT TOTTEN" | | 5508 | 06:57:00 | "80" | "" | "FORT TOTTEN" | | 5508 | 07:23:00 | "80" | "" | "FORT TOTTEN" | | 5508 | 07:49:00 | "80" | "" | "FORT TOTTEN" | | 5508 | 08:15:00 | "80" | "" | "FORT TOTTEN" | | 5508 | 08:41:00 | "80" | "" | "FORT TOTTEN" | | 5508 | 09:08:00 | "80" | "" | "FORT TOTTEN" | I am using Google Transit format Data loaded into MySQL. The query is supposed to provide stop times and bus routes for a given bus stop. For a bus stop, I am trying to get: Route Name Bus Name Bus Direction (headsign) Stop time The results should be limited only to buses times from 1 min ago to 20 min from now. Please let me know if you could help.

    Read the article

  • How to load a configuration file at startup within tomcat

    - by Alex
    I want to be able to load my configuration for the webapp at startup of tomcat (apache commons configuration library) is this a possible way: public class MyAppCfg implements javax.servlet.ServletContextListener { private ServletContext context = null; @Override public void contextInitialized(ServletContextEvent event) { try{ this.context = event.getServletContext(); XMLConfiguration config = new XMLConfiguration("cfg.xml"); config.setReloadingStrategy(new FileChangedReloadingStrategy()); this.context.setAttribute("mycfg", config); } catch (Exception e) { e.printStackTrace(); } } @Override public void contextDestroyed(ServletContextEvent arg0) { this.context = null; } } web.xml <listener> <listener-class>mypackage.MyAppCfg</listener-class> </listener> and later acces them in the webapp via this.cfg = (XMLConfiguration) servletRequest.getAttribute("mycfg");

    Read the article

  • SQL/Schema comparison and upgrade

    - by Workshop Alex
    I have a simple situation. A large organisation is using several different versions of some (desktop) application and each version has it's own database structure. There are about 200 offices and each office will have it's own version, which can be one of 7 different ones. The company wants to upgrade all applications to the latest versions, which will be version 8. The problem is that they don't have a separate database for each version. Nor do they have a separate database for each office. They have one single database which is handled by a dedicated server, thus keeping things like management and backups easier. Every office has it's own database schema and within the schema there's the whole database structure for their specific application version. As a result, I'm dealing with 200 different schema's which need to be upgraded, each with 7 possible versions. Fortunately, every schema knows the proper version so checking the version isn't difficult. But my problem is that I need to create upgrade scripts which can upgrade from version 1 to version 2 to version 3 to etc... Basically, all schema's need to be bumped up one version until they're all version 8. Writing the code that will do this is no problem. the challenge is how to create the upgrade script from one version to the other? Preferably with some automated tool. I've examined RedGate's SQL Compare and Altova's DatabaseSpy but they're not practical. Altova is way too slow. RedGate requires too much processing afterwards, since the generated SQL Script still has a few errors and it refers to the schema name. Furthermore, the code needs to become part of a stored procedure and the code generated by RedGate doesn't really fit inside a single procedure. (Plus, it's doing too much transaction-handling, while I need everything within a single transaction. I have been considering using another SQL Comparison tool but it seems to me that my case is just too different from what standard tools can deliver. So I'm going to write my own comparison tool. To do this, I'll be using ADOX with Delphi to read the catalogues for every schema version in the database, then use this to write the SQL Statements that will need to upgrade these schema's to their next version. (Comparing 1 with 2, 2 with 3, 3 with 4, etc.) I'm not unfamiliar with generating SQL-Script-Generators so I don't expect too many problems. And I'll only be upgrading the table structures, not any of the other database objects. So, does anyone have some good tips and tricks to apply when doing this kind of comparisons? Things to be aware of? Practical tips to increase speed?

    Read the article

  • Exception "Illegal attempt to associate a collection with two open sessions" when saving object

    - by Alex
    I am using CastleProject ActiveRecord and I use lazy load feature of this ORM. In order to make lazy load work, it is required to create SessionScope. I do this in Program.cs: public static SessionScope sessionScope; private static void InitializeActiveRecord() { ActiveRecordStarter.Initialize(); sessionScope = new SessionScope(); } This works fine for loading, however, when I try to save my objects, I get an exception saying "Illegal attempt to associate a collection with two open sessions". I guess this is due to the fact that I created one session myself. How to avoid this exception?

    Read the article

  • how to develop a program to minimize errors in human transcription of hand written surveys

    - by Alex. S.
    I need to develop custom software to do surveys. Questions may be of multiple choice, or free text in a very few cases. I was asked to design a subsystem to check if there is any error in the manual data entry for the multiple choices part. We're trying to speed up the user data entry process and to minimize human input differences between digital forms and the original questionnaires. The surveys are filled with handwritten marks and text by human interviewers, so it's possible to find hard to read marks, or also the user could accidentally select a different value in some question, and we would like to avoid that. The software must include some automatic control to detect possible typing differences. Each answer of the multiple choice questions has the same probability of being selected. This question has two parts: The GUI. The most simple thing I have in mind is to implement the most usable design of the questions display: use of large and readable fonts and space generously the choices. Is there something else? For faster input, I would like to use drop down lists (favoring keyboard over mouse). Given the questions are grouped in sections, I would like to show the answers selected for the questions of that section, but this could slow down the process. Any other ideas? The error checking subsystem. What else can I do to minimize or to check human typos in the multiple choice questions? Is this a solvable problem? is there some statistical methodology to check values that were entered by the users are the same from the hand filled forms? For example, let's suppose the survey has 5 questions, and each has 4 options. Let's say I have n survey forms filled in paper by interviewers, and they're ready to be entered in the software, then how to minimize the accidental differences that can have the manual transcription of the n surveys, without having to double check everything in the 5 questions of the n surveys? My first suggestion is that at the end of the processing of all the hand filled forms, the software could choose some forms randomly to make a double check of the responses in a few instances, but on what criteria can I make this selection? This validation would be enough to cover everything in a significant way? The actual survey is nation level and it has 56 pages with over 200 questions in total, so it will be a lot of hand written pages by many people, and the intention is to reduce the likelihood of errors and to optimize speed in the data entry process. The surveys must filled in paper first, given the complications of taking laptops or handhelds with the interviewers.

    Read the article

  • myXmlDataDoc.DataSet.ReadXml problem

    - by alex
    Hi: I am using myXmlDataDoc.DataSet.ReadXml(xml_file_name, XmlReadMode.InferSchema); to populate the tables within the dataset created by reading in a xml schema using: myStreamReader = new StreamReader(xsd_file_name); myXmlDataDoc.DataSet.ReadXmlSchema(myStreamReader); The problems I am facing is when it comes to read the xml tag: The readXml function puts the element in a different table and everything in the tables are 0s. Here is the print out of the datatable: TableName: test_data 100 2 1 TableName: parameters 1 0 2 0 3 0 4 0 5 0 6 0 7 0 8 0 9 0 10 0 11 0 12 0 In my xsd file, I represent an array using this: <xs:element name="test_data"> <xs:complexType> <xs:complexContent> <xs:extension base="test_base"> <xs:sequence> <xs:element name="a" type="xs:unsignedShort"/> <xs:element name="b" type="xs:unsignedShort"/> <xs:element name="c" type="xs:unsignedInt"/> <xs:element name="parameters" minOccurs="0" maxOccurs="12" type="xs:unsignedInt"/> </xs:sequence> </xs:extension> </xs:complexContent> </xs:complexType> And here is my xml file: 100 2 1 1 2 3 4 5 6 7 8 9 10 11 12 I am expecting after the readXml function call, the "parameters" is part of the test_data table. TableName: test_data 100 2 1 1 2 3 4 5 6 7 8 9 10 11 12 Does anyone knows what's wrong? Thanks

    Read the article

  • RIA Services - Two entity models share an entity name

    - by Alex
    I have two entity models hooked up to two different databases. However, the two databases both have a table named 'brand', for example. As such, there is a naming conflict in my models. Now, I've been able to add a namespace to each model, via Custom Tool Namespace in the model's properties, but the generated code in my Silverlight project will try to use both namespaces, and come up with this, Imports MyProject.ModelA Imports MyProject.ModelB Public ReadOnly Property brands() As EntitySet(Of brand) Get Return MyBase.EntityContainer.GetEntitySet(Of brand) End Get End Property giving me this exception: 'Error 1 'brand' is ambiguous, imported from the namespaces or types 'MyProject.ModelA,MyProject.ModelB'. Has anyone had experience with naming conflicts like this using RIA services? How did you solve it?

    Read the article

  • wxWidgets exception handling

    - by Alex Farber
    When unhandled exception is handled in wxWidgets application in Windows, program shows Abort-Retry-Ignore message produced by Widgets exception handler. I want to get normal unhandled exception behavior: program should terminate with standard Windows unhandled exception dialog. Can I prevent Widgets to catch unhahnled exceptions?

    Read the article

  • How do you size the jQuery Button?

    - by Alex
    Hi. I'm using the jQuery UI Button control but don't seem to be able to adjust the size (width and height). Here's the API documentation. I tried setting a STYLE attribute on it, but then the LABEL wasn't centered correctly. Thanks.

    Read the article

< Previous Page | 55 56 57 58 59 60 61 62 63 64 65 66  | Next Page >