How to get d3.js tree layout to sort nodes alphabetically?
Vote count: 0 I'm experimenting with this example of d3.js (pasted below in its entirity) to draw a tree based on a JSON tree structure. This code draws a nice tree, but it doesn't sort the sibling nodes in any order vertically. The data just happens to already be sorted in the underlying JSON objec...
What is ideal size of Fixed Thread pool?
Vote count: 0 Fixed Thread pool has been used to limit the number of threads in java application by passing an integer variable to the executors method like below Executors.newFixedThreadPool(10); Now, Here comes a question. Suppose we are designing any application and we are using fixed thread pool...
Saving an explicit entity through entity framework
Vote count: 0 Let's say I'm reading data from an excel file and I need to save this using EF. After reading excel, I construct an entity of type in my EF model - say Holiday. Chance is that this particular holiday already exist in my DB or may not. I can't know it just by reading the excel file. So,...
Resetting pristine when fields are empty.
Vote count: 0 I have a form that is tabbed with multiple nested ng-forms. I have some logic that shows an asterisk on the tab if that tab's form has required fields. I'm using form.$dirty to check these. An issue I have on the form is if someone goes into a tab, populates a feild, then changes their...
Change color of text inside quotations
Vote count: 0 NSString *message = @"This part: "Is in quotations""; I'm wondering if it's possible to color the part of the NSString inside the quotations a different color? I understand this example: Is it possible to change color of single word in UITextView and UITextField but not sure how to con...
AWS EC2 : SSH is not working after changing the Security Group
Vote count: 0 I have AWS EC2 VPS micro instance. I changed its security group to newly created group which has all old plus new rules including ssh. But now I can't login to my instance using my existing key "ssh -i mykey.pem root@52.xx.xx.xx" Based on the logs looks like its not liking my key anymo...
Making quicksort with pointers
Vote count: 0 Hey im trying to make a quick sort function with pointers, im pretty limited in pointer knowledge. I'm receiving a segmentation-fault for the code, I know that means im trying to map values outside of my array range but i cant seem to solve the issue. Any help would be appreciated! Eve...
Stripe-You did not set a valid publishable key
Vote count: 0 I am falling this short tutorial: https://stripe.com/docs/checkout/rails I created a brand new rails app for it. Yet, when I attempt to make a charge, I get the error "You did not set a valid publishable key. You must call Stripe.setPublishablekey()" Yet the tutorial itself says nothin...
CSS framework that works like Android layouts?
Vote count: 0 Is there any CSS framework that functions like how Android layouts work--more specifically linear layouts? I know this question is short, but I did do my homework and searched on Google and Github. Maybe I'm searching for the wrong keyword. Any help would be appreciated! asked 1 min ag...
if statement works in PHP 5.5.x and up not 5.2x-5.4x
Vote count: 148 Everyone runs into syntax errors. Even experienced programmers make typos. For newcomers it's just part of the lea ing process. However, it's often easy to interpret error messages such as: PHP Parse error: syntax error, unexpected '{' in index.php on line 20 The unexpected symbol is...
What is a URI and how do I make one?
Vote count: -2 I need a URI for an API I want to use and although I kind of know what it is, I don't know how to make one or what I need to make one. asked 2 mins agoBe ard Allotey Let's block ads! (Why?)
Adding like button to fb: Webview, or FB SDK
Vote count: 0 I want to add a FB like button to my Android app. I noticed there are 2 ways. The official way by adding FB sdk, registering the app on fb and going through the whole process. OR Opening a webview for the user to like a page ( I beleive this is what this library is doing http://blog.sh...
Chef remote_file giving permissions denied error
Vote count: 0 I am using remote_file resource in the following way: remote_file "/usr/local/bin/binaryname" do source "URL for Binaryname" owner 'root' group 'root' mode '0755' not_if { File.file?("/usr/local/bin/binaryname") } end I am getting permmision denied error even after doing mode '0755' ST...
Change state using redux in react
Vote count: 0 This is my component(react) which include rematch(Re play or play again) button. render() { const rematchTitle = formattedMessage('App.rematch'); retu ( <div className='modal-footer'> <a className='btn'>{rematchTitle}</a> </div> ); } I want to give click event to that button.And when u...
Connect cucumber test modules
Vote count: 0 Cucumber test cases are written for each components/modules. Now trying to co ect them together. Few ideas 1) Create a new integration project by reusing the code from each modules to create end to end flow. I feel with this approach there be single big project which is nothing but cod...
using javascript on qualtrics: questions ids in looped blocks
Vote count: 0 I'm using the following code to modify the form answer: $('QR~QID24~1').insert({after: ' out of'}); $('QR~QID24~2').style.position = "relative"; $('QR~QID24~2').style.left = "100px"; $('QR~QID24~2').style.bottom = "34.5px"; This doesn't work anymore because when the block is looped the...