Daily Archives

Articles indexed Monday March 15 2010

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

  • Formula parsing / evaluation routine or library with generic DLookup functionality

    - by tbone
    I am writing a .Net application where I must support user-defined formulas that can perform basic mathematics, as well as accessing data from any arbitrary table in the database. I have the math part working, using JScript Eval(). What I haven't decided on is what a nice way is to do the generic table lookups. For example, I may have a formula something like: Column: BonusAmount Formula: {CurrentSalary} * 1.5 * {[SystemSettings][Value][SettingName=CorpBonus AND Year={Year}]} So, in this example I would replace {xxx} and {Year} with the value of Column xxx from the current table, and I would replace the second part with the value of (select Value from SystemSettings WHERE SettingName='CorpBonus' AND Year=2008) So, basically, I am looking for something very much like the MS Access DLookup function: DLookup ( expression, domain, [criteria] ) DLookup("[UnitPrice]", "Order Details", "OrderID = 10248") But, I also need to overall parsing routine that can tell whether to just look up in the current row, or to look into another table. Would also be nice to support aggregate functions (ie: DAvg, DMax, etc), as well as all the weird edge cases handled. So I wonder if anyone knows of any sort of an existing library, or has a nice routine that can handle this formula parsing and database lookup / aggregate function resolution requirements.

    Read the article

  • SQL 2008 SMO Database Status property memory leak.

    - by AKoran
    It appears there is a memory leak in the Status property of the SMO Database class. Using the code below with SQL 2005 SMO libraries works fine, but as soon as you use SQL 2008, the memory leak appears.... Any other good way of getting the database staus in SQL 2008? A quick example that magnifies the problem: private void button1_Click(object sender, RoutedEventArgs e) { for (int x = 0; x < 100; x++) { CheckStatus(); } } private void CheckStatus() { Server server = new Server("YourServer"); DatabaseCollection dbc = server.Databases; if (dbc.Contains("YourDatabase")) { DatabaseStatus dbStatus = dbc["YourDatabase"].Status; } }

    Read the article

  • spring MVC sample web app

    - by Don
    Hi, I'm looking for an example Spring MVC 2.5 web app that I can easily: Setup as a project in Eclipse Deploy to a local app server (using Ant/Maven) There are a couple of example applications included with the Spring distribution ('petclinic' and 'jpetstore'), but they don't provide any Eclipse project files (or a way to generate them). They also seem a bit complicated for my needs, e.g. require a local database to be setup. Thanks, Don

    Read the article

  • ruby xmpfilter on windows

    - by dreftymac
    Has anyone out there ever gotten xmpfilter to work on windows? xmpfilter "unterminated string meets end of file" is the error. The only Google hit is in Japanese: google://xmpfilter "unterminated string meets end of file" http://www.unkar.org/read/pc12.2ch.net/tech/1249687283 For background, the desired feature from xmpfilter is to get automatic "eval" annotations of Ruby sourcecode: Before: a = "bravo alpha charlie" # => b = a.split # => b.sort! # => After: a = "bravo alpha charlie" # => "bravo alpha charlie" b = a.split # => ["bravo", "alpha", "charlie"] b.sort! # => ["alpha", "bravo", "charlie"]

    Read the article

  • QueryReadStore loads JSON into DataGrid, but JsonRestStore does not (from the same source)

    - by labratmatt
    I'm building a Dojo DataGrid from JSON data provided by my REST interface. The DataGrid loads the data fine using a QueryReadStore, but doesn't seem to work with the same same data piped into a JsonRestStore. I'm using the following Dojo libs with Dojo 1.4.1: dojo.require("dojox.data.JsonRestStore"); dojo.require("dojox.grid.DataGrid"); dojo.require("dojox.data.QueryReadStore"); dojo.require("dojo.parser"); I declare my stores in the following manner: var storeJRS = new dojox.data.JsonRestStore({target:"api/collaborations.php/1", idAttribute: 'items[].id'}); var storeQRS = new dojox.data.QueryReadStore({url:"api/collaborations.php/1", requestMethod:"get"}); I create my grid layout like this: var gridLayout = [ new dojox.grid.cells.RowIndex({ name: "Row #", width: 5, styles: "text-align: left;" }), { name: "Name", field: "name", styles: "text-align:right;", width:20 }, { name: "Description", field: "description", width:30 } ]; I create my DataGrid as follows: The above works, but if I use QueryReadStore as my store, the grid is created with the headers (Name, Description), but it isn't populated with any rows: <div dojoType="dojox.grid.DataGrid" jsid="grid3" store="storeQRS" structure="gridLayout" style="height:500px; width:1000px;"></div> Using FireBug, I can see that QueryReadStore is getting my JSON data from my REST interface. It looks like the following: {"numRows":6,"items":[{"name":"My Super Cool Collab","description":"This is for all the super cool people in the super cool group","id":1},{"name":"My Other Super Cool","description":"This is for all the other super cool people","id":3},{"name":"This is another coll","description":"This is just some other collab","id":4},{"name":"some new collab","description":"this is a new collab","id":5},{"name":"yet another new coll","description":"uh huh","id":6},{"name":"asdf","description":"asdf","id":7}]} Any ideas? Thanks.

    Read the article

  • Redirect to default action in Struts 2

    - by topher-j
    I have an action with an empty string for name defined in the root namespace, and I want to redirect to that action from another action if a certain result is found, but it doesn't seem to work. Here's the default action <action name="" class="com.example.actions.HomeAction"> <result name="success" type="freemarker">freemarker/home.ftl</result> </action> And I'm defining the redirect in the global-results for the package: <global-results> <result name="sendToRouting" type="redirectAction"> <param name="actionName"></param> <param name="namespace">/</param> </result> </global-results> I've tried taking out the actionName parameter, but that doesn't work. If I put a name in for the HomeAction and reference it by name in the global-results it works, so I'm assuming the problem is lack of action name for the redirect. Any thoughts?

    Read the article

  • PHP GD Reflection with original picture on top

    - by Steve Thomas
    Hi, I have stumbled upon a nice PHP library that uses GD to generate a reflection of a picture. I tried to modify the way so it also display the original image above its reflection to not have to align them in HTML. The script can be found there : http://reflection.corephp.co.uk/v3.php Any idea if this can be done easily ? With my tests, the alpha gradient effect wasnt applied at all. Thank you in advance.

    Read the article

  • What threading analysis tools do you recommend?

    - by glutz78
    My primary IDE is Visual Studio 2005 and I have a large C/C++ project. I'm interested in what thread analysis tools are recommended. By that I mean, I want a tool, static or dynamic, to help find race conditions, deadlocks, and the like. So far I've casually researched the following: 1. Intel Thread Checker: I don't believe that it ties into VS 2005? 2. Valgrind/Helgrind: free. 3. Coverity: this is a costly tool if i understand correctly. Anyone have experience with any of these or other? I'd much appreciate any advice. Thank you.

    Read the article

  • can bound negative space be used in SVG?

    - by Anthony
    If I have a map of three countries, and their borders form the outline of a sea, is their a way with SVG to give that bound area attributes and style? Another example might be three triangles which form a third triangle in the center (like the triforce). If someone wanted to make that middle empty area glow (or whatever)...

    Read the article

  • FilteredTextBox - allow non-english characters

    - by superexsl
    Hey, I'm using the AJAX FilteredTextBoxExtender, but I'm not sure how to let it accept non-english characters such as é and á. I know I can manually add these in the InvalidChar's property, but is there an easier, more practical way? When using Regex, the [\w] seems to let it through, but I'm guessing the FTBE is using another system to check for valid characters? (I know I can use the regex validator, but for UI experience, I'd like a real time input check) Thanks for any suggestions

    Read the article

  • WebOrb - Serializing an object as a string

    - by Robert Wagner
    We have an Adobe Flex client talking to a .NET server using WebORB. Simplifying things, on the .NET side of things we have a struct that wraps a ulong like this: public struct MyStruct { private ulong _val; public override string ToString() { return _val.ToString("x16"); } // Parse method } I want the Flex client to treat this as a string. So that for the following server method: public void DoStuff(int i, MyStruct b); It can call it as DoStuff(1, "1234567890ABCDEF") I've tried playing with custom WebORB serializers, but the documentation is a bit scarce. Is this possible? If so how?

    Read the article

  • Visual Studio Question: When doing a compile/debug is VS suppose to delete existing files in the bin

    - by Greg
    Hi, Q1 - When doing a compile/debug is VS suppose to delete existing files in the bin\debug area? (for VS2008) if no then can I ask please: Q2 - My winforms checks for existance of a sqlite.db3 file and creates it if it needs to (programmatically). If the behavior I wanted was that each Compile/Debug I do is for the target Debug area to be clear, so that the program would exercise the code that builds the database file, how would I organise this? thanks

    Read the article

  • How to make strtotime parse dates in Australian (i.e. UK) format: dd/mm/yyyy?

    - by Iain Fraser
    I can't beleive I've never come across this one before. Basically, I'm parsing the text in human-created text documents and one of the fields I need to parse is a date and time. Because I'm in Australia, dates are formatted like dd/mm/yyyy but strtotime only wants to parse it as a US formatted date. Also, exploding by / isn't going to work because, as I mentioned, these documents are hand-typed and some of them take the form of d M yy. I've tried multiple combinations of setlocale but no matter what I try, the language is always set to US English. I'm fairly sure setlocale is the key here, but I don't seem to be able to strike upon the right code. Tried these: au au-en en_AU australia aus Anything else I can try? Thanks so much :) Iain Example: $mydatetime = strtotime("9/02/10 2.00PM"); echo date('j F Y H:i', $mydatetime); Produces 2 September 2010 14:00 I want it to produce: 9 February 2010 14:00

    Read the article

  • Path for Delphi libraries

    - by Wouter van Nifterick
    Where do you guys store 3rd party (and your own) components? Do you keep separate copies per Delphi version? For years I've been using c:\program files\borland\delphi7\lib\, even for Delphi 2006, 2007, 2009 and 2010, like this: c:\program files\borland\delphi7\lib\AggPas\ c:\program files\borland\delphi7\lib\DeHL\ c:\program files\borland\delphi7\lib\DevExpress\ c:\program files\borland\delphi7\lib\FastCode\ c:\program files\borland\delphi7\lib\FastMM\ c:\program files\borland\delphi7\lib\Fundamentals\ c:\program files\borland\delphi7\lib\Graphics32\ c:\program files\borland\delphi7\lib\JCL\ c:\program files\borland\delphi7\lib\JVCL\ c:\program files\borland\delphi7\lib\OmniThread\ c:\program files\borland\delphi7\lib\Raize\ c:\program files\borland\delphi7\lib\TeeChartPro\ c:\program files\borland\delphi7\lib\TurboPower\ c:\program files\borland\delphi7\lib\VirtualTreeView\ c:\program files\borland\delphi7\lib\Zeos\ However, nowadays I don't even use Delphi7 anymore (what can it do that 2010 can't?), so this path doesn't make much sense anymore. I'm about to install windows7 on my home machine, so I'm thinking on something like this: c:\src\DelphiLib\ Any better ideas?

    Read the article

  • Inserting multiple types into an SQLite database with Python

    - by mankoff
    I'm trying to create an SQLite 3 database from Python. I have a few types I'd like to insert into each record: A float, and then 3 groups of n floats, currently a tuple but could be an array or list.. I'm not well-enough versed in Python to understand all the differences. My problem is the INSERT statement. DAS = 12345 lats = (42,43,44,45) lons = (10,11,12,13) times = (1,2,3,4,5,6,7,8,9) import sqlite3 connection = sqlite3.connect("test.db") cursor = connection.cursor() cursor.execute( "create table foo(DAS LONG PRIMARY KEY,lats real(4),lons real(4), times real(9) )" ) I'm not sure what comes next. Something along the lines of: cmd = 'INSERT into foo values (?,?,?,?), ..." cursor.execute(cmd) How should I best build the SQL insert command given this data?

    Read the article

  • Topeka Dot Net User Group (DNUG) Meeting &ndash; April 6, 2010

    - by Robz / Fervent Coder
    Topeka DNUG is free for anyone to attend! Mark your calendars now! SPEAKER: Troy Tuttle is a self-described pragmatic agilist, and Kanban practitioner, with more than a decade of experience in delivering software in the finance and health industries and as a consultant. He advocates teams improve their performance through pursuit of better practices like continuous integration and automated testing. Troy is the founder of the Kansas City Limited WIP Society and is a speaker at local area groups on team related topics. He currently works as a Project Lead Consultant with AdventureTech Group of Kansas City, KS. TOPIC: Why Kanban? Kanban is receiving a large amount of attention recently. What does it offer compared to other approaches? Answering that question may require you to hit the “reset” button on previously held biases and assumptions. Kanban blends Lean thought with ideas from first generation agile methodologies. To get started with Kanban, we will examine what steps are necessary to establish a transparent, work-limited, pull system. We will highlight the perils of allowing too much work-in-progress and how it affects development performance. Once established, Kanban teams need only a few metrics and tools to monitor their performance and improvement. WHERE: Federal Home Loan Bank Topeka on the Security Benefit Campus – Directions? WHEN: 11:30 AM - 1:00 PM on April 6th, 2010 REGISTER: http://topekadotnet.wufoo.com/forms/topeka-dnug-meeting-attendance/ ADDITIONAL INFO: As always, please sign in and out of FHLBank to help them with their accountability. Please park in the visitors section at the front of the building when you arrive. If  there are no spots in visitors you may park in the overflow lot at the far east end of the facility.  Lunch will be provided and we will have some great door prizes!

    Read the article

  • How to delete columns?

    - by Joey jie
    Hi all, I have generated the following text file below: fe120b99164f151b28bf86afa6389b22 -rw-r--r-- 1 joey joey 186 2010-03-14 19:26 Descript.txt 41705ea936cfc653f273b5454c1cdde6 -rw-r--r-- 1 joey joey 30 2010-03-14 20:29 listof.txt 0e25cca3222d32fff43563465af03340 -rw-r--r-- 1 joey joey 28 2010-03-14 23:35 sedexample.txt d41d8cd98f00b204e9800998ecf8427e -rw-r--r-- 1 joey joey 0 2010-02-16 15:11 test1.txt d41d8cd98f00b204e9800998ecf8427e -rw-r--r-- 1 joey joey 0 2010-02-16 15:11 test2.txt d41d8cd98f00b204e9800998ecf8427e -rw-r--r-- 1 joey joey 0 2010-02-16 15:11 test3.txt d41d8cd98f00b204e9800998ecf8427e -rw-r--r-- 1 joey joey 0 2010-02-16 15:11 test4.txt d41d8cd98f00b204e9800998ecf8427e -rw-r--r-- 1 joey joey 0 2010-02-16 15:11 test5.txt d41d8cd98f00b204e9800998ecf8427e -rw-r--r-- 1 joey joey 0 2010-02-16 15:11 test6.txt f5c7f1856249d0526be10df5bd5b895a -rw-r--r-- 1 joey joey 26 2010-03-13 14:13 testingfile.txt d41d8cd98f00b204e9800998ecf8427e -rw-r--r-- 1 joey joey 0 2010-03-15 00:28 uniquelist.txt Basically I would like to get rid of the access, amount column, user and group columns. In other words, I want rid of columns 3,4,5. I have tried using cut to keep the columns that I do want and having " " as my delimiter however because of the file size figures, it messes up using "space" as a delimiter. Any advice would be much appreciated! Oh just to add, I would like to save the output as another text file. Many thanks!

    Read the article

  • Git for beginners: The definitive practical guide

    - by Adam Davis
    Ok, after seeing this post by PJ Hyett, I have decided to skip to the end and go with git. So what I need is a beginners practical guide to git. "Beginner" being defined as someone who knows how to handle their compiler, understands to some level what a makefile is, and has touched source control without understanding it very well. "Practical" being defined as this person doesn't want to get into great detail regarding what git is doing in the background, and doesn't even care (or know) that it's distributed. Your answers might hint at the possibilities, but try to aim for the beginner that wants to keep a 'main' repository on a 'server' which is backed up and secure, and treat their local repository as merely a 'client' resource. Procedural note: PLEASE pick one and only one of the below topics and answer it clearly and concisely in any given answer. Don't try to jam a bunch of information into one answer. Don't just link to other resources - cut and paste with attribution if copyright allows, otherwise learn it and explain it in your own words (ie, don't make people leave this page to learn a task). Please comment on, or edit, an already existing answer unless your explanation is very different and you think the community is better served with a different explanation rather than altering the existing explanation. So: Installation/Setup How to install git How do you set up git? Try to cover linux, windows, mac, think 'client/server' mindset. Setup GIT Server with Msysgit on Windows How do you create a new project/repository? How do you configure it to ignore files (.obj, .user, etc) that are not really part of the codebase? Working with the code How do you get the latest code? How do you check out code? How do you commit changes? How do you see what's uncommitted, or the status of your current codebase? How do you destroy unwanted commits? How do you compare two revisions of a file, or your current file and a previous revision? How do you see the history of revisions to a file? How do you handle binary files (visio docs, for instance, or compiler environments)? How do you merge files changed at the "same time"? How do you undo (revert or reset) a commit? Tagging, branching, releases, baselines How do you 'mark' 'tag' or 'release' a particular set of revisions for a particular set of files so you can always pull that one later? How do you pull a particular 'release'? How do you branch? How do you merge branches? How do you resolve conflicts and complete the merge? How do you merge parts of one branch into another branch? What is rebasing? How do I track remote branches? How can I create a branch on a remote repository? Other Describe and link to a good gui, IDE plugin, etc that makes git a non-command line resource, but please list its limitations as well as its good. msysgit - Cross platform, included with git gitk - Cross platform history viewer, included with git gitnub - OS X gitx - OS X history viewer smartgit - Cross platform, commercial, beta tig - console GUI for Linux qgit - GUI for Windows, Linux Any other common tasks a beginner should know? Git Status tells you what you just did, what branch you have, and other useful information How do I work effectively with a subversion repository set as my source control source? Other git beginner's references git guide git book git magic gitcasts github guides git tutorial Progit - book by Scott Chacon Git - SVN Crash Course Delving into git Understanding git conceptually I will go through the entries from time to time and 'tidy' them up so they have a consistent look/feel and it's easy to scan the list - feel free to follow a simple "header - brief explanation - list of instructions - gotchas and extra info" template. I'll also link to the entries from the bullet list above so it's easy to find them later.

    Read the article

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