Search Results

Search found 68 results on 3 pages for 'preprocessing'.

Page 2/3 | < Previous Page | 1 2 3  | Next Page >

  • Using pragma once in a C++ project in Xcode 4

    - by Nils
    I know that #pragma once is non-standard, however it is supported by most compilers. So on my Mac I can compile C++ code with headers that use #pragma once on the command line using clang++. The strange thing however is that it does not seem to work within Xcode. I get Invalid preprocessing directive when I try to use #pragma once. I am using the newest version of OSX (10.8.2) and Xcode (Version 4.5.1 (4G1004)).

    Read the article

  • Run C or C++ file as a script

    - by Brendan Long
    So this is probably a long shot, but is there any way to run a C or C++ file as a script? I tried: #!/usr/bin/gcc main.c -o main; ./main int main(){ return 0; } But it says: ./main.c:1:2: error: invalid preprocessing directive #!

    Read the article

  • c++: see compiled object layout

    - by horsthahn
    Hi, is there a way - much like the way i can see the result of preprocessing when using 'gcc -E' - to see what my objects look like once the compiler compiled them into object files? I am not too good in reading assembler, so an advice to get the results as text would be nice .. or at least a little 'howto read the constructor intructions' or 'howto find the constructor' ... I am talking about gcc/g++, but a solution including msvc would be fine. Thanks!

    Read the article

  • In gnuplot, how to plot with lines but skip missing data points?

    - by Anna
    I've got a value associated to each day, as such: 120530 70.1 120531 69.0 120601 69.2 120602 69.5 # and so on for 200 lines When plotting this data in gnuplot with lines, the data points are nicely connected. Unfortunately, at places over a week of data points can be missing. Gnuplot draws long lines over these intervals. How can I make gnuplot only connect points on consecutive days? Solutions that require preprocessing of the data are fine, as I already smooth it with a script. Here is what I use: set xdata time set timefmt "%y%m%d" plot "vikt_ma.txt" using 1:2 with lines title "first line", \\ "" using 1:3 with lines title "second line" Example:

    Read the article

  • External table and preprocessor for loading LOBs

    - by David Allan
    I was using the COLUMN TRANSFORMS syntax to load LOBs into Oracle using the Oracle external which is a handy way of doing several stuff - from loading LOBs from the filesystem to having constants as fields. In OWB you can use unbound external tables to define an external table using your own arbitrary access parameters - I blogged a while back on this for doing preprocessing before it was added into OWB 11gR2. For loading LOBs using the COLUMN TRANSFORMS syntax have a read through this post on loading CLOB, BLOB or any LOB, the files to load can be specified as a field that is a filename field, the content of this file will be the LOB data. So using the example from the linked post, you can define the columns; Then define the access parameters - if you go the unbound external table route you can can put whatever you want in here (your external table get out of jail free card); This will let you read the LOB files fromn the filesystem and use the external table in a mapping. Pushing the envelope a little further I then thought about marrying together the preprocessor with the COLUMN TRANSFORMS, this would have let me have a shell script for example as the preprocessor which listed the contents of a directory and let me read the files as LOBs via an external table. Unfortunately that doesn't quote work - there is now a bug/enhancement logged, so one day maybe. So I'm afraid my blog title was a little bit of a teaser....

    Read the article

  • Understanding Application binary interface (ABI)

    - by Tim
    I am trying to understand the concept of Application binary interface (ABI). From The Linux Kernel Primer: An ABI is a set of conventions that allows a linker to combine separately compiled modules into one unit without recompilation, such as calling conventions, machine interface, and operating-system interface. Among other things, an ABI defines the binary interface between these units. ... The benefits of conforming to an ABI are that it allows linking object files compiled by different compilers. From Wikipedia: an application binary interface (ABI) describes the low-level interface between an application (or any type of) program and the operating system or another application. ABIs cover details such as data type, size, and alignment; the calling convention, which controls how functions' arguments are passed and return values retrieved; the system call numbers and how an application should make system calls to the operating system; and in the case of a complete operating system ABI, the binary format of object files, program libraries and so on. I was wondering whether ABI depends on both the instruction set and the OS. Are the two all that ABI depends on? What kinds of role does ABI play in different stages of compilation: preprocessing, conversion of code from C to Assembly, conversion of code from Assembly to Machine code, and linking? From the first quote above, it seems to me that ABI is needed for only linking stage, not the other stages. Is it correct? When is ABI needed to be considered? Is ABI needed to be considered during programming in C, Assembly or other languages? If yes, how are ABI and API different? Or is it only for linker or compiler? Is ABI specified for/in machine code, Assembly language, and/or of C?

    Read the article

  • Turn a Kindle into a Weather Display Station

    - by Jason Fitzpatrick
    The e-ink display, network connectivity, and low-power consumption of Kindle ebook readers make them a perfect candidate for an infrequently refreshed high-visibility display–like a weather display. Read on to see how to hack a Kindle to serve up the local weather. Tinker and hardware hacker Matt Petroff hacked his Kindle to accept input from a web server and then, graciously and in the spirit of geeky projects everywhere, shared his source code. He explains the heart of the project: The server side of the system uses shell and Python scripts to convert weather forecast data into an image for the Kindle. The scripts first download and parse forecast data from NOAA via the National Digital Forecast Database XML/SOAP Service. After parsing the data, the data then needs to be converted into an image. This is accomplished by preprocessing a specially crafted SVG file to insert temperatures, forecast symbols, and days of the week. This SVG is then rendered as a PNG using rsvg-convert and converted to a grayscale, no transparency color space as required by the Kindle using pngcrush. Finally, it is copied to a public location on the web server. The Kindle is set to refresh twice a day (you could easily tweak the scripts for a more frequent refresh) and displays the forecast as seen in the photo above–with crisp and easy to read text and icons. Hit up the link below for more information and the project’s source code. How To Create a Customized Windows 7 Installation Disc With Integrated Updates How to Get Pro Features in Windows Home Versions with Third Party Tools HTG Explains: Is ReadyBoost Worth Using?

    Read the article

  • string matching algorithms used by lucene

    - by iamrohitbanga
    i want to know the string matching algorithms used by Apache Lucene. i have been going through the index file format used by lucene given here. it seems that lucene stores all words occurring in the text as is with their frequency of occurrence in each document. but as far as i know that for efficient string matching it would need to preprocess the words occurring in the Documents. example: search for "iamrohitbanga is a user of stackoverflow" (use fuzzy matching) in some documents. it is possible that there is a document containing the string "rohit banga" to find that the substrings rohit and banga are present in the search string, it would use some efficient substring matching. i want to know which algorithm it is. also if it does some preprocessing which function call in the java api triggers it.

    Read the article

  • Building dictionary of words from large text

    - by LiorH
    I have a text file containing posts in English/Italian. I would like to read the posts into a data matrix so that each row represents a post and each column a word. The cells in the matrix are the counts of how many times each word appears in the post. The dictionary should consist of all the words in the whole file or a non exhaustive English/Italian dictionary. I know this is a common essential preprocessing step for NLP. Does anyone know of a tool\project that can perform this task? Someone mentioned apache lucene, do you know if lucene index can be serialized to a data-structure similar to my needs?

    Read the article

  • Does XercesC contain an extensive logic of XMLSchema validation?

    - by seas
    Tried to implement a small XML validation tool with XercesC. For some reason I cannot use existing validators right from the box - I need some preprocessing and would like to combine it with validation in a single tool. I used DOM parser and specified DOMErrorHandler. Instead of a set of errors with detailed messages like I saw from xmllint for the same xml and xmlschema files, only one message appeared that document has a wrong structure without details. Probably, I did something wrong. But also assume XercesC doesn't contain xmllint functionality right from the box. Does anybody can give me a hint before I spent too much time? Thanks.

    Read the article

  • shortest path search in a map represented as 2d shapes

    - by joe_shmoe
    Hi, I have a small library of a few shortest path search algorithms. They were developed for simple undirected graphs (the normal representation - vertices and edges). Now I'd like to somehow apply them on a bit different scenario - where the maps are represented as 2-dimensional shapes, connected by shared edges (edges of the polygons, that is). In this scenario, the search can start/end either at a map object or some point (x,y). What would be the best approach? Try to apply the algorithms onto shapes? or try to extract a 'normal' graph out of the shapes (I have preprocessing time available)? Any advice would be much appreciated, as I'm really not sure which way to go, and I don't have enough time (and skill) to explore many options... Thanks a lot

    Read the article

  • How do I do automatic data serialization of data objects in Haskell

    - by Adam Gent
    One of the huge benefits in languages that have some sort of reflection/introspecition is that objects can be automatically constructed from a variety of sources. For example in Java I can use the same objects for persisting to a db (with Hibernate) serializing to XML (with JAXB) or serializing to JSON (json-lib). You can do the same in Ruby and Python also usually following some simple rules for properties or annotations for Java. Thus I don't need lots "Domain Transfer Objects". I can concentrate on the domain I am working in. It seems in very strict FP like Haskell and Ocaml this is not possible. Particularly Haskell. The only thing I have seen is doing some sort of preprocessing or meta-programming (ocaml). Is it just accepted that you have to do all the transformations from the bottom upwards? In other words you have to do lot of boring work to turn a data type in haskell into JSON/XML/DB Row object and back again into a data object.

    Read the article

  • Praat scripting

    - by Binaryrespawn
    Hi all, I am trying to write a praat script to do preprocessing on hundreds of speach samples. I need to extract speech features from each sample and feed these as imputs into a feed-forward neural network. I have already constructed the network using math-lab. However, learing to script in praat is proving to be quite a challenge given my time constraints. Some of my samples are 0.01 to 0.03 seconds in length, I was looking at standardising the duration for all samples using Pitch Synchronous OverLap-Add(PSOLA). However this will be very tedious if I were to do this for every sample. Is there any script that can read in all of my files and perform the operations in a batch mode? Any guidance will be surelly appreaciated. Regards.

    Read the article

  • In html <a href> tag, how to call servlet before opening file dialog for download (save as)?

    - by deepthinker121
    Hi All, I am developing a web-app where I want to provide a download link to users - so they can download a zip file from my server. Now, my requirement is that I want to execute some processing logic contained in a servlet before displaying the file dialog to the user for 'zip' files. So If I write <a href="abc.zip".......> then it opens a file dialog asking the user to select the location where this file can be saved But if I want a servlet's doGet method to do some preprocessing - say like building the zip file , then how can I first call the servlet and then open the file dialog. Will the following snippet work? <a href="MyHandlerServlet;abc.zip".......> Thanks for your help !!

    Read the article

  • Efficient most common suffix algorithm?

    - by taw
    I have a few GBs worth of strings, and for every prefix I want to find 10 most common suffixes. Is there an efficient algorithm for that? An obvious solution would be: Store sorted list of <string, count> pairs. Identify by binary search extent for prefix we're searching. Find 10 highest counts in this extent. Possibly precompute it for all short prefixes, so it doesn't ever need to look at large portion of data. I'm not sure if that would actually be efficient at all. Is there a better way I overlooked? Answers must be real time, but it can take as much preprocessing as necessary.

    Read the article

  • Keep a Google Maps v3 Map Hidden, show when needed

    - by Dr1Ku
    Is there a way of preventing Google Maps (JS, v3) of being displayed from the get-go ? I do some pre-processing and would like to show my 'Loading' spinner until everything is good to go (more eloquently put, hide the map -- e.g. the container div -- until all preprocessing is complete -- at which point, show the map). Hooking to the map's 'idle' event doesn't help that much, since the map is already displayed when this event hits. I know that the container div gets inline-styled by GMaps after loading, my first idea is to clear out the style attr (whilst listening to 'idle'), but it would be interesting to see if there is a way of creating the map and not displaying it until all pre-processing is done. Maybe by using an argument to the new google.maps.Map constructor, or a MapOption ? Any thoughts on this ? Thank you in advance !

    Read the article

  • Plotting a cumulative graph of python datetimes

    - by ventolin
    Say I have a list of datetimes, and we know each datetime to be the recorded time of an event happening. Is it possible in matplotlib to graph the frequency of this event occuring over time, showing this data in a cumulative graph (so that each point is greater or equal to all of the points that went before it), without preprocessing this list? (e.g. passing datetime objects directly to some wonderful matplotlib function) Or do I need to turn this list of datetimes into a list of dictionary items, such as: {"year": 1998, "month": 12, "date": 15, "events": 92} and then generate a graph from this list? Sorry if this seems like a silly question - I'm not all too familiar with matplotlib, and would like to save myself the effort of doing this the latter way if matplotlib can already deal with datetime objects itself.

    Read the article

  • How to make flyspell bypass some words by context?

    - by manu
    Hi, I use Emacs for writing most of my writings. I write using reStructuredText, and then transform them to LaTeX after some preprocessing since I write my citations á-la LaTeX. This is an excerpt of one of my texts (in Spanish): En \cite[pp.~XXVIII--XXIX]{Crnkovic2002} se brindan algunos riesgos que se pueden asumir con el desarrollo basado en componentes, los This text is processed by some custom scripts that deals with the \cite part so rst2latex can do its job. When I activate flyspell-mode it signals most of the citation keys as spelling errors. How can I tell flyspell not to spellcheck things within \cite commands. Furthermore, how can I combine rst-mode and flyspell, so that rst-mode would keep flyspell from spellchecking the following? reST comments reST code literal reST directive parameters and arguments reST raw directive contents Any ideas?

    Read the article

  • Is there a way to know if std::chrono::monotonic_clock is defined?

    - by Vicente Botet Escriba
    C++0X N3092 states that monotonic_clock is optional. 20.10.5.2 Class monotonic_clock [time.clock.monotonic] 1 Objects of class monotonic_clock represent clocks for which values of time_point never decrease as physical time advances. monotonic_clock may be a synonym for system_clock if system_clock::is_monotonic is true. ** 2 The class monotonic_clock is conditionally supported.** Is there a way using SFINAE or another technique to define a traits class that states if monotonic_clock is defined? struct is_monotonic_clock_defined; If yes, how? If not, shouldn't the standard define macro that gives this information at preprocessing time?

    Read the article

  • Complexity in using Binary search and Trie

    - by user121196
    given a large list of alphabetically sorted words in a file,I need to write a program that, given a word x, determines if x is in the list. Preprocessing is ok since I will be calling this function many times over different inputs. priorties: 1. speed. 2. memory I already know I can use (n is number of words, m is average length of the words) 1. a trie, time is O(log(n)), space(best case) is O(log(n*m)), space(worst case) is O(n*m). 2. load the complete list into memory, then binary search, time is O(log(n)), space is O(n*m) I'm not sure about the complexity on tri, please correct me if they are wrong. Also are there other good approaches?

    Read the article

  • C++ Translation Phase Confusion

    - by blakecl
    Can someone explain why the following doesn't work? int main() // Tried on several recent C++ '03 compilers. { #define FOO L const wchar_t* const foo = FOO"bar"; // Will error out with something like: "identifier 'L' is undefined." #undef FOO } I thought that preprocessing was done in an earlier translation phase than string literal operations and general token translation. Wouldn't the compiler be more or less seeing this: int main() { const wchar_t* const foo = L"bar"; } It would be great if someone could cite an explanation from the standard.

    Read the article

  • Why did the C# designers attach three different meanings to the 'using' keyword?

    - by gWiz
    The using keyword has three disparate meanings: type/namespace aliasing namespace import syntactic sugar for ensuring Dispose is called The documentation calls the first two definitions directives (which I'm guessing means they are preprocessing in nature), while the last is a statement. Regardless of the fact that they are distinguished by their syntaxes, why would the language developers complicate the semantics of the keyword by attaching three different meanings to it? For example, (disclaimer: off the top of my head, there may certainly be better examples) why not add keywords like alias and import? Technical, theoretical, or historical reasons? Keyword quota? ;-) Contrived sample: import System.Timers; alias LiteTimer=System.Threading.Timer; alias WinForms=System.Windows.Forms; public class Sample { public void Action { var elapsed = false; using(var t = new LiteTimer.Timer(_ => elapsed = true) { while (!elapsed) CallSomeFinickyApi(); } } } "Using" is such a vague word.

    Read the article

  • How can I improve this regular expression?

    - by Michael Haren
    I want a regular expression to match valid input into a Tags input field with the following properties: 1-5 tags Each tag is 1-30 characters long Valid tag characters are [a-zA-Z0-9-] input and tags can be separated by any amount of whitespace Here's what I have so far--it seems to work but I'm interested how it could be simplified or if it has any major flaws: \s*[a-zA-Z0-9-]{1,30}(\s+[a-zA-Z0-9-]{1,30}){0,4}\s* // that is: \s* // match all beginning whitespace [a-zA-Z0-9-]{1,30} // match the first tag (\s+[a-zA-Z0-9-]{1,30}){0,4} // match all subsequent tags \s* // match all ending whitespace Preprocessing the input to make the whitespace issue easier isn't an option (e.g. trimming or adding a space). If it matters, this will be used in javascript. Any suggestions would be appreciated, thanks!

    Read the article

  • What types of conditions can be used for conditional compilation in C++?

    - by user1002288
    This is an exam question for C++: Which of the following statements accurately describe the condition that can be used for conditional compilation in C++? A. The condition can depend on the value of environment variables. B. The condition can depend on the value of any const variables. C. The condition can depend on the value of program variables. D. The condition can use the sizeof() operator to make decision about compiler-dependent operations based on the size of standard data type. E. The condition must evaluate to either a 0 or 1 during preprocessing. I think the answer is E. Is this correct?

    Read the article

  • Error occurs while using SPADE method in R

    - by Yuwon Lee
    I'm currently mining sequence patterns using SPADE algorithm in R. SPADE is included in "arulesSequence" package of R. I'm running R on my CentOS 6.3 64bit. For an exercise, I've tried an example presented in http://en.wikibooks.org/wiki/Data_Mining_Algorithms_In_R/Sequence_Mining/SPADE When I tried to do "cspade(x, parameter = list(support = 0.4), control = list(verbose = TRUE))" R says: parameter specification: support : 0.4 maxsize : 10 maxlen : 10 algorithmic control: bfstype : FALSE verbose : TRUE summary : FALSE preprocessing ... 1 partition(s), 0 MB [0.096s] mining transactions ... 0 MB [0.066s] reading sequences ...Error in asMethod(object) : 's' is not an integer vector When I try to run SPADE on my Window 7 32bit, it runs well without any error. Does anybody know why such errors occur?

    Read the article

< Previous Page | 1 2 3  | Next Page >