Search Results

Search found 3176 results on 128 pages for 'parsing'.

Page 70/128 | < Previous Page | 66 67 68 69 70 71 72 73 74 75 76 77  | Next Page >

  • Am I copy/paste programmer ?

    - by Searock
    When ever I am stuck with a particular problem, I search for a solution in Google. And then I try to understand the code and tweak it according to my requirement. For example recently I had asked a question Reading xml document in firefox in stack overflow. Soufiane Hassou gave me a link to w3schools, where I found a example on parsing xml document, I understood how the example works, but I copied the code and tweaked it according to my requirement, since I don't like typing much. So does this make me a copy/paste programmer? How do you say if a person is a copy/paste programmer ? Thanks.

    Read the article

  • How do I overcome paralysis by analysis when coding?

    - by LuxuryMode
    When I start a new project, I often times immediately start thinking about the details of implementation. "Where am I gonna put the DataBaseHandler? How should I use it? Should classes that want to use it extend from some Abstract superclass..? Should I an interface? What level of abstraction am I going to use in my class that contains methods for sending requests and parsing data?" I end up stalling for a long time because I want to code for extensibility and reusability. But I feel it almost impossible to get past thinking about how to implement perfectly. And then, if I try to just say "screw it, just get it done!", I hit a brick wall pretty quickly because my code isn't organized, I mixed levels of abstractions, etc. What are some techniques/methods you have for launching into a new project while also setting up a logical/modular structure that will scale well?

    Read the article

  • Is it possible to create a single tokenizer to parse this?

    - by Adrian
    This extends off this other Q&A thread, but is going into details that are out of scope from the original question. I am generating a parser that is to parse a context-sensitive grammar which can take in the following subset of symbols: ,, [, ], {, }, m/[a-zA-Z_][a-zA-Z_0-9]*/, m/[0-9]+/ The grammar can take in the following string { abc[1] }, } and parse it as ({, abc[1], }, }). Another example would be to take: { abc[1] [, } and parse it as ({, abc[1], [,, }). This is similar to the grammar used in Perl for the qw() syntax. The braces indicate that the contents are to be whitespace tokenized. A closing brace must be on its own to indicate the end of the whitespace tokenized group. Can this be done using a single lexer/tokenizer, or would it be necessary to have a separate tokenizer when parsing this group?

    Read the article

  • EL 3.0 Public Review - JSR 341 and Java EE 7 Moving Along

    - by arungupta
    Following closely on the lines of EL 3.0 Early Draft, the specification is now available for a Public Review. The JCP2 Process Document defines different stages of the specifications. This review period closes Jul 30, 2012. Some of the main goals of the JSR are to separate ELContext into parsing and evaluation contexts, adding operators like equality, string concatenation, etc, and integration with CDI. The section A.7 of the specification highlights the difference between Early Draft and Public Review. Download the Public Review and and follow the updates at el-spec.java.net. For more information about EL 3.0 (JSR 341), check out the JSR project on java.net. The archives of EG discussion are available at jsr341-experts and you can subscribe to the users@el-spec and other aliases on the Mailing Lists page.

    Read the article

  • How does one handle an incorrect resource file?

    - by AedonEtLIRA
    I'm starting the parser that will handle one of the key features of my app and realizing exactly who easy it would be for me to screw up a resource file that is provided to the application. For example, a simple resource that I provide to my app is a JSON file that contains an entity layout (name, fascia, location etc...). It would be easy for me to leave out the name of the entity or misspell the JSON key. Obviously catastrophic failures during parsing are to be handled in a try/catch, but how would subtle failures (such as a dyslexic spelling of name) be handled?

    Read the article

  • Is there some application to download files from popular file hosting websites?

    - by Tim
    I was wondering if there are some applications for downloading files from some popular hosting websites, automating the procedure of waiting and fetching links and downloading files, once we give the applications the links? Examples of such websites are Rapidshare, Uploading, Megaupload, Filesonic, Fileserver, Hotfiles, Depositefiles, iFile. But the applications are not necessarily applicable to all of them. Thanks and regards! ADDED: I just tried slimrat. It failed to download files from rapidshare. Can it be because the website of rapidshare has changed recently and the parsing functionality for their website by slimrat is not up-to-date yet.

    Read the article

  • Cannot install Ubuntu

    - by Tasso
    I'm using Windows 7 and when I try to install and this message appears: "An error ocurred: Could not retrieve the required installation files For more information, please see the log file: c:\users\.............\wubi-12.10-rev273.log" The final part of the log - 12-17 13:43 DEBUG Distro: checking whether F:\ is a valid Ubuntu CD 12-17 13:43 DEBUG Distro: parsing info from str=Ubuntu 12.10 "Quantal Quetzal" - Release i386 (20121017.2) 12-17 13:43 DEBUG Distro: parsed info={'name': 'Ubuntu', 'subversion': 'Release', 'version': '12.10', 'build': '20121017.2', 'codename': 'Quantal Quetzal', 'arch': 'i386'} 12-17 13:43 INFO Distro: Found a valid CD for Ubuntu: F:\ 12-17 13:43 INFO root: Running the uninstaller... 12-17 13:43 INFO CommonBackend: This is the uninstaller running 12-17 13:43 DEBUG WindowsFrontend: __init__... 12-17 13:43 DEBUG WindowsFrontend: on_init... 12-17 13:43 INFO WinuiPage: appname=wubi, localedir=C:\Users\TASSO'~1\AppData\Local\Temp\pylED6A.tmp\translations, languages=['en_US', 'en'] 12-17 13:43 INFO WindowsFrontend: Operation cancelled 12-17 13:43 DEBUG WindowsFrontend: frontend.quit 12-17 13:43 DEBUG WindowsFrontend: frontend.on_quit 12-17 13:43 DEBUG root: application.on_quit 12-17 13:43 INFO root: sys.exit

    Read the article

  • Should I always be checking every neighbor when building voxel meshes?

    - by Raven Dreamer
    I've been playing around with Unity3d, seeing if I can make a voxel-based engine out of it (a la Castle Story, or Minecraft). I've dynamically built a mesh from a volume of cubes, and now I'm looking into reducing the number of vertices built into each mesh, as right now, I'm "rendering" vertices and triangles for cubes that are fully hidden within the larger voxel volume. The simple solution is to check each of the 6 directions for each cube, and only add the face to the mesh if the neighboring voxel in that direction is "empty". Parsing a voxel volume is BigO(N^3), and checking the 6 neighbors keeps it BigO(7*N^3)-BigO(N^3). The one thing this results in is a lot of redundant calls, as the same voxel will be polled up to 7 times, just to build the mesh. My question, then, is: Is there a way to parse a cubic volume (and find which faces have neighbors) with fewer redundant calls? And perhaps more importantly, does it matter (as BigO complexity is the same in both cases)?

    Read the article

  • Converting ANTLR AST to Java bytecode using ASM

    - by Nick
    I am currently trying to write my own compiler, targeting the JVM. I have completed the parsing step using Java classes generated by ANTLR, and have an AST of the source code to work from (An ANTLR "CommonTree", specifically). I am using ASM to simplify the generating of the bytecode. Could anyone give a broad overview of how to convert this AST to bytecode? My current strategy is to explore down the tree, generating different code depending on the current node (using "Tree.getType()"). The problem is that I can only recognise tokens from my lexer this way, rather than more complex patterns from the parser. Is there something I am missing, or am I simply approaching this wrong? Thanks in advance :)

    Read the article

  • What C++ libraries can be used in game development [closed]

    - by RedShft
    I'm currently in the planning stage for my next game, and since I've been away from C++ for a while I have some questions about helpful libraries. I plan on making a 2D game with SDL, constructing my own simple 2D engine. I plan on making this game for the PC. What libraries would you recommend to make this process easier? What about unittests? What about an enforce operator to throw exceptions? int a = 1; enforce(a == 2); //Throws an exception, Specifically, i'm looking for general purpose libraries, that implement that make my life easier (like boost). Also, a helpful library for physics/collision, AI, XML file parsing (specifically working with the Tiled map editor), and any others that you guys have used that are useful in a 2D game.

    Read the article

  • What happened to .fx files in D3D11?

    - by bobobobo
    It seems they completely ruined .fx file loading / parsing in D3D11. In D3D9, loading an entire effect file was D3DXCreateEffectFromFile( .. ), and you got a ID3DXEffect9, which had great methods like SetTechnique and BeginPass, making it easy to load and execute a shader with multiple techniques. Is this completely manual now in D3D11? The highest level functionality I can find is loading a SINGLE shader from an FX file using D3DX11CompileFromFile. Does anyone know if there's an easier way to load FX files and choose a technique? With the level of functionality provided in D3D11 now, it seems like you're better off just writing .hlsl files and forgetting about the whole idea of Techniques.

    Read the article

  • How does one block unsupported web browsers?

    - by Sn3akyP3t3
    Web browsers with an end of life no longer receive security updates which not only makes them vulnerable to the end user, but I imagine its not safe for the server's which receive visits by them either. Is it practical to block or enforce and notify the end user that their browser is unsafe and unsupported? If so, how would one achieve that? I don't know of any official or crowd-sourced listing with that information to parse and keep up to date. I'm aware that the practice can be custom built with User Agent parsing and feature detection for HTML5 enabled browsers.

    Read the article

  • How to efficiently map tokens to code in a script interpreter?

    - by lithander
    I'm writing an interpreter for a simple scripting language where each line is a complete, executable command. (Like the instructions in assembler) When parsing a line I have to map the requested command to actual code. My current solution looks like this: std::string op, param1, param2; //parse line, identify op, param1, param2 ... //call command specific code if(op == "MOV") ExecuteMov(AsNumber(param1)); else if(op == "ROT") ExecuteRot(AsNumber(param1)); else if(op == "SZE") ExecuteSze(AsNumber(param1)); else if(op == "POS") ExecutePos((AsNumber(param1), AsNumber(param2)); else if(op == "DIR") ExecuteDir((AsNumber(param1), AsNumber(param2)); else if(op == "SET") ExecuteSet(param1, AsNumber(param2)); else if(op == "EVL") ... The more commands are supported the more string comparisions I'll have to do to identify and call the associated method. Can you point me to a more efficient implementation in the described scenario?

    Read the article

  • if ('constant' == $variable) vs. if ($variable == 'constant')

    - by Tom Auger
    Lately, I've been working a lot in PHP and specifically within the WordPress framework. I'm noticing a lot of code in the form of: if ( 1 == $options['postlink'] ) Where I would have expected to see: if ( $options['postlink'] == 1 ) Is this a convention found in certain languages / frameworks? Is there any reason the former approach is preferable to the latter (from a processing perspective, or a parsing perspective or even a human perspective?) Or is it merely a matter of taste? I have always thought it better when performing a test, that the variable item being tested against some constant is on the left. It seems to map better to the way we would ask the question in natural language: "if the cake is chocolate" rather than "if chocolate is the cake".

    Read the article

  • I am getting an error while writing my first app as shown in developer get-started tutorial

    - by TrickyJ
    I am trying to learn to develop apps in ubuntu and currently i am going through this tutorial. As shown in the video I am writing the below given codes: self.refreshbutton = self.builder.get_object("refreshbutton") def on_refreshbutton_clicked(self, widget): print "Refresh" As soon as I try to run my application it is giving me an error : I type this command to run my application : quickly run (trickybrowser:4418): Gtk-WARNING **: Theme parsing error: gtk-widgets.css:1971:11: Not using units is deprecated. Assuming 'px'. (trickybrowser:4418): Gtk-WARNING **: Failed to parse /usr/share/themes/mac-os-lion-theme-v2/gtk-3.0/settings.ini: Key file contains line '/* ' which is not a key-value pair, group, or comment Traceback (most recent call last): File "bin/trickybrowser", line 32, in <module> import trickybrowser File "/home/tricky/trickybrowser/trickybrowser/__init__.py", line 14, in <module> from trickybrowser import TrickybrowserWindow File "/home/tricky/trickybrowser/trickybrowser/TrickybrowserWindow.py", line 32 print "Refresh" ^ IndentationError: expected an indented block

    Read the article

  • How are "Json.org"-like specs graphs called and how can I generate them?

    - by Sebastián Grignoli
    In http://www.json.org Douglas Crockford shows the specs of the JSON format in two interesting ways: In the right side column he lists a text spec that looks like a YACC or LEX listing. In the main body of the homepage, he put several images that gives us a simple way to visually understand the valid sequences that composes a JSON string. Those images look like a description of the path that a finite state automaton would follow when parsing the JSON string. Wich are the names (if any) of that listing format and that kind of graphics? Is there any software that renders a source file containing the specification into that kind of images?

    Read the article

  • Is there some application to download files from popular file hosting websites?

    - by Tim
    I was wondering if there are some applications for downloading files from some popular hosting websites, automating the procedure of waiting and fetching links and downloading files, once we give the applications the links? Examples of such websites are Rapidshare, Uploading, Megaupload, Filesonic, Fileserver, Hotfiles, Depositefiles, iFile. But the applications are not necessarily applicable to all of them. Thanks and regards! ADDED: I just tried slimrat. It failed to download files from rapidshare. Can it be because the website of rapidshare has changed recently and the parsing functionality for their website by slimrat is not up-to-date yet.

    Read the article

  • Debugging-Setting Consoles in Games

    - by ShrimpCrackers
    Right now I have the graphical and input portions of a console for my game (command parsing hasn't been implemented yet). I was wondering how you would go about making changes to properties in game objects. For example, if I typed in the console: skeletonMonster maxHP 20 That would change all of the existing in-game skeletons' max hit points to 20. After you parse this information what are some ways to change the value? How can I change the variable(s) without violating information hiding? I'd like to implement this so I don't have to change variables in the code and recompile every time while playtesting.

    Read the article

  • Why do we use networking libraries instead of plain NSURLRequests and NSURLConnection ?

    - by Amogh Talpallikar
    in iOS development, I have often seen people creating a networking module to interact with their APIs. This module generally sits on top of a networking framework like MKNetWorkKit or AFNetWorking. In most of the cases, It's all about sending GET,POST request and parsing the response which is in most cases JSON. What extra practical benefits that these libraries provide that an iOS developer should be leveraging which the plain Cocoa Networking APIs lack ? I can understand RESTKit as one exception where it takes care of the conversion of JSON to native objects and also interfaces with Core Data but what about others ?

    Read the article

  • Googlebot requesting invalid url

    - by Rob Walker
    I have a web app which emails me exceptions automatically. This morning there was an error relating to a url: /Catalog/LiveCatalog?id=ylwpfqzts id is invalid (should be a guid) and caused an error parsing. Everything was handled correctly, and an error page is returned. But what was odd is that the user-agent reported itself as Googlebot and the IP is registered to Google. The URL would never have been generated by my web app but doesn't look particularly malicious. Anyone ever seen anything like this?

    Read the article

  • What diagrams, other than the class diagram and the workflow diagram, are useful for explaining how an application works?

    - by Goran_Mandic
    I am working on a small Delphi project, composed of two units. One unit is for the GUI, and the other for data management, file parsing, list iterating and so on.. I've already made a class diagram, and my workflow looks like hell- it's too complex, even for anyone to read. I've considered making a dataflow diagram, but it would be even more complex. A use case diagram wouldn't be of use either. Am I missing some diagram type which could somehow represent the relationship between my two units?

    Read the article

  • Automatic language transformation in editor or IDE [on hold]

    - by Rumca
    Are there any tools that are capable of editing code but in different language? To be more concrete, I want to parse java source file in editor, compile it to my language X, edit in X and compile back to java on save. Or edit pom.xml file using non-XML syntax. Which editor or IDE would be easiest to use for implementing such prototype? Option to transform only a snippet would be ideal to limit effort on parsing. For one example, Intellij IDEA can display anonymous class so it looks like lambda expression hiding some of boilerplate.

    Read the article

  • Nearest color algorithm using Hex Triplet

    - by Lijo
    Following page list colors with names http://en.wikipedia.org/wiki/List_of_colors. For example #5D8AA8 Hex Triplet is "Air Force Blue". This information will be stored in a databse table (tbl_Color (HexTriplet,ColorName)) in my system Suppose I created a color with #5D8AA7 Hex Triplet. I need to get the nearest color available in the tbl_Color table. The expected anaser is "#5D8AA8 - Air Force Blue". This is because #5D8AA8 is the nearest color for #5D8AA7. Do we have any algorithm for finding the nearest color? How to write it using C# / Java? REFERENCE http://stackoverflow.com/questions/5440051/algorithm-for-parsing-hex-into-color-family http://stackoverflow.com/questions/6130621/algorithm-for-finding-the-color-between-two-others-in-the-colorspace-of-painte Suggested Formula: Suggested by @user281377. Choose the color where the sum of those squared differences is minimal (Square(Red(source)-Red(target))) + (Square(Green(source)-Green(target))) +(Square(Blue(source)-Blue(target)))

    Read the article

  • OutOfBounds Exception when creating a PolygonShape using jbox2d

    - by B3nGr33ni3r
    So here's the deal, i'm parsing a file that contains the vertices for a polygon, that i want to create in box2d. I create a new PolygonShape() and then call .set() giving it a defined array of Vec, and that defined array's .length property. I expected this to work, since the documentation for jbox2d says this method takes a Vec array, and the count of Vec objects in that array. However, it errors out, and it seems to be unrelated to my code. The error i get is Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 8 at org.jbox2d.collision.shapes.PolygonShape.set(PolygonShape.java:174) and, upon looking at that line in the jbox2d svn repository, i still cannot figure out the issue. Any help is appreciated!

    Read the article

  • Which subjects in (theorethical) computer science matter the most in practice?

    - by Anto
    As you should know, computer science and software engineering aren't the same thing. My question is which subjects in computer science are (in your opinion) most important for software engineers and most applicable in practice? Please don't talk about "niche" areas of computer science (e.g. compiler construction) because of the usage of that inside that niche (e.g. helps you create compilers), but instead about areas which might be applicable and useful in a wide spectrum of software engineering problems and jobs (e.g helps you with parsing structured text).

    Read the article

< Previous Page | 66 67 68 69 70 71 72 73 74 75 76 77  | Next Page >