Home » Programming Languages » Page 1
Can profiling be used to verify if optimization was successful?
25/12/2015 9:47 am by ZsA in Programming Languages

I know that profiling is useful to identify bottlenecks and determining what parts of the code require how much time to execute. The latter isn't always very easy to track in the midst of other paths being executed, so once I decide what I want to optimize it might be problematic to see the improvement in numbers. This is especially true in desktop apps which run constantly and it is difficult

JEE MVC, controller calls the interface instead of the interface implementation
25/12/2015 9:47 am by cengel4 in Programming Languages

I'm following this tutorial: http://wiki4.caucho.com/Building_a_simple_listing_in_JSP It creates a basic web application in Eclipse using the MVC pattern with Resin as the web container. Here's the part I don't understand.

For the model, it creates a POJO, Interface and Interface Implementation. The

Webdesign MVC - going in the right direction?
25/12/2015 9:47 am by socurious in Programming Languages

I am trying to learn webdesign using the MVC design pattern. Right now, I am stuck at a point where my code gets more complex, and I am unsure about the structure and where to put which code parts.

I started with an index.php file as my controller, which right now does not much more than loading the Slim framework to render the different views

$app->get('/', function(

Dependency Inversion Principle and Hollywood analogy
25/12/2015 9:47 am by DexNFx in Programming Languages

Often DIP is known as the Hollywood principle: "Don't call us, we'll call you.".

But doesn't always higher level module calls lower level module, whether there is dependency inversion or not?

Then why is DIP called the Hollywood principle?

Am I missing something? Thanks!

Should I be using XML to store configuration values in a database?
25/12/2015 9:47 am by Theo in Programming Languages

There are a couple of answers on SE comparing single-row table vs. name-value-pair table used for config settings, but I haven't seen anyone arguing for using XML (or JSON) as a name-value pair model.

Option A

UserID     AppID     ParamID    Value
1          1         10         5.40
1          1         11         John Smith
2          1         10         4.40

When should you use JNI with native code and when should you just let the JIT handle things?
25/12/2015 9:47 am by christiandsg in Programming Languages

If I'm starting a new JVM project and need a particular section of code to be really fast, should I write it in a naively compiled language or just let the JIT handle things?

What is even the point of the JNI if the When should with native code when

Does this seem like a good rough design for a minecraft server wrapper program?
25/12/2015 9:47 am by Wilson Mar in Programming Languages

I am doing some research on how to write a Minecraft server wrapper program. Right now I run a minecraft server with the minecraft_server.jar file from Minecraft.net. When I want to execute complex commands I usually draft them in a text editor and copy and paste them into my Mac's terminal where the server is running. This more tedious than I would like it to be, so I have decided to see if it

How to find the kth minimum element in an array [on hold]
25/12/2015 9:47 am by silvervino in Programming Languages

I am looking for an efficient algorithm to find the k'th minimum element in an unsorted array of n elements, where 1 <= k <= n. The obvious thing is to sort the array first, then pick the k'th element, which will result in a running time of O(n * log(n)) But I guess it can be done in a more efficient way, since sorting the array seems to do "too much". For examp

DAO design for writing big XML file on database [on hold]
25/12/2015 9:47 am by Kapishin in Programming Languages

I am currently working on JavaEE application (Spring, Hibernate). I have to put a big XML file (more than 1 gigabyte) on a relational database (Postgres).

The application does not use batch processing. I've done some searching but I did not find any solution for the design of the DAO layer: if I use only one transaction, the server will not response to any request until it finishes the

Find out the user has access to this area - role [on hold]
25/12/2015 9:47 am by DOOR3 James in Programming Languages

I am in the process of building such that the user access to the different kinds of areas.

I must have sure me that, for example Admin part is for shared Admin.

It is for sure me that I can determine which users have access to the different area!

Helper.cs (Class)

public static class CheckList
    public static bool YouHaveAccessHere(in

Scala, checking for type and then cast to it
25/12/2015 9:47 am by patheems in Programming Languages

I have sometimes the usecase that I need to check if a variable is of a specific type and if so cast to it to access a property/function of it.


    if (state.isInstanceOf[StateA] &&

How can this be improved ? I could use match/case but is there a better option (shorter) ?

Basic Logical Operator Use [on hold]
25/12/2015 9:47 am by Jake Levitt in Programming Languages

I am trying to program a very simple program that will tests if the input string is one or two and then does the action. However, I can't seem to get it working. Can someone help me?

    String input;
    input = Input.getString("Hi.");

    if ( (input == "one") | (input == "two") )

Domain driven design - Entity is updateable in certain circumstances
25/12/2015 9:47 am by TheMoo in Programming Languages

Here is my business rule:

Anyone (anonymous users) can make an Application (as in to apply for something). Applications can be updated until they are reviewed and approved by an officer. Approved applications cannot be updated.

Therefore I created an abstract class

abstract class Application {
    //various fields of applicat

parsing in vb6 of one online sportsbook [on hold]
25/12/2015 9:47 am by Pseudoics in Programming Languages

from the outset i am not a programmer , i am an owner of several vb6 programs , i need parsing of the online sportsbbok , betdaq.com to scrape data for the english soccer, EPL & championsip , and the italian serie A & B for the wager type , match odds. i have 4 documents regarding this work if i could send an attachment , does anyone know of a program that will do this work , thanks d

Should I be using both AngularJS and ASP.NET MVC?
25/12/2015 9:47 am by changke in Programming Languages

I started learning AngularJS and ASP.NET MVC, but am not sure why to use them both together in the same project?

Aren't they both MVC frameworks? Should I be using them both in the same application? Isn't it one or the other?

Spring MVC hashmap model
25/12/2015 9:47 am by jrf in Programming Languages

I'm working on an existing project and they are using SPRING framework. Just want to ask if it's a good design to have lot of Hashmaps as MODEL in your CONTROLLER rather than utilizing pojos and beans ?

VIM or Emacs on top of IDE, with plugins? [on hold]
25/12/2015 9:47 am by Ir0nh1de in Programming Languages

I want to use VIM or Emacs on top of IDE with plugins like IdeaVIM (IntelliJ) or Vrapper (for Eclipse). I want to prioritize by following,

  1. Support with most functionality in IDE's
  2. Effective use under IDE.
  3. More natural fit, should retain most of IDE functionality.

Considering above, which one among VIM and Emacs suits better ?

Order of tree and order of leaf node
25/12/2015 9:47 am by vvv in Programming Languages

I was reading the book Fundamentals Of Database Systems by Navathe. The book mentions the order of internal nodes and order of the leaf node separately.

In other sources I found the order of tree to be only given.

In those cases can I assume that order of leaf node is same as the order of the tree?

Single Source Shortest Path
25/12/2015 9:47 am by gorcorps in Programming Languages

In the lecture we are taught that we can solve All Pairs Shortest Path(APSP) with matrix multiplication.

In APSP we are creating a distance table for all the distances between each nodes in the graph. And now the question is "Is it possible to solve Single Source Shortest Path(SSSP) problem with matrix multiplication? I

Privacy Policy - Copyrights Notice - Feedback - Report Violation - RSS 2014 © bighow.org All Rights Reserved .