Search Results

Search found 3195 results on 128 pages for 'balazs david'.

Page 73/128 | < Previous Page | 69 70 71 72 73 74 75 76 77 78 79 80  | Next Page >

  • Create a user-defined aggregate without SQL CLR

    - by David Pfeffer
    I am planning on deploying a database to SQL Azure, so I cannot use the SQL CLR. However, I have a need to create an aggregate function -- in my case, I need to STUnion a bunch of Geography objects together. (Azure is expected to support Spatial by June.) Is there another way to accomplish this, without making use of the CLR, in a query? Or do I have to create a UDF that will take a table as a parameter and return the aggregate?

    Read the article

  • How to make <dl> layout horizontally?

    - by David
    I'm trying to develop a layout for my website in which elements of a definition list will be laid out horizontally, kind of like this: term 1 term 2 term 3 definition 1 definition 2 definition 3 Anyone know a way to make a definition list look like this using valid CSS? Or if I can't do it with a <dl>, what would be the recommended structure?

    Read the article

  • Zend database query result converts column values to null

    - by David Zapata
    Hi again. I am using the next instructions to get some registers from my Database. Create the needed models (from the params module): $obj_paramtype_model = new Params_Model_DbTable_Paramtype(); $obj_param_model = new Params_Model_DbTable_Param(); Getting the available locales from the database // This returns a Zend_Db_Table_Row_Abstract class object $obj_paramtype = $obj_paramtype_model->getParamtypeByValue('available_locales'); // This is a query used to add conditions to the next sentence. This is executed from the Params_Model_DbTable_Param instance class, that depends from Params_Model_DbTable_Paramtype class (reference map and dependentTables arrays are fine in both classes) $obj_select = $this->select()->where('deleted_at IS NULL')->order('name'); // Execute the next query, applying the select restrictions. This returns a Zend_Db_Table_Rowset_Abstract class object. This means "Find Params by Paramtype" $obj_params_rowset = $obj_paramtype->findDependentRowset('Params_Model_DbTable_Param', 'Paramtype', $obj_paramtype); // Here the firebug log displays the queries.... Zend_Registry::get('log')->debug($obj_params_rowset); I have a profiler for all my DB executions from Zend. At this point the log and profiler objects (that includes Firebug writers), shows the executed SQL Queries, and the last line displays the resulting Zend_Db_Table_Rowset_Abstract class object. If I execute the SQL Queries in some MySQL Client, the results are as expected. But the Zend Firebug log writer displays as NULL the column values with latin characters (ñ). In other words, the external SQL client shows es_CO | Español de Colombia and en_US | English of United States but the Query results from Zend displays (and returns) es_CO | null and en_US | English of United States. I've deleted the ñ character from Español de Colombia and the query results are just fine in my Zend Log Firebug screen, and in the final Zend Form element. The MySQL database, tables and columns are in UTF-8 - utf8_unicode_ci collation. All my zend framework pages are in UTF-8 charset. I'm using XAMPP 1.7.1 (PHP 5.2.9, Apache at port 90 and MySQL 5.1.33-community) running on Windows 7 Ultimate; Zend Framework 1.10.1. I'm sorry if there is so much information, but I don't really know why could that happen, so I tryed to provide as much related information as I could to help to find some answer.

    Read the article

  • How do I override generic activerecord error messages in ruby-on-rails?

    - by David Smith
    In my en.yml translation file, I have: activerecord: errors: template: header: one: "1 error prohibited this {{model}} from being saved" other: "{{count}} errors prohibited this {{model}} from being saved" When an activerecord/validation error occurs during logging into my application, the error message: "1 error prohibited this user session from being saved" is displayed (where user_session is the model being used). I'd rather have it say something like "An error has occured to prevent you from logging into your account". How do I override the generic error message with my specific one?

    Read the article

  • ASP.NET Nested masterpages, how to set content in the top page from the aspx file?

    - by David Suarez
    I have some content from a CMS that I need to move to raw asp.net pages. Since the templates are nested I guess I can use nested masterpages to acomplish it, but I'm finding that I can't set values on the top masterpage from the deep child page. Here is a sample. I have several nested masterpages with contentplaceholders: top master (with contentPlaceHolder1) nested master, dependent on top master (with contentPlaceHolder2) aspx page, dependent on nested master, defines content for contentPlaceHolder1 and 2 The problem is that asp.net doesn't allow me to have the value of contentPlaceHolder1 defined in the content page, it should be defined in the nested master. But the point is that the client page knows that value, not the template masters (for instance, the page knows about the graphic it has to display on the the top, but the placeholder for the graphic is the top master). How can I set values in the aspx page to be rendered in the top master?

    Read the article

  • Singletons in Cocoa Plugins

    - by David Beck
    How would I get a hold of a singleton in the main application from a SIMBL plugin? When I try to call something like [ProcessControl sharedInstance], I get an error that ProcessControl is undefined (even though it is declared in a header file).

    Read the article

  • How to make this Makefile more concise?

    - by David
    I know there are ways to remove duplicates in Makefile. Can you tell me how to make the Makefile below more concise? Thanks! And is there any tool to automate it? CC=gcc CFLAGS=-pthread -g -o all: dotprod_mutex dotprod_serial dotprod_mutex: dotprod_mutex.c $(CC) $(CFLAGS) dotprod_mutex dotprod_mutex.c dotprod_serial: dotprod_serial.c $(CC) $(CFLAGS) dotprod_serial dotprod_serial.c

    Read the article

  • Equivalent of http://www.cplusplus.com/ for C# .net

    - by David Relihan
    Hi Folks I've read through a lot of the "Learn C# .Net" questions just to see if this question was answered already (directly or indirectly). I program mostly in C++ so I find the website http://www.cplusplus.com/ invaluable and there's rarely a day when it is not open in my browser! However, I'm just wondering is there an C# .Net equivalent that people find themselves constantly referencing? The best I'm aware of is: http://stackoverflow.com http://msdn.microsoft.com/en-us/vcsharp/aa336809.aspx http://www.java2s.com/Tutorial/CSharp/CatalogCSharp.htm Thanks,

    Read the article

  • What is the Null Character literal in TSQL?

    - by David in Dakota
    I am wondering what the literal for a Null character (e.g. '\0') is in TSQL. Note: not a NULL field value, but the null character (see link). I have a column with a mix of typical and a null character. I'm trying to replace the null character with a different value. I would have thought that the following would work but it is unsuccessfull: select REPLACE(field_with_nullchar, char(0), ',') from FOO where BAR = 20

    Read the article

  • C# graphics flickering

    - by David
    Hello, I am working on kind of drawing program but I have a problem with flickering while moving a mouse cursor while drawing a rubberband line. I hope you can help me to remove that flickering of line, here is the code: using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; namespace GraphicsTest { public partial class Form1 : Form { int xFirst, yFirst; Bitmap bm = new Bitmap(1000, 1000); Graphics bmG; Graphics xG; Pen pen = new Pen(Color.Black, 1); bool draw = false; public Form1() { InitializeComponent(); } private void Form1_Load(object sender, EventArgs e) { bmG = Graphics.FromImage(bm); xG = this.CreateGraphics(); bmG.Clear(Color.White); } private void Form1_MouseDown(object sender, MouseEventArgs e) { xFirst = e.X; yFirst = e.Y; draw = true; } private void Form1_MouseUp(object sender, MouseEventArgs e) { bmG.DrawLine(pen, xFirst, yFirst, e.X, e.Y); draw = false; xG.DrawImage(bm, 0, 0); } private void Form1_MouseMove(object sender, MouseEventArgs e) { if (draw) { xG.DrawImage(bm, 0, 0); xG.DrawLine(pen, xFirst, yFirst, e.X, e.Y); } } private void Form1_Paint(object sender, PaintEventArgs e) { xG.DrawImage(bm, 0, 0); } } }

    Read the article

  • Using Thor for generators in a Ruby Gem

    - by David Burrows
    How do I setup a Gem to have a binary command eg. "project newProject" that uses Thor's set of generator commands to create files etc.? A good answer would describe how to layout the skeleton of a gem that that when run from the command line "project newProject" creates 1 file named "newProject.txt" in the directory it's run from. I've seen that Rails 3 is using Thor to power it's generators, seems like a really good solution and i'd like to use a similar approach in non-Rails ruby gem i'm working on. Tried looking at the Rails 3 source but it's a bit labyrinthine hence the question.

    Read the article

  • NSZombieEnabled hides EXC_BAD_ACCESS error entirely

    - by David Liu
    So I have a subclass of a UIView that starts causing EXC_BAD_ACCESS errors when I go through a specific set of conditions (run on iPad instead of iPhone or simulator, first login only). It throws the exception when the UIView subclass gets deallocated, during the last line, where I have [super dealloc]. I heard about using NSZombieEnabled, so I tossed that on to see if I could get any more information about it, but now it hides the error completely! Does anyone know a bit more about this type of situation? I thought NSZombie would start spewing stuff into my console like before, but I'm hoping that the nonexistance of errors would tell me some sort of information as well.

    Read the article

  • Returning recursive ternary freaks out

    - by David Titarenco
    Hi, assume this following function: int binaryTree::findHeight(node *n) { if (n == NULL) { return 0; } else { return 1 + max(findHeight(n->left), findHeight(n->right)); } } Pretty standard recursive treeHeight function for a given binary search tree binaryTree. Now, I was helping a friend (he's taking an algorithms course), and I ran into some weird issue with this function that I couldn't 100% explain to him. With max being defined as max(a,b) ((a)>(b)?(a):(b)) (which happens to be the max definition in windef.h), the recursive function freaks out (it runs something like n^n times where n is the tree height). This obviously makes checking the height of a tree with 3000 elements take very, very long. However, if max is defined via templating, like std does it, everything is okay. So using std::max fixed his problem. I just want to know why. Also, why does the countLeaves function work fine, using the same programmatic recursion? int binaryTree::countLeaves(node *n) { if (n == NULL) { return 0; } else if (n->left == NULL && n->right == NULL) { return 1; } else { return countLeaves(n->left) + countLeaves(n->right); } } Is it because in returning the ternary function, the values a => countLeaves(n->left) and b => countLeaves(n->right) were recursively double called simply because they were the resultants? Thank you!

    Read the article

  • Adding LegendItems in Flex places horizontally not vertically (as it's supposed to)

    - by David
    I'm dynamically inserting LegendItems into a Legend using the following code: signalLegend.removeAllChildren(); signalLegend.direction = "vertical"; for (var i:int = 0; i < numItems - 1; i++) { signalLegend.addChild(new LegendItem()); legendItem = signalLegend.getChildAt(i) as LegendItem; legendItem.label = "Title here"; legendItem.setStyle("fill", theColour); } While the Legend direction is set as vertical, all the items are appearing horizontally. Very annoying.

    Read the article

  • How to find unique values in jagged array

    - by David Liddle
    I would like to know how I can count the number of unique values in a jagged array. My domain object contains a string property that has space delimitered values. class MyObject { string MyProperty; //e.g = "v1 v2 v3" } Given a list of MyObject's how can I determine the number of unique values? The following linq code returns an array of jagged array values. A solution would be to store a temporary single array of items, looped through each jagged array and if values do not exist, to add them. Then a simple count would return the unique number of values. However, was wondering if there was a nicer solution. db.MyObjects.Where(t => !String.IsNullOrEmpty(t.MyProperty)) .Select(t => t.Categories.Split(new char[] { ' ' }, StringSplitOptions.RemoveEmptyEntries)) .ToArray() Below is a more readable example: array[0] = { "v1", "v2", "v3" } array[1] = { "v1" } array[2] = { "v4", "v2" } array[3] = { "v1", "v5" } From all values the unique items are v1, v2, v3, v4, v5. The total number of unique items is 5. Is there a solution, possibly using linq, that returns either only the unique values or returns the number of unique values?

    Read the article

  • Do not show partial items in a WPF listbox

    - by David Martin
    I've tried Google and I've tried Bing to no avail. Does anyone here have an idea on how to prevent partial items from appearing in a listbox in WPF? In case that does not make sense here is an example: Listbox is 200 pixels tall - each item is 35 pixels tall. That means I can show 5.7 items. 7/10 of an item is undesirable. I'd like to limit it to showing only 5 items. The user could then scroll to see the additional items. Should I A) try to dynamically size the listbox or ScrollViewer ViewPort so that it fits perfectly? Or B) implement a custom panel that would not arrange a child whose desired height is more than the remaining vertical space? Any thoughts would be greatly appreciated. Last note: If anyone knows of a 3rd party control (listbox or grid) that does this I would be interested in that as well.

    Read the article

  • Facebook iframe embed in profile pages - what the heck

    - by David
    Hi there, We're looking for a way to embed an iframe and specific content into a fan page (not a profile). Apparently it's not directly allowed using the fb:iframe tag but I did find some hints here: http://www.facebook.com/PagesDesign#/profile.php?fbhref=iportfolio.html%3F%5Ffb%5Ffromhash%3D53f3ede8dd88aad33d3bc346401a683c&id=92993272816&app%5Fpage=1&v=app%5F96944267235 Looking for a more direct way though. Dave

    Read the article

  • Castle Active Record - Working with the cache

    - by David
    Hi All, im new to the Castle Active Record Pattern and Im trying to get my head around how to effectivley use cache. So what im trying to do (or want to do) is when calling the GetAll, find out if I have called it before and check the cache, else load it, but I also want to pass a bool paramter that will force the cache to clear and requery the db. So Im just looking for the final bits. thanks public static List<Model.Resource> GetAll(bool forceReload) { List<Model.Resource> resources = new List<Model.Resource>(); //Request to force reload if (forceReload) { //need to specify to force a reload (how?) XmlConfigurationSource source = new XmlConfigurationSource("appconfig.xml"); ActiveRecordStarter.Initialize(source, typeof(Model.Resource)); resources = Model.Resource.FindAll().ToList(); } else { //Check the cache somehow and return the cache? } return resources; } public static List<Model.Resource> GetAll() { return GetAll(false); }

    Read the article

  • How to create database records for a financial year

    - by David A Gibson
    Hello, I need to create entities (specifically contracts) in a database table that are associated with a financial year. These contracts will be applied to projects. Any contract variation will be recorded by creating a new contract record for the same financial year but the original will remain associated with the project as a history. The projects can last several years and so at any one time a project will have a live contract record for each year as well as any number of historic contracts for that year. All of which is incidental but I'm trying to provide some context. If the contracts where for the year - it would be easy and I'd just store the Year either as a date field with the 1st of January or just an Integer. However the contracts run for financial years and I don't know how to approach this. I don't want a separate table containing the financial years as I don't want the users to have to maintain this. I don't want to store the financial year as a string "2009/2010" as this is not ideal for sorting/extracting the data. Any ideas will be helpful, my best so far is to have starting and ending year in 2 columns and just "KNOW" that starting is April of the year etc Thanks

    Read the article

  • MYSQL select query where multiple conditions in same column must exist

    - by David
    I'm putting together a dating site and I'm having a mysql query issue. This works: SELECT * FROM `user` , `desired_partner` , `user_personality` WHERE dob BETWEEN '1957-05-18' AND '1988-05-18' AND country_id = '190' AND user.gender_id = '1' AND user.user_id = desired_partner.user_id AND desired_partner.gender_id = '2' AND user.user_id = user_personality.user_id AND user_personality.personality_id = '2' The sql finds any male (gender_id=1) with ATLEAST personality trait 2 (and possibly other personality traits) between certain age range in the USA (country_id=190) looking for a female (gender_id=2). Question 1) How do I make it so it returns those with personality type 2 ONLY and no other personality traits? Find any man in the USA that is between 22 and 53 that is of personality type 2 (only) that is looking for a woman. Question 2) Supposing I want to find someone that matches personality type 1, personality type 2, and personality type 5 ONLY. There are 14 personality traits in the database and a user can be associated with any of them. Find any man in the USA that is between 22 and 53 that is of personality type 1, 2, and 5 (ONLY) that is looking for a woman.

    Read the article

  • Uploading multiple files simultaneously with Flex

    - by David
    I have been working on a flex uploader, where the user can select multiple files. It works fine when the files are uploaded in a queue (one at a time), however as soon as I try to have it upload 2 files at once I run into issues. It seems that files will often lock up, and either stay at 1% until every other file is uploaded, or just not complete at all. There is never more than one file uploading at a time. Is there some issue with calling .upload on multiple files at once in Flex?

    Read the article

  • CSS centering text between two images

    - by David Lively
    I need to display two images and some text like so: ------------------------------------------ img1--------some centered text-------img2 ------------------------------------------ img1 and img2 are not the same dimensions, but their widths are very close The text is variable depending on the page in which it is displayed, and may include two lines instead of one. The text needs to centered horizontally between the two images, or between the outside of the container (either will be fine) the text AND the images need to be centered vertically within the container. I can do this VERY easily with a table, but I'd rather not retreat to that for layout. The position:inline-block and display:table-cell attributes work great in some browsers, but I need to support IE6+.

    Read the article

< Previous Page | 69 70 71 72 73 74 75 76 77 78 79 80  | Next Page >