Search Results

Search found 2312 results on 93 pages for 'whats your favourite'.

Page 58/93 | < Previous Page | 54 55 56 57 58 59 60 61 62 63 64 65  | Next Page >

  • Strange thing about .NET 4.0 filesystem enumeration functionality

    - by codymanix
    I just read a page of "Whats new .NET Framework 4.0". I have trouble understanding the last paragraph: To remove open handles on enumerated directories or files Create a custom method (or function in Visual Basic) to contain your enumeration code. Apply the MethodImplAttribute attribute with the NoInlining option to the new method. For example: [MethodImplAttribute(MethodImplOptions.NoInlining)] Private void Enumerate() Include the following method calls, to run after your enumeration code: * The GC.Collect() method (no parameters). * The GC.WaitForPendingFinalizers() method. Why the attribute NoInlining? What harm would inlining do here? Why call the garbage collector manually, why not making the enumerator implement IDisposable in the first place? I suspect they use FindFirstFile()/FindNextFile() API calls for the imlementation, so FindClose() has to be called in any case if the enumeration is done.

    Read the article

  • Clojure / HBase: How to Import HBaseTestingUtility in v0.94.6.1

    - by David Williams
    In Clojure, if I want to start a test cluster using the hbase testing utility, I have to annotate my dependencies with: [org.apache.hbase/hbase "0.92.2" :classifier "tests" :scope "test"] First of all, I have no idea what this means. According to leiningens sample project.clj ;; Dependencies are listed as [group-id/name version]; in addition ;; to keywords supported by Pomegranate, you can use :native-prefix ;; to specify a prefix. This prefix is used to extract natives in ;; jars that don't adhere to the default "<os>/<arch>/" layout that ;; Leiningen expects. Question 1: What does that mean? Question 2: If I upgrade the version: [org.apache.hbase/hbase "0.94.6.1" :classifier "tests" :scope "test"] Then I receive a ClassNotFoundException Exception in thread "main" java.lang.ClassNotFoundException: org.apache.hadoop.hbase.HBaseConfiguration Whats going on here and how do I fix it?

    Read the article

  • Send Logcat output of an App to an EmailAdress

    - by Sebi
    Hi Were now testing our application with a few friends. Sometimes there are some errors which dont throw an exception. So I don't really know whats the problem was. So i thought it would be a good idea to implement a menu item which allows to send the logcat file to a email adress, so that we can examine the logcat. Unfortunately I didnt found a hint in the Internet how to extract the Logcat from a phone. How to send a email shouldn't be the problem.

    Read the article

  • Subversion terminology. Difference between projects, modules and root directories

    - by aioobe
    I'm setting up a repository for me and some colleagues. I have a subversion repository at hand, and all required rights. The usual directory-skeleton has been set up for me (branches, tags and trunk). Now I'm about to create a directory for me and my colleagues to put our files in. I'm quite sure the right place to put it is in trunk. Now here and there in tutorials, I see terms like "modules" and "projects" such as in Checking Out a Project - svn checkout svn checkout http://host_name/svn_dir/repository_name/project/trunk proj Is proj in the above line some glorified directory in trunk? Should I do something else than a checkout on trunk, mkdir and then commit when creating a directory for me and my colleagues? Whats the difference between a project, a directory in trunk and a module?

    Read the article

  • Rails and MongoDB with MongoMapper

    - by FCastellanos
    I'm new to Rails development and I'm starting with MongoDB also. I have been following this Railscast tutorial about complex forms with Rails but I'm using MongoDB as my database. I'm having no problems inserting documents with it's childs and retrieving the data to the edit form, but when I try to update it I get this error undefined method `assert_valid_keys' for false:FalseClass this is my entity class class Project include MongoMapper::Document key :name, String, :required => true key :priority, Integer many :tasks after_update :save_tasks def task_attributes=(task_attributes) task_attributes.each do |attributes| if attributes[:id].blank? tasks.build(attributes) else task = tasks.detect { |t| t.id.to_s == attributes[:id].to_s } task.attributes = attributes end end end def save_tasks tasks.each do |t| t.save(false) end end end Does anyone knows whats happening here? Thanks

    Read the article

  • Using stack defined in C++ stl

    - by cambr
    #include <stack> using namespace std; int main() { stack<int> s; int i; for (i = 0; i <= 10; i++) { s.push(i); } for (i = 0; i <= 10; i++) { printf("%d", s.pop()); } } Whats wrong with the code above? Error: In function `int main()': aggregate value used where an integer was expected

    Read the article

  • jQuery getScript and Google Maps API Problem

    - by k0ni
    HI I got a problem with loading the google maps api. I got my own object with a function that initializes the map, and the google maps api gets loaded via jquery.getscript. but i always get an error message in the callback function: var MyGMap = { GMapScriptURL: "http://maps.google.com/maps?file=api&v=2&async=2&key=", Map: null, Geocoder: null, InitiazlizeMaps: function () { if (GBrowserIsCompatible()) { this.Map = new GMap2(document.getElementById("map_canvas")); this.Map.setCenter(new GLatLng(37.4419, -122.1419), 13); this.Geocoder = new GClientGeocoder(); } } } $(function(){ var CurrentKey = "MY_KEY"; $.getScript(MyGMap.GMapScriptURL + CurrentKey, function () { MyGMap.InitiazlizeMaps(); // throws GMap2 is undefined }); }); whats wrong? why is this not running?

    Read the article

  • HTML Rendering Engine as a Java Control

    - by SvrGuy
    Hi All, We have a client side application (Java/Swing) that we need an HTML rendering control for. What I want to find is the most widely adopted, most heavily developed, easiest to deploy solution to get Gecko or WebKit into a Swing app (Needs to run OS X and Windows). The limited (crappy?) JEditPane type solutions are not robust enough for our needs. We would really like to use either WebKit or Gecko. Some libraries seems to exist that would allow this: (QT WebKit) http://trac.webkit.org/wiki/QtWebKit (JRex) [can not post URL because I am new] etc. Whats the best library to achieve this?

    Read the article

  • Date format strings in .Net and Java

    - by mizipzor
    I have an application that runs on both C# .Net and Java. Two entirely separate but identical code bases. The problem Im having is formatting date and numbers. For example: A user running the .Net variant is inputting a date and a format string. The 26th of April 1986 is formatted 1986-04-26. The actual date, along with the format string, is serialized to an XML file. Later another user running the Java variant opens said XML file and looks at the date. I want them to look the same. Whats the best approach here? There doesnt seem to be a one-to-one mapping between Java and .Nets format strings. Should I limit the possible formats to a selection I know I can represent fully in both .Net and Java?

    Read the article

  • Check malicious Redirect URL in ASP.NET

    - by acidzombie24
    I heard of sites using other site to redirect users either to their own site or to hide behind another site. In my code i redirect in a few places such as post a comment (its easier to use a return url then figure out the page using data given). How do i check if the return URL is my own url? I think i use absolute paths so i can easily check if the first character is '/' but then i will lose relative flexibility. This also disallows me from doing http://mysite.com/blah in the redirect url. I could patch the url by adding mysite + string but i'll need to figure out if string is a relative url or already a mysite.com url. Whats the easiest way to ensure i am only redirecting to my site?

    Read the article

  • Can I use/include gsdll32.dll redmonnt.dll (no modificaitons) in a commercial application for my cli

    - by scriptmaster
    Hi - I am not a license expert, however after a lot of research, I am still struggling to answer the following questions and would like to know if my assumptions are right! 1) Is it legal to include gsdll32.dll and redmonnt.dll in a commercial product? A: ? 2) Should I release any source code of the commercial app where I am using this library? A: ? 3) Is there a commercial license (a small fee that my client can pay to use these libraries) to GhostScript? A: ? 4) Whats the meaning of "although it may be distributed ("aggregated") with commercial products." in this para: http://pages.cs.wisc.edu/~ghost/doc/AFPL/8.00/New-user.htm#Commercial_use A: ? 5) What are the alternate solutions? A: ?

    Read the article

  • How do i keep my DB and lucene in sync?

    - by acidzombie24
    So i can have a transaction in sql. But i am sure its not a good idea to wait in the middle of a transaction for lucene to finish also i am unsure if lucene is permanently saved in the DB until i do something there. Whats the best way to keep my DB and lucene in sync? I am thinking of adding a lucene_queue in my sql db and everytime i make a change i add it into the queue (removing older queue if any) and delete it once it is done. Is this the best way? Also i am unsure how to make lucene permanently keep the changes i made and how frequent i can/should do it.

    Read the article

  • superfish vertical menu

    - by Dooie
    Hi Guy's, Im using jQuery with superfish vertical menu. My menu is positioned at the bottom of my page so the menu slides up, however, on hover of the menu items the sub items get lost at the bottom of my window. Below is a crude example of whats happening. menu item menu item menu item menu item > sub item browser bottom-------------------------- sub item sub item sub item This is my desired outcome menu item sub item menu item sub item menu item sub item menu item > sub item browser bottom-------------------------- Has anyone accomplished this?

    Read the article

  • Junit exception test

    - by Prithis
    I have two tests to check the expected exception throw. I am using Junit 4 and has following syntax. @Test(expected=IllegalArgumentException.class) public void testSomething(){ .......... } One of the tests fail even though IllegalArgumentException is thrown and the other passes. Any idea whats missing?? I modified the test which is failing to following and it passes. public void testSomething(){ try{ ............ //line that throws exception fail(); }catch(IllegalArgumentException e) { } }

    Read the article

  • Symbol info in .app file

    - by tech74
    Hi, i've recently released an app to the App store, i went to have a look at some crash logs in Organiser of my app downloaded from the app store and noticed that there is symbol info in my crash log - Shock Horror I definitely remember setting some strip symbols flags when i built the distribution build (which was copied from release) so can't for the life of me work out how there is this symbol info there. I never shipped a .SYM file to apple just the .app. So whats going on. Surely apple would have warned me about this wouldn't they??

    Read the article

  • MoveFileEx Problem

    - by rajivpradeep
    int i ; DWORD dw ; String^ Source = "c:\\ProtectedFlash\\Program\\test.exe" ; String^ Destination = "c:\\Program Files" ; // move to program Files Folder //pin_ptr<const wchar_t> WSource = PtrToStringChars(Source); // pin_ptr<const wchar_t> WDestination = PtrToStringChars(Destination); i = MoveFileEx(L"c:\\ProtectedFlash\\Program\\ProtectedFlash.exe",L"c:\\Program Files",MOVEFILE_REPLACE_EXISTING) ; dw = GetLastError() ; return 0; The status dw is valued as 5 , when i run the program. Whats the error

    Read the article

  • Python IDE built into Visual Studio 2008?

    - by Thomaschaaf
    Hi I develop in Visual Studio 2008 a lot and would like to find an addin like vsphp which enables intellisense and debugging in Visual Studio. Is IronStudio what I am looking for? As far as I understand IronStudio is a Plugin for .NET. If there is no Plugin for Visual Studio 2008 whats a great IDE for a python newbee who loves Visual Studio (hate netbeans and eclipse sorry just don't feel the love) Also if IronPython Studio is an IDE do I want the Isolated or Integrated Version? I don't seem to understand the name. I installed integrated and got this: http://dl.getdropbox.com/u/5910/Jing/2009-02-11_1750.png :( no console like here: http://www.codeplex.com/IronPythonStudio

    Read the article

  • Kill a Perl system call after a timeout

    - by Fergal
    I've got a Perl script I'm using for running a file processing tool which is started using backticks. The problem is that occasionally the tool hangs and It needs to be killed in order for the rest of the files to be processed. Whats the best way best way to apply a timeout after which the parent script will kill the hung process? At the moment I'm using: foreach $file (@FILES) { $runResult = `mytool $file >> $file.log`; } But when mytool hangs after n seconds I'd like to be able to kill it and continue to the next file.

    Read the article

  • $_GET loading content before head tag instead of in specified div.

    - by s32ialx
    NOT EDITING BELOW BUT THANKS TO SOME REALLY NICE PEOPLE I CAN'T POST AN IMAGE ANYMORE BECAUSE I HAD a 15 Rep but NOW ONLY A 5 becuase my question wasn't what they wanted help with they gave me a neg rep. The problem is that the content loads it displays UNDER the div i placed #CONTENT# inside so the styles are being ignored and it's posting #CONTENT# outside the divs at positions 0,0 any suggestions? Found out whats happening by using "View Source" seems that it's putting all of the #CONTENT#, content that's being loaded in front of the <head> tag. Like this <doctype...> <div class="home"> \ blah blah #CONTENT# bot being loaded in correct specified area </div> / <head> <script src=""></script> </head> <body> <div class="header"></div> <div class="contents"> #CONTENT# < where content SHOULD load </div> <div class="footer"></div> </body> so anyone got a fix? OK so a better description I'll add relevant screen-shots Whats happening is /* file.class.php */ <?php $file = new file(); class file{ var $path = "templates/clean"; var $ext = "tpl"; function loadfile($filename){ return file_get_contents($this->path . "/" . $filename . "." . $this->ext); } function setcontent($content,$newcontent,$vartoreplace='#CONTENT#'){ $val = str_replace($vartoreplace,$newcontent,$content); return $val; } function p($content) { $v = $content; $v = str_replace('#CONTENT#','',$v); print $v; } } if(!isset($_GET['page'])){ // if not, lets load our index page(you can change home.php to whatever you want: include("main.txt"); // else $_GET['page'] was set so lets do stuff: } else { // lets first check if the file exists: if(file_exists($_GET['page'].'.txt')){ // and lets include that then: include($_GET['page'].'.txt'); // sorry mate, could not find it: } else { echo 'Sorry, could not find <strong>' . $_GET['page'] .'.txt</strong>'; } } ?> is calling for a file_get_contents at the bottom which I use in /* index.php */ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <?php include('classes/file.class.php'); // load the templates $header = $file->loadfile('header'); $body = $file->loadfile('body'); $footer = $file->loadfile('footer'); // fill body.tpl #CONTENT# slot with $content $body = $file->setcontent($body, $content); // cleanup and output the full page $file->p($header . $body . $footer); ?> and loads into /* body.tpl */ <div id="bodys"> <div id="bodt"></div> <div id="bodm"> <div id="contents"> #CONTENT# </div> </div> <div id="bodb"></div> </div> but the issue is as follows the $content loads properly img tags etc <h2> tags etc but CSS styling is TOTALY ignored for position width z-index etc. and as follows here's the screen-shot My Firefox Showing The Problem In Action REPOSTED DUE TO PEOPLE NOT HELPING AND JUST BEING ARROGANT AND GIVING NEGATIVE VOTES and not even saying a word. DO NOT COMMENT UNLESS YOU PLAN TO HELP god I'm a beginner and with you people giving me bad reviews this won't make me help you out when the chance comes.

    Read the article

  • How to change the text color in a disabled edit box using MFC?

    - by anand.arumug
    Hello all, I have a dialog in which the edit box is disabled but the text should be displayed in red instead of the default grey. I tried the following: void CMyEdit::OnEnable(BOOL bEnable) { CEdit::OnEnable(bEnable); if (bEnable) { m_BackGroundColor = kRGBWhite; } else { m_BackGroundColor = kRGBDefaultGray; } m_TextColor = kRGBRed; m_BackgroundBrush.DeleteObject(); m_BackgroundBrush.CreateSolidBrush(m_BackGroundColor); Invalidate(); } But its still displaying the text in grey only. But if I remove the base class call CEdit::OnEnable(bEnable); then new text color takes effect. Can anyone explain whats wrong in the code? Thanks for your time. cheers...

    Read the article

  • delete in tableView..

    - by totato
    I just add this methods in .h file : - (IBAction)EditTable:(id)sender; - (IBAction)DeleteButtonAction:(id)sender; and in .m file : (IBAction)DeleteButtonAction:(id)sender{ [tableList removeLastObject]; [Table reloadData]; } (IBAction) EditTable:(id)sender{ if(self.editing) { [super setEditing:NO animated:NO]; [Table setEditing:NO animated:NO]; [Table reloadData]; [self.navigationItem.leftBarButtonItem setTitle:@"Edit"]; [self.navigationItem.leftBarButtonItem setStyle:UIBarButtonItemStylePlain]; } else { [super setEditing:YES animated:YES]; [Table setEditing:YES animated:YES]; [Table reloadData]; [self.navigationItem.leftBarButtonItem setTitle:@"Done"]; [self.navigationItem.leftBarButtonItem setStyle:UIBarButtonItemStyleDone]; } } when I run the program and click the delete button (red button) the program is stop ! whats the problem ? please any help ?

    Read the article

  • Unable to validate e-mail format

    - by Aishwarya Shiva Pareek
    I am using this code which was suggested by my friend to validate an email id format in C#. public bool IsValidEmail(string strIn) { string strPattern = "^([0-9a-zA-Z]([-.\\w]*[0-9a-zA-Z])*@([0-9a-zA-Z][-\\w]*[0-9a-zA-Z]\\.)+[a-zA-Z]{2,9})$"; if (System.Text.RegularExpressions.Regex.IsMatch(strIn, strPattern)) { return true; } return false; } When I pass the value of the strIn as [email protected] This function returns false. Please tell me whats wrong with it?

    Read the article

  • Getting error in MVC Proj while writing Lambda Expression

    - by Shrewd Demon
    hi, i am creating a sample movie (MVC) application. I was getting fine with Viewing and Creating a new record, but when i wrote the code to get the details of a particular record i met with the following error: Unable to cast objec`t of type 'System.Data.Objects.ObjectQuery`1[MovieApp.Models.Movie]' to type 'MovieApp.Model`s.Movie'. here is the code i wrote for getting the details public ActionResult Details(int id) { var moviedetail = (Movie)_entities.MovieSet.Where(mvid => mvid.Id == id); return View(moviedetail); } can any body tell me whats going wrong and where ?? thank you.

    Read the article

  • Best approach to design a service oriented system

    - by Gustavo Paulillo
    Thinking about service orientation, our team are involved on new application designs. We consist in a group of 4 developers and a manager (that knows something about programming and distributed systems). Each one, having own opinion on service design. It consists in a distributed system: a user interface (web app) accessing the services in a dedicated server (inside the firewall), to obtain the business logic operations. So we got 2 main approachs that I list above : Modular services Having many modules, each one consisting of a service (WCF). Example: namespaces SystemX.DebtService, SystemX.CreditService, SystemX.SimulatorService Unique service All the business logic is centralized in a unique service. Example: SystemX.OperationService. The web app calls the same service for all operations. In your opinion, whats the best? Or having another approach is better for this scenario?

    Read the article

  • jquey ajax upload file in asp.net mvc

    - by CoffeeCode
    i have a file in my view <form id="upload" enctype="multipart/form-data"> <input type="file" name="fileUpload" id="fileUpload" size="23" /><br /> </form> and an ajax request $.ajax({ url: '<%=Url.Action("JsonSave","Survey") %>', dataType: 'json', processData: false, contentType: "multipart/mixed", data: { Id: selectedRow.Id, Value: 'some date was added by the user here :))' }, cache: false, success: function(data) { } }); but there is no file in the Request.Files. Whats wrong with the ajax request?

    Read the article

< Previous Page | 54 55 56 57 58 59 60 61 62 63 64 65  | Next Page >