RoR - Simple form inputs
◷
تاریخ انتشار: 1395/4/23 | ساعت: 0:39
Vote count: 0 Using the simple form gem for Ruby on Rails, I have a form that looks like this: <%= simple_form_for(article, html: {class: 'form-vertical'}) do |f| %> ... <div class="field"> <%= f.collection_select :category_id, Category.all, :id, :name, {prompt: "Choose a category"} %> <%= f.collect...
knockout custom binding bootstrap popover
◷
تاریخ انتشار: 1395/4/22 | ساعت: 23:38
Vote count: 0 I am using asp.net mvc with dynamic knockout columns. One of the column headers, "Status", should have a bootstrap popover in which a user can click a font-icon question mark and be provided with a popover containing information about the column: <script type="text/html" id="statusHead...
Android Studio Button not Responding (OnClick)
◷
تاریخ انتشار: 1395/4/22 | ساعت: 23:38
Vote count: 0 I have tried various tutorials and no matter what , the button just never responds. Here is the Code: public class MainActivity extends Activity { Button handbtn; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); this.requestWindowFeatur...
Replace multiple words within a cell
◷
تاریخ انتشار: 1395/4/22 | ساعت: 23:38
Vote count: 0 I have multiple cells in a spreadsheet which lists two character country ISO codes in a single cell like so: CA, MX, US CA, MX, US CA, CR, MX, US AD, AE, AR, AT, AU, BD, BE, BG, BO, BR, CH, CI, CL CA, MX, US GB, US I have another sheet which lists the ISO code and full country name. I'...
Communication via microUSB - microUSB OTG cable on Android?
◷
تاریخ انتشار: 1395/4/22 | ساعت: 22:14
Vote count: 0 I would need to code an application that allows two Android devices to communicate using a microUSB/microUSB OTG cable. Is this possible? How? I couldn't find any practical example of this, and I'm not even sure it's possible: by default, when two devices are co ected, the host one can...
How to create and where to run a daily job to copy production database from Linode to Heroku?
◷
تاریخ انتشار: 1395/4/22 | ساعت: 22:14
Vote count: 0 For historical reasons Heroku is where are reporting database is located, which is a direct copy of production from Linode. I currently run commands locally every day to copy the Linode database from Linode server to local drive and then push it to Heroku. I need to automate this someh...
c/c++: how to properly define a constant array of multiple structures of constands
◷
تاریخ انتشار: 1395/4/22 | ساعت: 22:14
Vote count: 0 I have: typedef struct { int aaa; int bbb; } My_Struct; And I want to make a constant script for a regression test that contains multiple copies of My_Struct with initialized values, but also with the labels (aaa & bbb) for readability and convenience. I can't figure out the syntax, or...
Can't build a jar using Leiningen
◷
تاریخ انتشار: 1395/4/22 | ساعت: 20:09
Vote count: 0 I'm trying to make a stand alone jar from my bare-bones Clojure project using the Leiningen plugin in Intellij's Cursive. To create the project, I just created the project.clj file, opened it, and Cursive offered to import it as a project. project.clj: (defproject WaterTimer "1" :descr...
how to load all user js files after renderbody complete in MVC single page application
◷
تاریخ انتشار: 1395/4/22 | ساعت: 20:09
Vote count: 0 When I generate a MVC5 app using AngularJs, the _Layout.cshtml has the @Scripts.Render at the end of the file after the @RenderBody(), @Scripts.Render contains some animation related script, these script should execute after @RenderBody() elements loaded. Now all scripts are included i...
Can I have my Makefile automatically set -std=c++0x or -std=c++11 as appropriate?
◷
تاریخ انتشار: 1395/4/22 | ساعت: 20:09
Vote count: 0 My C++03 project needs an upgrade to C++11, and I can guarantee that at least experimental support for it will be available in all the GCCs I want to use. However, that may be -std=c++0x or it may be actual -std=c++11 from newer GCC. How can I form a GNU Makefile that adds the appropri...
Reopen popovers in Bootstrap 3.3.6
◷
تاریخ انتشار: 1395/4/22 | ساعت: 19:07
Vote count: 0 So I have problems with popovers on my site. When I click on any icon to show popover and then try to close that popover by clicking anywhere on screen, it works normally, but after that I need to click this icon twice instead of once to reopen popover. Problem do not appear when I clo...
summarize results dynamically produced by a template in R knitr
◷
تاریخ انتشار: 1395/4/22 | ساعت: 19:07
Vote count: 0 I am writing a report using knitr, with a template that runs analyses over multiple datasets (Section 1 of the MWE). I can generate summaries of the results by assigning values to variables that I then "stitch together" into tables (Section 2 of the MWE). However, this approach is cumb...
n_jobs don't work in sklearn-classes
◷
تاریخ انتشار: 1395/4/22 | ساعت: 19:07
Vote count: 0 Does anybody use "n_jobs" of sklea -classes? I am work with sklea in Anaconda 3.4 64 bit. Spyder version is 2.3.8. My script can't finish its execution after setting "n_jobs" parameter of some sklea -class to non-zero value.Why is this happening? asked 33 secs agoK.Alex This entry pass...
Varnish (Turpentine): Reload page before flushing in Magento
◷
تاریخ انتشار: 1395/4/22 | ساعت: 17:56
Vote count: 0 Va ish is really fast in Magento 1.8. The problem is the refresh of a page in the cache. For example: If something on the index page is changed, I'm using this command to flush: Mage::getModel('turpentine/va ish_admin')->flushUrl("^/$"); And then this script to reload the page to the c...
Angular 2 Pipe - can't return value inside a promise
◷
تاریخ انتشار: 1395/4/22 | ساعت: 17:56
Vote count: 0 I'm trying to do a really simple translate pipe for angular2. But I might be wrong how to promise work. The idea is to get the language parameter from a async service which call a doc in PouchDB. Fyi, the data are organised like this: { title: { fr: "text in french", en : "text in engl...
Using socket.makefile with UDP sockets
◷
تاریخ انتشار: 1395/4/22 | ساعت: 17:56
Vote count: 0 I'm ru ing into an Unterminated string error when receiving UDP packets on and from a local socket. This is due to my messages being of various lengths, and my buffer size seemingly being insufficient (I've tried as much as 16k buffersize - which wasn't enough). Since I've read that bu...
Oracle PL/SQL Sysdate > NULL
◷
تاریخ انتشار: 1395/4/22 | ساعت: 16:55
Vote count: 0 I am looking into a scenario some similar to future dated stuff. i have table something similar to this Product id Product Status Effective From Date Effective to Date Cancelled Indicator 345 A 7/7/2016 (null) 1 345 S 7/7/2016 11/7/2016 (null) 345 A 12/7/2016 (null) (null) i need to fe...
"The call is ambiguous between the following methods" for services.AddCors()
◷
تاریخ انتشار: 1395/4/22 | ساعت: 16:55
Vote count: 0 I am using Visual Studio Community 2015 Update 3. I am busy attempting to enable CORS as per this resource: https://docs.asp.net/en/latest/security/cors.html I created a new .NET Core Web API project. In Startup.cs, under ConfigureServices() I added: services.AddCors() However, after a...
Nodejs - node-twitter-api OAuth Callback session issue
◷
تاریخ انتشار: 1395/4/22 | ساعت: 16:55
Vote count: 0 I am using node-twitter-api module in node.js. In OAuth Call back session is getting lost. `router.get('/p/twitterLogin', handlers.twitterLogin); router.get('/p/twitter_auth', handlers.twitterAuth); exports.twitterLogin = utils.wrapReqHandler(function*(req, res){ let twitter = new twit...
build find and count queries with MongoRepository when dao use DBRef with Map
◷
تاریخ انتشار: 1395/4/22 | ساعت: 15:17
Vote count: 0 Whats the name of "count" and "find" queries when i use DBRef in conjunction with java.util.map? In my example the countByFoos-Method always retu s 0 instead of 1. How can i find and count BarDaos by given FooDao or key (String)? public class FooDao { @Id private String id; private Str...