ack

1

votes
0

answer
132

views

“HTTP 403 forbidden” with Jersey 2.2 in GlassFish 4.1.2

I have an issue with GlassFish using IntellJ IDEA. Using in that environment Jersey library and restful architecture, when I try to verify CRUD's operation, I don't find issues with GET and POST. Instead with PUT and DELETE, server answer with error 403. What can I do? Is there a way to solve issue?...
ack
1

votes
2

answer
659

views

OR in view's argument — How to rewrite views query?

I need an OR clause in the arguments section of a view. So if a user passes 123, I'd like to return rows WHERE Field1 = 123 OR Field2 = 123. I'm fairly certain this can't be done in the views interface (but please correct me if I'm wrong). So I'm trying to rewrite the query. Where's the best place...
ack
1

votes
3

answer
1.3k

views

Multiple URLs pointing to same tab in hook_menu

Here's a basic menu structure I'm working with: function events_menu() { $items = array(); $items['events'] = array( 'title' => 'Current Events', 'access callback' => true, 'page callback' => 'page_event', 'type' => MENU_CALLBACK, ); $items['events/current'] = array( 'access callback' => true, 'type...
ack
1

votes
3

answer
1k

views

C# WPF Run action when window has been created

I'm opening a new Window in a separate thread. I want the window to open and a job to run automatically, then report its progress to this window (i'll use a progress bar). The action code that opens the window : private void button_Run_Click(object sender, RoutedEventArgs e) { ExecutorWindow myExec...
ack__
1

votes
1

answer
1.3k

views

Why is NumberPicker (up-down-domain picker) not visibility in Android UI Editor at Eclipse?

up-down-domain picker is a popular/general UI component, but anytime I have to add it by hand.Why is NumberPicker (up-down-domain picker) not visibility in Android UI Editor at Eclipse? I got it! NumberPicker widget supports Android SDK since API level 11 = Android 3.0+ OS, and my project is based o...
Ack
1

votes
3

answer
423

views

How to get the correct XML page from Nexmo.com get-balance API by Java BufferedReader?

I tried to call a get-balance web/ RESTful API of Nexmo.com to get account's balance, but I received two kind of error response: (1)400 - page not found in GAE-Java runtme. (2)FileNotFoundException in Java SE runtime. How to get the correct XML page by Java BufferedReader? String api = 'http://res...
Ack
1

votes
1

answer
305

views

How to set the username and password as a hardcode in a WS-Security usernameToken police?

How to set the username and password as a hardcode in a WS-Security usernameToken police? .... admin ??? ....
Ack
1

votes
1

answer
1.8k

views

Phantomjs page.onConsoleMessage doesn't log warnings

I'm using Phantomjs to detect errors/warnings on my pages by hooking console messages : page.onConsoleMessage = function(msg, line, source) { console.log(msg); } page.open(page.address, function (status) { if (status !== 'success') { console.log('Fail to load the address'); } else { for(var i=0;i
ack__
1

votes
1

answer
592

views

sqlite3 command line inconsistent return codes

I cannot find documentation anywhere on the internet for return codes from the sqlite3 command line program. Trying to use it programmatically, I've found that some errors will print to the screen but still return zero. For example, anything that returns the error message 'Error: incomplete SQL' wi...
ACK_stoverflow
1

votes
1

answer
0

views

Silently modifying nodes

I'm about to batch update every node in my database. Having made a recent change to my Auto Node Title rules, I'll be using Views Batch Operations to re-run everyone through ANT and potentially change their title. I'd like to do this silently, and not have every single node appear in my recently mo...
ack
1

votes
1

answer
0

views

Drupal: Best place to put drupal_goto

I need to redirect certain content types to other nodes. As a proof of concept I've got this working with a drupal_goto at the top of node--[type].tpl.php This works great, but is probably the least optimized place to put it. Would phptemplate_preprocess_node be too early? What about hook_nodeapi,...
ack
1

votes
1

answer
0

views

Form Validation: Cancel and return w/o error

I've added a validation function to my search bar to catch empty submissions. If I use form_set_error() though I'll end up at the search results page with the form element highlighted. What I actually want to happen is to just abort the submission and come back to the original page like nothing happ...
ack
1

votes
1

answer
0

views

How to call self component in Java swing?

I have many buttons in a button group that need to search a database using their containing text as the query when toggled. Instead of typing out specific event code for each button, how do I call a button's self? Desired pseudocode: searchDB(genericSelf.getText()) Tried using the this keyword...
ENG_ACK
1

votes
2

answer
1.5k

views

Javascript plugin for graph rendering (tree and nodes)

I'm looking for a Javascript API to draw this kind of graph :D3 graph Except I don't need/want the 'force' effect. Something static is ok, it can be an image generated or some JS rendering (I prefer this). I've gone through a lot of google results without success, and every JS plugins i've found ba...
ack__
1

votes
1

answer
285

views

NSURLConnection hangs for server which is not available

I'm using NSURLConnection initWithRequest to get some data from a server. This works fine when the server is available. However when the server is not available my app hangs and becomes totally unresponsive for at least 40-50 seconds. I've tried using a timeoutInterval, as well as a timer to cancel...
ack
1

votes
2

answer
99

views

Removing lowest values from an array

Say I have this array of hashes: [{:title => 'Frankenstein', :edition => 1}, {:title => 'Frankenstein', :edition => 2}, {:title => 'Dracula', :edition => 1}, {:title => 'Dracula', :edition => 2}, {:title => 'Dracula', :edition => 3}] Is there an elegant way in which I can strip this array of all old...
Ack
1

votes
1

answer
99

views

Creating draft email from gmail addon that extends compose UI

I'm running my gmail add-on with the following scopes: https://mail.google.com/ https://www.googleapis.com/auth/gmail.addons.execute https://www.googleapis.com/auth/gmail.addons.current.action.compose https://www.googleapis.com/auth/gmail.addons.current.message.metadata https://www.googleapis.com/au...
ack_inc
1

votes
1

answer
4.8k

views

PyQT: get recursive children of a widget

Anyone have a slick function that will return a nested tree of all the children of a particular widget? I'm familiar with dumpObjectTree() but I'm not able to compile in debug mode, so I don't have access to that function. Trying to find a particular widget and I'm traversing the children() hierarch...
ack
2

votes
2

answer
1.4k

views

WSO2 ESB 4.5.0 sample axis2 server cannot be started (samples.util.SampleAxis2Server)

WSO2 ESB 4.5.0 sample axis2 server cannot be started (samples.util.SampleAxis2Server) D:\esb-4.5.0\samples\axis2Server>axis2server.bat 'Starting Sample Axis2 Server ...' Using AXIS2_HOME: D:\axis2 Using JAVA_HOME: C:\Program Files\Java\jdk1.6.0_33 Server could not start due to class loadi...
Ack
3

votes
3

answer
1.5k

views

Nodejs how to update client after external program has returned?

I'm writing a NodeJS application that mainly does 2 things: Run a web GUI (simple HTML/JS) Run external programs (binaries) based on user input I want to be able to run those external programs asynchronously, as they can take several minutes to complete. And when they return, I want to update the we...
ack__
18

votes
8

answer
7.4k

views

Computational cost of trig functions [duplicate]

Possible Duplicate: How do Trigonometric functions work? What actually goes into the computation of trig functions like Sin, Cos, Tan and Atan? I think I've found an optimization in my code where I can avoid using any of these functions and base the problem around slope instead of angles. So that...
ack
18

votes
3

answer
19.2k

views

Drupal: Creating anchor only link with l()

I'd like to output this link using the l() function, so that the link just jumps to an anchor on the current page. I expected this to work l('link', '', array('fragment' => 'namedanchor')); but it creates an absolute link to www.example.com/#namedanchor instead of www.example.com/currentpage#named...
ack
3

votes
1

answer
515

views

How to create Depth Fade effect in OpenGL?

I would like to create a translucent sphere, which is highlighted where it intersects other objects (for example the ground). Like the white line in this picture: I've found an Unreal Engine 4 tutorial about how to create something like that. It uses 'depth fade' in the shader. Unfortunately I haven...
U Ack Fin
1

votes
2

answer
57

views

Combining XML records into meaningful sentence: “Dale, Harry and Lucy”

Say I have this in XML Dale Harry Lucy How would I go about transforming this into Dale, Harry and Lucy using just XSLT? It has to be flexible to a certain point, so that where there are more names, it would still make sense. Dale, Harry, Lucy, James, Andy, Shelly and Norma
Ack
2

votes
2

answer
1.1k

views

How can I store data between web pages?

How can I store some information between pages with JS ? My webapp is using sql queries to populate a couple pages and those queries usually return the same result. Is there a way to store this result in a JS variable, and force a refresh with sql queries only at some events ? And how efficient is t...
ack__
6

votes
4

answer
1.2k

views

Rolling Your Own Plaintext Wiki (Wiki inside a DB)

Anyone know of an API (php preferable but I'd be interested in any language) for creating wiki-like data storage? How about any resources on rolling your own plaintext wiki? How do other plaintext wikis handle the format of the text file? I understand I can use Markdown or Textile for the formattin...
ack
2

votes
1

answer
1.9k

views

Programatically create Visio drawing on a linux server

Is it possible to create Visio drawings from a Linux server ? That is, without access to the Visio software. Language can be python, php, C ..
ack__
12

votes
4

answer
14.7k

views

Change hotkey for autocomplete selection

In Eclipse, I find it pretty annoying that Enter is the hotkey that selects an item from the Content Assist/Autocomplete list. Especially in PyDev where there is no end-of-line semicolon, pressing enter for a new line will instead give me whatever is selected in the Autocomplete list. Tab is a much...
ack
2

votes
1

answer
132

views

Unpredictable CCK field name in returned View data

I'm using views_get_view_result to directly access the data in a view. I've stumbled upon this odd behavior where cck fields are prefixed with the first field name as a query optimization. Explained here. What's bizarre though is that fields are named differently depending on whether I retrieve th...
ack
2

votes
4

answer
1.2k

views

Comcast's two step login

Comcast has changed their login process so it happens in two steps. Instead of two input boxes for username and password, you submit your username first. Then on a second page you enter your password. https://www.comcast.com/Customers/CustomerCentral.cspx Due to some recent security improvements,...
ack
2

votes
1

answer
3k

views

UIScrollView content offset x gets set to 0 when scroll UITableView

I have a UITableView with one of the UITableViewCells containing a UIScrollView and a UIPageControl; so that the user can scroll horizontally through two pages whilst browsing the table. My problem is this- initially the page control works fine, I can see the little dots moving as expected as I bro...
ack
3

votes
2

answer
75

views

SVN opposite of cp?

svn cp will cause a branch in svn's history, where one file becomes two. What I want to do is the opposite of this, where two files become one in the repo history. Is there any way to do this?
ACK_stoverflow
6

votes
0

answer
942

views

Python curses print terminal color escape codes

I have a bash script that prints a nice big colorful table, using escape codes for foreground and background generated from tput. My curses application needs to call this bash script and put the output on the screen. When I try to do that, curses explodes with a stacktrace ending at: File './dostuf...
ACK_stoverflow
2

votes
3

answer
310

views

Organizing Drupal Code

How do you like to organize your Drupal code? One giant module? Separate modules per feature? Separate modules per code type (theme functions, menu hooks, etc...)? I've started by trying to organize by feature, treating modules like they were libraries. Ultimately though things are never perfect...
ack
4

votes
8

answer
6k

views

Set a virtual function declaration to zero? [duplicate]

Possible Duplicate: Why pure virtual function is initialized by 0? In C++, what does it mean to set a function declaration to zero? I'm guessing it has to do with the function being virtual, and not actually defined in this class. Found in a header file of code that I'm reading: virtual void SetV...
ack
2

votes
3

answer
906

views

mySQL hierarchical grouping sort

I have a schema that essentially looks like this: CREATE TABLE `data` ( `id` int(10) unsigned NOT NULL, `title` text, `type` tinyint(4), `parent` int(10) ) The type field is just an enum where 1 is a parent type, and 2 is a child type (in actuality there are many types, where some should behave like...
ack
2

votes
2

answer
844

views

Cartesian/combination algorithm (while maintaining order)

Since I don't quite know the language of these types of algorithms (i.e. how to google this), I'll just demonstrate what I'm looking for: I have a three arrays (source arrays are of not equal lengths): $array1 = array('A', 'B', 'C', 'D'); $array2 = array('x', 'y', 'z'); $array3 = array('1', '2', '3'...
ack
2

votes
1

answer
846

views

FastCGI authorizer support in lighttpd broken?

I'm in the process of writing a webapp in C++ using FastCGI with lighttpd. The reason I'm doing this the painful way is because the end product will go on an embedded device. Originally, I didn't know about FCGI modes; I thought everything was basically a responder. Then I learned about authorize...
ACK_stoverflow
1

votes
3

answer
163

views

.gitignore on a new repo (can't reset on a fresh repo)

This happens almost every time I init a new repo. Start a new project. Create a bunch of new files. git init git add . Oh shoot, there's some IDE/build cruft I need to ignore. echo '.scons-nodecount' > .gitignore Dammit, .gitignore doesn't see it because this file has already been added. git reset...
ack
3

votes
1

answer
2.8k

views

How to add a resource : xml file

I'm currently using the following XAML code to add my xml file as a resource : Now I would like to use this myfile.xml from the %appdata% folder, to get more portability. Obviously, using Source='%appdata%\myfile.xml' doesn't work, as it seems that '%' char is not accepted in XAML. Thus I want to a...
ack__

View additional