Daily Archives

Articles indexed Monday April 19 2010

Page 24/113 | < Previous Page | 20 21 22 23 24 25 26 27 28 29 30 31  | Next Page >

  • How to use SetTextCharacterExtra in TEdit or TMemo?

    - by lyborko
    Hi, Does anybody know any component based on TEdit or TMemo, in which is possible to set different intercharacter spacing? Win API SetTextCharacterExtra solves the problem for Tcanvas, but I tried hard to implement this behavior as a property for my own TEdit Component (a year ago) and despite of my various desperate attempts to do this, I failed. Thanx in advance.

    Read the article

  • clear nootification [android]

    - by rahul
    hiiii, is it possible to clear notification programatically??? if it is possible plz help me i tried with NotificationManager but its not working is thr any other way i can do it?????????? thanks

    Read the article

  • .net OpenFileDialog changing the CurrentDirectory

    - by meowing
    Hi, I am using OpenFileDialog. But using it changes the Environment.CurrentDirectory. Using the RestoreDirectory property solves this issue, but I'm using external dlls that I can't control that don't use RestoreDirectory. Is there a way to make it true as default? Or is there any other solution to this annoying problem? Thanks.

    Read the article

  • Offloading to HLSL/GPU without displaying?

    - by George R
    As far as I know, certain mathematical functions like FFTs and perlin noise, etc. can be much faster when done on the GPU as a pixel shader. My question is, if I wanted to exploit this to calculate results and stream to bitmaps, could I do it without needing to actually display it in Silverlight or something? More specifically, I was thinking of using this for large terrain generation involving lots of perlin and other noises, and post-processing like high passes and deriving normals from heightmaps, etc, etc.

    Read the article

  • Keep text on left and middle of the div, not center

    - by Jean
    Hello, I want to be able to keep a text on the left, but in the middle of a div. <div id=sel>text goes here</div> and my CSS for the same sel{ text-align:left; vertical-align:middle; } The characters and lines of the text may vary. I am more focussed on the text with a single line that sits on the top. I do not want to use position:absolute/relative. Appreciate all help. Thanks Jean

    Read the article

  • ask. help me to compare two array of integers and the order does not matter.

    - by stdnoit
    [Example] <1 2 3 4 = <3 1 2 4 <1 2 3 4 != <3 4 1 1 and ummm it is in java. cant use hashmap table or anything just pure without library. I know there are two ways. 1. sort them and compare the array index by index 2. use two for loops and compare the outer index with the inner index. ( i have been trying with this but still not working) for(int i = 0; i < n; i++) { for(int j = 0; j < n; j++) { if(a[i] != a[j] && j == n) return false; } } return true; anything wrong with the code ? thanks

    Read the article

  • Converting part of a multi-purpose XML file to RSS using XSL

    - by Nate McCloud
    I have an XML file that I use for storing and displaying recipes that I collect, but that same XML file also has updates for the site at the top of it. How would I, say, use Recipes.xsl to transform Recipes.xml for display as an actual website, and use RecipesRSS.xsl to transform Recipes.xml into Recipes.rss? Currently, my XML file is formatted something like this: <book> <updates> <update when="2010-04-19"> <format> <update>Formatting updates here, if any. Otherwise, omit the Format section.</update> ... </format> <recipes> <update>Recipe updates here, if any. Otherwise, omit the Recipes section.</update> ... </recipes> </update> ... </updates> <recipe name="Recipe Name"> <from>Recipe source</from> <category>Recipe category</category> <ingredients> <ingredient>Recipe ingredient</ingredient> ... </ingredients> <instructions> <step>Recipe instructions go here.</step> ... </instructions> <notes> <note>Additional notes go here, if any. Otherwise, Notes section is omitted.</note> ... </notes> </recipe> ... </book> Any help would be greatly appreciated.

    Read the article

  • C# How to set source path of image within html pages to show in webbrowser control

    - by Royson
    Hi in my application there is web browser control to show some static html pages. The pages are displayed properly. but images are not displayed.. I tried with changing src-path but no success. my html file is located at bin folder. And i am assigning it as. FileStream source = new FileStream(@"..\HtmlPages\supportHtml.html", FileMode.Open, FileAccess.Read); if i open html files in browser, the images are displayed properly.. So, What is the correct path for images..?? If i set full path to src attribute of <img> tag..it works. but i think its not a proper way. :(

    Read the article

  • Need Flex Regex Validation Expression for password that allows for only alphanumeric values and requ

    - by BlueDude
    Hi I'm trying to setup a RegexpValidator that only accepts a string of alphanumeric characters between 6-30 characters long and requires one number. I'm new to Regular Expressions and everything I've tried seems to keep returning an invalid ValidationRsultEvent. Here's a chunk of code: <mx:RegExpValidator id="regexValidator" source="{passwordInput}" property="text" triggerEvent="" valid="onPasswordValidate(event)" invalid="onPasswordValidate(event)" /> private function validateRegister():void { regexValidator.expression = "^(?=.*(\d|\W)).{6,30}$"; regexValidator.validate(); }

    Read the article

  • Best way to use my windows box as a backup?

    - by user29336
    I put a 1.5 TB HD in my Windows 7 box and my main computer is a MBP. I have a lot of professional files/folders in a FireWire 800 external HD connected to the MBP and I want to use the 1.5 TB HD in my Windows 7 box as a backup for both the HD and MBP. Right now I am just copying files manually to the HD over the network and that's very slow and open to failure (not rsync'd.) Anyone suggest some appropriate solutions? Should I just figure out how to setup RSync on the windows box or is there a better alternative? Thanks!

    Read the article

  • Saving a huge dataset into SQL table in a XML column - MS SQL, C#.Net

    - by NLV
    Hello all I'm having a requirement where i've to save a dataset which has multiple tables in it in a sql table XML column by converting into an XML. The problem is that in some cases the dataset grows extremely huge and i get OutOfMemoryException. What i basically do is that i convert the dataset into an xml file and save it in the local disk and then load the XML again and send it as a stored procedure parameter. But when i write the dataset xml into the disk the file sizes over 700 Mb and when i load it in the XMLDocument object in memory i get OutOfMemoryException. How can get the dataset xml without saving it in a file and re-reading it again? Thank You NLV

    Read the article

  • How do I get class of an internal static class in another assembly?

    - by Echiban
    I have a class C in Assembly A like this: internal class C { internal static string About_Name { get { return "text"; } ... } I have about 20 such static properties. Is there a way, in an outside assembly, without using friend assembly attribute (.Net reflection only), get class C so I can invoke any of the static string properties like this: Class C = <some .Net reflection code>; string expected = C.About_Name; If that is not possible, a .Net reflection code to get the string property value directly will suffice, but not ideal. Thanks in advance!

    Read the article

  • JAVA - Create variable names using a loop?

    - by SeerUK
    Hi, first time poster, long time reader so be gentle with me :) See the following code which works to generate me timestamps for the beginning and end of every month in a financial year. int year = 2010; // Financial year runs from Sept-Aug so earlyMonths are those where year = FY-1 and lateMonths are those where year = FY int[] earlyMonths = {8, 9, 10, 11}; // Sept to Dec int earlyYear = year -1; for (int i : earlyMonths) { month = i; Calendar cal = Calendar.getInstance(); cal.clear(); cal.set(earlyYear,month,1,0,0,0); Long start = cal.getTimeInMillis(); cal.clear(); cal.set(earlyYear,month,1); lastDayofMonth = cal.getActualMaximum(GregorianCalendar.DAY_OF_MONTH); cal.set(earlyYear,month,lastDayofMonth,23,59,59); Long end = cal.getTimeInMillis(); } int[] lateMonths = {0, 1, 2, 3, 4, 5, 6, 7}; // Jan to Aug for (int i : lateMonths) { month = i; Calendar cal = Calendar.getInstance(); cal.clear(); cal.set(year,month,1,0,0,0); Long start = cal.getTimeInMillis(); cal.clear(); cal.set(year,month,1); lastDayofMonth = cal.getActualMaximum(GregorianCalendar.DAY_OF_MONTH); cal.set(year,month,lastDayofMonth,23,59,59); Long end = cal.getTimeInMillis(); } So far so good, but in order to use these results I need these timestamps to be output to variables named by month (to be used in a prepared statement later in the code. e.g. SeptStart = sometimestamp, SeptEnd = some timestamp etc etc. I don't know if it is possible to declare new variables based on the results of each loop. Any ideas?

    Read the article

  • asp.net mvc model - my own database

    - by progtick
    The tutorials I have come across usually let you create a dababase from scratch creating a .mdf file or something and so on. However, what if I already have a SQL Server Express set up with the needed database? How do I tell my model to use that database? Right now, all my model contains is basically some classes that execute stored procedure on my own database and return manupulated data. Should I leave it as it is? What are the benefits of going through the full-fledged model approach that tutorials demonstrate?

    Read the article

  • Making animation on sIFR3

    - by Tomo
    Hello all, Now I'm using sIFR3. It works very nicely. Additionally, I would like to put an effect on sIFR. My idea is that when the page loaded, sIFR(ed) texts change its color. For example, sIFR in list item change color one by one. The purpose is to emphasize the sIFR(ed) texts. Reading the document, I thought Flash filters are not for like this animation. Do you think is it possible to make animation on sIFR ? Thank you for your help.

    Read the article

  • C# asp.net Howto load an aspx page from another project?

    - by Martijn
    I have 2 projects. One project is a core and contains the GUI which is always the same and acts like a kind of framework. The second project is an application that must be set in the framework. The framework consists of a masterpage and a content page (application.aspx). From my second project I want to load the application.aspx. Is this possible? And if so.. how?

    Read the article

  • How to set image on EAGL VIEW

    - by Viral
    hi, I want to put images from my photo library in to the EAGL view for some further processing. The image that are already in our resources folder will be taken by itself but mltiple or images from photo library can't. So any one knows how to put image on EAGL view in open GLES. Regtards viral

    Read the article

  • Save from viewController?

    - by fuzzygoat
    I have a very small bit of data that I would like to archive from my apps view. My question is, its far easier to save this data from the viewController, but should I really be pushing it back into my model and saving it there? BTW: I also need to do a quick load of this data when the app starts up.

    Read the article

  • Remote C++ Development using SSH only inside Eclipse Environment

    - by EFreak
    How do you integrate Remote Systems Explorer and CDT plugin inside eclipse ? What I mean is that you can use Remote Systems Explorer (RSE) plugin to work on C++ code on a remote linux box inside Eclipse but when you try to compile, you basically run a shell command through SSH. The CDT plugin is unable to locate the remote system and off course the remote compiler. Is there a way to integrate both the plugins so that we can use the parsing / suggestion features of CDT for the remote system as well; and also features like remote compilation, remote debugging using SSH only. If this is not possible, then what is the closest open source alternative to the above problem.

    Read the article

  • How to "DRY up" C# attributes in Models and ViewModels?

    - by DanM
    This question was inspired by my struggles with ASP.NET MVC, but I think it applies to other situations as well. Let's say I have an ORM-generated Model and two ViewModels (one for a "details" view and one for an "edit" view): Model public class FooModel // ORM generated { public int Id { get; set; } public string FirstName { get; set; } public string LastName { get; set; } public string EmailAddress { get; set; } public int Age { get; set; } public int CategoryId { get; set; } } Display ViewModel public class FooDisplayViewModel // use for "details" view { [DisplayName("ID Number")] public int Id { get; set; } [DisplayName("First Name")] public string FirstName { get; set; } [DisplayName("Last Name")] public string LastName { get; set; } [DisplayName("Email Address")] [DataType("EmailAddress")] public string EmailAddress { get; set; } public int Age { get; set; } [DisplayName("Category")] public string CategoryName { get; set; } } Edit ViewModel public class FooEditViewModel // use for "edit" view { [DisplayName("First Name")] // not DRY public string FirstName { get; set; } [DisplayName("Last Name")] // not DRY public string LastName { get; set; } [DisplayName("Email Address")] // not DRY [DataType("EmailAddress")] // not DRY public string EmailAddress { get; set; } public int Age { get; set; } [DisplayName("Category")] // not DRY public SelectList Categories { get; set; } } Note that the attributes on the ViewModels are not DRY--a lot of information is repeated. Now imagine this scenario multiplied by 10 or 100, and you can see that it can quickly become quite tedious and error prone to ensure consistency across ViewModels (and therefore across Views). How can I "DRY up" this code? Before you answer, "Just put all the attributes on FooModel," I've tried that, but it didn't work because I need to keep my ViewModels "flat". In other words, I can't just compose each ViewModel with a Model--I need my ViewModel to have only the properties (and attributes) that should be consumed by the View, and the View can't burrow into sub-properties to get at the values. Update LukLed's answer suggests using inheritance. This definitely reduces the amount of non-DRY code, but it doesn't eliminate it. Note that, in my example above, the DisplayName attribute for the Category property would need to be written twice because the data type of the property is different between the display and edit ViewModels. This isn't going to be a big deal on a small scale, but as the size and complexity of a project scales up (imagine a lot more properties, more attributes per property, more views per model), there is still the potentially for "repeating yourself" a fair amount. Perhaps I'm taking DRY too far here, but I'd still rather have all my "friendly names", data types, validation rules, etc. typed out only once.

    Read the article

  • Auto populate a text field based on another text field

    - by Syed Aslam
    I am trying to auto-populate a text field based on the value of another input field. Currently trying to do this using observe_field helper like this: <%= observe_field( :account_name, :function => "alert('Name changed!')", :on => 'keyup' ) %> <% form_for(@account, :html => { :id => 'theform' }) do |f| %> <label for="accountname"> Account name </label> <%= form.text_field :name, :tabindex => '1' %> <label for="subdomain"> Subdomain </label> <%= form.text_field :subdomain, :tabindex => '2' %> <% end %> When the user enters text in the account_name text_field, I want to copy that convert into a subdomain (downcase and join by '-') and populate to subdomain text_field. But, in the process getting this error: element is null var method = element.tagName.toLowerCase(); protot...9227640 (line 3588) Where exactly am I going wrong here? Or is there a better way to do this?

    Read the article

< Previous Page | 20 21 22 23 24 25 26 27 28 29 30 31  | Next Page >