Search Results

Search found 57 results on 3 pages for 'pawel sawicki'.

Page 2/3 | < Previous Page | 1 2 3  | Next Page >

  • Broken console in Maven project using Netbeans

    - by Maciek Sawicki
    Hi, I have strange problem with my Neatens+Maven installation. This is the shortest code to reproduce the problem: public class App { public static void main( String[] args ) { // Create a scanner to read from keyboard Scanner scanner = new Scanner (System.in); Scanner s= new Scanner(System.in); String param= s.next(); System.out.println(param); } } When I'm running it as Maven Project inside Netbeans console seems to be broken. It just ignores my input. It's look like infinitive loop in System.out.println(param);. However this project works fine when it's compiled as "Java Aplication" project. It also works O.K. if I build and run it from cmd. System info: Os: Vista IDE: Netbeans 6.8 Maven: apache-maven-2.2.1 //edit Built program (using mavean from Netbeans) works fine. I just can't test it using Net beans. And I think I forgot to ask the question ;). So of course my first question is: how can I fix this problem? And second is: Is it any workaround for this? For example configuring Netbeans to run external commend line app instead of using built in console.

    Read the article

  • quaring larg text file containing JSON objects.

    - by Maciek Sawicki
    Hi, I have few Gigabytes text file in format: {"user_ip":"x.x.x.x", "action_type":"xxx", "action_data":{"some_key":"some_value"...},...} each entry is one line. First I would like to easily find entries for given ip. This part is easy because I can use grep for example. However even for this I would like to find better solution because I would like to get response as fast as possible. Next part is more complicated because I would like to find entries from selected ip and of selected type and with particular value of some_key in action_data. Probably I would have to convert this file to SQL db (probably SQLite, because it will be desktop APP), but I would ask if there are exists better solutions?

    Read the article

  • querying larg text file containing JSON objects.

    - by Maciek Sawicki
    Hi, I have few Gigabytes text file in format: {"user_ip":"x.x.x.x", "action_type":"xxx", "action_data":{"some_key":"some_value"...},...} each entry is one line. First I would like to easily find entries for given ip. This part is easy because I can use grep for example. However even for this I would like to find better solution because I would like to get response as fast as possible. Next part is more complicated because I would like to find entries from selected ip and of selected type and with particular value of some_key in action_data. Probably I would have to convert this file to SQL db (probably SQLite, because it will be desktop APP), but I would ask if there are exists better solutions?

    Read the article

  • Get IFrame parent url or referrer using javascript or php

    - by Pawel
    I am creating a widget that would load in a IFrame and users will be able to place the widget on their own website. How would I get the URL of the website that is using the IFrame in javascript and/or PHP? The IFrame loads a php file. I have tried "parent.top.location.href" and "parent.document.referrer" in the IFrame page but that is undefined. I have also tried to echo "$_Server[referrer]" in the IFrame page and that did return the IFrame parent URL, but how easy is it for someone to manipulate the referrer variable? I dont want to get misleading information.

    Read the article

  • Git branching / rebasing good practices

    - by Pawel Krupinski
    I have a following scenario: 3 branches: - Master - MyBranch branched off Master for the purpose of developing a new feature of the system - MyBranchLocal branched off MyBranch as my local copy of the branch MyBranch is being rebased against and pushed to by other developers (who are working on the same feature as I am). As the owner of the MyBranch branch I want to keep it in sync with Master by rebasing. I also need to merge the changes I make to MyBranchLocal with MyBranch. What is a good way to do that? Couple of possible scenarios I tried so far: I. 1. Commit change to MyBranchLocal 2. Rebase MyBranch against Master 3. Rebase MyBranchLocal against MyBranch 4. Merge MyBranch with MyBranchLocal II. 1. Commit change to MyBranchLocal 2. Merge MyBranch with MyBranchLocal 3. Rebase MyBranch against Master 4. Rebase MyBranchLocal against MyBranch III. 1. Commit change to MyBranchLocal 2. Rebase MyBranch against Master 3. Merge MyBranch with MyBranchLocal 4. Rebase MyBranchLocal against MyBranch I already know that scenario III seems to be messing the commit history up a lot, potentially duplicating commits. What is your experience? What scenarios do you recommend?

    Read the article

  • QueueConnectionFactory for MQSeries

    - by Pawel
    Does anyone know if there is an implementation of javax.jms.QueueConnectionFactory for MQSeries and where to get it? I Googled it and searched IBM website but couldn't find anything. I don't want to retrieve the connection or factory from Websphere MQ via jndi, I need my own connection factory.

    Read the article

  • Why a very good PHP framework - Qcodo (or Qcubed - its branch) - is so unpopular?

    - by Pawel
    I am wondering why this framework (QCodo) is almost forgotten and totally unpopular. I've started using it a few years ago and it is the only thing that keeps me with PHP. Yeah ... its development is stuck (that's why there is now more active branch Qcubed) but it is still very good piece of software. Its main advantages: Event driven (something like asp.net) no spaghetti code Powerful code generation good ORM follows DRY very simple AJAX support is fun to write Since then I wanted to be trendy and checked Django but I cannot write normal request-based web application (it just doesn't feel right). Don't believe? chess.com is written with it and surely there are plenty others. My 2 questions are: Have you heard of it (PHP people)? If you are using it what is your opinion about it (show us examples of your work) Thanks

    Read the article

  • XML generation with java, trying to copy the whole node

    - by Pawel Mysior
    I've got an xml document that filled with people (parent node is "students", and there are 25+ "student" nodes). Each student looks like this: <student> <name></name> <surname></surname> <grades> <subject name=""> <small_grades></small_grades> <final_grade></final_grade> </subject> <subject name=""> <small_grades></small_grades> <final_grade></final_grade> </subject> </grades> <average></average> </student> Basically, what I want to do ('ve been asked to do) is to make a program that would get 3 students with the best average. While parsing the document and getting three best students isn't too difficult, the XML generation is a pain in the ass. Right now, what I'm doing is getting every single node from student and recreating it to a new file. Is there a way to copy the whole student node with everything that's in it? Regards, Paul

    Read the article

  • How to monitor HTTP(S) traffic / URLs in Android?

    - by Pawel Krakowiak
    I'm interested in whether there is a way to monitor HTTP(S) traffic on an Android phone? What I would like to do is to be able to retrieve all URLs that have been accessed on the phone's browser. I thought that there would be a browser intent for that, but have not seen anything - given I'm green, maybe I just did not know where to look? I followed the question and answer here, but it works only for hyperlinks which were clicked by the user, however I need to catch all URLs - including the ones typed in by the user. Basically I need to know about every single URL that was opened in the web browser. Can I register some kind of a handler with the browser? Is something like that feasible at all?

    Read the article

  • Problem with CruiseControl.net configuration

    - by Pawel
    Hi I started using ccnet to build my project. This is quite new issue for me so I have some problems. First thing: Why does ccnet copy directory with my project to another directory (ccnet creates new folder named the same as project name included in ccnet.config file and copies to them directory with my project) Second thing: Dashboard page cannot show reports for recent build (When I click on any item in recent build then I get page: "The page Cannot be found" I suppose that page cannot link files with logs. but I don't know how to link it. I create one publisher: <publishers> <xmllogger logDir="c:\Branches" /> Can anyone help me?

    Read the article

  • UTF-8 to ISO-8859-1 mapping / lossless conversion libraries in Java

    - by Pawel Krupinski
    I need to perform a conversion of characters from UTF-8 to ISO-8859-1 in Java without losing for example all of the UTF-8 specific punctuation. Ideally would like these to be converted to equivalents in ISO (e.g. there are probably 5 different single quotes in UTF-8 and would like them all converted to ISO single quote character). String.getBytes("ISO-8859-1") just won't do the trick in this case as it will lose the UTF-8-specific chars. Do you know of any ready mappings or libraries in Java that would map UTF-8 specific characters to ISO?

    Read the article

  • Find point which sum of distances to set of other points is minimal

    - by Pawel Markowski
    I have one set (X) of points (not very big let's say 1-20 points) and the second (Y), much larger set of points. I need to choose some point from Y which sum of distances to all points from X is minimal. I came up with an idea that I would treat X as a vertices of a polygon and find centroid of this polygon, and then I will choose a point from Y nearest to the centroid. But I'm not sure whether centroid minimizes sum of its distances to the vertices of polygon, so I'm not sure whether this is a good way? Is there any algorithm for solving this problem? Points are defined by geographical coordinates.

    Read the article

  • Advanced search engine or server for relational database [closed]

    - by Pawel
    In my current project we are storing big volume of data in relational database. One of the recent key requirements is to enrich application by adding some advanced search capabilities. In the Project, performance is one of the important factors due to very large tables (10+ milions of records) with parent-children relations (for example: multi-level parent-child relationship, where I am looking for all parents with specific children). The search engine should also be able to check these references for hits. I have found some potential engines on stack overflow, however it looks like that all of them are dedicated rather for text search than relational db and hosted on linux os: lucene Solr Sphinx As I understand some of them use documents as a source of searching, but is it possible or efficient to create programmaticaly documents based on my relational data? As I am not familiar with all of their features/capabilities can anyone please make some recommendations or propose some different solution? To summarize my requirements: framework/engine to search relational database including decendants. support for Microsoft SQL Server can be used in .NET applications preferably hosted on Windows systems Does any of mentioned above are able to solve my problem? do you know any better solution?

    Read the article

  • How to globalize ASP.NET MVC views (decimal separators in particular)?

    - by Pawel Krakowiak
    I'm working with the NerdDinner sample application and arrived at the section which deals with the Virtual Earth map. The application stores some values for the longitude and latitude. Unfortunately on my system floating point numbers are stored with a comma as the decimal separator, not a dot like in the US. So if I have a latitude of 47.64 it's retrieved and displayed as 47,64. Because that value is passed in a function call to the Virtual Earth API it fails at that point (e.g. JavaScript API expects 47.64, -122.13, but gets 47,64, -122,13). I need to make sure that the application always uses dots. In a WebForms app I would have a common class which overrides the System.Web.UI.Page.InitializeCulture() method and I would be inheriting my pages from that class. I am not sure about how to do the same with MVC. Do I need a customized ViewPage or something? Is there an easy way to solve this? Examples?

    Read the article

  • SEO URL building - simple or hierarchy

    - by Pawel
    I run an online shop and I wonder what would be more SEO-friendly URL for a product page: a) domain.com/category-name/product-name OR b) domain.com/product-name I already have URL-s for product category pages with format domain.com/category-name. On one hand I heard (but cannot find proof for) that Google like tree hierarchies in URL (vote for "a"). On the other hand though longer URL could lead to smaller kewyord density, also "product_name" comes as the last URL part so probably the least important (vote for "b"). Maybe both options are equally SEO-effective? PS. I know about canonical URL's but this is not the case, I don't want/need both URL's formats, just want to choose the best.

    Read the article

  • How to select chosen columns from two different entities into one DTO using NHibernate?

    - by Pawel Krakowiak
    I have two classes (just recreating the problem): public class User { public virtual int Id { get; set; } public virtual string FirstName { get; set; } public virtual string LastName { get; set; } public virtual IList<OrgUnitMembership> OrgUnitMemberships { get; set; } } public class OrgUnitMembership { public virtual int UserId { get; set; } public virtual int OrgUnitId { get; set; } public virtual DateTime JoinDate { get; set; } public virtual DateTime LeaveDate { get; set; } } There's a Fluent NHibernate map for both, of course: public class UserMapping : ClassMap<User> { public UserMapping() { Table("Users"); Id(e => e.Id).GeneratedBy.Identity(); Map(e => e.FirstName); Map(e => e.LastName); HasMany(x => x.OrgUnitMemberships) .KeyColumn(TypeReflector<OrgUnitMembership> .GetPropertyName(p => p.UserId))).ReadOnly().Inverse(); } } public class OrgUnitMembershipMapping : ClassMap<OrgUnitMembership> { public OrgUnitMembershipMapping() { Table("OrgUnitMembership"); CompositeId() .KeyProperty(x=>x.UserId) .KeyProperty(x=>x.OrgUnitId); Map(x => x.JoinDate); Map(x => x.LeaveDate); References(oum => oum.OrgUnit) .Column(TypeReflector<OrgUnitMembership> .GetPropertyName(oum => oum.OrgUnitId)).ReadOnly(); References(oum => oum.User) .Column(TypeReflector<OrgUnitMembership> .GetPropertyName(oum => oum.UserId)).ReadOnly(); } } What I want to do is to retrieve some users based on criteria, but I would like to combine all columns from the Users table with some columns from the OrgUnitMemberships table, analogous to a SQL query: select u.*, m.JoinDate, m.LeaveDate from Users u inner join OrgUnitMemberships m on u.Id = m.UserId where m.OrgUnitId = :ouid I am totally lost, I tried many different options. Using a plain SQL query almost works, but because there are some nullable enums in the User class AliasToBean fails to transform, otherwise wrapping a SQL query would work like this: return Session .CreateSQLQuery(sql) .SetParameter("ouid", orgUnitId) .SetResultTransformer(Transformers.AliasToBean<UserDTO>()) .List<UserDTO>() I tried the code below as a test (a few different variants), but I'm not sure what I'm doing. It works partially, I get instances of UserDTO back, the properties coming from OrgUnitMembership (dates) are filled, but all properties from User are null: User user = null; OrgUnitMembership membership = null; UserDTO dto = null; var users = Session.QueryOver(() => user) .SelectList(list => list .Select(() => user.Id) .Select(() => user.FirstName) .Select(() => user.LastName)) .JoinAlias(u => u.OrgUnitMemberships, () => membership) //.JoinQueryOver<OrgUnitMembership>(u => u.OrgUnitMemberships) .SelectList(list => list .Select(() => membership.JoinDate).WithAlias(() => dto.JoinDate) .Select(() => membership.LeaveDate).WithAlias(() => dto.LeaveDate)) .TransformUsing(Transformers.AliasToBean<UserDTO>()) .List<UserDTO>();

    Read the article

  • Non-Latin characters in URLs - is it better to encode them or replace with their Latin "counterparts

    - by Pawel Krakowiak
    We're implementing a blog for a site which supports six different languages and five of them have non-Latin characters in their alphabets. We are not sure whether we should have them encoded (that is what we're doing at the moment) Létání s potravinami: Co je dovoleno? becomes l%c3%a9t%c3%a1n%c3%ad-s-potravinami-co-je-dovoleno and the browser displays it as létání-s-potravinami-co-je-dovoleno. or if we should replace them with their Latin "counterparts" (similar looking letters) Létání s potravinami: Co je dovoleno? becomes letani-s-potravinami-co-je-dovoleno. I can't find a definitive answer as to what's better from SEO perspective? Search engine optimization is very important for us. Which approach would you suggest?

    Read the article

  • MySQL update query, how to skip empty values?

    - by Pawel
    I've got such query: $sql = "UPDATE test_accs SET acc_owner = '$owner_id', acc_policy_version = '$version', acc_policy_last_update = '$approved', acc_policy_next_update = '$renewed' WHERE acc_id = '1'"; Now, all of these values on the web folmular are optional, one can set one of these values, two, or so. Now, after I submit the form, it goes in the query like that: UPDATE test_accs SET acc_owner = '2', acc_policy_version = '1.2', acc_policy_last_update = '2012-12-19', acc_policy_next_update = '2012-12-18' WHERE acc_id = '1' It works only when I submit all values from the form. Can you please show me how could it work even if not all the values has been sent, just for example one of them? When I set one value (f.ex. policy version), it looks like that: UPDATE test_accs SET acc_owner = '', acc_policy_version = '1.2', acc_policy_last_update = '', acc_policy_next_update = '' WHERE acc_id = '1' and it isn't working. It might be possible cause of the acc_owner table values? #1366 - Incorrect integer value: '' for column 'acc_owner' at row 1 Thanks in advice.

    Read the article

  • UpdatePanel update without trigger button

    - by dragonfly
    Hi, I have an UpdatePanel with ContentTemplate specified. When page loads, user can do some AJAX work in other part of the page. Then, after that work is finished, I would like to update only content inside UpdatePanel, but without pressing any buttons etc. I should be done automatically using JavaScript when previously started AJAX work finishes. How to do it without manual clicking on the trigger button? Thanks, Pawel

    Read the article

< Previous Page | 1 2 3  | Next Page >