Search Results

Search found 733 results on 30 pages for 'frank ter v'.

Page 18/30 | < Previous Page | 14 15 16 17 18 19 20 21 22 23 24 25  | Next Page >

  • How to use boost::transform_iterator to iterate over modifed std::map values?

    - by Frank
    I have an std::map, and I would like to define an iterator that returns modified values. Typically, a std::map<int,double>::iterator iterates over std::pair<int,double>, and I would like the same behavior, just the double value is multiplied by a constant. I tried it with boost::transform_iterator, but it doesn't compile: #include <map> #include <boost/iterator/transform_iterator.hpp> #include <boost/functional.hpp> typedef std::map<int,double> Map; Map m; m[100] = 2.24; typedef boost::binder2nd< std::multiplies<double> > Function; typedef boost::transform_iterator<Function, Map::value_type*> MultiplyIter; MultiplyIter begin = boost::make_transform_iterator(m.begin(), Function(std::multiplies<double>(), 4)); // now want to similarly create an end iterator // and then iterate over the modified map The error is: error: conversion from 'boost ::transform_iterator< boost::binder2nd<multiplies<double> >, gen_map<int, double>::iterator , boost::use_default, boost::use_default >' to non-scalar type 'boost::transform_iterator< boost::binder2nd<multiplies<double> >, pair<const int, double> * , boost::use_default, boost::use_default >' requested What is gen_map and do I really need it? I adapted the transform_iterator tutorial code from here to write this code ...

    Read the article

  • Books on OpenGL ES targeted towards the iPhone

    - by Frank V
    There are a few posts on this site about OpenGL and the iPhone. Some even on books but I think you'll find this question is a bit different. I've searched and searched and have come to the conclusion that there are currently no books that specifically cover OpenGL ES on the iPhone platform. There are books that cover OpenGL ES [2.0] (note: the linked book covers OpenGL ES 2.0 but the iPhone uses OpenGL ES 1.1 which, I understand, is not backward compatible)... but they only have a small section for the iPhone (if any). What I want to know, is if anybody knows of any books that are forthcoming that specifically cover OpenGL ES 1.1 on the iPhone?

    Read the article

  • optimizing any OS for maximum informix client/server performance

    - by Frank Developer
    Is there any Informix documentation for optimizing any operating system where an ifx engine is running? For example, in Linux, strip-down to a bare minimum all unnecessary binaries, daemons, utilities, tune kernel parameters, optimize raw and cooked devices (hdparm), place swap space on beginning tracks of a disk, etc. Someday, maybe, Informix can create its own proprietary and dedicated PICK-like O/S to provide the most optimized environment for a standalone ifx server? The general idea is for the OS where ifx sits on have the smallest footprint and lowest overhead impact.

    Read the article

  • Google App Engine update an object from servlet not working ?

    - by Frank
    I use the following code to update an object from servlet in Google App Engine : String Time_Stamp=Get_Date_Format(6),query="select from "+Contact_Info_Entry.class.getName()+" where Contact_Id == '"+Contact_Id+"' order by Contact_Id desc"; PersistenceManager pm=null; try { pm=PMF.get().getPersistenceManager(); // note that this returns a list, there could be multiple, DataStore does not ensure uniqueness for non-primary key fields List<Contact_Info_Entry> results=(List<Contact_Info_Entry>)pm.newQuery(query).execute(); Contact_Info_Entry A_Contact_Entry=results.get(0); A_Contact_Entry.Extra_10=Time_Stamp; pm.makePersistent(A_Contact_Entry); } catch (Exception e) { Send_Email(Email_From,Email_To,"Check_License_Servlet Error [ "+Time_Stamp+" ]",new Text(e.toString()+"\n"+Get_Stack_Trace(e)),null); } finally { pm.close(); } The value "[ 2010-05-13 Thu 15:58:31 ]" was in A_Contact_Entry.Extra_10, but it seems "pm.makePersistent(A_Contact_Entry);" was not executed. The object was not updated and there was no error message, why ? How to fix it ?

    Read the article

  • .NET 3.5 C# does not offer what I need for locking: Count async saves until 0 again.

    - by Frank Michael Kraft
    I have some records, that I want to save to database asynchronously. I organize them into batches, then send them. As time passes, the batches are processed. In the meanwhile the user can work on. There are some critical operations, that I want to lock him out from, while any save batch is still running asynchronously. The save is done using a TableServiceContext and method .BeginSave() - but I think this should be irrelevant. What I want to do is whenever an async save is started, increase a lock count, and when it completes, decrease the lock count so that it will be zero as soon as all have finished. I want to lock out the critical operation as long as the count is not zero. Furthermore I want to qualify the lock - by business object - for example. I did not find a .NET 3.5 c# locking method, that does fulfil this requirement. A semaphore does not contain a method to check, if the count is 0. Otherwise a semaphore with unlimited max count would do.

    Read the article

  • Best way to gather, then import data into drupal?

    - by Frank
    I am building my first database driven website with Drupal and I have a few questions. I am currently populating a google docs excel spreadsheet with all of the data I want to eventually be able to query from the website (after it's imported). Is this the best way to start? If this is not the best way to start what would you recommend? My plan is to populate the spreadsheet then import it as a csv into the mysql db via the CCK Node. I've seen two ways to do this. http://drupal.org/node/133705 (importing data into CCK nodes) http://drupal.org/node/237574 (Inserting data using spreadsheet/csv instead of SQL insert statements) Basically my question(s) is what is the best way to gather, then import data into drupal? Thanks in advance for any help, suggestions.

    Read the article

  • Override Locale Date with custom setings.

    - by Frank Developer
    Aside from the GL Support, is there a way to override locale settings with custom values for month and day when using mmm-dd-yyyy, modified spanish examples: Jan = ENE, Aug = AGO, or long dates (mmmm) January = ENERO, August = AGOSTO, or (dddd) Monday = LUNES, Thursday = JUEVES, etc.?

    Read the article

  • Asp.net error object not set to a reference

    - by Frank
    Hi all, Because I rush in development (a lot of whip cracking here) and declare my objects at the top of the function and instantiate inside my try-catch block, I get a lot of the good old "object not set to an instance of an object" errors while doing TDD, and later if I do miss a branch that object was used in (doing VB now, would prefer C#) or just in every day coding, object not set to an instance of an object is a bit vague. Sure the stack trace sends me to the line the error occured at, but it would be nice if I could modify my logging to either name the object or its type because sometimes I have multiple objects on the same line. It's not the end of the world, but in the end it would save me a few minutes each day. Any ideas on how I can pass the info on which object wasn't set? Thanks

    Read the article

  • MessageListener didnt receive full message ASMACK Android

    - by Frank Junior
    i got problem when want to receive message, right now i am able to receive message, but some attribut is missing class MyMessageListener implements MessageListener { @Override public void processMessage(Chat chat, Message message) { Util.DebugLog("message->"+message.toXmlns()); } } what i got is <message to="[email protected]" type="chat" from="[email protected]/ff3b2485"><body asdf="asdf">aaa</body></message> talk_id and chat type inside message is missing. This is want i want when receive message <message to="[email protected]" type="chat" talk_id="304" chat_type="0" from="[email protected]/ff3b2485"><body asdf="asdf">aaa</body></message>

    Read the article

  • Systematically resolve conflicting styles in css

    - by Frank Michael Kraft
    I have some stylesheets from different sources in my web project. I want to harmonize them. Some styles I need from the one, some from the other. Is there a tool or method how to systematically resolve style conflicts? I tried IE8 developer tool, and yes, it is possible to view conflicts at the level of each element. But I have many elemens, so if I do it element by element I think this takes too long. Theoretically there could be a tool that shows conflicts of two css files at design time?!? I think this would save me a lot of time.

    Read the article

  • slow php command line performance - is this normal or do I have an install problem?

    - by Frank Schwieterman
    I have a simple PHP app that prints 'hello world'. When I run it from the command line it takes 6 seconds. Is this normal? It seems to take 1 seconds before "hello world" prints, then 5 seconds after. I assume this is overhead of the interpreter. I am running PHP version 5.2.12 on Windows Server 2008 R2. Could this be an install issue, or is it typical? I did a manual install of PHP then added whatever components were needed to run Drupal. The only PHP addon I remember adding was MDB2, CGI support is there too. I am used to a Lua project I run from the command line, hundreds of lines of code that will run in under a second. I have some unit tests I run from the command line, and already with just a few they are very slow. I run them from Netbeans and the tests are still very slow.

    Read the article

  • How do I change the locale that Jasper uses?

    - by Frank Fiuza
    The windows installed on my machine has the locale en_AU and that's what Japer uses. I already tried changing the locale of all users, including the Administrator but it still uses en_AU. How can I change that locale? Is it possible to change the REPORT_LOCALE parameter on my report?

    Read the article

  • .NET C# setting the value of a field defined by a lambda selector

    - by Frank Michael Kraft
    I have a generic class HierarchicalBusinessObject. In the constructor of the class I pass a lambda expression that defines a selector to a field of TModel. protected HierarchicalBusinessObject (Expression<Func<TModel,string>> parentSelector) A call would look like this, for example: public class WorkitemBusinessObject : HierarchicalBusinessObject<Workitem,WorkitemDataContext> { public WorkitemBusinessObject() : base(w => w.SuperWorkitem, w => w.TopLevel == true) { } } I am able to use the selector for read within the class. For example: sourceList.Select(_parentSelector.Compile()).Where(... Now I am asking myself how I could use the selector to set a value to the field. Something like selector.Body() .... Field...

    Read the article

  • Help Forming An SQL Query That Selects The Max Difference Of Two Fields

    - by Frank
    I'm trying to select a record with the most effective votes. Each record has an id, the number of upvotes (int) and the number of downvotes (int) in a MySQL database. I know basic update, select, insert queries but I'm unsure of how to form a query that looks something like: SELECT * FROM topics WHERE MAX(topic.upvotes - topic.downvotes). Please excuse my made up SQL. The tutorials on SQL I find on the internet cover very basic stuff. Does anyone recommend a good book on this subject?

    Read the article

  • customer.name joining transactions.name vs. customer.id [serial] joining transactions.id [integer]

    - by Frank Computer
    INFORMIX-SQL 7.32 Pawnshop Application: one-to-many relationship where each customer (master) can have many transactions (detail). customer( id serial, pk_name char(30), {PATERNAL-NAME MATERNAL-NAME, FIRST-NAME MIDDLE-NAME} [...] ); unique index on id; unique cluster index on name; transaction( fk_name char(30), ticket_number serial, [...] ); dups cluster index on fk_name; unique index on ticket_number; Several people have told me this is not the correct way to join master to detail. They said I should always join customer.id[serial] to transactions.id[integer]. When a customer pawns merchandise, clerk queries the master using wildcards on name. The query usually returns several customers, clerk scrolls until locating the right name, enters a 'D' to change to detail transactions table, all transactions are automatically queried, then clerk enters an 'A' to add a new transaction. The problem with using customer.id joining transaction.id is that although the customer table is maintained in sorted name order, clustering the transaction table by fk_id groups the transactions by fk_id, but they are not in the same order as the customer name, so when clerk is scrolling through customer names in the master, the system has to jump allover the place to locate the clustered transactions belonging to each customer. As each new customer is added, the next id is assigned to that customer, but new customers dont show up in alphabetical order. I experimented using id joins and confirmed the decrease in performance. How can I use id joins instead of name joins and still preserve the clustered transaction order by name if transactions has no name column?

    Read the article

  • why does cx_oracle execute() not like my string now?

    - by Frank Stallone
    I've downloaded cx_oracle some time ago and wrote a script to convert data to XML. I've had to reisntall my OS and grabbed the latest version of cx_Oracle (5.0.3) and all of the sudden my code is broken. The first thing was that cx_Oracle.connect wanted unicode rather string for the username and password, that was very easy to fix. But now it keeps failing on the cursor.execute and tells me my string is not a string even when type() tells me it is a string. Here is a test script I initally used ages ago and worked fine on my old version but does not work on cx_Oracle now. import cx_Oracle ip = 'url.to.oracle' port = 1521 SID = 'mysid' dsn_tns = cx_Oracle.makedsn(ip, port, SID) connection = cx_Oracle.connect(u'name', u'pass', dsn_tns) cursor = connection.cursor() cursor.arraysize = 50 sql = "select isbn, title_code from core_isbn where rownum<=20" print type(sql) cursor.execute(sql) for isbn, title_code in cursor.fetchall(): print "Values from DB:", isbn, title_code cursor.close() connection.close() When I run that I get: Traceback (most recent call last): File "C:\NetBeansProjects\Python\src\db_temp.py", line 48, in cursor.execute(sql) TypeError: expecting None or a string Does anyone know what I may be doing wrong?

    Read the article

  • environment configuration for tests running in NUnit

    - by Frank Schwieterman
    I have some integration tests that hit a webserver and verify certain functionalities. Depending on the build environment, the server will be at a different address (http://localhost:8080/, http://test-vm/, etc). I would like to run these tests from a TFS build. I'm wondering whats the appropriate way to configure these tests? Would I just add a setting to the config file? I'm doing that currently. Incidentally we do have a separate branch per test environment, so I could have a different config file checked in for each environment. I wonder if there is a better way though? I'd like the build project to be able to tell the test what server to test. This seems better because then I don't have to maintain config information on a per branch basis. I believe I'd be using NUnit for Team Build (http://nunit4teambuild.codeplex.com/) to get NUnit/TFS to play together.

    Read the article

  • After Port Forwarding, how to get my external IP in Java ?

    - by Frank
    I set up a static IP and did port forwarding on my notebook, and now I have a static IP address, but it's relatively static, every time I re-start the machine, I get another address, and since I have a "static" IP I can now do Paypal IPN messaging. But how can I get this static IP from my Java program ? One way I can think of is to visit : http://portforward.com/ and on that page it tells me what my external IP is, so I can extract it with Java code, is there any other way that I can do in my Java code to get this info ?

    Read the article

  • Anyone have experience developing with ESQL/C for INFORMIX-SQL?

    - by Frank Developer
    Does anyone have experience developing with ESQL/C for INFORMIX-SQL, as in calling C funcs within "Perform" screen generator and "ACE" report writer? I have ISQL without ESQL/C. I experimented compiling a perform screen, where in the instructions section I put "ON BEGINNING CALL userfunc() END" and although I don't have ESQL/C, the Perform screen successfully compiled without errors!.. Apparently, the compiler didn't reject the C call even though there's no ESQL/C or C program linked.

    Read the article

  • Google App Engine PersistenceManager can process multiple objects ?

    - by Frank
    I have some code like this : PersistenceManager pm=PMF.get().getPersistenceManager(); String query="select from "+PayPal_Message.class.getName()+" where processed == false order by time desc"; List<PayPal_Message> messages=(List<PayPal_Message>)pm.newQuery(query).execute(); if (messages.isEmpty()) { } else { for (PayPal_Message g : messages) { Contact_Info_Entry A_Contact_Entry=Process_PayPal_Message_To_Get_A_License(g.getContent().getValue()); pm=PMF.get().getPersistenceManager(); try { pm.makePersistent(A_Contact_Entry); g.setProcessed(true); pm.makePersistent(g); } catch (Exception e) { Send_Email(Email_From,"[email protected]","Servlet Error Message [ "+time+" ]",new Text(e.toString())); } // finally { pm.close(); } } } pm.close(); I wonder if it's ok to use the pm above to process multiple objects before closing it. Or do I have to get and close pm for processing each object ?

    Read the article

  • Google App Engine JDO error could be caused by Serializable object ?

    - by Frank
    I got the following error mesage : java.lang.UnsupportedOperationException org.datanucleus.store.appengine.EntityUtils.getPropertyName(EntityUtils.java:62) org.datanucleus.store.appengine.DatastoreFieldManager.storeObjectField(DatastoreFieldManager.java:839) org.datanucleus.state.AbstractStateManager.providedObjectField(AbstractStateManager.java:1037) PayPal_Monitor.Contact_Info_Entry.jdoProvideField(Contact_Info_Entry.java) PayPal_Monitor.Contact_Info_Entry.jdoProvideFields(Contact_Info_Entry.java) org.datanucleus.state.JDOStateManagerImpl.provideFields(JDOStateManagerImpl.java:2715) Could it be caused by my Contact_Info_Entry.java ? It looks like this : @PersistenceCapable(identityType=IdentityType.APPLICATION) public class Contact_Info_Entry implements Serializable { @PrimaryKey @Persistent(valueStrategy=IdGeneratorStrategy.IDENTITY) Long Id; public static final long serialVersionUID=26362862L; @Persistent String Contact_Id=""; ... }

    Read the article

  • I want to use VI-like commands in Web Browser?

    - by Frank
    I love VI and I'm looking for a plugin of some sort that would allow me to input text in my browser (preferably Firefox or Chrome) using VI commands. It would save me an immense amount of time and at the same time when writing long emails. Can anyone think of any plugins that would allow me to do this? I was hopeful with Vimperator (https://addons.mozilla.org/en-US/firefox/addon/4891) but after installing it, I realized that it didn't do the one VI think I wanted to do: create or edit a text box with VI commands. It just allowed me to do Browser commands and scrolling in VI-style.

    Read the article

  • Robust DateTime parser library for .NET

    - by Frank Krueger
    Hello, I am writing an RSS and Mail reader app in C# (technically MonoTouch). I have run into the issue of parsing DateTimes. I see a lot of variance in how dates are presented in the wild and have begun writing a function like this: public static DateTime ParseTime(string timeStr) { var formats = new string[] { "ddd, d MMM yyyy H:mm:ss \"GMT+00:00\"", "d MMM yyyy H:mm:ss \"EST\"", "yyyy-MM-dd\"T\"HH:mm:ss\"Z\"", "ddd MMM d HH:mm:ss \"+0000\" yyyy", }; try { return DateTime.Parse(timeStr); } catch (Exception) { } foreach (var f in formats) { try { var t = DateTime.ParseExact(timeStr, f, CultureInfo.InvariantCulture); return t; } catch (Exception) { } } return DateTime.MinValue; } This, well, makes me sick. Three points. (1) It's silly of me to think that I can actually collect a format list that will cover everything out there. (2) It's wrong! Notice that I'm treating an EST date time as UTC (since .NET seems oblivious to time zones). (3) I don't like using exceptions for logic. I am looking for an existing library (source only please) that is known to handle a bunch of these formats. Also, I would like to keep using UTC DateTimes throughout my code so whatever library is suggested should be able to produce DateTimes. Is there anything out there like this?

    Read the article

< Previous Page | 14 15 16 17 18 19 20 21 22 23 24 25  | Next Page >