vendredi 11 septembre 2015

In Pandoc, how do I add a newline between authors through the YAML metablock without modifying the template?

I am trying to add a a couple of authors to a report I am writing. Preferably, the second author would appear on a new line after the first. I know I can modify the template to add a new field or the multiple author example given in the Pandoc readme. However, I wonder if there is any character I can use to insert a new line between authors directly in the metablock. So far I have tried \newline, \\, | with newline and space, <br>, <div></div>, and making the author list a string with newline or double spaces between author names, but nothing has worked. My desired output is pdf.



via Chebli Mohamed

Angular $modal scope - Passing an object to $modal

I am attempting to pass angular's bootstrap modal the url of the image that was clicked in a angular masonry gallery. What I have is very close to the demo in the documentation with only a few changes. I know this is completely an issue with my own understanding of scope.

My modal HTML:

    <div class="modal-header">
        <h3 class="modal-title">I'm a modal!</h3>
    </div>
    <div class="modal-body">
        <ul>
            <li ng-repeat="item in items">
                <a href="#" ng-click="$event.preventDefault(); selected.item = item">{{ item }}</a>
            </li>
        </ul>
    </div>
    <div class="modal-footer">
        <button class="btn btn-primary" type="button" ng-click="ok()">OK</button>
        <button class="btn btn-warning" type="button" ng-click="cancel()">Cancel</button>
    </div>

And in my Controller:

angular.module('testApp').controller('GalleryCtrl', function ($scope, $modal, $log) {
  $scope.animationsEnabled = true;
  $scope.items = ['item1', 'item2', 'item3'];
  // Temporary Generation of images to replace with about us images
  function genBrick() {
      var height = ~~(Math.random() * 500) + 100;
      var id = ~~(Math.random() * 10000);
      return {
        src: 'http://placehold.it/' + width + 'x' + height + '?' + id
      };
  };
  this.bricks = [
    genBrick(),
    genBrick(),
    genBrick(),
    genBrick(),
    genBrick(),
    genBrick()
  ];
  this.showImage = function(item){
    alert(item.src); // gives me exactly what im trying to pass to the modal
    var modalInstance = $modal.open({
      animation: $scope.animationsEnabled,
      templateUrl: 'views/modal.html',
      scope: $scope,
      controller: 'GalleryCtrl',
      resolve: {
        items: function () {
          return $scope.items;
        }
      }
    });

    modalInstance.result.then(function (selectedItem) {
      $scope.selected = selectedItem;
    }, function () {
      $log.info('Modal dismissed at: ' + new Date());
    });

  }
});

Lastly for clarity, this is my masonry code

<div masonry>
    <div class="masonry-brick" ng-repeat="brick in gallery.bricks">
        <img ng-src="{{ brick.src }}" alt="A masonry brick" ng-click="gallery.showImage(brick)">
    </div>
</div>

Right now this works fine to return the items objects 3 values in li tags to the modal just like in the original example. What id really like to pass into the model is the (item.src) but no matter what i change it never seems to get passed in so that i can display it.



via Chebli Mohamed

JMeter: Is Windows not capable of handling a hundreds of thousands of users in single system

My linux (i5 Processor, RAM: 16GB) machine is able to handle 100k users easily however same does not happen with Windows 8 (i7 Processor 2600 @ CPU 3.40GHz, RAM: 32GB) and thread creation stops after specific amount of thread is created somewhere around 20k in JMeter.

Is there any reason as why Windows in not able to handle huge number of users?



via Chebli Mohamed

SQL Server insert missing record with select distinct or left join

I have a table where is some case we are missing the location record for location = 'WHS1'. You will notice the bottom 2 "TCODE's" do not have a location = WHS1 record

I was thinking of doing a select distinct on TCODE InvYear and to get unique records then checking to see if the Location 'WHS1' NOT Exist.

I'm very green at this that you for any help

TCODE   InvYear Location    StartingInv Adjustments Damages EndingInv
NY530-1 2015    BRX         625         NULL        NULL    709
NY530-1 2015    LAN         365         NULL        NULL    365
NY530-1 2015    WHS1        432         NULL        NULL    442
NY530-2 2015    BRX         309         NULL        NULL    413
NY530-2 2015    LAN         94          NULL        NULL    96
NY530-2 2015    WHS1        1310        NULL        NULL    1344
NY547-1 2015    BRX         0           NULL        NULL    0
NY547-2 2015    BRX         0           NULL        NULL    0



via Chebli Mohamed

Echo issue during audio streaming using native RTP lib in Android

I'm working on an Android app, which streams live audio from mic to the vlc using native android RTP lib (using AudioStream and AudioGroup) with in the same room on the speaker(it is conference app, so MIC and Speaker both will be in same room) the problem is, it is creating a lot of ECHO, i know the android have native Android API AcousticEchoCanceler and also NoiseSuppressor API but these APIs work with AudioRecord or MediaRecorder... I need some hep, how can i remove Echo using these native APIs with RTP lib OR Anyone can suggest me any 3rd party lib which streams live audio with built-in Echo canceler..

Here is the link you can see, they are streaming live audio in the same room, without any echo, we are working on the same concept of live streaming...

Thanks in advance...!



via Chebli Mohamed

Find file names containing value stored in a string variable or object and move that file

Hi Please help a Powershell newbie with a seemingly simple task which is doing my head in.

I have a folder containing a large list of hofixes. Each hotfix filename contains the KB number such as KB2993958 similar to Windows8.1-KB2957189-x64.msu

I'm trying to troubleshoot an issue caused by the installation of a particular hotfix. I have narrowed the selection down to about 50 possible hotfixes, far less than how many are contained in the master folder. I want to install 10 hotfixes at a time to try and isolate the issue.

I have the list of 50 hotfixes I need to install either in a get-hotfix object or probably converted to a string in a variable.

So I want to compare the Kb numbers listed in my object / variable against the file names in the master folder and if the file name contains any of the KB number stored in my variable then move this file into a folder, ready for installation. Seems simple. Can't work it out.

Please help. Feeling a bit dumb right now :( Many Thanks!!



via Chebli Mohamed

Emacs + windowed mode + non-ascii characters + utf8 file encoding

I've developed a little mode for emacs which applies enriched format (colors, different fonts, etc) to some pieces of text using regular expressions (as markdown does).

In some of these regular expressions, there's french and spanish characters (like ``), and unicode characters (like ☛). Usually I use emacs in no windows mode (-nw), but to edit files which uses my mode, I open emacs in windowed mode, and I've realized that in windowed mode I can't write non-ascii characters, like ` or ☛. So, I can't use these special patterns (files are utf8).

If I execute describe-input-method in emacs, it says that no input method is specified, both in windowed and nw mode. However, it's not crazy to say the input method is different in windows and nw mode, since in boths modes the characters I'm able to write are different; or have I misunderstood what the meaning of input mode in emacs is?



via Chebli Mohamed