Search Results

Search found 229 results on 10 pages for 'klaus johan'.

Page 8/10 | < Previous Page | 4 5 6 7 8 9 10  | Next Page >

  • JAVA: XML parsers gives null element

    - by Johan
    When I try to parse a XML-file, it gives sometimes a null element by the title. I think it has to do with HTML-tags &#039; How can I solve this problem? I have the follow XML-file: <item> <title>&#039; Nieuwe DVD &#039;</title> <description>tekst, tekst tekst</description> <link>dvd.html</link> <category>nieuws</category> <pubDate>Sat, 1 Jan 2011 9:24:00 +0000</pubDate> </item> And the follow code to parse the xml-file: //DocumentBuilderFactory, DocumentBuilder are used for //xml parsing DocumentBuilderFactory dbf = DocumentBuilderFactory .newInstance(); DocumentBuilder db = dbf.newDocumentBuilder(); //using db (Document Builder) parse xml data and assign //it to Element Document document = db.parse(is); Element element = document.getDocumentElement(); //take rss nodes to NodeList element.normalize(); NodeList nodeList = element.getElementsByTagName("item"); if (nodeList.getLength() > 0) { for (int i = 0; i < nodeList.getLength(); i++) { //take each entry (corresponds to <item></item> tags in //xml data Element entry = (Element) nodeList.item(i); entry.normalize(); Element _titleE = (Element) entry.getElementsByTagName( "title").item(0); Element _categoryE = (Element) entry .getElementsByTagName("category").item(0); Element _pubDateE = (Element) entry .getElementsByTagName("pubDate").item(0); Element _linkE = (Element) entry.getElementsByTagName( "link").item(0); String _title = _titleE.getFirstChild().getNodeValue(); String _category = _categoryE.getFirstChild().getNodeValue(); Date _pubDate = new Date(_pubDateE.getFirstChild().getNodeValue()); String _link = _linkE.getFirstChild().getNodeValue(); //create RssItemObject and add it to the ArrayList RssItem rssItem = new RssItem(_title, _category, _pubDate, _link); rssItems.add(rssItem); conn.disconnect(); }

    Read the article

  • What should students be taught first when first learning sorting algorithms?

    - by Johan
    If you were a programming teacher and you had to choose one sorting algorithm to teach your students which one would it be? I am asking for only one because I just want to introduce the concept of sorting. Should it be the bubble sort or the selection sort? I have noticed that these two are taught most often. Is there another type of sort that will explain sorting in an easier to understand way?

    Read the article

  • How to generate all permutations of a string in PHP ?

    - by Johan
    I need an algorithm that return all possible combination of all characters in one string. I've tried: $langd = strlen($input); for($i = 0;$i < $langd; $i++){ $tempStrang = NULL; $tempStrang .= substr($input, $i, 1); for($j = $i+1, $k=0; $k < $langd; $k++, $j++){ if($j > $langd) $j = 0; $tempStrang .= substr($input, $j, 1); } $myarray[] = $tempStrang; } But that only returns the same amount combination as the length of the string. Say the $input is = "hey", the result would be: hey, hye, eyh, ehy, yhe, yeh.

    Read the article

  • Intercept creation of activities when the application is restored

    - by Johan Bilien
    Most of our activities access a user-specific model. All these activities inherit from a ModelActivity base class, which provides a getModel() call. When one of these activities detect that the user has signed out (through the AccountManager callback), it sticks to its existing model, but prepares to exit back to the root activity (which is not user-specific) by starting its intent with FLAG_ACTIVITY_CLEAR_TOP. If however the user deletes an account while the app is not running, we run into trouble when the activity is restored. Now the activity needs to handle there not being a model, which makes the code more complicated and bug-prone. Ideally we would intercept the application restore process before the activity is created. Then we would check whether we have an account and a model, and if not clear up the saved stack of activities, and restart from our root activity instead of the last saved activity. But as far as I can tell the first place where we can run code is in the onCreate callback of the activity. Is there a way to run some code when the application is restored from background-saving, but before the saved activity is created?

    Read the article

  • Make any posible combination of one string with php

    - by Johan
    I need an algorithm that return all possible combination of all characters in one string. I've tried: $langd = strlen($input); for($i = 0;$i < $langd; $i++){ $tempStrang = NULL; $tempStrang .= substr($input, $i, 1); for($j = $i+1, $k=0; $k < $langd; $k++, $j++){ if($j > $langd) $j = 0; $tempStrang .= substr($input, $j, 1); } $myarray[] = $tempStrang; } But that only returns the same amount combination as the length of the string. Say the $input is = "hey", the result would be: hey, hye, eyh, ehy, yhe, yeh.

    Read the article

  • Best resources to prepare for the "Spring Framework Certification"

    - by Johan Pelgrim
    Hi there I want to do the Spring Framework Certification (2.5), but there aren't many good resources to prepare for the exam. For the Sun certifications there are a lot of books and trainers (Enthuware / Whizlabs) but not for the Spring certification. Has somebody done the 2.5 exam already? What was your first impression? How did you prepare? What resources did you have and which are sufficient. Thanks in advance for your answers!

    Read the article

  • How to efficiently get all instances from deeper level in Cocoa model?

    - by Johan Kool
    In my Cocoa Mac app I have an instance A which contains an unordered set of instances B which in turn has an ordered set of instances C. An instance of C can only be in one instance B and B only in one A.   I would like to have an unordered set of all instances C available on instance A. I could enumerate over all instances B each time, but that seems expensive for something I need to do often. However, I am a bit worried that keeping track of instances C in A could become cumbersome and be the cause of  inconsistencies, for example if an instance C gets removed from B but not from A.  Solution 1 Use a NSMutableSet in A and add or remove C instances whenever I do the same operation in B.  Solution 2 Use a weak referenced NSHashTable in A. When deleting a C from B, it should disappear for A as well.  Solution 3 Use key value observing in A to keep track of changes in B, and update a NSMutableSet in A accordingly.  Solution 4 Simply iterate over all instances B to create the set whenever I need it.   Which way is best? Are there any other approaches that I missed?  NB I don't and won't use CoreData for this app.

    Read the article

  • Did you ever switch from one programming language to another?

    - by Johan Pelgrim
    The stereotypical programmer is very keen on writing software in one particular programming language and is very fanatic about defending their programming language in any way they can, without being realistic about whether their programming language is the best tool for the job. The other kind of programmer can take a step back and switch between languages (or is not very concerned about doing everything in just one language), is a "jack-of-all-trades", and doesn't mind learning a new language as long as it solves their problem in a good fashion. Did you ever switch from one programming language to another? If yes, why? [P.S. Please don't just answer with "I switched from language A to B because company X sucks! I think it will be very useful to understand why people switch between languages, or what's the best tool for a particular kind of job]

    Read the article

  • Add a custom jquery validation method not connected to a field

    - by Johan Wikström
    Normally all validation methods is connected to a field, radiobuttons, dropdowns etc. In my case I would like to do a general custom validation that depends on many fields in my form. I dont want one field of them to become highlighted like a normal "required", i would rather just show a message in the errorcontainer. Is there a simple way to do this I have overlooked?

    Read the article

  • fetching savedInstanceState values, nullpointerexception

    - by Johan
    @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main2); savedInstanceState.putString("foo", "bar"); } @Override public void onRestoreInstanceState(Bundle savedInstanceState) { super.onRestoreInstanceState(savedInstanceState); String myString = savedInstanceState.getString("foo"); Log.i("debug", "saved data: " + myString); } Im trying to preserve some values in an activity, but i recieve the following error: 06-23 23:09:44.038: E/AndroidRuntime(17584): java.lang.RuntimeException: Unable to start activity ComponentInfo{se.johanberntsson.activitytest/se.johanberntsson.activitytest.TestActivity}: java.lang.NullPointerException What did I miss here? Thanks

    Read the article

  • Dynamic Grouping and Columns

    - by Tim Dexter
    Some good collaboration between myself and Kan Nishida (Oracle BIP Consulting) over at bipconsulting on a question that came in yesterday to an internal mailing list. Is there a way to allow columns to be place into a template dynamically? This would be similar to the Answers Column selector. A customer has said Crystal can do this and I am trying to see how BI Pub can do the same. Example: Report has Regions as a dimension in a table, they want the user to select a parameter that will insert either Units or Dollars without having to create multiple templates. Now whether Crystal can actually do it or not is another question, can Publisher? Yes we can! Kan took the first stab. His approach, was to allow to swap out columns in a table in the report. Some quick steps: 1. Create a parameter from BIP server UI 2. Declare the parameter in RTF template You can check this post to see how you can declare the parameter from the server. http://bipconsulting.blogspot.com/2010/02/how-to-pass-user-input-values-to-report.html 3. Use the parameter value to condition if a particular column needs to be displayed or not. You can use <?if@column:.....?> syntax for Column level IF condition. The if@column is covered in user documentation. This would allow a developer to create a report with the parameter or multiple parameters to allow the user to pick a column to be included in the report. I took a slightly different tack, with the mention of the column selector in the Answers report I took that to mean that the user wanted to select more of a dimensional column and then have the report recalculate all its totals and subtotals based on that selected column. This is a little bit more involved and involves some smart XSL and XPATH expressions, but still very doable. The user can select a column as a parameter, that is passed to the template rather than the query. The parameter value that is actually passed is the element name that you want to regroup the data by. Inside the template we then reference that parameter value in our for-each-group loop. That's where we need the trixy XSL/XPATH code to get the regrouping to happen. At this juncture, I need to hat tip to Klaus, for his article on dynamic sorting that he wrote back in 2006. I basically took his sorting code and applied it to the for-each loop. You can follow both of Kan's first two steps above i.e. Create a parameter from BIP server UI - this just needs to be based on a 'list' type list of value with name/value pairs e.g. Department/DEPARTMENT_NAME, Job/JOB_TITLE, etc. The user picks the 'friendly' value and the server passes the element name to the template. Declare the parameter in RTF template - been here before lots of times right? <?param@begin:group1;'"DEPARTMENT_NAME"'?> I have used a default value so that I can test the funtionality inside the template builder (notice the single and double quotes.) Next step is to use the template builder to build a re-grouped report layout. It does not matter if its hard coded right now; we will add in the dynamic piece next. Once you have a functioning template that is re-grouping correctly. Open up the for-each-group field and modify it to use the parameter: <?for-each-group:ROW;./*[name(.) = $group1]?> 'group1' is my grouping parameter, declared above. We need the XPATH expression to find the column in the XML structure we want to group that matches the one passed by the parameter. Its essentially looking through the data tree for a match. We can show the actual grouping value in the report output with a similar XPATH expression <?./*[name(.) = $group1]?> In my example, I took things a little further so that I could have a dynamic label for the parameter value. For instance if I am using MANAGER as the parameter I want to show: Manager: Tim Dexter My XML elements are readable e.g. DEPARTMENT_NAME. Its a simple case of replacing the underscore with a space and then 'initcapping' the result: <?xdoxslt:init_cap(translate($group1,'_',' '))?> With this in place, the user can now select a grouping column in the BIP report viewer and the layout will re-group the data and any calculations based on that column. I built a group above report but you could equally build the group left version to truly mimic the Answers column selector. If you are interested you can get an example report, sample data and layout template here. Of course, you can combine Klaus' dynamic sorting, Kan's conditional column approach and this dynamic grouping to build a real kick ass report for users that will keep them happy for hours..

    Read the article

  • Annual SQL Server conference in Poland - SQLDay 2014

    - by Damian
    We had a great 3-days conference this year in Poland. The SQLDay (7th edition) is an annual community conference. We started in 2008 as a part of C2C (community to communities) conference and after that, from 2009 the SQLDay is the independent event dedicated to the SQL Server specialists. This year we had almost 300 people and speakers like Bob Ward, Klaus Aschenbrenner and Alberto Ferrari. Of course there were also many local Polish leaders (MVP's and an MCM :) )If you are curious how we played in Wroclaw this year - just visit the link http://goo.gl/cgNzDl (or try that one https://plus.google.com/photos/100738200012412193487/albums/6010410545898180113?authkey=CITqmqmkrKK8Tw) Visit the conference site: http://conference.plssug.org.pl/ 

    Read the article

  • There are some more places available on the SQLBits training days

    - by simonsabin
    We’ve moved a few things around which has freed up some places on the Performance Monitoring and the Optimising BI Training Days at SQLBits 8. SQL Server Performance Monitoring and Troubleshooting with Klaus Aschenbrenner It's Monday, 10:30am. You are just receiving an email that informs you that your SQL Server has enormous performance problems! What can you do? How can you identify the problem and resolve it fast? Which tools provides you SQL Server for this task? In this workshop you will...(read more)

    Read the article

  • Hot Java Content

    - by Tori Wieldt
    It's August, summertime in the United States, and time for many of us to go on vacation. (You'll have to find my personal account to see more photos of the Monterey Bay Aquarium.) Here's some great Java content that you may have missed while I was gone: Blogs  Project Jigsaw: Late for the train: The Q&A JSR 355 Final Release, and moves JCP to version 2.9Oracle releases JDK for Linux ARM, JRE for Mac OS XArchitects and Architecture at JavaOne 2012Java Champions at JavaOne 2012 Podcasts & Videos Java Spotlight Episode 96: Johan Vos on Glassfish and JavaFXJava Spotlight Episode 94: Kirk Pepperdine on Java Performance TuningJava Spotlight Episode 93: Jonathan Giles on JavaFX 2.2 UI ControlsVideo: JavaFX Canvas Node July/August Java Magazine (free subscription) Developer Power: Web-based Development ToolsFork/Join Framework for Client Java ApplicationsIntro to Web Service SecurityHow to Modify javacOracle's Berkeley DB Java Edition's Java API and more. Java Magazine is available on the App Store and the Android Market. Get all this great Java content while it's as hot as a North American (non-San Franciscian) summer. 

    Read the article

  • Gotcha | Installing .net 4.0 and IIS 6

    - by Steve Clements
    Just a quick one, seems pretty weird to me. I installed .net 4.0 on an old IIS6 box, ready to deploy a asp.net mvc app targeting .net 4.0.  I thought, which to me seems logical, that I install .net 4.0, setup a new web site, new app pool, set the web site to asp.net 4.0 (other configuration also needed to run MVC on IIS6 here and here) and it would just work. Errr… No.  The page cannot be displayed!  Nothing to do with MVC. Apparently just because you have installed .net 4 and the option is available in IIS, it’s not enabled.  I’m not going to repeat anything here…take a look at this post – clear, easy steps on exactly what you need to do and how to check if this is the problem. http://johan.driessen.se/archive/2010/04/13/getting-an-asp.net-4-application-to-work-on-iis6.aspx

    Read the article

  • How To Check If Your Account Passwords Have Been Leaked Online and Protect Yourself From Future Leaks

    - by Chris Hoffman
    Security breaches and password leaks happen constantly on today’s Internet. LinkedIn, Yahoo, Last.fm, eHarmony – the list of compromised websites is long. If you want to know whether your account information was leaked, there are some tools you can use. These leaks often lead to many compromised accounts on other websites. However, you can protect yourself by using unique passwords everywhere – if you do, password leaks won’t be a threat to you. Image Credit: Johan Larsson on Flickr 8 Deadly Commands You Should Never Run on Linux 14 Special Google Searches That Show Instant Answers How To Create a Customized Windows 7 Installation Disc With Integrated Updates

    Read the article

  • JCP activities at Devoxx 2013!

    - by Heather VanCura
    Devoxx 2013 has officially started! Looking forward to catching up with Java community member friends--old and new this week. Tuesday (today) the Hackergarten has returned to Devoxx!  There are Java EE 7 tables and Java SE 8 Lambda tables.  Kudos to Andres Almirey for organizing the event and to Arun Gupta and Stuart Marks for leading the activities -- awesome Adopt-a-JSR participation in action! Wednesday there is a JCP 'quickie' session How to Participate in the Future of Java Quickie at 13:35-13:50.  We will also have a chat with the OTN team afterward!  Wednesday evening at 21:00, join us for our BOF session with Martin Verburg and Johan Vos: JCP & Adopt-a-JSR Workshop BOF. 

    Read the article

  • Get textbox binding in wpf datagridtemplatecolumn

    - by klawusel
    Hi I have a wpf datagrid containing multiple datagridtemplatecolumns, which all are build up from a datatemplate which contains a textbox. Now I want to get the binding of the textbox (I have a reference to the template column which textbox's binding I woukld like to determine). Alternatively it would be nice to return the X:Name of the template column Any hints? Regards klaus

    Read the article

  • Decode HTML entities in android

    - by johboh
    Hi there. I need to decode HTML entities, e.g. from &#246; to ö, and &amp; to &. URLEncoder.decode(str) does not do the job (convert from % notations). TextUtils has a HTMLencode, but not a HTMLdecode. Are there any function for decoding HTML entities? Regards, Johan

    Read the article

  • Capitalization of Person names in programming

    - by Albert
    Hey all, Is anyone aware of some code/rules on how to capitalize the names of people correctly? John Smith Johan van Rensburg Derrick von Gogh Ruby de La Fuente Peter Maclaurin Garry McDonald (these may not be correct, just some sample names and how the capitalization could be/work) This seems like a losing battle... If anyone has some code or rules on when and how to capitalize names, let me know :) Cheers, Albert

    Read the article

  • Save Usercredentials permanently without prompt when opening Document from Webdavserver

    - by cpt.oneeye
    i am opening a word document from a url like https://myurl.com/mydoc.doc. The Webdavserver uses Basic Authentication. At the beginning the Office 2003 is asking for the Username and Password. After i have typed them in I click the checkbox "Save Usercredentials" and the word is opened. When i open the document the next time the login prompt is appearing again (username and passwort are already set in the textfields and I only have to click "Ok"). Is it possible to avoid this one click and make office not show this prompt at all after the first login? Greetings Klaus

    Read the article

< Previous Page | 4 5 6 7 8 9 10  | Next Page >