Search Results

Search found 4641 results on 186 pages for 'john paku'.

Page 122/186 | < Previous Page | 118 119 120 121 122 123 124 125 126 127 128 129  | Next Page >

  • Converting c++ string to int

    - by skazhy
    Hi! I have the following data in a c++ string John Doe 01.01.1970 I need to extract the date and time from it into int variables. I tried it like this: int last_space = text_string.find_last_of(' '); int day = int(text_string.substr(last_space + 1, 2)); But I got invalid cast from type ‘std::basic_string’ to type ‘int’. When I extract the "John Doe" part in another string variable, all works fine. What's wrong? I am trying to compile it with g++ -Wall -Werror.

    Read the article

  • Method-Object pairs in Java

    - by John Manak
    I'd like to create a list of method-object pairs. Each method is a function returning a boolean. Then: foreach(pair) { if method evaluates to true { do something with the object } } One way of modelling this that I can think of is to have a class Constraint with a method isValid() and for each constraint produce an anonymous class (overriding the isValid() method). I feel like there could be a nicer way. Can you think of any?

    Read the article

  • HTML / Conditional Comments - Do conditional comments behave as expected across browsers?

    - by John Himmelman
    Do conditional comments behave as expected across browsers? Can they cause rendering bugs or other issues? Are there any errors in the formatting/syntax of this CC? <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="718" height="227" id="swf"> <param name="movie" value="images/swf.swf" /> <!--[if !IE]>--> <object type="application/x-shockwave-flash" data="images/swf.swf" width="718" height="227"> <!--<![endif]--> <img src="images/alt.jpg" border="0" width="718" height="227"> <!--[if !IE]>--> </object> <!--<![endif]--> </object>

    Read the article

  • Which PHP calendar will suit my needs? Or build my own?

    - by John
    There are so many web based calendars out there that I'm not sure which will best suit my purposes. I want to create an events calendar, which I suppose looks and functions in much the same way as google calendar. But users shouldn't need to sign up for a gmail account or a google account. Users of my social network website should be able to create events in the calendar and share it with other friends in their "friend network". In month, year or day views, you can mouse hover events to see a bubble dialog that lists events in detail. People need to pay a monthly fee to use my website (not sure if this prevents me from using google apps). So is something like Google Calendar the way to go? Or are there other php/javascript calendars out there that already meet my needs? Or will it just save me more time to build my own?

    Read the article

  • How to test if an array contains a pair of numbers whose product is odd?

    - by John
    How can I write a function that takes an array of integers and returns true if their exists a pair of numbers whose product is odd? What are the properties of odd integers? And of course, how do you write this function in Java? Also, maybe a short explanation of how you went about formulating an algorithm for the actual implementation. Yes, this is a function out of a textbook. No, this is not homework—I'm just trying to learn, so please no "do your own homework comments."

    Read the article

  • Have an external java application by notified of changes to Entity EJBs in JBoss AS

    - by John
    I'm trying to connect an external application to a JBoss AS container. The external application is a Java application that is currently being notified of changes to database entities through a JMS topic. I've added an EntityLifecycleListener class to all my entities that publishes a serialized (and unwrapped) copy of the entity to the JMS topic. The problem is that this implementation ignores the transaction boundaries of the JBoss container. For example, the @PostUpdate event can be fire, generating the JMS message for that entity, but the transaction could be rolled back causing the external application to be notified of an invalid change and become unsync'd. I need my external application to only be notified of successful commits to the database, but I need to be able to publish the entire java POJO to the external application. Is there an official way of doing this?

    Read the article

  • Javascript split with RegEx

    - by Rohan
    Hey again, I just asked a question about Regex, and received a great answer: http://stackoverflow.com/questions/3047201/javascript-split-without-losing-character Now, I have another question. My current Regex looks like this: var split = text.split(/(?=\w*\d*\d:\d\d)/); Basically, I'm trying to split using the timestamps (eg - 9:30 or 10:30, the difference between them is the extra digit in the latter). How do I go about this? Currently, if I have these two: 9:30 pm The user did action A. 10:30 pm Welcome, user John Doe. The splits are : 9:30 pm The user did action A. ---- 1 ---- 0:30 pm Welcome, user John Doe. How do I add an optional check for the first character in the timestamp? Thanks!

    Read the article

  • XHTML 1.0 DocType ignored in all browsers?

    - by John
    I was testing this, since I understood using XHTML let me use any valid XML for empty <div> elements: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html;charset=utf-8"> <title>Test</title> </head> <body> <div style="border:solid 10px black; width:100px; height:100px"></div> <div style="border:solid 10px red; width:100px; height:100px"></div> <div style="border:solid 10px blue; width:100px; height:100px"></div> <div style="border:solid 10px black; width:100px; height:100px" /> <div style="border:solid 10px red; width:100px; height:100px" /> <div style="border:solid 10px blue; width:100px; height:100px" /> </body> </html> It doesn't work in any browser I try... this is how FireBug tells me it understands the document: <html> <head> <meta content="text/html;charset=utf-8" http-equiv="Content-Type"/> <title>Test</title> </head> <body> <div style="border: 10px solid black; width: 100px; height: 100px;"/> <div style="border: 10px solid red; width: 100px; height: 100px;"/> <div style="border: 10px solid blue; width: 100px; height: 100px;"/> <div style="border: 10px solid black; width: 100px; height: 100px;"> <div style="border: 10px solid red; width: 100px; height: 100px;"> <div style="border: 10px solid blue; width: 100px; height: 100px;"/> </div> </div> </body> </html> I'm a bit confused what the point is of using XHTML if I have to do this, I might as well just use HTML? Note, that setting the content type to content="application/xhtml+xml" makes no difference in FF3 at least.

    Read the article

  • Templating Word Documents in C#

    - by NullGeo
    I was wondering if there is a library out there such that it could give me the ability to fill in word templates with custom values. For example: Following could be the content of the Word Document {Address} {PhoneNumber} Hello {Name}, How are you doing? In C# I would like to do something like this to replace all the placeholders in the Word document: using(WordDocument doc = WordDocument.Load("Mail.docx")){ var person = new {Name = "John Smith", Address="42 Wallaby Way, Sydney", PhoneNumber="555-555-5555"}; doc.Template(person); doc.Print(); } The resulting document would look like this: 42 Wallaby Way, Sydney 555-555-5555 Hello John Smith, How are you doing? Any libraries out there (preferably free) that let's me do this? Edit: I am not asking you to find anything that let's me do this. If that was the case, I would do a Google search by myself. Honestly, all I am asking is "has anybody used a library in the past to do this exact thing."

    Read the article

  • XPath Query - Select relative top level nodes

    - by John
    I'm trying to iterate over some elements in an XML document that may be nested, but as I iterate over them I may be removing some from the tree. I'm thinking the best way is to do this recursively, so I'm trying to come up with an XPath Query that will select all the top-level nodes relative to the current node. //foo[not(ancestor::foo)] works great at the document level, but I'm trying to figure out how to do this from a relative query. <foo id="1"> <foo id="2" /> <foo id="3"> <foo id="4"> <bar> <foo id="5"> <foo id="6" /> </foo> <foo id="7" /> </bar> </foo> </foo> </foo> If the current node is foo#3, I only want to select foo#4. When the current node is foo#4, I only want to select foo#5 and foo#7. I think I'm trying to select any descendant foo nodes of the current node, but without any ancestor foo nodes between the current node and the node I'm selecting. My conundrum is if we're already inside a foo node, not(ancestor::foo) doesn't help.

    Read the article

  • SQL: count days in date range?

    - by John Isaacks
    I have a query like this: SELECT COUNT(*) AS amount FROM daily_individual_tracking WHERE sales = 'YES' AND daily_individual_tracking_date BETWEEN '2010-01-01' AND '2010-03-31' I am selected from a date range. Is there a way to also get the total days in the date range?

    Read the article

  • Bluetooth support on Android Emulator

    - by John
    Hi everyone! I wanna know if the developer team wich made the emulator have some information to make bluetooth works in the android emulator, indicate some links about it, if they have some date for release or if they'll make it works in the future. Thanks.

    Read the article

  • Can you call compiled JRuby classes from java?

    - by John Baker
    So I came up with the general idea to write some code in JRuby, then access all the classes via Java. I have no idea if this is at all possible but I wanted to ask anyway. Lets say I have some JRuby code: class adder def addme return 22 end end If I compiled this with jrubyc is there any way I could then possibly do something like this in java: import adder; class anything { void testMethod() { adder a = new adder(); int x = a.addme(); } } After looking at it now it sort of makes me think that Java will have zero idea what sort of item test addme is going to return so that might not work. I don't know but I wanted to throw it out there anyway. Thanks

    Read the article

  • Subsonic : Same column name different tables

    - by John Transformer
    Hi, I have a query where I need to do a "Where" clause for two different columns in two different tables but subsonic creates the same parametrized parameter name for both which is causing an issue. How can I fix this? string _RawSql = new Select() .From(Tables.Table1) .InnerJoin(Tables.Table2) .InnerJoin(Table3.SidColumn, Table2.Table3SidColumn) .Where(Table1.SidColumn).IsEqualTo(2) .And(Table3.SidColumn).IsEqualTo(1) .BuildSqlStatement(); The query this is creating is SELECT .... FROM [dbo].[Table1] INNER JOIN [dbo].[Table2] ON [dbo].[Table1].[Table2Sid] = [dbo].[Table2].[Sid] INNER JOIN [dbo].[Table3] ON [dbo].[Table2].[Table3Sid] = [dbo].[Table3].[Sid] WHERE [dbo].[Table1].[Sid] = @Sid AND [dbo].[Table3].[Sid] = @Sid Note that in the last two lines its using @Sid for both Table1 and Table3. How go I do it so it uses @Sid0 and @Sid1? Any help would be appreciated. Thanks

    Read the article

  • Lua-Objective-C bridge on the iphone

    - by John Smith
    I have partially ported the LuaObjCBridge to the iPhone. Most things work but there are still some issues I have to deal with. There are sections where #defines are defined with-respect-to intel or ppc. Is the ARM chip closer to intel or ppc? Here is the most relevant section where most of the defines are: #if defined(__ppc__)||defined(__PPC__)||defined(__powerpc__) #define LUA_OBJC_METHODCALL_INT_IS_SHORTEST_INTEGRAL_TYPE #define LUA_OBJC_METHODCALL_PASS_FLOATS_IN_MARG_HEADER #define LUA_OBJC_POWER_ALIGNMENT #elif defined(__i386__)||defined(__arm__) #warning LuaObjCBridge is not fully tested for use on Intel chips. #define LUA_OBJC_METHODCALL_RETURN_STRUCTS_DIRECTLY // Use this or the code was crashing for me for structs LUA_OBJC_METHODCALL_RETURN_STRUCTS_DIRECTLY_LIMIT #define LUA_OBJC_METHODCALL_USE_OBJC_MSGSENDV_FPRET #define LUA_OBJC_METHODCALL_RETURN_STRUCTS_DIRECTLY_LIMIT 8 #define LUA_OBJC_INTEL_ALIGNMENT #endif For now I added arm with i386, but I could be wrong

    Read the article

  • Firing PropertyChanged event in a complex, nested type in WPF

    - by John
    Hey I have a question about the PropertyChanged vent firing in WPF whne it is used in a complex type. I have a class called DataStore and a list of Departments (an ObservableCollection), and each department again has a list of Products. Properties in the Product class that are changed also affect properties in the Department and DataStore class. How does each Product notify the Department it belongs to, and the DataStore (which is the mother class of all) that one or more of its properties have changed their values? Example: a product has a property NumberSoldToday and is bound. The Department has a property called TotalNumberOfProductsSold: public int TotalNumberOfProductsSold { get { int result = 0; foreach(Product p in this.products) result += p.NumberSoldToday; return result; } } And the data store has a property TotalProductsSold (for all departments): public int TotalProductsSold { get { int result = 0; foreach(Product p in this.deparments) result += p.TotalNumberOfProductsSold; return result; } } If all these properties are bound, and the innermost property changes, it must somehow notify that the value of the other 2 changed as well. How? The only way I can see this happening is to hook up the PropertyChanged event in each class. Th event must also fire when deleting, adding to the collection of products and deparments, respectively. Is there a better, more clever way to do this?

    Read the article

  • R: How to write out a data.frame so that I can paste it into SO for others to read?

    - by John
    I have a large data.frame displaying some weird properties when plotted. I'd like to ask a question about it on Stackoverflow, to do that I'd like to write the data.frame out in a form that I can paste it into SO and somebody else can easily run it and have it back into a data.frame object again. Is there an easy way to accomplish this? Also, if it is really long, should I use paste bin instead of directly paste it here?

    Read the article

  • Flash relationship map

    - by John
    Hi, Does anyone know any Flash fla's which are out there and free which do something similar to http://audiomap.tuneglue.net/ (you have to type in a search term to see it in action). What I'm after is the flash to create the node in the middle which expands out into children and then each of those children can be expanded out into more children, etc. while keeping their distance from one another so as to not overlap. I'd like it so that if you clicked on a node to expand it, it would shoot off to a web site and get an xml feed which could then be used to create the children. Thanks

    Read the article

  • doxygen with IDL/ODL

    - by John
    If you have a C++ project that has a bunch of .ODL files and the generated .h files from the ODL compiler, should doxygen be told to parse both .odl and .h, or only one or the other? In general I don't like documenting generated code but IDL is sort of a special case. In any case, it seems like the member listing of ODL files is not quite working properly in my tests, are ODL files properly parsed?

    Read the article

  • Magento - determine which xml layout file a page is using?

    - by John
    I tried reading the documentation but I still don’t really understand how magento's xml layout files work. In the directory app/design/frontend/default/modern/layout, i see a lot of xml files. How do I determine which xml file any given page on the website is using? For example, if I were on the home page at http://mysite.com, which layout xml file am I using? What if I’m on http://mysite.com/hello-world, which xml file then?

    Read the article

< Previous Page | 118 119 120 121 122 123 124 125 126 127 128 129  | Next Page >