Daily Archives

Articles indexed Tuesday April 20 2010

Page 32/121 | < Previous Page | 28 29 30 31 32 33 34 35 36 37 38 39  | Next Page >

  • Text viewing in a delimited space

    - by Maurizio Reginelli
    I need to visualize a text into a delimited space. If I add a simple TextBlock I have a problem: when the text is longer than the available space, it is cropped at the end. I tried to insert the TextBlock inside a Viewbox: this solution works for a text longer than the available space, but increase the size of the text when it is shorter. Is there a way to reduce the size of the text only when it is longer than the available space?

    Read the article

  • Android browser scaling?

    - by Joren
    I'm trying to create a mobile website for android. When I set the width of the body to 480px (the width of the screen) the result is about 50% larger than what I expect. It seems that android is scaling what it draws and messing up all my layouts. Does anyone know how to disable this, or work around it? I'm already using this: <meta name="viewport" content="width=device-width, height=device-height, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0" />

    Read the article

  • how to restore files deleted in the Mapping virtual drive

    - by r9r9r9
    I used psubst drive1: drive2:path /P to create the persistent virtual drive, I found that's greate, but when I delete files in those drives, they didn't appeared in the Recycle Bin, so How can I restore them? ex: I used (p)subst K: C:/1 to create the K: driver, then I delete files in the K:, I think it will be better if they are moved to the C:/Recycle Bin but not delete persistently. you can find more detail about psubst here: http://code.google.com/p/psubst/

    Read the article

  • video player recommendation (hardware)

    - by Fuxi
    hi all, i'm looking for a hardware-videoplayer with the following features: support for all kind of video formats from the web (xvid, divx, mpeg ..) w/o problems slots for memory cards like cf/sd usb connector for external devices like hd/usb sticks updateable firmware support for .srt files (subtitles) - option to change eg. fontsize currently i'm having a dvd player with memory slot but it only supports a few formats and it's very annoying having to convert anything - mostly it doesn't work. thx in advance

    Read the article

  • Best approach to write huge xml data to file?

    - by Kayes
    Hi. I'm currently exporting a database table with huge data (100000+ records) into an xml file using XmlTextWriter class and I'm writing directly to a file on the physical drive. _XmlTextWriterObject = new XmlTextWriter(_xmlFilePath, null); While my code runs ok, my question is that is it the best approach? Or should I write the whole xml in memory stream first and then write the xml document in physical file from memory stream? And what are the effects on memory/ performance in both cases?

    Read the article

  • How do you ensure a mimetype in asp.net?

    - by Sem Dendoncker
    Hello, I have the following code to export a zip file: byte[] buffer = FileUtil.FileToByteArray(zipLocation, true); // push the memory data to the client. _ctx.Response.ContentType = "application/zip"; _ctx.Response.AddHeader("content-disposition", String.Format("attachment; filename={0}", String.Format("map{0}.zip", mapId))); _ctx.Response.BinaryWrite(buffer); This code works great. After every export I get a perfectly made zipfile. The problem however is that when I try to import it, the mimetype sometimes is "application/empty". Now I wonder how can I ensure that the mimetype is always added? Cheers, M.

    Read the article

  • Visual Studio 2005 - OleDbConnection throws "Invalid authorization specification" in Form Designer,

    - by Jason Dagit
    I have a form with an OleDbConnection object on it. This form fails to load in the Form Designer with the message: One or more errors encountered while loading the designer. The errors are listed below. Some errors can be fixed by rebuilding your project, while others may require code changes. Invalid authorization specification at ADODB.ConnectionClass.Open(String ConnectionString, String UserID, String Password, Int32 Options) ... (stack trace continues into user code) I've tracked this down to the OleDbConnection string. If I hardcode in the server IP, username/password/dbinstance into the constructor of the GUI form then the form will load in the designer. At run-time it is not an issue because we require the user to provide the login details. The question: Is it possible to use the OleDbConnection and the Form designer without supplying the database credentials in the source code of the form? For example, is there a property of the OleDbConnection or Form that I can set so that it doesn't need to access the database during Form design? My concern is that if we ever move the database server or change the login that the code will stop working in the designer.

    Read the article

  • How to get an ordered list parsed by XML parser?

    - by Matthias Doringer
    I am using a xsd schema file; there I specified an ordered list. When parsing an XML node of the kind... <myOrderedList> "element_1" "element_2" "element_3" </myOrderedList> (which is valid XML syntax) ...all XML parsers I know parse this as a single node element. Is there a way to get the XML parser parse this list for me (return it as a list or an array or whatever) or do I always have to parse it myself?

    Read the article

  • Migrate Liferay 5 -> 5.2

    - by Alex Takitani
    We have a liferay portal running on a hosting company, and We want to bring it to our own structure. So, I've downloaded the excellent bitnami stack and loaded it in our vmware server. I've no experience on liferay whatsoever, all I know its that it uses mysql as database. Is there any docs on how to do it? Tks!

    Read the article

  • Writing a spec for helper with Ruby on Rails and RSpec

    - by TK
    I have been writing specs for controllers and models, but I have never written a helper spec. I have no idea where I start. I have the following snippet in application_helper.rb def title(page_title) content_for(:title) { page_title } end How should I write a helper spec on the code? Also if there's any open-source Rails app to show good helper testing/specing, do let me know.

    Read the article

  • 'Invalid conversion from some_type** to const some_type**'

    - by petersohn
    I've got a function that requires const some_type** as an argument (some_type is a struct, and the function needs a pointer to an array of this type). I declared a local variable of type some_type*, and initialized it. Then I call the function as f(&some_array), and the compiler (gcc) says: error: invalid conversion from ‘some_type**’ to ‘const some_type**’ What's the problem here? Why can't I convert a variable to const?

    Read the article

  • get all words using java

    - by hussain
    i want to know how to get all word using java String first[]={"a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"}; String second[]={"a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"}; String ch =""; String total[]; for(int i = 0;i<26;i++) { for(int j = 0;j<26;j++) { ch+=first[i]+first[j]; System.out.println(ch); } } i get only 576 words only by this program but the 26! words is 4.03291461 × 1026 how to write the program in java thanks and advance

    Read the article

  • Swap bits in c++ for a double

    - by hidayat
    Im trying to change from big endian to little endian on a double. One way to go is to use double val, tmp = 5.55; ((unsigned int *)&val)[0] = ntohl(((unsigned int *)&tmp)[1]); ((unsigned int *)&val)[1] = ntohl(((unsigned int *)&tmp)[0]); But then I get a warning: "dereferencing type-punned pointer will break strict-aliasing rules" and I dont want to turn this warning off. Another way to go is: #define ntohll(x) ( ( (uint64_t)(ntohl( (uint32_t)((x << 32) >> 32) )) << 32) | ntohl( ((uint32_t)(x >> 32)) ) ) val = (double)bswap_64(unsigned long long(tmp)); //or val = (double)ntohll(unsigned long long(tmp)); But then a lose the decimals. Anyone know a good way to swap the bits on a double without using a for loop?

    Read the article

  • JSF Servlet Arch Help needed.

    - by abc
    i want a mechanism in my web app as described below: user will enter mydomain.com/CompanyName , depending upon the CompanyNameit will show its logo and its customized page, and i will take that parsed parameter in session again upon each request i will compare the parsed CompanyName and one stored in session , and if they matched then application will show the requested page with user's data.else it will be redirected to login page. and the main thing is i want this thing in JSF arch. i tried taking a servlet that will resolve all request and it will parse and then will dispatch the request to prefered servlet,but problem is it goes in loop as again it resolves to the same controller servlet,

    Read the article

  • Java - is it possible to read a file line by line, stop, and then immediately start reading bytes wh

    - by hatorade
    I'm having an issue trying to parse the ascii part of a file, and once I hit the end tag, IMMEDIATELY start reading in the bytes from that point on. Everything I know in Java to read off a line or a whole word creates a buffer, which ruins any chance of getting the bytes immediately following my stop point. Is the only way to do this read in byte-by-byte, find new-lines, reconstruct everything prior to the new-line, see if it's my end tag, and go from there?

    Read the article

  • Multi-tab application (C#)

    - by Zach
    Hi, I'm creating a multi-tabbed .NET application that allows the user to dynamically add and remove tabs at runtime. When a new tab is added, a control is added to it (as a child), in which the contents can be edited (eg. a text box). The user can perform tasks on the currently visible text box using a toolbar/menu bar. To better explain this, look at the picture below to see an example of what I want to accomplish. It's just a mock-up, so it doesn't actually work that way, but it shows what I want to get done. Essentially, like a multi-tabbed Notepad. View the image here: http://picasion.com/pic15/324b466729e42a74b9632c1473355d3b.gif Is this possible in .NET? I'm pretty sure it is, I'm just looking for a way that it can be implemented.

    Read the article

  • How can a hacker put a file on my server root (apache, php, 1and1)

    - by mike-sav
    Hi there, I have a site hosted on 1and1 and a couple of weeks ago I noticed a hacker had put a .php file on the server that when viewed in a browser exposed my DB schema, DB connection strings, FTP account (for file uploads using a form), etc, etc. Naturally I panicked and I wiped the server and reuploaded my files. Fortunatley I encrypt passwords using MD5 and I don't store things like credit card details, etc, etc. Now I checked my files and with all user input I use a clean function (htmlentities, sql_real_escape_string, etc, etc) that strips the input of any XSS or SQL injection. I have also made sure that the session key gets re-engineered when a user status changes (like they log into their account) to prevent session hijacking, my folder permissions are set to 755 and file permission are 644. Has anyone got any idea how this could have happened? Or if I'm missing something

    Read the article

  • mapping server 2008 network drive to vista home premium x64

    - by rboorgapally
    Hi, We have a windows server 2008 box at my work place. I want to map a drive from the server to my laptop. I use windows vista home premium x64. I am connected to my workplace through VPN. i can map the drive when I use the administrator account on the server. But the log on is unsuccessful if I use my personal account on the server to map the drive. My personal account on the server is part of Administrators group. Can any one help me with this?

    Read the article

  • Start Menu freezes when highlighting 'All Programs'

    - by gergesi
    Hey all, A friends machine is lagging for about 30 seconds when they highlight 'All Programs'. A gray box popus up where the program menu would be, but it doesnt populate for nearly 30 seconds. This seems to happen if he hasn't open the start menu for a bit.. but if he get's it working once, doing it immediatly afterwards will usually not have the same lag. Assuming computer hardware isn't an issue, any ideas what the problem may be? Sidenote: He mentioned making desktop shortcuts is taking long as well, does that give any clues?

    Read the article

< Previous Page | 28 29 30 31 32 33 34 35 36 37 38 39  | Next Page >