Daily Archives

Articles indexed Wednesday May 12 2010

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

  • 5 Things SQL Server should get rid of

    - by Jonathan Kehayias
    Paul Randal ( blog | twitter ) started a new meme last night with his blog post " What 5 things should SQL Server get rid of? " A few bloggers have posted their top 5 lists, so here is mine. Creating Foreign Keys without mentioning Indexes This is probably a performance tuning consultants favorite.  I know that Greg Low has blogged about this in the past (see Indexing Foreign Keys - should SQL Server do that automatically? ) and back then, and now I still do think this should be an...(read more)

    Read the article

  • OData EndPoint/DataService Using IEnumerable<IQueryable>

    - by Elijah Glover
    I am using NHibernate with NHibernate.Linq, and have a bunch of dynamically loading modules each with their own POCO's and Mappings (ClassMap<POCO). I have created OData services before, but normally with a datacontext and IQueryable as Properties/Getters. What I want is to create the service by passing in IEnumerable, into the constructor IEnumerable<IQueryable>> queryableObjects; var dataService = new DataService(queryableObjects); Is this at all possible?

    Read the article

  • Create PDF in memory instead of physical file using C#

    - by acadia
    Hello, How do one create PDF in memorystream instead of physical file using itextsharp. The code below is creating actual pdf file. Instead how can I create a byte[] and store it in the byte[] so that I can return it through a function using iTextSharp.text; using iTextSharp.text.pdf; Document doc = new Document(iTextSharp.text.PageSize.LETTER, 10, 10, 42, 35); PdfWriter wri = PdfWriter.GetInstance(doc, new FileStream("c:\\Test11.pdf", FileMode.Create)); doc.Open();//Open Document to write Paragraph paragraph = new Paragraph("This is my first line using Paragraph."); Phrase pharse = new Phrase("This is my second line using Pharse."); Chunk chunk = new Chunk(" This is my third line using Chunk."); doc.Add(paragraph); doc.Add(pharse); doc.Add(chunk); doc.Close(); //Close document

    Read the article

  • How do you match only valid roman numerals with a regular expression?

    - by Daniel Magliola
    Thinking about my other problem, i decided I can't even create a regular expression that will match roman numerals (let alone a context-free grammar that will generate them) The problem is matching only valid roman numerals. Eg, 990 is NOT "XM", it's "CMXC" My problem in making the regex for this is that in order to allow or not allow certain characters, I need to look back. Let's take thousands and hundreds, for example. I can allow M{0,2}C?M (to allow for 900, 1000, 1900, 2000, 2900 and 3000). However, If the match is on CM, I can't allow following characters to be C or D (because I'm already at 900). How can I express this in a regex? If it's simply not expressible in a regex, is it expressible in a context-free grammar? Thanks for any pointers!

    Read the article

  • sql-access: HAVING clause and != operator

    - by every_answer_gets_a_point
    i am new to access sql and i built a select statement that looks like this: SELECT [Lab Occurrence Form].[Practice Code], Count([Lab Occurrence Form].[1 0 Preanalytical (Before Testing)]) AS [CountOf1 0 Preanalytical (Before Testing)], [Lab Occurrence Form].[1 0 Preanalytical (Before Testing)] FROM [Lab Occurrence Form] WHERE ((([Lab Occurrence Form].[Occurrence Date]) Between #9/1/2009# And #9/30/2009#)) having ([CountOf1 0 Preanalytical (Before Testing)] != 0) GROUP BY [Lab Occurrence Form].[Practice Code], [Lab Occurrence Form].[1 0 Preanalytical (Before Testing)]; its not liking my HAVING clause. what is wrong with it? how do i do a != ??

    Read the article

  • What is the best way when creating a Google Widget, to store the data for the Widget to be shared by

    - by Tim McJilton
    I know this may end up getting closed quickly. I could not find this in my searching through APIs. And this is probably a very simple question but here we go... How do you store data on a google application you create in which you and others in a specific group or more specifically the people who can edit a specific calendar, can reach this data? Person A,B,C have read/write access to a calendar, and lets say they want to co-ordinate information. I want this information to not be accessible to modify by all 3 though it is not stored in a calendar? (Though I thought about just creating an event in 1900 and then that fullfills that, but at the same time is a very hack way to do it) I would appreciate any insight you can give me when it comes to data handling in google applications, I am very new to it, but have been looking into it.

    Read the article

  • how to know when a work in a thread is complete?

    - by seinkraft
    I need to create multiple threads when a button is clicked and i've done that with this: Dim myThread As New Threading.Thread(AddressOf getFile) myThread.IsBackground = True myThread.Start() but i need to update a picture box with the downloaded file, buy if i set an event in the function getFile and raise it to notify that the files was downloaded and then update the picturebox.

    Read the article

  • Creating a Function in SQL Server with a Phone Number as a parameter and returns a Random Number

    - by Emer
    Hi Guys, I am hoping someone can help me here as google is not being as forthcoming as I would have liked. I am relatively new to SQL Server and so this is the first function I have set myself to do. The outline of the function is that it has a Phone number varchar(15) as a parameter, it checks that this number is a proper number, i.e. it is 8 digits long and contains only numbers. The main character I am trying to avoid is '+'. Good Number = 12345678 Bad Number = +12345678. Once the number is checked I would like to produce a random number for each phone number that is passed in. I have looked at substrings, the like operator, Rand(), left(), Right() in order to search through the number and then produce a random number. I understand that Rand() will produce the same random number unless alterations are done to it but right now it is about actually getting some working code. Any hints on this would be great or even point me towards some more documentation. I have read books online and they haven't helped me, maybe I am not looking in the right places. Here is a snippet of code I was working on the Rand declare @Phone Varchar (15) declare @Counter Varchar (1) declare @NewNumber Varchar(15) set @Phone = '12345678' set @Counter = len(@Phone) while @Counter > 0 begin select case when @Phone like '%[0-9]%' then cast(rand()*100000000 as int) else 'Bad Number' end set @counter = @counter - 1 end return Thanks for the help in advance Emer

    Read the article

  • Notepad replacement for writing poetry?

    - by DINGUZ
    Requirements: associateable with .TXT justified text center (for poetry) real total fullscreen *open quicker than Similar to: Jdarkroom, Q10, WriteMonkey None of the above start fast enough on my netbook with an Atom processor. Any alternatives would be appreciated, though I feel I have expired my google-foo.

    Read the article

  • How to use Javascript to create a checked radioButton in IE?

    - by Chris
    I was trying to create a checked radiobutton by using following code in IE7. But it doesn't work. var x = document.createElement(""); var spn=document.createElement("span"); spn.appendChild(x); x.checked=true; document.body.appendChild(spn); I found that I could put x.checked=true after appendChild statement to make it work. I also noticed that when I change "radio" to "checkbox", it can be checked without changing the order of statements. I am really confused by these facts. Am I doing something wrong in the above code?

    Read the article

  • Basic Profanity Filter in Objective C for iPhone

    - by David van Dugteren
    How have you like minded individuals tackled the basic challenge of filtering profanity, obviously one can't possibly tackle every scenario but it would be nice to have one at the most basic level as a first line of defense. In Obj-c I've got NSString *tokens = [text componentsSeparatedByString:@" "]; And then I loop through each token to see if any of the keywords (I've got about 400 in a list) are found within each token. Realising False positives are also a problem, if the word is a perfect match, its flagged as profanity otherwise if more than 3 words with profanity are found without being perfect matches it is also flagged as profanity. Later on I will use a webservice that tackles the problem more precisely, but I really just need something basic. So if you wrote the word penis it would go yup naughty naughty, bad word written.

    Read the article

  • Lightbox close and loading images not showing

    - by Mark Szymanski
    I am using Lightbox 2 and I have followed the short tutorial on how to insert it in a webpage and it works perfectly but the close and refresh images don't show. They are replaced with the classic Mac OS X '?' box. I have checked the paths of these images in the lightbox.js file and they are correct. Thanks in advance!

    Read the article

  • Create PDF in memory instead of physical file

    - by acadia
    How do one create PDF in memorystream instead of physical file using itextsharp. The code below is creating actual pdf file. Instead how can I create a byte[] and store it in the byte[] so that I can return it through a function using iTextSharp.text; using iTextSharp.text.pdf; Document doc = new Document(iTextSharp.text.PageSize.LETTER, 10, 10, 42, 35); PdfWriter wri = PdfWriter.GetInstance(doc, new FileStream("c:\\Test11.pdf", FileMode.Create)); doc.Open();//Open Document to write Paragraph paragraph = new Paragraph("This is my first line using Paragraph."); Phrase pharse = new Phrase("This is my second line using Pharse."); Chunk chunk = new Chunk(" This is my third line using Chunk."); doc.Add(paragraph); doc.Add(pharse); doc.Add(chunk); doc.Close(); //Close document

    Read the article

  • Works in Google charts but not in Eastwood?

    - by Rhubarb
    This chart works fine in Google charts, but when rendered in Eastwood, it doesn't use the 2nd provided color, rather it applies the first color to both bars in the chart. http://chart.apis.google.com/chart?cht=bvg&chs=150x150&chd=t:18,81&chco=FFF000|00FFFF&chxt=x,y&chl=Bar1|Bar2&chtt=Chart Any suggestions as to why this could be? Unfortunately it looks like Eastwood is somewhat abandoned.

    Read the article

  • GWT application not displaying data on Windows 7 Starter Edition

    - by Steve Buikhuizen
    I have a GWT application that works great on all platforms/browsers etc. Then we tried Windows 7 Starter Edition. For all browsers (Chrome, IE, Firefox) none of the dynamically displayed data appears in the application. We know that the machine is ok because Google Wave works fine and its also a GWT application. I'm at a loss. What could cause this to happen? I'd be grateful if you have a suggestion as to how to debug this. If so find the solution I'll post it.

    Read the article

  • JSF SSL Hazzard

    - by java beginner
    In my application it is required that only certain pages need to be secured using SSL so I configured it security-constraint> <display-name>Security Settings</display-name> <web-resource-collection> <web-resource-name>SSL Pages</web-resource-name> <description/> <url-pattern>/*.jsp</url-pattern> <http-method>GET</http-method> <http-method>POST</http-method> </web-resource-collection> <user-data-constraint> <description>CONFIDENTIAL requires SSL</description> <transport-guarantee>CONFIDENTIAL</transport-guarantee> </user-data-constraint> and added filter http://blogs.sun.com/jluehe/entry/how_to_downshift_from_https but only one hazard is there. I am using it with richFaces. Once it goes to HTTPS its not changing the page—I mean if I perform post action it doesn't actually happen. But if I do it from the local machine's browser it works perfectly, from a remote browser it stucks with HTTPS and not changing after that. Here is my web.xml's snap: <filter> <filter-name>MyFilter</filter-name> <filter-class>MyFilter</filter-class> <init-param> <param-name>httpPort</param-name> <param-value>8080</param-value> </init-param> </filter> <filter-mapping> <filter-name>MyFilter</filter-name> <url-pattern>/*</url-pattern> </filter-mapping> <security-constraint> <web-resource-collection> <web-resource-name>Protected resource</web-resource-name> <url-pattern>somePattern</url-pattern> <http-method>GET</http-method> <http-method>POST</http-method> </web-resource-collection> <user-data-constraint> <transport-guarantee>CONFIDENTIAL</transport-guarantee> </user-data-constraint> </security-constraint> and some other filters of richfaces. Problem is strange. If I try to access the web app from local's machine's browser it works fine but in remote machine's browser once it get into HTTP, all the forms of that page aswell as href stops working.(JSF,facelet is used.)

    Read the article

  • How to lazy load scripts in YUI that accompany ajax html fragments

    - by Chris Beck
    I have a web app with Tabs for Messages and Contacts (think gmail). Each Tab has a Y.on('click') event listener that retrieves an HTML fragment via Y.io() and renders the fragment via node.setContent(). However, the Contact Tab also requires contact.js to enable an Edit button in the fragment. How do I defer the cost of loading contact.js until the user clicks on the Contacts tab? How should contact.js add it's listener to the Edit button? The Complete function of my Tab's on('click') event could serialize Get.script('contact.js') after Y.io('fragment'). However, for better performance, I would prefer to download the script in parallel to downloading the HTML fragment. In that case, I would need to defer adding an event listener to the Edit button until the Edit button is available. This seems like a common RIA design pattern. What is the best way to implement this with YUI? How should I get the script? How should I defer sections of the script until elements in the fragment are available in the DOM?

    Read the article

  • iphone/ipad orientation handling

    - by Mark
    This is more of a general question for people to provide me guidance on, basically Im learning iPad/iPhone development and have finally come across the multi-orientation support question. I have looked up a fair amount of doco, and my book "Beginning iPhone 3 Development" has a nice chapter on it. But my question is this, if I was to programatically change my controls (or even use different views for each orientation) how on earth to people maintain their code base? I can just imagine so many issues with spaghetti code/thousands of "if" checks all over the place, that it would drive me nuts to make one small change to the UI arrangement. Does anyone have experience handling this issue? What is a nice way to control it? Thanks a lot Mark

    Read the article

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