{"QuestionId": 28966162, "AnswerCount": 1, "Tags": " I am using window.less.modifyVars(modified_variables); on the front-end to reflect the changes. And i want to show loading icon while less is compiling. Is there any way to check that less has started compilation and completed. Assuming I have users on a page of my site. I update this page on my server but users will not notice the difference until reloading the page. How can a JavaScript function detect the difference and start reloading the page ? A solution could be using a timer which reloads the page every second but this causes a lot of traffic? I have some text data with multiple labels for each document. I want to train a LSTM network using Theano for this dataset. I came across http://deeplearning.net/tutorial/lstm.html but it only facilitates a binary classification task. If anyone has any suggestions on which method to proceed with, that will be great. I just need an initial feasible direction, I can work on. thanks,\nAmit I've been trying to get a dynamic header to clip text using the text-overflow:ellipsis, but I can't seem to get everything working that I need. Have a look at what we've originally implemented here https://dl.orangedox.com/selZdE Notice that the file name extends over the controls, this is what we're trying to fix by using something like the text-overflow css property. This is what I've tried
\r\n.toolbar {\r\n width: 100%;\r\n height: 45px;\r\n background-color: #fff;\r\n border-bottom: 1px solid #d5d5d5;\r\n }\r\n \r\n .middle {\r\n text-align: center;\r\n }\r\n \r\n .left {\r\n text-align:left;\r\n }\r\n \r\n .right {\r\n text-align:right;\r\n }\r\n \r\n .border {\r\n border:thin solid silver;\r\n }\r\n \r\n .clip {\r\n overflow: hidden;\r\n white-space: nowrap;\r\n text-overflow: ellipsis;\r\n }\r\n \r\n #float > div {\r\n width:32%;\r\n height:100%;\r\n }\r\n \r\n #inline > div {\r\n\r\n position: absolute;\r\n top: 0;\r\n left: 0;\r\n width: 100%;\r\n height: 0;\r\n overflow: visible;\r\n margin-top: 3px;\r\n\r\n }\r\n \r\n .hide {\r\n display:none;\r\n }\r\n \r\n .float-right {\r\n float:right;\r\n }\r\n \r\n .float-left {\r\n float:left;\r\n }
\r\n <div id='inline' class=\"toolbar\">\r\n <div class=\"inline left clip\">\r\n Some really really really really really really really really really really really really really long line of text.\r\n </div>\r\n <div class=\"inline middle\">Middle Stuff</div>\r\n <div class=\"inline right\">Right Stuff</div>\r\n </div>\r\n \r\n <br>\r\n <hr>\r\n <h3>Second Attempt</h3>\r\n <br>\r\n \r\n <div id='float' class=\"toolbar\">\r\n <div class=\"border left float-left clip\">\r\n Some really really really really really really really really really really really really really long line of text.\r\n </div>\r\n <div class=\"border middle float-left\">Middle Stuff</div>\r\n <div class=\"border right float-right\">Right Stuff</div>\r\n </div>\r\n\r\n <br>\r\n <hr>\r\n <strong>without the middle</strong>\r\n <br>\r\n \r\n <div id='float' class=\"toolbar\">\r\n <div class=\"border left float-left clip\">\r\n Some really really really really really really really really really really really really really long line of text.\r\n </div>\r\n <div class=\"border middle float-left hide\">Middle Stuff</div>\r\n <div class=\"border right float-right\">Right Stuff</div>\r\n </div>
Having a look at the attempts I've tried above
\n\nAny ideas on how to better structure this header with overflowing text & controls like this?
\n", "Lable": "No"} {"QuestionId": 29225200, "AnswerCount": 1, "Tags": "I have installed a few packages using opam, such as Core and Batteries. The ocamlinit file is as follows:
\n\n(* Added by OPAM. *)\n\n#use \"topfind\"\n#thread\n#camlp4o\n#require \"core.top\"\n#require \"core.syntax\"\n#require \"batteries\"\n\nlet () =\n try Topdirs.dir_directory (Sys.getenv \"OCAML_TOPLEVEL_PATH\")\n with Not_found -> ()\n;;\n\n\nWhen I run this with utop I can see the modules for Batteries but I cannot see any of the modules for Core. When I try to do open Core or open Core.Std I get an unbound module error. I also tried adding in #require \"core\" and the error persisted.
I'm not sure what the error is since I followed the installation instructions from the book \"Real World OCaml\".
\n\nI also see two messages when I start off utop:
\n\nNo such package: oUnit\" - required by `pa_ounit'\"\nNo such package: pa_pipebang\" - required by `core.syntax'\"\n\n\nI'm not sure if these are related to the problem but when I do opam list ounit and opam list pipebang it shows them as installed.
I have MVC website, and I would like to show some code snippets as text on my website. Something like this:
\n\nList<ImageInfoModel> imgList = new List<ImageInfoModel>();\nstring imgPath = @\"~/Content/Images/ImageGallery/\";\nstring tmbPath = @\"~/Content/Images/ImageGallery/thumbnails/\";\n\nstring imgFullPath = Server.MapPath(imgPath);\nstring tmbFullPath = Server.MapPath(tmbPath);\n\n\nIf I simply copy and paste this into my view with
code text
it messes things up because of @ symbol.
\n\nSo my question is: How can I display C# code inside my view?
\n\nThanks in advance.
\n", "Lable": "No"} {"QuestionId": 29274208, "AnswerCount": 2, "Tags": "I am trying to replace a char in my Select with an newline. But it doenst work.
\n\nHere is the code:
\n\nvMsg := to_char(rec.CREATED,'HH24:MI') || ' - ' || replace(rec.FILELIST, '|', chr(13) || chr(10)) || chr(13) || chr(10) || chr(13) || chr(10) || 'Test'\n\n\nBut this does not work, it seems like Oracle replaces '|' with ' '
\n\nExample input:
\n\n\n\n\nAudio.hx|Camera.hx|Circle.hx|Color.hx|Component.hx|Core.hx|Debug.hx|Draw.hx|Emitter.hx|Entity.hx|Events.hx|Game.hx|Input.hx|IO.hx|Log.hx|
\n
Example output:
\n\n\n\n\nAudio.hx Camera.hx Circle.hx Color.hx Component.hx Core.hx Debug.hx\n Draw.hx Emitter.hx Entity.hx Events.hx Game.hx Input.hx IO.hx Log.hx
\n
What i expected:
\n\n\n\n", "Lable": "No"} {"QuestionId": 29276295, "AnswerCount": 3, "Tags": "Audio.hx
\n \nCamera.hx
\n \nCircle.hx
\n \nColor.hx
\n \n...
\n
Here my actual code :
\n\neach val, index in array\n if (index%3 == 0)\n .parent\n .child\n\n\nor this one :
\n\neach val, index in array\n if (index%3 == 0)\n .parent\n .child\n else\n .child\n\n\nWhat i want is, accpeting the condition is true, add the block parent .row, when the condition is not true add the child inside the parent. The final goal is to have this code :
\n\n <div class='row'>\n <div class='child'></div>\n <div class='child'></div>\n <div class='child'></div>\n </div>\n <div class='row'>\n <div class='child'></div>\n <div class='child'></div>\n <div class='child'></div>\n </div>\n\n\nBut the code i have for the moment with my actual code is :
\n\n <div class='row'></div>\n <div class='child'></div>\n <div class='child'></div>\n <div class='child'></div>\n <div class='row'></div>\n <div class='child'></div>\n <div class='child'></div>\n <div class='child'></div>\n\n\nI tried many differents indentations but nothing works, everytime I write the parent in a conditon the block is automaticaly close, I don't know how to keep it open, or re-open it to put the content in it.
\n", "Lable": "No"} {"QuestionId": 29351820, "AnswerCount": 0, "Tags": "I am programmatically creating new commands via ICommandService#getCommand(String commandId) and am in need of adding these Commands to a MenuManager, but the MenuManager seems to accept only IContributionItem or IAction for its overloaded add() method
Seemingly the CommandContributionItemParameter can be constructed with the newly made commandId, and from it a CommandContributionItem can be made, and then added to the MenuManager
Is this the way to add programmatically created commands to a programmatically created Toolbar?
Any experience with this would be golden, thanks.
\n", "Lable": "No"} {"QuestionId": 29426756, "AnswerCount": 2, "Tags": "In Javascript, I have a string of options for a select tag. This is my string:
\n\nvar myOptionsString = '<option id=\"\"></option><option id=\"1\">Self Service</option><option id=\"2\">Administrator</option>';\n\n\nIn Javascript, I want to convert it to a 2-dimensional Array where 1st dimension will store the id and 2nd dimension will store the text of an option.
\n\nHow can I do that? I am looking for Javascript solution; I am open to 3rd party solutions also like jQuery.
\n", "Lable": "No"} {"QuestionId": 29483297, "AnswerCount": 3, "Tags": "I am confused about using apply or call method correctly.\nI know that apply is passing an array to the function and call is passing strings to a function.\nFor example the code below, what does \"this\"really have to do with the code? if it has nothing to do with this code, then can anyone give me an example when \"this\" is implementing appropriately?
\n\nfunction myFunction(a, b) {\n return a * b;\n}\nmyArray = [10,2];\nmyFunction.apply(this, myArray);\n\n\n\n", "Lable": "No"}
{"QuestionId": 29484147, "AnswerCount": 2, "Tags": "Here is my doubt !!!
\n\nHow to run a animated gif image directly by getting dynamically from url / NSdata and assigning it to Wkinterfaceimage ???
\n\ni am working on the applewatch app development from past few days it's so great.Currently i'm working on the GIf Images assigning to the imageview. I successfuly done by adding the series of images statically in xcode and running it by assigning to Wkinterfaceimage.
\n", "Lable": "No"} {"QuestionId": 29509933, "AnswerCount": 1, "Tags": "I have a config table which holds lots of configuration values,\nHow can I create a static helper/class that will be available globally on laravel?
\n\nfor example, I have a view with the an input:
\n\n<input type=\"text\" value=\"<?= SettingsHelper::getValue('my-settings-key'); ?>\" />
And off course i don't want to query each time for it, just one query that gets all the configuration values.
\n\nAny ideas?
\n", "Lable": "No"} {"QuestionId": 29514460, "AnswerCount": 1, "Tags": "I have been trying to use the MCP23017 along with my beaglebone.. I have however not received my devices yet, but I have started to get my program ready...\nI am programming the GPIO pins now.. Here I have tried to read and write the pins using i2c commands as follows:\nfor write--
\n\na=('i2cset', '-y', '0', '0x20', '0x14', '0x01')\nsubprocess.call(a, shell=True)\n\n\nsimilarly using i2cget for reading.. However when I try to run it , it give me a notification on my screen saying
\n\nUsage: i2cset [-f] [-y I2CBUS CHIP-ADDRESS [DATA-ADDRESS [MODE]]\nI2CBUS is an integer or an I2C bus name\nADDRESS is an integer (0x03- 0x77)\n\n\nDo I get this notification only because I don't have my device connected yet? Or is it a problem because of using the subprocess module?
\n\nAny help is appreciated,
\n\nNamita.
\n", "Lable": "No"} {"QuestionId": 29526560, "AnswerCount": 1, "Tags": "I use the 'whenever' gem for my rails cron file in EC2 and it works great. \"Whenever -w\" writes it and I never have to worry about it again. The problem is when my instance has a planned reboot. The rails app get passed to a new instance and the whole process is seamless with no downtime, but the new instance does not have my cron file.
\n\nHow can I make sure that the cron file gets written when I move to a new instance? Is there a way to run it on app start or something like that? Thanks.
\n", "Lable": "No"} {"QuestionId": 29618653, "AnswerCount": 2, "Tags": "I've a piece of java code which constructs an object from xml and takes some nanoseconds to a millisecond depending on object size. Sometimes I've to call that method 1-2 times, sometimes 70-80 times in loop to construct a list of objects.
\n\nI tried constructing the objects in parallel, but sometimes it's taking double time than sequential and half the other times. Now my question is are there any guidelines or performance comparison metrics to guide when should multitasking be used and when it's just an overkill?
\n\nSample code that I'm using is:
\n\n List<Callable<Integer>> tasks = new ArrayList<Callable<Integer>>();\n for (final Integer object : list) {\n Callable<Integer> c = new Callable<Integer>() {\n @Override\n public Integer call() throws Exception {\n return test.m1(object);\n }\n };\n tasks.add(c);\n }\n List<Future<Integer>> results = EXEC.invokeAll(tasks);\n\n for (Future<Integer> fr : results) {\n fr.get();\n }\n\n", "Lable": "No"}
{"QuestionId": 29627660, "AnswerCount": 8, "Tags": "I have a simple div in my html as follows:
\n\n<div id=\"myDiv\">\n....\n\n</div>\n\n\nAlso I have set the onlick event on the window.click as follows:
window.onclick = function()\n{\n // do something\n } \n\n\nSo if I click, anywhere in the div, how can I find that this click was made inside \"myDiv\"
\n\nNote : I cannot add the click event on my div, it is generated randomly from jqgrid
\n", "Lable": "No"} {"QuestionId": 29642020, "AnswerCount": 1, "Tags": "By using codeigneiter, I want to connect one controller and one model with another database.
\n\nIs it possible?
\n\nI am following this post Codeigniter - I am looking to use/connect to a different database for one of my controllers and one model, but I'm not getting any result.
\n", "Lable": "No"} {"QuestionId": 29660988, "AnswerCount": 0, "Tags": "We're doing some work on a CPU in logism in class. We're going over the ALU, and need now need to know different ways multiplication can take place. Our professor gave us two examples, one called the \"Five Add Time\" and the \"31 Add Time\" (although I do not believe these are the official names of the algorithm), shown here:
\n\n
And Here
\n\n
What are the proper names for both these algorithms, and is there any documentation that would allow me to better understand what's going on here? I'd google it, but I am really not sure on the specific term I should look up.
\n\nThanks
\n", "Lable": "No"}