Daily Archives

Articles indexed Friday March 19 2010

Page 17/124 | < Previous Page | 13 14 15 16 17 18 19 20 21 22 23 24  | Next Page >

  • .NET Compact Framework Form not closing properly

    - by Daniel O
    I have a form in a Compact Framework application. When the user presses the 'X' button in the top right, the screen doesn't refresh until the users taps anywhere on the screen. The form is being shown using this code: using (var customerDetailsForm = ObjectFactory.Get<CustomerDetailsForm>()) { customerDetailsForm.AssignCustomerId(customerId); customerDetailsForm.ShowDialog(); }

    Read the article

  • Winforms-how do I keep window fully painted/responsive during a long running synchronous request is

    - by Greg
    Hi, Background - For a winforms 3.5 c# application, I would like to keep the main window fully painted/responsive during a long running synchronous request. For example if the user moves the window. Question - Is there a way to achive this WITHOUT having to setup a separate thread or backgroundworker process? (e.g. like a way to call from within my long running transaction, "release a bit of CPU to mainform", at some points) thanks

    Read the article

  • How to manage data access / preloading efficiently using web services in C# ?

    - by Amadeus45
    Hello all, Ok, this is very "generic" question. We currently have a SQL Server database for which we need to develop an application in ASP.NET with will contain all the business logic in C# Web Services. The thing is that, architecturally speaking, I'm not sure how to design the web service and the data management. There are many things to consider : We need have very rapid access to data. Right now, we have over a million "sales" and "purchases" record from which we need to often calculate and load the current stock for a given day according to a serie of parameter. I'm not sure how we should preload the data and keep the data in the Web Service. Doing a stock calculation within a SQL query will be very lengthy. They currently have a stock calculation application that preloads all sales and purchases for the day and afterwards calculate the stock on the code-side. We want to develop powerful reporting tools. We want to implement a "pivot table" but not sure how to implement it and have good performances. For the reasons above, I'm not sure how to design the data model. Anybody can give me any guidelines on how to start, or from their personnal experiences (what have you done in the past ?) I'm not sure if it's possible to make a bounty even though the question is new (I'd put 300 rep on it, since I really need something). If you know how, let me know. Thanks

    Read the article

  • how to organize country data?

    - by fayer
    how do i organize country data (countries, states and cities etc) in mysql? cause every country has 3 tables: countries, states and cities. should i have each country in separate set of tables or should i have them all in these 3 tables? if i have all of them in same tables, im afraid that the amount of rows will be huge cause i tend to have a lot of countries! what is best practice for this?

    Read the article

  • Simulating pass by reference for an array reference (i.e. a reference to a reference) in Java

    - by Leif Andersen
    I was wondering, in java, is it possible to in anyway, simulate pass by reference for an array? Yes, I know the language doesn't support it, but is there anyway I can do it. Say, for example, I want to create a method that reverses the order of all the elements in an array. (I know that this code snippet isn't the best example, as there is a better algorithms to do this, but this is a good example of the type of thing I want to do for more complex problems). Currently, I need to make a class like this: public static void reverse(Object[] arr) { Object[] tmpArr = new Object[arr.length]; count = arr.length - 1; for(Object i : arr) tmpArr[count--] = i; // I would like to do arr = tmpArr, but that will only make the shallow // reference tmpArr, I would like to actually change the pointer they passed in // Not just the values in the array, so I have to do this: count = arr.length - 1; for(Object i : tmpArr) arr[count--] = i; return; } Yes, I know that I could just swap the values until I get to the middle, and it would be much more efficient, but for other, more complex purposes, is there anyway that I can manipulate the actual pointer? Again, thank you.

    Read the article

  • tomcat isolate webapps

    - by cometta
    multiple webapp running on same tomcat using same jvm. sometime, one webapp that have memory leak will cause entire jvm to crash and affect other webapps. any recommendation how to isolated that without need to use multiple jvm and tomcat

    Read the article

  • Unable to login to SQL Server + SQL Server Authentication + Error: 18456

    - by Nev_Rahd
    Hello I have created login account on my localhost\sql2008 Server (Eg. User123) Mapped to Database (default) Authentication Mode on SQL Server is set to both (Windows and SQL) But login to SQL Server fails with following message (for User123) Note: Have checked mutliple time that UserName / Password are typed in correctly Error Details: Login failed for user 'User123' (Net.SqlClient Data Provider) Server Name : localhost\sql2008 Error Number: 18456 Severity : 14 State : 1 Line Number : 65536 any help on this please. Thanks

    Read the article

  • Preserving Language across inline Calculated Members in SSAS

    - by Tullo
    Problem: I need to retrieve the language of a given cell from the cube. The cell is defined by code-generated MDX, which can have an arbitrary level of indirection as far as calculated members and sets go (defined in the WITH clause). SSAS appears to ignore the Language of the specified members when you declare a calculated member inline in the query. Example: The cube's default locale is 1033 (en-US) The cube contains a Calculated Measure called [Net Pounds] which is defined as [Net Amt], language=2057 (en-GB) The query requests this measure alongside an inline calculated measure which is simply an alias to the [Net Pounds] When used directly, the measure is formatted in the en-GB locale, but when aliased, the measure falls back to using the cube default of en-US. Here's what the query looks like: WITH MEMBER [Measures].[Pounds Indirect] AS [Measures].[Net Pounds] SELECT { [Measures].[Pounds Indirect], [Measures].[Net Pounds] } ON AXIS (0) FROM [Cube] CELL PROPERTIES language, value, formatted_value The query returns the expected two cells, but only uses the [Net Pounds] locale when used directly. Is there an option or switch somewhere in SSAS that will allow locale information to be visible in calculated members? I realise that it is possible to declare the inline calculated member in a particular locale, but this would involve extracting the locale from the tuple first, which (since the cube's member is isolated in the application's query schema) is unknown.

    Read the article

  • Database Modelling - Conceptually different entities but with near identical fields

    - by Andrew Shepherd
    Suppose you have two sets of conceptual entities: MarketPriceDataSet which has multiple ForwardPriceEntries PoolPriceForecastDataSet which has multiple PoolPriceForecastEntry Both different child objects have near identical fields: ForwardPriceEntry has MarketPriceDataSetId (foreign key to parent table) StartDate EndDate SimulationItemId ForwardPrice PoolPriceForecastEntry has PoolPriceForecastDataSetId (foreign key to parent table) StartDate EndDate SimulationItemId ForecastPoolPrice If I modelled them as separate tables, the only difference would be the foreign key, and the name of the price field. There has been a debate as to whether the two near identical tables should be merged into one. Options I've thought of to model this is: Just keep them as two independent, separate tables Have both sets in the one table with an additional "type" field, and a parent_id equalling a foreign key to either parent table. This would sacrifice referential integrity checks. Have both sets in the one table with an additional "type" field, and create a complicated sequence of joining tables to maintain referential integrity. What do you think I should do, and why?

    Read the article

  • Generated HTML word document not displaying image correctly

    - by spiderdijon
    I'm trying to add an image to a generated html word document that is embedded in a classic ASP page. The code looks something like this: <% Response.ContentType = "application/msword" %> <html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word"> ... <v:shape id="_x0000_s1030" type="#_x0000_t75" style='position:absolute; left:0;text-align:left;margin-left:0;margin-top:17.95pt;width:7in;height:116.85pt; z-index:2;mso-position-horizontal:center;mso-position-horizontal-relative:page; mso-position-vertical-relative:page'> <v:imagedata src="http://xxx/image001.gif" o:title="image001"/> <w:wrap anchorx="page" anchory="page"/> <w:anchorlock/> </v:shape><![endif]--><![if !vml]><span style='mso-ignore:vglayout;position: absolute;z-index:0;left:0px;margin-left:0px;margin-top:24px;width:672px; height:156px'><img width=672 height=156 src="http://xxx/image001.gif" v:shapes="_x0000_s1030"></span><![endif]> The image URL is correct and can be viewed through a browser, however when the word document opens, the image has a red x, with the error message: The image cannot be displayed. Your computer may not have enough memory to open the image, or the image may be corrupted. Restart your computer, and then open the file again. If the red x still appears, you may have to delete the image and then insert it again. If i copy the html code and try to open the word document on my local machine, it displays the image correctly. It just doesn't work when retrieving the document from the server. This happens for any images I try to add. Is there another way to add images to html-generated word documents that can be output from an asp page? Thanks.

    Read the article

  • Image display incorrect on toolstrip

    - by Lu Lu
    I use a 32-bit image & use it as a value for Image property of ToolStripButton. But I don't know why it displays unlike the original one. This is the screenshot: And my project: http://www.mediafire.com/?3mzmf5r5nnx Please help me to find the reason. Thanks.

    Read the article

  • Twitter Search API Question

    - by supermogx
    I'm using the twitter search API to get twitter posts based on some keywords, using AND and OR keyword. It works OK, but I seem to get problems using hashtags... For example : Not returning any results : http://search.twitter.com/search.json?q="%23ipad+AND+%23ipod"+OR+"%23joke+AND+%23funny"&rpp=100&callback=? Returning results : http://search.twitter.com/search.json?q="ipad+AND+ipod"+OR+"joke+AND+funny"&rpp=100&callback=? But there's results with #ipod AND #ipad because when I search only for #ipod, I can see a lot of posts with both hashtags. Example : http://search.twitter.com/search.json?q=%23ipad&rpp=100&callback=? P.S. %23 = # Any idea?

    Read the article

  • Problem with File uplolad in javascript.

    - by Nikhil
    I have used javascript to upload more than one file. when user clicks on 'add more' javascript appends new object to older div using innerHTML. Now the problem is if I select a file and then click on "add more" then new file button exist but older selected file removes and two blank file buttons display. I want this old file must be selected when user add new file button. If anybody can, Help Plz!!! tnX.

    Read the article

  • iPhone: Issue disabling Auto-Cap/autocorrect on a UITextField

    - by phil swenson
    For some reason, even though I disable the auto-cap and auto-correct of my UITextField, it's still capitalizing the first letter of my input. Here is the code: UITextField* textField = [[[UITextField alloc] initWithFrame:CGRectMake(90.0, 10.0, 213.0, 25.0)] autorelease]; [textField setClearButtonMode:UITextFieldViewModeWhileEditing]; textField.returnKeyType = UIReturnKeyGo; textField.autocorrectionType = FALSE; textField.autocapitalizationType = UITextAutocapitalizationTypeNone; textField.delegate = self; if (inputFieldType == Email) { label.text = @"Email:"; textField.keyboardType = UIKeyboardTypeEmailAddress; emailTextField = textField; textField.placeholder = @"Email Address"; } else { // password textField.secureTextEntry = TRUE; label.text = @"Password:"; if (inputFieldType == Password){ textField.placeholder = @"Password"; passwordTextField = textField; } if (inputFieldType == ConfirmPassword){ textField.placeholder = @"Confirm Password"; confirmPasswordTextField = textField; } } See screenshot:

    Read the article

  • Is JavaScript 's "new" Keyword Considered Harmful?

    - by Pablo Fernandez
    In another question, a user pointed out that the new keyword was dangerous to use and proposed a solution to object creation that did not use new... I didn't believe that was true, mostly because I've used Prototype, Scriptaculous and other excellent JavaScript libraries, and everyone of them used the new keyword... In spite of that, yesterday I was watching Douglas Crockford's talk at YUI theater and he said the exactly same thing, that he didn't use the new keyword anymore in his code. Is it 'bad' to use the new keyword? what are the advantages and disadvantages of using it?

    Read the article

  • AT&T Upload Filtering?

    - by xpda
    Using an AT&T DSL, I cannot ftp upload or ftp download a few files of a large 1500 set. The problem is the file name. I can change a few characters of the file name, and they upload fine. I can change the filenames from upper to lower case and they upload fine. If I change back to the original filename, it will not upload again. When it doesn't upload, it starts, transfers about 5% of a 5-10 meg file, and then times out. I have uploaded one of the files under a different name, changed the name back to the original, and it will not download via ftp. It will download onto a browser, and it will ftp download just fine with a different name. It just will not download with ftp. I have reproduced this uploading to three different servers on 1and1 and Amazon EC2. When I try it on a non-AT&T ISP client, it works OK. Here is a file that did not upload until I had renamed it. (I have changed it back to the original name): "http://xpda.com/nautnew/11302 STOVER POINT TO PORT BROWNSVILLE SIDE A.png" This problem is unrelated to connection, speed, and file content. Only things I can see that makes a difference are the file name and ATT DSL. Does ATT have some kind of ftp file filtering? Is there anything else that could cause this behavior?

    Read the article

  • Finding out whether files are added, changed or deleted on a FTP server

    - by futureelite7
    I've recently been given the task to migrate about 200GB of data from one dedicated server to another. As this will take a week or more, I've been taking a snapshot of the current files on the FTP server using wget's mirror feature. However, since other users will probably be uploading / changing stuff in the meantime, the snapshot that I have made will not include the most recent changes. Since I only have access to FTP on this server, I'm planning to write a script that will recursively do a FTP stat on all files in the FTP folder, and compare the directory listing against the snapshot I have locally. If there are differences in the number of files, then I know files have been added or deleted. If the modification dates have been changed, then I know the files have been changed, and should redownload those files specifically. Am I missing anything in my approach, or are there any possible improvements to this approach?

    Read the article

  • How to check whether your code environment on Windows or on Linux or other OS

    - by justjoe
    hi, right now, i code custom wordpress theme and testing it in xampp windows XP on apache server. But as long as i concern, there's no wp build-in function to identify the code environment. Is there's any PHP build-in function to identify such thing ? for the record, what i want to code need to read a directory. in my apache (in windows), the path will be c:/xampp/htdocs where apache on linux will be \somepath\somepath\ so, is there any code solution to know what is the OS environment without i have to compare the path ? i hope it will also work on other OS with other webserver then APACHE such as IIS

    Read the article

  • Shortest Ruby Quine

    - by AaronThomson
    Just finished reading this blog post: http://www.skorks.com/2010/03/an-interview-question-that-prints-out-its-own-source-code-in-ruby/ In it, the author argues the case for using a quine as an interview question. I'm not sure I agree but thats not what this question is about. He goes on to construct a quine in Ruby and refactor it to make it shorter. He then challenges the reader to try to make it even shorter. I played around with it for a while and came up with the following: s="s=;puts s[0,2]+34.chr+s+34.chr+s[2,36]";puts s[0,2]+34.chr+s+34.chr+s[2,36] This is the first time I have ever attempted a quine and I can't figure out how to make it any shorter. What is the shortest Ruby quine you can come up with? Please post an explanation if your implementation requires it.

    Read the article

  • Database Modelling - Conceptually different entities with near identical fields

    - by Andrew Shepherd
    Suppose you have two sets of conceptual entities: MarketPriceDataSet which has multiple ForwardPriceEntries PoolPriceForecastDataSet which has multiple PoolPriceForecastEntry Both different child objects have near identical fields: ForwardPriceEntry has StartDate EndDate SimulationItemId ForwardPrice MarketPriceDataSetId (foreign key to parent table) PoolPriceForecastEntry has StartDate EndDate SimulationItemId ForecastPoolPrice PoolPriceForecastDataSetId (foreign key to parent table) If I modelled them as separate tables, the only difference would be the foreign key, and the name of the price field. There has been a debate as to whether the two near identical tables should be merged into one. Options I've thought of to model this is: Just keep them as two independent, separate tables Have both sets in the one table with an additional "type" field, and a parent_id equalling a foreign key to either parent table. This would sacrifice referential integrity checks. Have both sets in the one table with an additional "type" field, and create a complicated sequence of joining tables to maintain referential integrity. What do you think I should do, and why?

    Read the article

  • saving appengine mail from spam filters

    - by Fh
    One of my clients uses Trend Micro InterScan Messaging Security to protect their internal mail services. Suddenly InterScan decided to filter out all messages coming from Google App Engine. Unfortunately they haven't been able to whitelist the sender address as each e-mail gets a different one. For example, *3ckihSOVMMHlZHSL.JSMMHlZHSL.JS*@apphosting.bounces.google.com, with everything before the @ being variable. Update I'm including this screenshot of how Interscan sees the incoming e-mail. Notice that all senders are different: If I look into the e-mail headers, the apphosting domain appears inside the Return-Path field: Return-Path: <36kSiSwYIBh0883XL3E7.5EH883XL3E7.5E@apphosting.bounces.google.com> The "From" field looks ok. It says what I set it to say, but the spam filter only looks at the Return-Path. My client sysadmin doesn't want to whitelist the whole apphosting domain, as it wouldn't be only whitelisting my application. How could I bypass this e-mail filters if I can't get an unique sender? Thanks,

    Read the article

  • How can I get a file's upload size using simple Javascript?

    - by Pankaj Khurana
    I have upload file functionality on one of the page. I check for the extension of the file using JavaScript. Now i want to restrict the user from uploading file greater than 1 MB. Is there any way i can check the file upload size using JavaScript. My code currently look like this: <script language="JavaScript"> function validate() { var filename = document.getElementById("txtChooseFile").value; var ext = getExt(filename); if(ext == "txt" || ext == "csv") return true; alert("Please upload Text files only."); return false; } function getExt(filename) { var dot_pos = filename.lastIndexOf("."); if(dot_pos == -1) return ""; return filename.substr(dot_pos+1).toLowerCase(); } </script>

    Read the article

  • C# Event routing in code behind

    - by Nate
    I'm building a WPF MVVM-ish application. I want to be able to display an event log containing items in a collection that exists in my viewmodel. I want any of the objects in the model to be able to add data to the event log. Therefore every object needs to be able to pass data back to one central collection for databinding in the view. I could implement an event in every one of my data classes and manually pass the events up the object heirarchy but this seems super clumsy. On the visual tree a Routed Event would take care of this, is there some equivelent in the model scope? Any other ideas?

    Read the article

< Previous Page | 13 14 15 16 17 18 19 20 21 22 23 24  | Next Page >