Daily Archives

Articles indexed Wednesday May 5 2010

Page 11/119 | < Previous Page | 7 8 9 10 11 12 13 14 15 16 17 18  | Next Page >

  • Javascript algorithm that calculates week number in Fiscal Year

    - by ForeignerBR
    Hi, I have been looking for a Javascript algorithms that gives me the week number of a given Date object within a custom fiscal year. The fiscal year of my company starts on 1 September and ends on 31 August. Say today happens to be September 1st and I pass in a newly instanced Date object to this function; I would expect it to return 1. Hopefully someone will be able to help me with it. thanks, fbr

    Read the article

  • The Grand Unified Framework Theory

    Tom Janssens left a comment: What still bugs me is that we do not have a unified pattern for all .net dev (using modelbinders and icommand for example...) But, Tom we are pretty close. At least as close as we should be, I think. With .NET there are plenty of low level patterns we can reuse regardless of the application platform or architecture. Stuff like: Asynchronous programming with events or the TPL. Object queries with LINQ. Resource management with IDispose. At a higher...Did you know that DotNetSlackers also publishes .net articles written by top known .net Authors? We already have over 80 articles in several categories including Silverlight. Take a look: here.

    Read the article

  • SQL SERVER Get Latest SQL Query for Sessions DMV

    In recent SQL Training I was asked, how can one figure out what was the last SQL Statement executed in sessions. The query for this is very simple. It uses two DMVs and created following quick script for the same. SELECT session_id, TEXT FROM sys.dm_exec_connections CROSS APPLYsys.dm_exec_sql_text(most_recent_sql_handle) AS ST While working with DMVs if you [...]...Did you know that DotNetSlackers also publishes .net articles written by top known .net Authors? We already have over 80 articles in several categories including Silverlight. Take a look: here.

    Read the article

  • MSI Log Debug Log Sink

    - by Todd Kobus
    I have an InstallShield MSI project. When I pass an MSIHANDLE from an InstallScript custom action to a managed assembly initialized via DotNetCoCreateObject(), the value received within my managed code is -2. Does anyone know if it is possible to access an MSIHANDLE from an InstallScript custom action that calls into managed code via DotNetCoCreateObject()? I'd like to log my custom action results to the same log file as the rest of the installation. I am using InstallShield 2010, Windows Install 4.5 and .Net 3.5.

    Read the article

  • UINavigationController + UITableView + UISearchBar + UISplitViewController

    - by ACBurk
    I have an annoying problem. I have an UINavigationController with an UITableView in the Master (Left) pane of my UISplitViewController. When I do normal operations, things push on on to the navigation controller fine. However, when I do a search and push things on, it's like it doesn't account for the space the navigation bar needs. It pushed the new controller on at the very top, then puts the navbar on, overlapping the content! I should add it works fine when doing it in portrait (in the popup menu) and on the iphone. Is this an UISplitViewController bug?

    Read the article

  • SQL Server 2000, yes 2000 password hash

    - by Justin808
    I need to store a password has in a SQL server 2000 database. The information isn't critical but I really don't want to store the password in clear text. How can I get a unique hash (sha, sha1, md5, etc) in SQL server 2000 as HashBytes isn't available. I'm not looking for compiled DLL or the ilk, I dont have access to the server, needs to be pure MS SQL.

    Read the article

  • Drupal ical for Authenticated users

    - by Linda
    I am using the calender module with it's iCal support for Drupal 6. I have made my event type which appear on the iCal feed. I however want to make the event content type private, so only authenticated users can read it. By doing this they will not show on the iCal feed. Is there any way that I could get the iCal feed to still show these events?

    Read the article

  • How do I apply a servlet filter when serving an HTML page directly?

    - by Philippe Beaudoin
    First off, I'm using Google AppEngine and Guice, but I suspect my problem is not related to these. When the user connect to my (GWT) webapp, the URL is a direct html page. For example, in development mode, it is: http://127.0.0.1:8888/Puzzlebazar.html?gwt.codesvr=127.0.0.1:9997. Now, I setup my web.xml in the following way: <?xml version="1.0" encoding="UTF-8"?> <web-app xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" version="2.5"> <display-name>PuzzleBazar</display-name> <!-- Default page to serve --> <welcome-file-list> <welcome-file>Puzzlebazar.html</welcome-file> </welcome-file-list> <filter> <filter-name>guiceFilter</filter-name> <filter-class>com.google.inject.servlet.GuiceFilter</filter-class> </filter> <filter-mapping> <filter-name>guiceFilter</filter-name> <url-pattern>/*</url-pattern> </filter-mapping> <!-- This Guice listener hijacks all further filters and servlets. Extra filters and servlets have to be configured in your ServletModule#configureServlets() by calling serve(String).with(Class<? extends HttpServlet>) and filter(String).through(Class<? extends Filter) --> <listener> <listener-class>com.puzzlebazar.server.guice.MyGuiceServletContextListener </listener-class> </listener> </web-app> Since I'm using Guice, I have to configure extra filters in my ServletModule, where I do this: filter("*.html").through( SecurityCookieFilter.class ); But my SecurityCookieFilter.doFilter is never called. I tried things like "*.html*" or <url-pattern>*</url-pattern> but to no avail. Any idea how I should do this?

    Read the article

  • How to pair users? (Like Omegle.com)

    - by Carlos Dubus
    Hi, I'm trying to do an Omegle.com clone script, basically for learning purposes. I'm doing it in PHP/MySQL/AJAX. I'm having problems finding two users and connecting them. The purpose of omegle is connecting two users "randomly". What I'm doing right now is the following: When a user enters the website a session is assigned. There are 3 states for each session/user (Normal,Waiting,Chatting) At first the user has state Normal and a field "connected_to" = NULL If the users clicks the START button, a state of "Waiting" is assigned. Then it looks for another user with state Waiting, if doesn't find one then it keeps looping, waiting for the "connected_to" to change. The "connected_to" will change when other user click START and then find another user waiting and updates the sessions accordingly. Now this have several problems, like: A user only can be connected to one user at a time. In omegle you can open more than one chat simultaneously. I don't know if this is the best way. About the chat, each user is polling the events from the server with AJAX calls, I saw that omegle, instead of several HTTP requests each second (let's say), does ONE request and wait for an answer, that means that the PHP script is looping indefinitely until gets an answer.I did this using set_time_limit(30) each time the loop is started. Then when the Ajax call is done start over again. Is this approach correct? I will appreciate a LOT your answers, Thank you, Carlos

    Read the article

  • MySQL Insert Data Question

    - by Nano HE
    Hi, assume I already created a table in MySQL as below CREATE TABLE IF NOT EXISTS `sales` ( `id` smallint(5) unsigned NOT NULL auto_increment, `client_id` smallint(5) unsigned NOT NULL, `order_time` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, `sub_total` decimal(8,2) NOT NULL, `shipping_cost` decimal(8,2) NOT NULL, `total_cost` decimal(8,2) NOT NULL, PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=9 ; -- -- Dumping data for table `sales` -- If I added a new field must_fill for the current table. `must_fill` tinyint(1) unsigned NOT NULL, User can insert less than the number of fiels items to the table defaultly, just as the script of below. INSERT INTO `sales` (`id`, `client_id`, `order_time`, `sub_total`, `shipping_cost`, `total_cost`) VALUES (8, 12312, '2007-12-19 01:30:45', 10.75, 3.00, 13.75); It's fine. But How can I configure the field (must_fill) to a MUST INCLUDE Data field when user plan to insert into new data. BTW, The code will be integrated in PHP script.

    Read the article

  • Rename Exchange Server 2003 Domain

    - by Debasish Pramanik
    Hi All: We have the following exchange server deployment Windows 2003 Server + Domain Controller + Exchange Server 2003 The domain name was X.COM. everything was working fine but due to some reason we need to rename the domain name to Y.COM. The rename of Domain went well but the rename of Exchange Server 2003 is having issues. When we run the XDR-Fixup we get the following error Operation failed: Could not get 'configurationNamingContext' on RootDSE of this server. Let me know if you have any idea on this.

    Read the article

  • trouble in using flalign (LaTeX)

    - by Jorge
    I am trying to put 3 equations with "=" signs aligned but also left aligned. I tried the following: \documentclass{article} \usepackage{amsmath} \begin{document} \begin{flalign*} RPC &= A+B\tilde{f} +C x &\ A &= a+\eta &\ E &= cte & \end{flalign*} \end{document} With this I get the stuff in the left and the "=" signs aligned. However, I also need A (in the second equation) and E (in the third equation) to be aligned to the R (in the first one) Does anyone know how to get it? thanks

    Read the article

  • .net famework 4 total application deployment size

    - by kzen
    After watching in horror as the .net framework 3.5 SP1 bloated to whopping 231 MB I was amazed to see that .NET Framework 4 Full (x86) is only 35 MB and client profile just 29 MB... My question is if .NET Framework 4 is in any way dependent on previous versions of the framework(s) being installed on the client machine or if my users will have to download only 29 (or 35) MB if I develop a Winforms or WPF desktop application in VS 2010 targeting the .NET Framework 4?

    Read the article

  • Bizarre Son of Suckerfish ie6/ie7 problem - 2 letters from right-most dropdown menu also appearing o

    - by Kevin Burke
    I'm interning for an NGO in India and trying to fix their website, including updating their menu so it's not the last item on the page to load, and it's centered on the screen. Everything works well enough but when I try out my new menu in IE6, I get this weird error where the content below the menu is padded an extra 30px or so and the material in the right-most drop down appears on the far left of the screen, always visible. When I drop down the rightmost link ("Publications") the content appears both in the correct location and in the same spot on the far left of the screen, and changes color when I hover as well. It's tough to describe, so it would probably be best if you took a look: visit http://sevamandir.org/a30/aboutus.htm in your IE6/IE7 browser to see for yourself. I really appreciate your help. Also I'm using a 1000px wide monitor, if there's more hijinks going on outside that space I'd like to know about that too. I took a look at the problem again and it's even weirder than I thought. Only two letters of the bottom-most drop down menu item are shown, no matter how many items are in the left-most drop down menu. When I delete the left-most drop down menu, the bottom item from the next left-most item shows up in the same space. The padding between the menu and the content is always the same. When I hover over the real menu item, the two letters on the left hand side change color to match the hover color. Unfortunately many people that visit our website are using old browsers so IE6 support is pretty crucial, this problem is really weird though, and I would appreciate some help. I uploaded a file with the entire style.css sheet in the and HTML code below, at http://sevamandir.org/a30/aboutus.htm. Here's the relevant code: in the html head: <script> sfHover = function() { var sfEls = document.getElementById("nav").getElementsByTagName("LI"); for (var i=0; i<sfEls.length; i++) { sfEls[i].onmouseover=function() { this.className+=" sfhover"; } sfEls[i].onmouseout=function() { this.className=this.className.replace(new RegExp(" sfhover\\b"), ""); } } } if (window.attachEvent) window.attachEvent("onload", sfHover); </script> text surrounding the menu - the menu is simply <ul id="nav"><li></li></ul> etc. <!--begin catchphrase--> <div style="float:left; height:27px; width:520px; margin:0px; font:16px Arial, Helvetica, sans-serif; font-weight:bold; color:#769841;"> Transforming lives through democratic &amp; participatory development </div> <?php include("menu.php"); ?> </div><!-- end header --> <!--begin main text div--> <div id="maincontent"> Relevant menu CSS: #nav, #nav ul { font:bold 11px Verdana, sans-serif; float: left; width: 980px; list-style: none; line-height: 1; background: white; font-weight: bold; padding: 0; border: solid #769841; border-width: 0; margin: 0 0 1em 0; } #nav a { display: block; width: 140px; /*this is the total width of the upper menu*/ w\idth: 120px; /*this is the width less horizontal padding */ padding: 5px 10px 5px 10px; /*horiz padding is the 2nd & 4th items here - goes Top Right Bottom Left */ color: #ffffff; background:#b6791e; text-decoration: none; } #nav a.daddy { background: url(rightarrow2.gif) center right no-repeat; } #nav li { float: left; padding: 0; width: 140px; /*this needs to be updated to match top #nav a */ background:#b6791e; } #nav li:hover, #nav li a:hover, #nav li:hover a { background:#769841; } #nav li:hover li a { background:#ffffff; color:#769841; } #nav li ul { position: absolute; left: -999em; height: auto; width: 14.4em; w\idth: 13.9em; font-weight: bold; border-width: 0.25em; /*green border around dropdown menu*/ margin: 0; } #nav li ul a { background:#ffffff; color:#769841; } #nav li li { padding-right: 1em; width: 13em; background:#ffffff; } #nav li ul a { width: 13em; w\idth: 9em; } #nav li ul ul { margin: -1.75em 0 0 14em; } #nav li:hover ul ul, #nav li:hover ul ul ul, #nav li.sfhover ul ul, #nav li.sfhover ul ul ul { left: -999em; } #nav li:hover ul, #nav li li:hover ul, #nav li li li:hover ul, #nav li.sfhover ul, #nav li li.sfhover ul, #nav li li li.sfhover ul { left: auto; } #nav li:hover, #nav li.sfhover, { background: #769841; color:#ffe400; } #nav li a:hover, #nav li li a:hover, #nav li:hover li:hover, #nav li.sfhover a:hover { background: #769841; color:#ffe400; }

    Read the article

  • Extracting attribute data from a raster

    - by user308827
    Hi, I have a raster file (basically 2D array) with close to a million points. I am trying to extract a circle from the raster (and all the points that lie within the circle. Using ArcGIS is exceedingly slow for this. Can anyone suggest any image processing library that is both easy to learn and powerful and quick enough for something like this? Thanks!

    Read the article

  • Implementing Operator Overloading with Logarithms in C++

    - by Jacob Relkin
    Hello my friends, I'm having some issues with implementing a logarithm class with operator overloading in C++. My first goal is how I would implement the changeBase method, I've been having a tough time wrapping my head around it. My secoond goal is to be able to perform an operation where the left operand is a double and the right operand is a logarithm object. Here's a snippet of my log class: // coefficient: double // base: unsigned int // number: double class _log { double coefficient, number; unsigned int base; public: _log() { base = rand(); coefficient = rand(); number = rand(); } _log operator+ ( const double b ) const; _log operator* ( const double b ) const; _log operator- ( const double b ) const; _log operator/ ( const double b ) const; _log operator<< ( const _log &b ); double getValue() const; bool changeBase( unsigned int base ); }; You guys are awesome, thank you for your time.

    Read the article

  • Design suggestion for expression tree evaluation with time-series data

    - by Lirik
    I have a (C#) genetic program that uses financial time-series data and it's currently working but I want to re-design the architecture to be more robust. My main goals are: sequentially present the time-series data to the expression trees. allow expression trees to access previous data rows when needed. to optimize performance of the data access while evaluating the expression trees. keep a common interface so various types of data can be used. Here are the possible approaches I've thought about: I can evaluate the expression tree by passing in a data row into the root node and let each child node use the same data row. I can evaluate the expression tree by passing in the data row index and letting each node get the data row from a shared DataSet (currently I'm passing the row index and going to multiple synchronized arrays to get the data). Hybrid: an immutable data set is accessible by all of the expression trees and each expression tree is evaluated by passing in a data row. The benefit of the first approach is that the data row is being passed into the expression tree and there is no further query done on the data set (which should increase performance in a multithreaded environment). The drawback is that the expression tree does not have access to the rest of the data (in case some of the functions need to do calculations using previous data rows). The benefit of the second approach is that the expression trees can access any data up to the latest data row, but unless I specify what that row is, I'll have to iterate through the rows and figure out which one is the last one. The benefit of the hybrid is that it should generally perform better and still provide access to the earlier data. It supports two basic "views" of data: the latest row and the previous rows. Do you guys know of any design patterns or do you have any tips that can help me build this type of system? Should I use a DataSet to hold and present the data, or are there more efficient ways to present rows of data while maintaining a simple interface? FYI: All of my code is written in C#.

    Read the article

  • How much detail should be in a project plan or spec?

    - by DeanMc
    I have an issue that I feel many programmers can relate to... I have worked on many small scale projects. After my initial paper brain storm I tend to start coding. What I come up with is usually a rough working model of the actual application. I design in a disconnected fashion so I am talking about underlying code libraries, user interfaces are the last thing as the library usually dictates what is needed in the UI. As my projects get bigger I worry that so should my "spec" or design document. The above paragraph, from my investigations, is echoed all across the internet in one fashion or another. When a UI is concerned there is a bit more information but it is UI specific and does not relate to code libraries. What I am beginning to realise is that maybe code is code is code. It seems from my extensive research that there is no 1:1 mapping between a design document and the code. When I need to research a topic I dump information into OneNote and from there I prioritise features into versions and then into related chunks so that development runs in a fairly linear fashion, my tasks tend to look like so: Implement Binary File Reader Implement Binary File Writer Create Object to encapsulate Data for expression to the caller Now any programmer worth his salt is aware that between those three to do items could be a potential wall of code that could expand out to multiple files. I have tried to map the complete code process for each task but I simply don't think it can be done effectively. By the time one mangles pseudo code it is essentially code anyway so the time investment is negated. So my question is this: Am I right in assuming that the best documentation is the code itself. We are all in agreement that a high level overview is needed. How high should this be? Do you design to statement, class or concept level? What works for you?

    Read the article

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