Is the lower code in your question doing what it's supposed to do? If so, can you provide some usage examples with both input and output? — Simon André Forsberg4 mins ago
@chillworld I'm not sure if he means that it's not clean, or that it's not working properly. I hope there'll be an edit.
I wrote a piece of code in python using QGIS APIs. the shapeviewer is working on itself but a bit buggy. then I tried to couple it with some more code, but now it does not work.
from PyQt4.QtCore import *
from PyQt4.QtGui import *
from qgis.core import *
from qgis.gui import *
import sys
import ...
When implementing the Builder Pattern, I often find myself confused with when to let building fail and I even manage to take different stands on the matter every few days.
First some explanation:
With failing early I mean that building an object should fail as soon as an invalid parameter is p...
@chillworld google search for "jpa read-only field" gave me this SO question: stackoverflow.com/questions/10128092/… I guess you found the same one, or something similar? :)
And I might have been wrong about getter and setter, it's been a little while since I used Hibernate. Might have mixed it up with Jackson :P
I'm new to C# and OOP and am struggling to move away from the procedural way of doing things. I understand the tutorials I have looked at but find it more difficult when actually doing something a little more involved.
The code works out the number of presses and time taken for the supplied mes...
@SimonAndréForsberg so your point is kinda m00t as a field can always be modified with reflection, wether it's final or not and independent of exposed setters..
@Vogel612 My point was that the 'final' modifier can be removed with reflection. I believe modifying a final field without removing the modifier throws an exception.
@Vogel612 Exactly. But not many people know that the final modifier can be removed at runtime. (I haven't fully tested this though, but Jackson has no problems at all modifying a final field)
@SimonAndréForsberg not sure, I just can hope so ;)
-INFO in ch.qos.logback.classic.LoggerContext[People] - Found resource [/opt/software/jbossData/people/properties/logback.xml] at [file:/opt/software/jbossData/people/properties/logback.xml]
@chillworld Just a thought here, you said "but I have log4j dependency (if I don't take he detect the older log4j from jboss classloader)" - I suspect that if you're using different versions of Log4j that it will cause the problem.
@skiwi What on earth are you trying to accomplish with that? What's IntValuedEnum? What's Pointer?
I want to insert multiple rows in a Bigquery table. The rows are in an ArrayList (Java array).
The following code (in Coldfusion) allow me to insert the same row as many time as the array length.
This is mu code:
<cfset count=0>
<cfloop query="GetParcels">
<cfset count=count+1>...
The cool thing is that I also can have access to all those resources (dictionary, etc.) so I could search for the correct words myself based on some heuristics at some point
If I know that one word needs to be fully numeric, I can 'force' that if there are alternatives for every symbol, and vica versa
I wonder if I get this part done today... I need to creat the aggregates of words aswell etc. Defined by the OCR: Symbol -> Word -> Line -> Paragraph -> Block
and then above that should be page I think
I miss java 8 in this project ;(
Thanks autocomplete. It just removed the classname I was typing in the process of autocompleting.
I'm trying to set up a very lightweight permission system using Google App Engine and Flask.
The end result I am hoping for is that each individual view is its own permission, and in an admin panel you can assign the views each user is allowed to see.
How would I set this up better? It works fi...
I'd written a php code for calculating the future date after certain number of business days.
function add_business_days($startdate,$businessdays,$holidays,$dateformat){
$i=1;
$dayx = strtotime($startdate);
while($i < $businessdays){
$day = date('N',$dayx);
$date = d...
Bean one is ConversationScoped (120k ms timeout) and I need a single Id from the only field in that bean in my RequestScoped beans that are running in the same view...
@Nobody I don't know, my question yesterday was mainly whether someone has experience with it. I can't just check unfortunately
I think that is can visualize something though
You also said something about tagging releases? Could I just create a release from the current master, then tag it "release-1" and create a branch based upon that release at a later point if a bug would be found?
Travis could also prepare a draft release on every succesful commit to releases, which I can then myself either delete or edit appropiately and release
In Dropdownlist having 3 field fname,lname,phone by selecting any one ...And there is textbox, search fname using textbox like 'raj' and then submit button click the fname must raj should come....
In Dropdownlist having 3 field fname,lname,phone by selecting any one ...And there is textbox, search fname using textbox like 'raj' and then submit button click the fname must raj should come....
"When you’re done working on a particular feature in a branch other than “master”, you should merge your changes with the master branch. To do this, right click on the master branch in the repository browser and select Checkout Revision. Click Checkout, then right click on the branch you’d like to merge with the master branch and select Merge Revision. Click through the prompts and then Push to make your changes public."
I believe it will be flexible like crazy, simply removing a component/system can change a significant part of the game. But the code gets scattered in so many different classes.
this little bit of code should be changed
Property Let Server(str As String)
If Me.Driver <> DSN_DRIVER_ORA11G Then
mServer = str
Else
ErrRaise_NotSupported
End If
End Property
I would change this around so that you are using a positive conditional, get straight to ...
Both of these return a variable that you define within the block itself, so you should just return what you need instead of creating a variable
public static IEnumerable<Request> GetRequests(){
SqlDatabase db = new SqlDatabase(_connectionString);
var requests = db.ExecuteSpro...
I have been learning JavaScript.
I had an idea for an adventure game, so, have planned out the game and started to experiment with code:
Here is my JavaScript:
// JavaScript Document
function changeColour ()
{
if (document.getElementById('colourTest').style.backgroundColor=='yellow')
...
the function below adds a new table row every time an add button is clicked.
function addRow(tableID) {
var table = document.getElementById(tableID);
var rowCount = table.rows.length;
var row = table.insertRow(rowCount);
var colCount = table.rows[0].cells.length...
I am new to programming and entirely self-taught. Below is a program I wrote to retrieve text content via an API and scan the text for important words. If the word is found URI is returned. The API returns data in JSON. The important words and URIs are linked via a dictionary. It works. I'm at a ...
A friend of mine has a spreadsheet where she coded a classroom video for various teaching events, which I needed to help her plot. For each recording, she used several video cassettes, and her time codes were relative to each video cassette (ie. they always start on 0). To be able to plot these o...
I have: - 5 possible levels of nestedness - possibility to go to the next symbol (lowest level) - boolean to check whether I'm at the first element of a nested level - boolean to check whether I'm at the last element of a nested level - retrieve next element
(and got a JDOM question on Stack Overflow .... which is about to be down-voted out of there because it's not DOM .... stackoverflow.com/q/23907035/1305253
@SimonAndréForsberg - I was up .... late...!
I literally went to bed after the birds started singing
I am using a script to open a bunch of Excel files, copying two or more sheets into a new file and saving this new file. It sure beats doing it manually, but I think it could be faster.
Here's my script:
Sub Flujo()
Const FilePath = "A path..."
Const Destination = "Another path..."
Dim app As...
Description
To make it simple, this code is the Controller Packet corresponding to a View with multiple tabs. All but one of these tabs are showing a list of dependent entries. This Construction was once a single class, that did everything and I thought "Why not refactor that thing?"
So I began...
@SimonAndréForsberg that smells like a Hungarian, why would the reader care whether Player is a component every single time he reads the class name, it seems like a detail to me
I am using a script to open a bunch of Excel files, copying two or more sheets into a new file and saving this new file. It sure beats doing it manually, but I think it could be faster.
Here's my script:
Sub Flujo()
Const FilePath = "A path..."
Const Destination = "Another path..."
Dim app As...
@konijn Yes, it is a detail, and yes, it's probably not the best name. But I have so many freakin' Player-classes that I must separate them somehow :) And I prefer to not only separate them by package, as having 10 classes named Player would take longer time to find the correct class when using Ctrl + Shift + T in Eclipse.
Doorknobs provide a worse UX for bears, which can be a useful feature for humans who want to keep bears out.
...elderly and disabled people find it easier to operate doors with handles. But so do bears. In British Columbia, bears have been known to scavenge for food inside cars—whose doors ha...