Daily Archives

Articles indexed Thursday April 22 2010

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

  • Scrapped HTML does not written at the beginning of text file.

    - by karikari
    Currently, I'm scraping the HTML code of a page, and write it to a txt file. My problem is, why there must be empty spaces or empty lines at the beginning? The HTML codes written to the txt file, seems does not start at the beginning of the txt file. Means, the '<' does not located at the position 0 of the txt file. After a few runs, my HTML is always written a few lines down inside the txt file. Can anyone tell me why : )

    Read the article

  • Emulating CSS3 border-radius and box-shadow in IE7/8

    - by Adam Maras
    I'm working on HTML for a small web application; the design calls for a content area with rounded corners and a drop shadow. I've been able to produce this with CSS3, and it works flawlessly on Firefox and Chrome: However, Internet Explorer 7 and 8 (not supporting CSS3) is a different story: Is there an easy, lightweight JavaScript solution that would allow me to either 1) use IE-specific features to achieve this, or 2) modify the DOM (programmatically) in such a way that adds custom images around the content area to emulate the effect?

    Read the article

  • Visual Studio 2010 and Target Framework Version

    - by Scott Dorman
    Almost two years ago, I wrote about a Visual Studio macro that allows you to change the Target Framework version of all projects in a solution. If you don’t know, the Target Framework version is what tells the compiler which version of the .NET Framework to compile against (more information is available here) and can be set to one of the following values: .NET Framework 2.0 .NET Framework 3.0 .NET Framework 3.5 .NET Framework 3.5 Client Profile .NET Framework 4.0 .NET Framework 4.0 Client Profile This can be easily accomplished by editing the project properties: The problem with this approach is that if you need to change a lot of projects at one time it becomes rather unwieldy. One possible solution is to edit the project files by hand in a text editor and change the <TargetFrameworkVersion /> and <TargetFrameworkProfile /> properties to the correct values. For example, for the .NET Framework 4.0 Client Profile, these values would be: <TargetFrameworkVersion>v4.0</TargetFrameworkVersion> <TargetFrameworkProfile>Client</TargetFrameworkProfile> Again, this is not only time consuming but can also be error-prone. The better solution is to automate this through the use of a Visual Studio macro. Since I had already created a macro to do this for Visual Studio 2008, I updated that macro to work with Visual Studio 2010 and .NET 4.0. It prompts you for the target framework version you want to set for all of the projects and then loops through each project in the solution and makes the change. If you select one of the Framework versions that support a Client Profile, it will ask if you want to use the Client Profile or the Full Profile. It is smart enough to skip project types that don’t support this property and projects that are already at the correct version. This version also incorporates the changes suggested by George (in the comments). The macro is available on my SkyDrive account. Download it to your <UserProfile>\Documents\Visual Studio 2010\Projects\VSMacros80\MyMacros folder, open the Visual Studio Macro IDE (Alt-F11) and add it as an existing item to the “MyMacros” project. I make no guarantees or warranties on this macro. I have tested it on several solutions and projects and everything seems to work and not cause any problems, but, as always, use with caution. Since it is a macro, you have the full source code available to investigate and see what it’s actually doing. If you find any bugs or make any useful changes, please let me know and I’ll update the macro. Technorati Tags: Macros,Visual Studio

    Read the article

  • Windows 7 dual boots after upgrade

    - by Paul
    I was running Vista 64, I installed (not upgraded, fresh install) Windows 7 64 bit on the same partition, but since then it's been bringing up a dual boot menu asking if I want to boot to 7 or Vista. Any way to get rid of that, I'm really not interested in rolling back.

    Read the article

  • Issues with proftpd on ubuntu server

    - by yummm
    I'm in the process of setting up a new server running Ubuntu 9.10 and I need to be able to access my web directory via FTP. I've installed proftpd, opened up port 21 and made sure it was up and running. Everything seems good, but when I try to connect via FTP from my personal computer to the server it times out each time. I've been stuck on this issue for a while now and I would appreciate any help. Any ideas???

    Read the article

  • Unique Business Value vs. Unique IT

    - by barry.perkins
    When the age of computing started, technology was new, exciting, full of potential and had a long way to grow. Vendor architectures were proprietary, and limited in function at first, growing in capability and complexity over time. There were few if any "standards", let alone "open standards" and the concepts of "open systems", and "open architectures" were far in the future. Companies employed intelligent, talented and creative people to implement the best possible solutions for their company. At first, those solutions were "unique" to each company. As time progressed, standards emerged, companies shared knowledge, business capability supplied by technology grew, and companies continued to expand their use of technology. Taking advantage of change required companies to struggle through periodic "revolutionary" change cycles, struggling through costly changes that were fraught with risk, resulted in solutions with an increasingly shorter half-life, and frequently required altering existing business processes and retraining employees and partner businesses. The pace of technological invention and implementation grew at an ever increasing rate, making the "revolutionary" approach based upon "proprietary" or "closed" architectures or technologies no longer viable. Concurrent with the advancement of technology, the rate of change in business increased, leading us to the incredibly fast paced, highly charged, and competitive global economy that we have today, where the most successful companies are companies that are good at implementing, leveraging and exploiting change. Fast forward to today, a world where dramatic changes in business and technology happen continually, a world where "evolutionary" change is crucial. Companies can no longer afford to build "unique IT", nor can they afford regular intervals of "revolutionary" change, with the associated costs and risks. Human ingenuity was once again up to the task, turning technology into a platform supporting business through evolutionary change, by employing "open": open standards; open systems; open architectures; and open solutions. Employing "open", enables companies to implement systems based upon technology, capability and standards that will evolve over time, providing a solid platform upon which a company can drive business needs, requirements, functions, and processes down into the technology, rather than exposing technology to the business, allowing companies to focus on providing "unique business value" rather than "unique IT". The big question! Does moving from "older" technology that no longer meets the needs of today's business, to new "open" technology require yet another "revolutionary change"? A "revolutionary" change with a short half-life, camouflaging reality with great marketing? The answer is "perhaps". With the endless options available to choose from, it is entirely possible to implement a solution that may work well today, but in 5 years time will become yet another albatross for the company to bear. Some solutions may look good today, solving a budget challenge by reducing cost, or solving a specific tactical challenge, but result in highly complex environments, that may be difficult to manage and maintain and limit the future potential of your business. Put differently, some solutions might push today's challenge into the future, resulting in a more complex and expensive solution. There is no such thing as a "1 size fits all" IT solution for business. If all companies implemented business solutions based upon technology that required, or forced the same business processes across all businesses in an industry, it would be extremely difficult to show competitive advantage through "unique business value". It would be equally difficult to "evolve" to meet or exceed business needs and keep up with today's rapid pace of change. How does one ensure that they do not jump from one trap directly into another? Or to put it positively, there are solutions available today that can address these challenges and issues. How does one ensure that the buying decision of today will serve the business well for years into the future? Intelligent & Informed decisions - "buying right" In a previous blog entry, we discussed the value of linking tactical to strategic The key is driving the focus to what is best for your business, handling today's tactical issues while also aligning with a roadmap/strategy that is tightly aligned with your strategic business objectives. When considering the plethora of possible options that provide various approaches to solving today's complex business problems, it is extremely important to ensure that vendors supplying those options, focus on what is best for your business, supplying sufficient information, providing adequate answers to questions, addressing challenges, issues, concerns and objections honestly and openly, and focus on supplying solutions that are tailored for, and deliver the most business value possible for your business. Here are a few questions to consider relative to the proposed options that should help ensure that today's solution doesn't become tomorrow's problem. Do the proposed solutions: Solve the problem(s) you are trying to address? Provide a solid foundation upon which to grow/enhance your business? Provide tactical gains that align with and enable your strategic business goals/objectives? Provide an infrastructure that can be leveraged with subsequent projects? Solve problems for the business overall, the lines of business, or just IT? Simplify your current environment Provide the basis for business: Efficiency Agility Clarity governance, risk, compliance real time business visibility and trend analysis Does your IT staff have the knowledge/experience to successfully manage the proposed systems once they are deployed in production? Done well, you will be presented with options tailored to your business, that enable you to drive the "unique business value" necessary to help your business stand out from others, creating a distinct competitive advantage, delivering what your customers need, when they need it, so you can attract new customers, new business, and grow top line revenue, all at a cost that provides a strong Return on Investment/Return on Assets. The net result is growth with managed cost providing significantly improved profit margin and shareholder value.

    Read the article

  • How prevent anyone from stealing my shared_ptr?

    - by Kyle
    So, I use boost::shared_ptr for all the various reference-counting benefits it provides -- reference counting for starters, obviously, but also the ability to copy, assign, and therefore store in STL Containers. The problem is, if I pass it to just one "malicious" function or object, the object can save the ptr and then I'll never be able to de-allocate it without the foreign function or object nicely relinquishing its ownership. Ultimately, I try to keep object ownership explicit. I accomplish this by having the owner keep the only shared_ptr to the object, and "guest" objects only store weak_ptrs to the object. I really don't want the "shared" part of shared_ptr, but I'm required to use shared_ptr in order to make weak_ptrs. I want to use scoped_ptr, but it's extremely limited since you can't copy it. You can't store it in a container, you can't lend out weak_ptrs from it, and you can't transfer ownership to a new manager. What's the solution?

    Read the article

  • How can I get this code involving unique_ptr to compile?!

    - by Neil G
    #include <vector> #include <memory> using namespace std; class A { public: A(): i(new int) {} A(A const& a) = delete; A(A &&a): i(move(a.i)) {} unique_ptr<int> i; }; class AGroup { public: void AddA(A &&a) { a_.emplace_back(move(a)); } vector<A> a_; }; int main() { AGroup ag; ag.AddA(A()); return 0; } does not compile... (says that unique_ptr's copy constructor is deleted) I tried replacing move with forward. Not sure if I did it right, but it didn't work for me.

    Read the article

  • How to accomplish covariant return types when returning a shared_ptr?

    - by Kyle
    using namespace boost; class A {}; class B : public A {}; class X { virtual shared_ptr<A> foo(); }; class Y : public X { virtual shared_ptr<B> foo(); }; The return types aren't covariant (nor are they, therefore, legal), but they would be if I was using raw pointers instead. What's the commonly accepted idiom to work around this, if there is one?

    Read the article

  • Get Classic ASP variable from posted JSON

    - by Will
    I'm trying to post JSON via AJAX to a Classic ASP page, which retrieves the value, checks a database and returns JSON to the original page. I can post JSON via AJAX I can return JSON from ASP I can't retrieve the posted JSON into an ASP variable POST you use Request.Form, GET you use Request.Querystring......... what do I use for JSON? I have JSON libraries but they only show creating a string in the ASP script and then parsing that. I need to parse JSON from when being passed an external variable. Javascipt var thing = $(this).val(); $.ajax({ type: "POST", url: '/ajax/check_username.asp', data: "{'userName':'" + thing + "'}", contentType: "application/json; charset=utf-8", dataType: "json", cache: false, async: false, success: function() { alert('success'); }); ASP file (check_username.asp) Response.ContentType = "application/json" sEmail = request.form() -- THE PROBLEM Set oRS = Server.CreateObject("ADODB.Recordset") SQL = "SELECT SYSUserID FROM dbo.t_SYS_User WHERE Username='"&sEmail&"'" oRS.Open SQL, oConn if not oRS.EOF then sStatus = (new JSON).toJSON("username", true, false) else sStatus = (new JSON).toJSON("username", false, false) end if response.write sStatus

    Read the article

  • Alternatives to GameKIt for iPhone to iPhone transfer

    - by Mike
    I am needing to transfer information as an NSData object from one iPhone to another inside an application and was originally planning on using Bluetooth/GameKit, but the data looks like it will be in the neighborhood of 500KB - 1MB in size. I don't think this is going to fly with GameKit (Bluetooth) as it will take forever and it seems like people are having all kinds of issues with GK anyway. I'd prefer the users to not have to be on the same WiFi network to make it work but am running out of options and time so I'd probably be happy with whatever works. What is a reasonable alternative? The simpler the setup the better or something with sample code would be greatly appreciated and preferred. Thanks.

    Read the article

  • Sending Back Ajax variable

    - by matthewb
    Hello, I am trying to use jquery to do a client side validation to do a check and return with a error or success. I know how to echo text/html back as the response, but here's what I am trying to do. On Error, send back a message, so the user can re-submit a form. On Success, re-load the page. I am not sure how to get it to send a variable which I think will let me do either condition in jquery. Any suggestions??

    Read the article

  • Jquery post array via ajax

    - by Dan
    I have an array (for checkboxes) that I need to pass alongside the regular form in an ajax post, but can't seem to get this to work: new_data = [a,b,c,d,e]; somedata_assoc = JQuery.param({'choices[]': new_data}); $.ajax({ type: "POST", url: contract_qurl, data: $(div).find("form").serialize()+"&"+somedata_assoc, context: $(this), success: function(data) { $("#results_table").html(data); } });

    Read the article

  • Python hash() can't handle long integer?

    - by Xie
    I defined a class: class A: ''' hash test class a = A(9, 1196833379, 1, 1773396906) hash(a) -340004569 This is weird, 12544897317L expected. ''' def __init__(self, a, b, c, d): self.a = a self.b = b self.c = c self.d = d def __hash__(self): return self.a * self.b + self.c * self.d Why, in the doctest, hash() function gives a negative integer?

    Read the article

  • Seeking reporting or templating tool to generate large formatted PDF reports from dataset

    - by Mr. Tacos
    Say I have some data in MySQL or a big ole CSV file. I also have a report. It's a PDF, call it 100 pages long. I need to generate variations on this PDF for slices of the data. More specific example: I have a CSV file with each StackOverflow user in a row and each column contains various statistics about that user. I have a report called "Your StackOverflow Performance". Its got lots of text, always the same, but each section contains something like: "You Vs. The Average StackOverflow Poster on this metric". I want a table that appears there that has the average data, which is the same in every run of the PDF, in one column. In the second column, I want your data, which is different for each PDF/row in the CSV file/user of StackOverflow. I'm pretty sure people use things like Crystal for this? Is there something in MS SQL Server that's good for this? An open source template language? I'm not even really sure if what I need is called a 'reporting' tool (since I don't really need to do any crunching, the data in this case is being crunched by a series of scripts and SPSS, I don't need bands and subbands and so on) or 'templating'. Is there even such a thing as templating PDFs? Natch, I'd be fine with something that generates output easily scriptable to PDF, like eps, but not something like HTML. The report formatting is fussy and done and externally determined and handed down from on high. It's print-oriented, not webby. Thanks in advance.

    Read the article

  • Nhibernate mapping: fixed count multiple members instead of collection

    - by AhmetC
    I don't want to put wheels into a collection. How can i map kind of relation? Class Wheel { int id; Car Owner; } Class Car { int id; Wheel Wheel1; Wheel Wheel2; Wheel Wheel3; Wheel Wheel4; } I tried this but Wheelmap.Owner comes always null : Class WheelMap : ClassMap<Wheel> { Id(x=>x.Id); References(x=>x.Owner); } Class CarMap : ClassMap<Car> { Id(x=>x.Id); References(x=>x.Wheel1).Cascade.All(); References(x=>x.Wheel2).Cascade.All(); References(x=>x.Wheel3).Cascade.All(); References(x=>x.Wheel4).Cascade.All(); }

    Read the article

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