Daily Archives

Articles indexed Monday April 19 2010

Page 5/113 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • Scripting for JAVA - a problem to solve

    - by Parhs
    Hello.. I had no luck to find a good way to achieve the following: suppose i let the user to write a condition using javascript INS5 || ASTO.valueBetween(10,210) ... etc.... I tried to find a way to get the variables name...from JAVA... Rhino library didnt help a lot... However i found that handling exceptions i could get all the identifiers! Everything is great but one little problem..... How teh heck i can replace these identifiers with the numeric id of each var ? eg INS to be _234 ASTO to be _331 ? I want to to this replace because the name may change... I could do it using a replace but i know that this isnt easy because... 1) replacing _23 with MPLAH may replace also _234...(this could be fixed with regexp somehow..) 2)what if _23 is in a comment section ? rare to happen but possible /* _23 fdsafd ktl */ it should be replaced... 3)what if is a name of a function ??? _32() {} rare but shouldnt be replaced 4) what if it is enclosed in "" or ''??? And i am sure that there should me a lot more cases..... any ideas ? thank yoyu for your time

    Read the article

  • (Visual) C++ project dependency analysis

    - by polyglot
    I have a few large projects I am working on in my new place of work, which have a complicated set of statically linked library dependencies between them. The libs number around 40-50 and it's really hard to determine what the structure was initially meant to be, there isn't clear documentation on the full dependency map. What tools would anyone recommend to extract such data? Presumably, in the simplest manner, if did the following: define the set of paths which correspond to library units set all .cpp/.h files within those to belong to those compilation units capture the 1st order #include dependency tree One would have enough information to compose a map - refactor - and recompose the map, until one has created some order. I note that http://www.ndepend.com have something nice but that's exclusively .NET unfortunately. I read something about Doxygen being able accomplish some static dependency analysis with configuration; has anyone ever pressed it into service to accomplish such a task?

    Read the article

  • vim-latex config

    - by Myx
    Hello: I have installed vim-latex package using my ubuntu's synaptic package manager. I followed the instructions here to edit my .vimrc file. However, when I open up a .tex file in vim, nonw of the new menu options appear and I can't seem to compile documents using \ll. What did I do wrong?

    Read the article

  • Great GUI for Apache2?

    - by ajsie
    I wonder if there are great GUI management tools for Apache so you dont have to manually edit files in VIM. It would be great if you could manage Apache over internet. Any suggestions of such tools?

    Read the article

  • The Definitive C++ Book Guide and List

    - by grepsedawk
    After more than a few questions about deciding on C++ books I thought we could make a better community wiki version. Providing QUALITY books and an approximate skill level. Maybe we can add a short blurb/description about each book that you have personally read / benefited from. Feel free to debate quality, headings, etc. Note: There is a similar post for C: The Definitive C Book Guide and List Reference Style - All Levels The C++ Programming Language - Bjarne Stroustrup C++ Standard Library Tutorial and Reference - Nicolai Josuttis Beginner Introductory: C++ Primer - Stanley Lippman / Josée Lajoie / Barbara E. Moo Accelerated C++ - Andrew Koenig / Barbara Moo Thinking in C++ - Bruce Eckel (2 volumes, 2nd is more about standard library, but still very good) Best practices: Effective C++ - Scott Meyers Effective STL - Scott Meyers Intermediate More Effective C++ - Scott Meyers Exceptional C++ - Herb Sutter More Exceptional C++ - Herb Sutter C++ Coding Standards: 101 Rules, Guidelines, and Best Practices - Herb Sutter / Andrei Alexandrescu C++ Templates The Complete Guide - David Vandevoorde / Nicolai M. Josuttis Large Scale C++ Software Design - John Lakos Above Intermediate Modern C++ Design - Andrei Alexandrescu C++ Template Metaprogramming - David Abrahams and Aleksey Gurtovoy Inside the C++ Object Model - Stanley Lippman Classics / Older Note: Some information contained within these books may not be up to date and no longer considered best practice. The Design and Evolution of C++ - Bjarne Stroustrup Ruminations on C++ Andrew Koenig / Barbara Moo Advanced C++ Programming Styles and Idioms - James Coplien

    Read the article

  • Incorporating MIT/X11 licensed code into project

    - by Yktula
    I'm rewriting a small MIT-licensed program in C, and I intend to copy a segment from it (though not verbatim) that prints usage information and such things. The programs are going to behave, for the most part, the same, but the implementations are going to be much different. What is the best way to incorporate this code into my program, whether it's licensed under Apache 2, GPLv2/3, or under the MIT license? My guess is that for the first two listed I'd just add the original authors name to the NOTICE file along with relevant information and paste the license header as a comment above the derived code, and for the latter I'd just add the original author's copyright statement above my own.

    Read the article

  • Macros in macros (C++)

    - by meds
    Is it possible to put a macro in a macro in c++? Something like: #define Something\ #ifdef SomethingElse\ //do stuff \ #endif\ I tried and it didn't work so my guess is it doesn't work, unless there's some sort of syntax that can fix it?

    Read the article

  • Objective C block gives link error

    - by ennuikiller
    I'm trying to use objective-c blocks for some iPhone programming and am getting the following link time error: The relevant code is: - (NSDictionary *) getDistances { CLLocationCoordinate2D parkingSpace; NSMutableDictionary *dict; NSIndexSet *indexForUser; BOOL (^test)(id obj, NSUInteger idx, BOOL *stop); test = ^ (id obj, NSUInteger idx, BOOL *stop) { NSString *user = (NSString *)[(NSDictionary *)obj valueForKey:@"userid"]; if ([user isEqualToString:self->sharedUser.userName]) { return YES; } return NO; }; [self->sharedUser.availableParking indexesOfObjectsPassingTest:test]; } Any help would be very much appreciated!!

    Read the article

  • What's the best way of playing media files (esp. audio) with Mono/C#?

    - by supercheetah
    I'm trying to create something that will be playing some sound and music for some things in Mono+C#, but I'm not sure what the best thing will be for that. I'm trying to make it usable with things like Ogg Vorbis, MP3s, and wave files. My primary platform will be Linux, although a cross platform solution would be nice. Anyone have any suggestions for libraries for playing audio files?

    Read the article

  • Core Data iPhone how often should I call [managedObjectContext save:&error] when doing 50k record in

    - by jamone
    I will be doing an occiasional import from XML into core data. I have around 50k entities that will be added. My question is how often should I call [managedObjectContext save:&error]. For every new entity added, or every x entities, or just at the end of the 50k import? I currently am calling it for each entity and tried only doing it for around every 10k and import speed went up drastically but after the first 30k it would crash with: *** Terminating app due to uncaught exception 'NSGenericException', reason: '*** Collection <NSCFSet: 0x13e760> was mutated while being enumerated.' Before I spend too much time trying to diagnose what is going on there I figured I'd check if its ok to not call save on every entity? Is the # of entities before calling save limited by the amount of memory those entities are using?

    Read the article

  • Google Friend Connect - Meaning of URLs

    - by shoaibmohammed
    Hello, I would like to know the meaning of the URL's provided by google for its Friend Connect. For example, in the FCAUTH, the user details can be grabbed by sending a request to the following link and a JSON encoded string will be returned http://www.google.com/friendconnect/api/people/@viewer/@self?fcauth=<some-cookie-value> Also for getting user activites, I came across a link as below http://www.google.com/friendconnect/api/activities/@owner/@friends/@app?fcauth=<cookie> What if I change the @owner to @me or @viewer , what would be the meaning and would it be valid? Example, if i change it as http://www.google.com/friendconnect/api/activities/@me/@friends/@app?fcauth=<cookie> http://www.google.com/friendconnect/api/activities/@viewer/@friends/@app?fcauth=<cookie> Also, could some one suggest me where can I get the User Profile URL for the user using the same method as above? Thankx guys

    Read the article

  • How to filter and format email text and forward to customers?

    - by understack
    I get poorly formatted invoice related email from my payment gateway. I wan to automatically format these emails to make them more readbale. Mostly I want to remove few 'fixed' lines which are always present in email body. Do I need to run some sort of PHP process to do it? Is it possible to do it on email server itself? EDIT I have got cpanel access.

    Read the article

  • Web services that implement the same interface

    - by zachary
    My friend build a web service in java I build one in .net I want them to implement the same interface then in my program change the web.config to point to one or the other. In my mind this would be done by implementing the same interface. Not sure how it would actually be done...

    Read the article

  • How do I bind one TabControl to the TabItems of another TabControl in WPF?

    - by joebeazelman
    I've defined the following TabControl called TabControl1: <TabControl> <TabItem Header="Cheese"> The Cheese Tab </TabItem> <TabItem Header="Pepperoni"> The Pepperoni Tab </TabItem> <TabItem Header="Mushrooms"> The Mushrooms Tab </TabItem> </TabControl> I've defined another TabControl, TabControl2 which is dynamically loaded from an add-in or plugin: <TabControl> <TabItem Header="Anchovies"> The AnchoviesTab </TabItem> <TabItem Header="Jalepenos"> The Jalepenos Tab </TabItem> <TabItem Header="Rattle Snake"> The Rattle Snake Tab </TabItem> </TabControl> After TabControl1 binds to TabControl2 after the "Cheese" item, TabControl1 should look like this: <TabControl> <TabItem Header="Cheese"> The Cheese Tab </TabItem> <TabItem Header="Anchovies"> The AnchoviesTab </TabItem> <TabItem Header="Jalepenos"> The Jalepenos Tab </TabItem> <TabItem Header="Rattle Snake"> The Rattle Snake Tab </TabItem> <TabItem Header="Pepperoni"> The Pepperoni Tab </TabItem> <TabItem Header="Mushrooms"> The Mushrooms Tab </TabItem> </TabControl>

    Read the article

  • Enabling the log app on the WDTV

    - by Ariel Popovsky
    Just flashed the last WDXLTV firmware on my WDTV and it's working fine. I tried to config a Wifi USB adapter but couldn't get it to work. Dropped the log-saver.app.bin on the root of the stick but didn't find any log files after booting. What I'm doing is turning on the WDTV with the stick inserted (the stick is formatted with FAT32). Tried with the wireless-mod.app.bin required files and without any other file than the log saver. I can't get a log file anyway. All I want right now is to get the log file so I can debug the WI FI adapter.

    Read the article

  • Getting bizarre "expected primary-expression" error.

    - by Fecal Brunch
    Hi, I'm getting a really strange error when making a method call: /* input.cpp */ #include <ncurses/ncurses.h> #include "input.h" #include "command.h" Input::Input () { raw (); noecho (); } Command Input::next () { char input = getch (); Command nextCommand; switch (input) { case 'h': nextCommand.setAction (ACTION_MOVELEFT); break; case 'j': nextCommand.setAction (ACTION_MOVEDOWN); break; case 'k': nextCommand.setAction (ACTION_MOVEUP); break; case 'l': nextCommand.setAction (ACTION_MOVERIGHT); break; case 'y': nextCommand.setAction (ACTION_MOVEUPLEFT); break; case 'u': nextCommand.setAction (ACTION_MOVEUPRIGHT); break; case 'n': nextCommand.setAction (ACTION_MOVEDOWNLEFT); break; case 'm': nextCommand.setAction (ACTION_MOVEDOWNRIGHT); break; case '.': nextCommand.setAction (ACTION_WAIT); break; } return nextCommand; } and the error: Administrator@RHYS ~/code/rogue2 $ make g++ -c -Wall -pedantic -g3 -O0 input.cpp input.cpp: In member function `Command Input::next()': input.cpp:21: error: expected primary-expression before '=' token input.cpp:24: error: expected primary-expression before '=' token input.cpp:27: error: expected primary-expression before '=' token input.cpp:30: error: expected primary-expression before '=' token input.cpp:33: error: expected primary-expression before '=' token input.cpp:36: error: expected primary-expression before '=' token input.cpp:39: error: expected primary-expression before '=' token input.cpp:42: error: expected primary-expression before '=' token input.cpp:45: error: expected primary-expression before '=' token make: *** [input.o] Error 1 Sorry about the lack of linenumbers, the errors occur on the lines "nextCommand.setAction(...)", which is totally bizarre considering that they don't contain a '='. Any ideas? Thanks, Rhys

    Read the article

  • How do I ignore a directory in mod_rewrite?

    - by eddowding
    I'm trying to have the modrewrite rules skip the directory vip. I've tried a number of things as you can see below, but to no avail. # BEGIN WordPress <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / #RewriteRule ^vip$ - [PT] RewriteRule ^vip/.$ - [PT] #RewriteCond %{REQUEST_URI} !/vip RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] </IfModule> # END WordPress How do I get modrewrite to entirely ignore the /vip/ directory so that all requests pass directly to the folder?

    Read the article

  • How to make a Non Rectangular Winforms ?

    - by karthik
    I am using the below code to change to shape of the winform. Its changing the shape, but not like how i wanted. I need the forms to have curved corners. What points should i use to get it ? public void MakeNonRectangularForm() { System.Drawing.Drawing2D.GraphicsPath p = new System.Drawing.Drawing2D.GraphicsPath(); int width = this.ClientSize.Width; int height = this.ClientSize.Height; p.AddClosedCurve(new Point[]{new Point(width/2, height/2), new Point(width,0), new Point(width, height/3), new Point(width-width/3, height), new Point(width/7, height-height/8)}); this.Region = new Region(p); }

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >