I have issue with HTML form which is pointing its action to: /index.php?something=x So its looks like <form action="/index.php?something=x" method="POST"> I have production of application running on subdomain xx.example.com When i submit form, everything works well, request is going to: xx.example.com/index.php?something=x But on development environment i have 4th grade url. Example: yy.xx.example.com When i submit form on dev environment request is not going to https://yy.xx.example.com/index.php?something=x...
Sunday, April 30, 2017
How to Backup a Meteor Mongo Database?
To create a backup of my mongo database, I am trying mongodump from my meteor console. The command successfully completes, but creates an empty folder under the dump folder. I use the command mongodump -h 127.0.0.1 --port 3001 -d meteor So basically I am trying to backup my database for reactionecommerce. My question is how to backup a meteor mongodb that is running locally? Thanks for any guidance of help. 1 AnswersAnswers 1 The issue was with the mongo version 2.6.10. I installed the latest 3.4.4 in my Ubuntu...
Why is my s3 hosted website that I set up SSL for via cloudfront only working sporadically?
By Hường Hana
7:00 PM
amazon-cloudfront,
amazon-s3,
amazon-web-services,
angularjs,
web
Leave a Comment
So I have a static website hosted on s3. I set it up to work with AWS certificate manager, route 53, and cloud front so that the site can be accessed with https. It seems to be sort of working after a lot of fiddling but it then breaks super weirdly. For example I can go to the following no problem: www.myurl.com https://www.myurl.com/ https://myurl.com/ http://myurl.com/ Great! But then I click a link on this homepage to take me to another page named login.html but this ONLY works for a few of the above links. For...
document.objSecuBSP.OpenDevice biometrics issues

My problem is we have buy an finger print device on secugen but the problem occurs when i use there code , i have installed all their drives. on the html side there is this code which encounters "document.objSecuBSP.OpenDevice is not a function". I found this link but its not working. here is a sneak peak of the code. <html> <head> <title>Example of SecuGen SecuBSP SDK Pro COM Module</title> </head>...
Python: How to use splinter/browser?
How to get on the form. Form is to filled out. Thank you and will be sure to vote up and accept the answer! 1 AnswersAnswers 1 Browser has a method called: fill_form(field_values) It takes a dict parameter, with the field names, and the values, and it fills the form at once. So you'll use browser.fill_form(dict) instead of browser.fill(field, value) More info about Browser's API and its methods here : https://splinter.readthedocs.io/en/latest/api/driver-and-element-api.html ...
(SWI)Prolog: Order of sub-goals
I have two, slightly different, implementations of a predicate, unique_element/2, in Prolog. The predicate succeeds when given an element X and a list L, the element X appears only once in the list. Below are the implementations and the results: Implementation 1: %%% unique_element/2 unique_element(Elem, [Elem|T]) :- not(member(Elem, T)). unique_element(Elem, [H|T]) :- member(Elem, T), H\==Elem, unique_element(Elem, T), !. Results: ?- unique_element(X, [a, a, b, c, c, b]). false. ?- unique_element(X,...
DNA Matching in Prolog
I am attempting to learn basic Prolog. I have read some basic tutorials on the basic structures of lists, variables, and if/and logic. A project I am attempting to do to help learn some of this is to match DNA sequences. Essentially I want it to match reverse compliments of DNA sequences. Example outputs can be seen below: ?- dnamatch([t, t, a, c],[g, t, a, a]). true While it's most likely relatively simple, being newer to Prolog I am currently figuring it out. I started by defining basic matching rules for the...
Resume download after killing or putting on background the application
I have some issues when I want to resume a download operation. I am using Alamofire 4.4 and I made my tests on iOS 9 and 10. Here is my use cases: 1- A download operation is in progress, I cancel the request (resumeData is generated and saved) and then I put the application on background. After relaunching the application, I resume the download (using the resumeData) some times the download is being resumed and sometimes is being restarted. Is it a normal behaviour ? And are there any solution if not ? 2- A download operation...
Saturday, April 29, 2017
Implementing an efficient graph data structure for maintaining cluster distances in the Rank-Order Clustering algorithm

I'm trying to implement the Rank-Order Clustering here is a link to the paper (which is a kind of agglomerative clustering) algorithm from scratch. I have read through the paper (many times) and I have an implementation that is working although it is a lot slower than I expect. Here is a link to my Github which has instructions to download and run the Jupyter Notebook. The algorithm: Algorithm 1 Rank-Order distance based clustering...
React-Native Spotify SDK iOS: Dismiss auth window

I have been developing a react-native application using the following module: https://github.com/viestat/react-native-spotify Currently, the application opens the authentication window to login to spotify. I do get a return of success but i'm confused as to how i now get rid of the window that popped up to login with. I understand it should redirect back to my application but it just stays on the same window with logout/ my account...
Make ToolBar look like Windows Vista/7 instead of classic

I want to make my application look more like a native app than a .NET app and I use .NET because of Visual Designer and C#. I've seen some native apps using a toolbar that looks very similar to Vista/7 menus. Check out the example: Some native apps like Notepad++, Codeblocks, etc. uses the same Vista/7 style for toolbars. How can I do the same in C#? I know P/Invoke, so, I need to know the methods to be used or an example. I...
d3.js force piechart nodes

I am interested in making this force-piechart hybrid. I've tried merging these two charts together - to create a placeholder for the pie chart module to become exposed. //pie chart http://jsfiddle.net/Qh9X5/10111/ //Force chart http://jsfiddle.net/Qh9X5/10110/ //merged chart attempt1 http://jsfiddle.net/Qh9X5/10114/ //merged chart attempt 2 - LATEST http://jsfiddle.net/k0pn3x5o/3/ var datajson = { "name": "parentnode",...
Friday, April 28, 2017
How do I use a Rails cache to store Nokogiri objects?
I'm using Rails 5 to use a Rails cache to store Nokogiri objects. I created this in config/initializers/cache.rb: $cache = ActiveSupport::Cache::MemoryStore.new and I wanted to store documents like: $cache.fetch(url) { result = get_content(url, headers, follow_redirects) } but I'm getting this error: Error during processing: (TypeError) no _dump_data is defined for class Nokogiri::HTML::Document /Users/davea/.rvm/gems/ruby-2.4.0/gems/activesupport-5.0.2/lib/active_support/cache.rb:671:in `dump' /Users/davea/.rvm/gems/ruby-2.4.0/gems/activesupport-5.0.2/lib/active_support/cache.rb:671:in...
Update_or_create wont respect unique key
I'm using the following model in Django: class sfs_upcs(models.Model): upc = models.CharField(max_length=14, unique=True) product_title = models.CharField(max_length=150,default="Not Available") is_buyable = models.NullBooleanField() price = models.DecimalField(max_digits=8, decimal_places=2,default="0.00") image_url = models.URLField(default=None) breadcrumb = models.TextField(default=None) product_url = models.URLField(default=None) timestamp = models.DateTimeField(auto_now=True) And then I'm using...
Create custom User Control for Acumatica
I am attempting to create a custom User Control that is usable in the Acumatica Framework... Documentation is very limited so I was hoping someone may have some experience/examples of how best to implement? It appears possible by creating a WebControl derived from PXWebControl & creating a global JS function with a matching name. 0 Answe...
Create custom User Control for Acumatica
I am attempting to create a custom User Control that is usable in the Acumatica Framework... Documentation is very limited so I was hoping someone may have some experience/examples of how best to implement? It appears possible by creating a WebControl derived from PXWebControl & creating a global JS function with a matching name. 0 Answe...
Create custom User Control for Acumatica
I am attempting to create a custom User Control that is usable in the Acumatica Framework... Documentation is very limited so I was hoping someone may have some experience/examples of how best to implement? It appears possible by creating a WebControl derived from PXWebControl & creating a global JS function with a matching name. 0 Answe...
Create custom User Control for Acumatica
I am attempting to create a custom User Control that is usable in the Acumatica Framework... Documentation is very limited so I was hoping someone may have some experience/examples of how best to implement? It appears possible by creating a WebControl derived from PXWebControl & creating a global JS function with a matching name. 0 Answe...
Create custom User Control for Acumatica
I am attempting to create a custom User Control that is usable in the Acumatica Framework... Documentation is very limited so I was hoping someone may have some experience/examples of how best to implement? It appears possible by creating a WebControl derived from PXWebControl & creating a global JS function with a matching name. 0 Answe...
Redirect to https but without .php
Now I have a https. I need a redirection in the .htaccess. I could find this: RewriteCond %{HTTPS} off RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301] But I find that if the user writes: http://myDomain/someFile It redirects to: https://myDomain/someFile.php I suppose that the correct should be without .php How to do that? Those are all the rules: RewriteCond %{HTTPS} off RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301] RewriteCond %{HTTP_HOST} !^www\. RewriteRule ^(.*)$ https://www.%{HTTP_HOST}/$1...
Change Cassandra configuration on runtime in Storm
I'm using the storm cassad storm-cassandra It is configured and working, But I have two issues: I have 2 data centers and if one of them fail I want to load the information to the other one. The question is how to change the configuration in the cluster on runtime. I want to change the consistency level in cassandra on runtime Both problems are related on the change of configuration is Storm cassandra 0 Answe...
Eclipse - break on user code when unhandled exception is raised on Android App

My problem is simple : I use Ecplise (Luna or Neon) to develop on Android and I don't want to use Android Studio I wish to debug breaks on ALL unhandled exceptions only on the last user code call of the stack that cause the exception (So, for example, I don't want to break in an unuseful ZygonteInit&MethodAndArgsCaller.run() when an exception in caused by passing a null reference to a native Android SDK method). I know that...
How to bind data using angular js and datatable with extra row and column
Hello I am creating one application using angularjs and ASP.NET MVC with datatable js. I have implemented table showing data using datatable with angular js by help of this article. But I want to bind the data using same functionality with column names statically in html like: In article author has done work using: <table id="entry-grid" datatable="" dt-options="dtOptions" dt-columns="dtColumns" class="table table-hover"> </table> but I want to do it like this by using above same functionality...
Thursday, April 27, 2017
Navigation in Xamarin.Forms
I have two pages say Page1 and page2. In Page-1 I have listview and a Image button(tap gesture). Here if I click listview item, it navigates to Page2 where it plays a song. Navigation.PushModalAsync(new page2(parameter1)); Song continues to play.Then I go back to page1 by clicking back button.Then As mentioned I have a imagebutton in page1,If I click this image button,I want to go same page which was shown earlier(page2) with same status song continues to play(it should not play from beginning). I understand ,If I click...
How to redirect stderr and stdout into /var/log directory in background process?
With the below command ,all stderr and stdout redirect into /tmp/ss.log and it perform in background process. python sslocal -c /etc/shadowsocks.json > /tmp/ss.log 2>&1 & Now to redirect stderr and stdout into /var/log directory as following. python sslocal -c /etc/shadowsocks.json > /var/log/ss.log 2>&1 & bash: /var/log/ss.log: Permission denied It encounter permission problem. I made a try with sudo tee as following. python sslocal -c /etc/shadowsocks.json |sudo tee -a...
why is blindly using df.copy() a bad idea to fix the SettingWithCopyWarning
There are countless questions about the dreaded SettingWithCopyWarning I've got a good handle on how it comes about. (Notice I said good, not great) It happens when a dataframe df is "attached" to another dataframe via an attribute stored in is_copy. Here's an example df = pd.DataFrame([[1]]) d1 = df[:] d1.is_copy <weakref at 0x1115a4188; to 'DataFrame' at 0x1119bb0f0> We can either set that attribute to None or d1 = d1.copy() I've seen devs like @Jeff and I can't remember who else, warn about doing that....