Daily Archives

Articles indexed Monday April 26 2010

Page 13/110 | < Previous Page | 9 10 11 12 13 14 15 16 17 18 19 20  | Next Page >

  • cmake missing separator error

    - by user198729
    D:\Works\c\cmake\build>cmake .. -- The C compiler identification is MSVC -- The CXX compiler identification is MSVC -- Check for CL compiler version -- Check for CL compiler version - 1500 -- Check if this is a free VC compiler -- Check if this is a free VC compiler - no -- Check for working C compiler: D:/Tools/Microsoft Visual Studio 9.0/VC/bin/cl.exe -- Check for working C compiler: D:/Tools/Microsoft Visual Studio 9.0/VC/bin/cl.exe -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Check for working CXX compiler: D:/Tools/Microsoft Visual Studio 9.0/VC/bin/cl.exe -- Check for working CXX compiler: D:/Tools/Microsoft Visual Studio 9.0/VC/bin/cl.exe -- works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Configuring done -- Generating done -- Build files have been written to: D:/Works/c/cmake/build D:\Works\c\cmake\build>make Makefile:28: *** missing separator. Stop. I saw many similar problems,but not with cmake,and their solution is to use tabs instead of spaces,but the makefile is generated by cmake,has anyone else met this problem?

    Read the article

  • Use python decorators on class methods and subclass methods

    - by AlexH
    Goal: Make it possible to decorate class methods. When a class method gets decorated, it gets stored in a dictionary so that other class methods can reference it by a string name. Motivation: I want to implement the equivalent of ASP.Net's WebMethods. I am building this on top of google app engine, but that does not affect the point of difficulty that I am having. How it Would look if it worked: class UsefulClass(WebmethodBaseClass): def someMethod(self, blah): print(blah) @webmethod def webby(self, blah): print(blah) # the implementation of this class could be completely different, it does not matter # the only important thing is having access to the web methods defined in sub classes class WebmethodBaseClass(): def post(self, methodName): webmethods[methodName]("kapow") ... a = UsefulClass() a.post("someMethod") # should error a.post("webby") # prints "kapow" There could be other ways to go about this. I am very open to suggestions

    Read the article

  • Adding text over existing PDFs using reportlab

    - by Shane
    I'm interested in filling out existing PDF forms programatically. All I really need to do is pull information from user input and then place the appropriate text over an existing PDF in the appropriate locations. I can already do this with reportlab by feeding the same sheet of paper into a printer, twice, but this just really rubs me the wrong way. I'm tempted to just personally reverse engineer each existing PDF and draw every line and character myself before adding the user-inputted text, but I wanted to check to see if there was an easy way to take an existing PDF and set it as a background for some extra text. I'd really prefer to use python as it's the only language I feel comfortable with. I also realize that I could just scan the document itself and use the resulting raster image as a background, but I would prefer the precision of vector graphics. It seems like ReportLab has a commercial product with this functionality, and the specific function I'm looking for is in it (copyPages) - but it seems like overkill to pay for a 4 figure product for a single, simple function for a nonprofit use.

    Read the article

  • how to create button in internet explorer?

    - by karikari
    I am developing a simple c++ program inside Microsoft Visual Studio. This program will later be convert to DLL, in order to register it to Internet Explorer. Inside my program, I would like to do like this: if flag=1, toolbar_button = green; else toolbar button = red; I want to create a simple button on the Internet Explorer, and the button can reflects the color that I pass from my c++ program. How can I achieve this?

    Read the article

  • SQLiteDataAdapter Update method returning 0

    - by Lirik
    I loaded 83 rows from my CSV file, but when I try to update the SQLite database I get 0 rows... I can't figure out what I'm doing wrong. The program outputs: Num rows loaded is 83 Num rows updated is 0 The source code is: public void InsertData(String csvFileName, String tableName) { String dir = Path.GetDirectoryName(csvFileName); String name = Path.GetFileName(csvFileName); using (OleDbConnection conn = new OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + dir + @";Extended Properties=""Text;HDR=Yes;FMT=Delimited""")) { conn.Open(); using (OleDbDataAdapter adapter = new OleDbDataAdapter("SELECT * FROM " + name, conn)) { QuoteDataSet ds = new QuoteDataSet(); adapter.Fill(ds, tableName); Console.WriteLine("Num rows loaded is " + ds.Tags.Rows.Count); InsertData(ds, tableName); } } } public void InsertData(QuoteDataSet data, String tableName) { using (SQLiteConnection conn = new SQLiteConnection(_connectionString)) { using (SQLiteDataAdapter sqliteAdapter = new SQLiteDataAdapter("SELECT * FROM " + tableName, conn)) { using (new SQLiteCommandBuilder(sqliteAdapter)) { conn.Open(); Console.WriteLine("Num rows updated is " + sqliteAdapter.Update(data, tableName)); } } } } Any hints on why it's not updating the correct number of rows?

    Read the article

  • Transfer of directory structure over network

    - by singh
    I am designing a remote CD/DVD burner to address hardware constraints on my machine. My design works like this: (analogous to a network printer) Unix-based machine (acts as server) hosts a burner. Windows-based machine acts as client. Client prepares data to burn and transfers it to the server. Server burns the data on CD/DVD. My question is: what is the best protocol to transfer data over the network (Keeping the same directory hierarchy) between different operating systems?

    Read the article

  • OLPC in Paraguay educates both little kids and teenagers

    <b>Stop:</b> "Today, however, Sugar is usable on any computer running Linux, Mac OS or Windows. Since some months ago I had described how the XO laptop is used in some Nepali schools, this time I interviewed Bernie Innocenti, an italian developer who worked on that project and now is doing the same thing in Paraguay. "

    Read the article

  • Range of int and long datatypes

    - by n00b8688
    I learned the range of int and long on 32 bit windows is: signed int: -32767 to 32767 signed long: -2147483647 to 2147483647 why does the int has same range as long type as mentioned here? http://msdn.microsoft.com/en-us/library/s3f49ktz%28VS.80%29.aspx

    Read the article

  • Visit neighbor of a position in a 2d-array

    - by Martin
    I have the following two dimensional array: static int[,] arr = new int[5, 5] { { 00, 00, 00, 01, 00 }, { 00, 00, 01, 01, 00 }, { 00, 00, 01, 01, 00 }, { 00, 00, 01, 01, 00 }, { 00, 00, 00, 01, 00 }, }; I have to a implement a method called Hit(int x, int y). When we hit a 0 in the array (i.e. Hit(0, 0), Hit(1, 1), but not Hit(3, 0)) I would like all the adjacent zeros to the zero we hit to be incremented by 10. So if I call Hit(1, 1), the array should become the following. static int[,] arr = new int[5, 5] { { 10, 10, 10, 01, 00 }, { 10, 10, 01, 01, 00 }, { 10, 10, 01, 01, 00 }, { 10, 10, 01, 01, 00 }, { 10, 10, 10, 01, 00 }, }; Any idea how I could implement that? It sounds to me like a Depth First Search/Recursive sort-of algorithm should do the job, but I haven't been able to implement it for an 2d array. Thanks for the help!

    Read the article

  • How to stop video player in Blackberry?

    - by Rajapandian
    Hi, I created one blackberry application which will play a video on a button click.This is my code, invocation=new Invocation("file:///SDCard/Blackberry/videos/PlayingVideo/funny.mp4"); registry=Registry.getRegistry("net.rim.device.api.content.BlackBerryContentHandler"); try { registry.invoke(invocation); } catch(Exception e) { } Now i can play the Video file.After clicking the Back button the native player is going to the background.It always running in the background.But i want to close that player.I have no idea about how to do it.Anybody knows please help me.

    Read the article

  • PHP Extract Values From One String Based on a Pattern Defined in Another

    - by ironkeith
    I have two strings: $first = '/this/is/a/string'; $second = '/this/:param1/a/:param2'; And I'm trying to get this: $params = array('param1' => 'is', 'param2' => 'string'); But getting from point a to b is proving more than my tired brain can handle at the moment. Anything starting with a ':' in the second string defines a variable name/position. There can be any number of variables in $second which need to be extracted from $first. Segments are separated by a '/'. Thanks.

    Read the article

  • How do I bring Set Focus of MDI Child Window using UIAutomation

    - by Scott Ferguson
    We have an old legacy application we need to automate. It uses MDI Windows. We're using UIAutomation and I can succesfully get the appropriate AutomationElement for each MDI Child window. What I cannot do is bring that element into focus. Here is some example code that I tried, that fails: var desktop = AutomationElement.RootElement; var dolphin = desktop.FindFirst(TreeScope.Children, new PropertyCondition(AutomationElement.NameProperty, "Dolphin for Windows", PropertyConditionFlags.IgnoreCase)); dolphin.SetFocus(); var workspace = dolphin.FindFirst(TreeScope.Children, new PropertyCondition(AutomationElement.NameProperty, "Workspace", PropertyConditionFlags.None)); var childWindow = workspace.FindFirst(TreeScope.Children, new PropertyCondition(AutomationElement.NameProperty, "Sharp ")); childWindow.SetFocus(); The last line in this code fails with System.InvalidOperationException Experimenting, I tried finding a control on the childWindow, and calling SetFocus on it. It DID correctly set the focus on the right control, but it did not bring the MDI window to the foreground. Any ideas?

    Read the article

  • Multiple lines of text to a single map

    - by steven
    I've been trying to use Hadoop to send N amount of lines to a single mapping. I don't require for the lines to be split already. I've tried to use NLineInputFormat, however that sends N lines of text from the data to each mapper one line at a time [giving up after the Nth line]. I have tried to set the option and it only takes N lines of input sending it at 1 line at a time to each map: job.setInt("mapred.line.input.format.linespermap", 10); I've found a mailing list recommending me to override LineRecordReader::next, however that is not that simple, as that the internal data members are all private. I've just checked the source for NLineInputFormat and it hard codes LineReader, so overriding will not help. Also, btw I'm using Hadoop 0.18 for compatibility with the Amazon EC2 MapReduce.

    Read the article

  • ASP NET MVC Error In Function

    - by rah.deex
    hello it's me again... thx b4 to experts who have provided solutions to my question.. now i've got some trouble again, would you please halp me... this is my code (i've got this sample from the internet n i try to modify it) :) private void FillGridData() { //IQueryable<SVC> query = _customerService.GetQueryable(); _dataContext = new dbServiceModelDataContext(); var query = from m in _dataContext.SVCs select m; query = AddQuerySearchCriteria(query, _grid.SearchForm); int totalRows = query.Count(); _grid.Pager.Init(totalRows); if (totalRows == 0) { _grid.Data = new List<SVC>(); return; } query = AddQuerySorting(query, _grid.Sorter); query = AddQueryPaging(query, _grid.Pager); List<SVC> customers = query.ToList(); //***ERROR IN HERE***// _grid.Data = customers; } the error says "Cannot order by type 'System.Object'.", what is the matter? do you have solution for me, please...

    Read the article

  • Daily tech links for .net and related technologies - Apr 26-28, 2010

    - by SanjeevAgarwal
    Daily tech links for .net and related technologies - Apr 26-28, 2010 Web Development MVC: Unit Testing Action Filters - Donn ASP.NET MVC 2: Ninja Black Belt Tips - Scott Hanselman Turn on Compile-time View Checking for ASP.NET MVC Projects in TFS Build 2010 - Jim Lamb Web Design List of 25+ New tags introduced in HTML 5 - techfreakstuff 15 CSS Habits to Develop for Frustration-Free Coding - noupe Silverlight, WPF & RIA Essential Silverlight and WPF Skills: The UI Thread, Dispatchers, Background...(read more)

    Read the article

  • Which JavaScript graphics library has the best performance?

    - by DNS
    I'm doing some research for a JavaScript project where the performance of drawing simple primitives (i.e. lines) is by far the top priority. The answers to this question provide a great list of JS graphics libraries. While I realize that the choice of browser has a greater impact than the library, I'd like to know whether there are any differences between them, before choosing one. Has anyone done a performance comparison between any of these?

    Read the article

  • Stop output of image if no record - paperclip - Ruby on rails

    - by bgadoci
    I have just installed paperclip into my ruby on rails blog application. Everything is working great...too great. I am trying to figure out how to tell paperclip not to output anything if there is no record in the table so that I don't have broken image links everywhere. How, and where, do I do this? Here is my code: class Post < ActiveRecord::Base has_attached_file :photo, :styles => { :small => "150x150"} validates_presence_of :body, :title has_many :comments, :dependent => :destroy has_many :tags, :dependent => :destroy has_many :ugtags, :dependent => :destroy has_many :votes, :dependent => :destroy belongs_to :user after_create :self_vote def self_vote # I am assuming you have a user_id field in `posts` and `votes` table. self.votes.create(:user => self.user) end cattr_reader :per_page @@per_page = 10 end View <% div_for post do %> <div id="post-wrapper"> <div id="post-photo"> <%= image_tag post.photo.url(:small) %> </div> <h2><%= link_to_unless_current h(post.title), post %></h2> <div class="light-color"> <i>Posted <%= time_ago_in_words(post.created_at) %></i> ago </div> <%= simple_format truncate(post.body, :length => 600) %> <div id="post-options"> <%= link_to "Read More >>", post %> | <%= link_to "Comments (#{post.comments.count})", post %> | <%= link_to "Strings (#{post.tags.count})", post %> | <%= link_to "Contributions (#{post.ugtags.count})", post %> | <%= link_to "Likes (#{post.votes.count})", post %> </div> </div> <% end %>

    Read the article

  • how to write floating value accurately to a bin file.

    - by user319873
    Hi I am trying to dump the floating point values from my program to a bin file. Since I can't use any stdlib function, I am thinking of writting it char by char to a big char array which I am dumping in my test application to a file. It's like float a=3132.000001; I will be dumping this to a char array in 4 bytes. Code example would be:- if((a < 1.0) && (a > 1.0) || (a > -1.0 && a < 0.0)) a = a*1000000 // 6 bit fraction part. Can you please help me writting this in a better way.

    Read the article

  • JSON-P and a GET resource?

    - by user246114
    Hi, If a website operating on a domain other than my own supports get requests, like: http://api.someothersite.com/v1/farms There's no way for me to access it using JSON-P right, they would have to have support for it as a query parameter? Something like: http://api.someothersite.com/v1/farms?callback=fantastic I mean, there's no way for me to use it without them explicitly supporting it, right? Thanks

    Read the article

< Previous Page | 9 10 11 12 13 14 15 16 17 18 19 20  | Next Page >