I m posting the snippet of a datatable that shows three records, I m trying to get the data in column fashion. I have 2 arrays being formed from column(0) and column(2). column(2) keeps sending "true" value regardless of its checked state, any idea why? Thanks

var tablenest = $('#RegSrc').DataTable({
  select: true,
  "bPaginate": false,
  "bFilter": false,
  responsive: true,
  deferRender: true,
  "processing": true,
  "serverSide": false,
  bAutoWidth: true,
  data: [{
    "RecID": 2383,
    "PtFilenum": 15090248,
    "PrtFilenum": 13090701,
    "Fullname": " sadden ",
    "PrtStatus": 1
  }, {
    "RecID": 2384,
    "PtFilenum": 15090248,
    "PrtFilenum": 15120996,
    "Fullname": "marwam mohmmad saleem",
    "PrtStatus": 1
  }, {
    "RecID": 2385,
    "PtFilenum": 15090248,
    "PrtFilenum": 170227111,
    "Fullname": "asd dsf a",
    "PrtStatus": 1
  }],
  order: [2, 'asc'],
  keys: {
    columns: ':not(:first-child)',
    keys: [9]
  },
  columns: [{ // Checkbox select column
      data: null,
      defaultContent: '',
      className: 'select-checkbox',
      orderable: false,
      "width": "1%"
    },
    {
      "width": "50%",
      data: "RecID",
      "visible": false
    },
    {
      "width": "50%",
      data: "PtFilenum",
      "visible": false
    },
    {
      "width": "10%",
      data: "PrtFilenum"
    },
    {
      "width": "40%",
      data: "Fullname"
    },
    {
      "width": "10%",
      data: "PrtStatus",
      render: function(data, type, row) {
        if (type === 'display') {
          if (data == 1) {
            return 'Partners';
          } else {
            return 'Not Partners';
          }
        }
        return data;
      },
      className: "dt-body-center"
    },
  ],
});

$("#btn2").click(function() {
  var obj = {}
  obj.Ptfn = '15090248'
  obj.Prfnarray = '' + tablenest.columns(0).data().toArray(); + ''
  obj.PrfStarray = '' + tablenest.columns(2).data().toArray(); + ''
  console.log(JSON.stringify(obj))
})
<link href="https://cdn.datatables.net/1.10.15/css/dataTables.bootstrap.min.css" rel="stylesheet" />
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet" />
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<script src="https://cdn.datatables.net/1.10.15/js/jquery.dataTables.min.js"></script>
<script src="http://uxmine.com/demo/dockmodal/assets/js/jquery.dockmodal.js"></script>
<script src="https://cdn.datatables.net/1.10.15/js/dataTables.bootstrap.min.js"></script>
<link href="http://uxmine.com/demo/dockmodal/assets/css/jquery.dockmodal.css" rel="stylesheet" />
<link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/v/dt/jqc-1.12.4/moment-2.18.1/dt-1.10.15/b-1.3.1/se-1.2.2/datatables.min.css">
<link rel="stylesheet" type="text/css" href="Resources/css/generator-base.css">
<link rel="stylesheet" type="text/css" href="Resources/css/editor.dataTables.min.css">

<script type="text/javascript" charset="utf-8" src="https://cdn.datatables.net/v/dt/jqc-1.12.4/moment-2.18.1/dt-1.10.15/b-1.3.1/se-1.2.2/datatables.min.js"></script>
<script type="text/javascript" charset="utf-8" src="Resources/js/dataTables.editor.min.js"></script>
<script type="text/javascript" charset="utf-8" src="Resources/js/table.asd.js"></script>



<button id="btn2" class="btn btn-primary">Get</button>
<table id="RegSrc" class="table table-bordered table-striped table-condensed mb-none display responsive nowrap" cellspacing="0" width="100%">
  <thead>
    <tr>
      <th></th>
      <th><b>RecID</b></th>
      <th><b>Patient File Number</b></th>
      <th><b>Partner File Number</b></th>
      <th><b>Patient Name</b></th>
      <th><b>Status</b></th>
    </tr>
  </thead>
  <tbody>
  </tbody>
</table>

I have a table where there is one input box in each row. There are 3 rows in total and i need to calculate the total from those three input boxes value. But the state of value is not updating. I only get the initial state of value. For example, there is a state object of agent, hotel, admin. If i initialize the agent value 10, i get 10 in input box but when i try to change the value i only get 10. The value does not gets updated.

Here is the code

const Tbody = ({ roles, states, onChange, onBlur }) => {
  const row = roles.map((role, index) => (
    <tr key={index}>
      <td>{index + 1}</td>
      <td>{role.label}</td>
      <td>
        <TextFieldGroup
          id="formControlsText"
          type="number"
          name={role.name}
          value={states[role.name]}
          onChange={event => onChange(event)}
          onBlur={event => onBlur(event)}
          error={states.errors[role.name]}
          required
        />
      </td>
    </tr>
  ));
  return <tbody>{row}</tbody>;
};

class Commission extends React.PureComponent {
  state = {
    agentCommission: 0,
    hotelCommission: 0,
    adminCommission: 0,
    errors: {},
    isSubmitted: false
  };

  handleChange = event => {
    console.log(event.target);
    const fieldName = event.target.name;
    this.setState(
      { [event.target.name]: parseFloat(event.target.value) },
      () => {
        this.validateField([fieldName]);
      }
    );
  };

  handleBlur = event => {
    const fieldName = event.target.name;
    this.validateField([fieldName]);
  };

  validateField = validate => {
    const errors = { ...this.state.errors };
    let hasError = false;
    validate.forEach(field => {
      if (
        parseFloat(this.state[field]) > 100 ||
        parseFloat(this.state[field]) < 0
      ) {
        hasError = true;
        errors[field] = 'cannot be less than 0 and more than 100';
      } else {
        errors[field] = '';
      }
    });
    this.setState({ errors });
    return !hasError;
  };

  render() {
    const { agentCommission, adminCommission, hotelcommission } = this.state;
    const totalCommission = agentCommission + adminCommission + hotelcommission;
    console.log('totalCommission', totalCommission);
    return (
      <div className="table-responsive">
        <table className="table table-striped table-bordered table-condensed">
          <thead>
            <tr>
              <th>S.N</th>
              <th>Role</th>
              <th>Commission</th>
            </tr>
          </thead>
          <Tbody
            roles={[
              { name: 'agentCommission', label: 'Agent' },
              { name: 'hotelCommission', label: 'Hotel Owner' },
              { name: 'adminCommission', label: 'Admin' }
            ]}
            states={{ ...this.state }}
            onChange={this.handleChange}
            onBlur={this.handleBlur}
          />
          <tbody>
            <tr>
              <td>
                <button
                  className="btn btn-primary"
                  onClick={this.handleSubmit}
                  disabled={totalCommission === 100 ? false : true}>
                  Save Changes
                </button>
              </td>
            </tr>
          </tbody>
        </table>
      </div>
    );
  }
}

I would like to know whether it is possible to add a canvas to a datatable.

I have installed the datatable responsive plugin which, in case the column is too width, clicking a button will allow you to see extra information.

I would like to know whether I can add a canvas to the hidden area in order to play an audio which correspond to the selected row. I wish to use a nice audio player called wavesurfer.js

To be able to do do that I need to learn the following:

  • How to add a canvas at the end of the hidden area
  • How to force the responsive table to not display the canvas in case the table has enough space
  • The canvas has to fill the hidden div 100%

Picture of what I am trying to achieve (Each row is an audio file)

enter image description here Please see the following for your information

<div id="demo">
   <div id="waveform">
      <div class="progress progress-striped active" id="progress-bar" style="display: none;">
         <div class="progress-bar progress-bar-info" style="width: 100%;"></div>
      </div>
      <wave style="display: block; position: relative; -webkit-user-select: none; height: 128px; overflow-x: auto; overflow-y: hidden;"><canvas width="870" height="128" style="position: absolute; z-index: 1; top: 0px; bottom: 0px; width: 870px;"></canvas><wave style="position: absolute; z-index: 2; top: 0px; bottom: 0px; overflow: hidden; width: 0px; display: block; box-sizing: border-box; border-right-style: solid; border-right-width: 1px; border-right-color: navy;"><canvas width="870" height="128" style="width: 870px;"></canvas></wave></wave>
   </div>
</div>

https://jsfiddle.net/h26cxgc8/

I'm new to Lottie animation and i want to use Lottie animation in my ListView as animation for Like/Unlike Button. I've seen Lottie support CacheStrategy for high frequently reused animation, but i don't know how to use it.

This is the code in Github. LottieAnimationView setAnimation(String, CacheStrategy). String : json file. CacheStrategy: Strong, Weak, None.

And one more question.

What about the memory usage between LottieAnimationView setAnimation(String, CacheStrategy) and LottieAnimationView setAnimation(String) ?

One is continuously loading Json file, another is caching data to buffer once and reuse it.

For using in ListView, i'm using following codes.

FrameLayout.LayoutParams param = new FrameLayout.LayoutParams(FrameLayout.LayoutParams.MATCH_PARENT , FrameLayout.LayoutParams.MATCH_PARENT);

animationView.setLayoutParams(param);
animationView.setBackgroundResource(R.drawable.raduis_bottom_right_nonpadding);
animationView.setAnimation("hello.json");

animationView.addAnimatorListener(new Animator.AnimatorListener() {
    @Override
    public void onAnimationStart(Animator animation) {}

    @Override
    public void onAnimationEnd(Animator animation) {
        holder.likeFrameLayout.removeView(animationView);
       holder.image_view_save_article_item.setVisibility(View.VISIBLE);

    }
    @Override
    public void onAnimationCancel(Animator animation) {}

    @Override
    public void onAnimationRepeat(Animator animation) {}
});

I have a table named 'quantity' as below

Table 1 :

----------------------------------------------------
Price | A_Quantity | B_Quantity | Remaining_quantity
----------------------------------------------------
30    | 17         | 2          | 0    
32    | 17         | 4          | 0    
33    | 17         | 4          | 0
----------------------------------------------------

I want the field - Remaining_quantity to be filled as below

Table 2 :

----------------------------------------------------
Price | A_Quantity | B_Quantity | Remaining_quantity
----------------------------------------------------
30    | 17         | 2          | 15    
32    | 17         | 4          | 11
33    | 17         | 4          | 7
----------------------------------------------------

I have used the below query, but it doesn't give the expected result.

update quantity set remaining_quantity = remaining_quantity - (lag(B_Quantity) OVER (ORDER BY price)). 

My web app doesn't activate proceed button as shown in the picture even when ' I agree ' check box but it works in other browsers like UC Mini. What can be done?

Image

public class sign extends AppCompatActivity {

WebView site;

ProgressDialog pb;


String 

url="http://tinesandbarbs.com/login/index.phppage=

join&redirect=http%3A%2F%2Ftinesandbarbs.com%2Flogin%2Findex.php%3Fpage%3D


start%26keep_session%3d562582627&keep_session=562582627";

@Override

protected void onCreate(Bundle savedInstanceState) {

super.onCreate(savedInstanceState);

setContentView(R.layout.activity_sitepage);

site = (WebView) findViewById(R.id.site);

try {

if(new net(getApplicationContext()).network()) {

cookie();

site.getSettings().getJavaScriptEnabled();

site.getSettings().setLoadsImagesAutomatically(true);

site.getSettings().setDatabaseEnabled(true);

site.setWebChromeClient(new WebChromeClient());


site.setWebViewClient(new browser());

site.loadUrl(url);

}

}catch(Exception e)

{

start();

}

}


 private class browser extends WebViewClient {


  @Override

   public void onPageStarted(WebView view, String url, Bitmap favicon) {

   super.onPageStarted(view, url, favicon);

   sign.this.pb = new ProgressDialog(sign.this);

   sign.this.pb.setMessage("Loading");

   sign.this.pb.setIndeterminate(true);

   sign.this.pb.show();

   sign.this.pb.setCancelable(true);

   sign.this.pb.setOnCancelListener(new 

   DialogInterface.OnCancelListener() {

   @Override
   public void onCancel(DialogInterface dialog) {

    site.stopLoading();

    }

    });

    }

    @SuppressWarnings("deprecation")

    @Override
    public boolean shouldOverrideUrlLoading(WebView view, String url) {
            view.loadUrl(url);
        return true;
    }

    @Override
    public void onPageFinished(WebView view, String url) {
            super.onPageFinished(view, url);
            sign.this.pb.dismiss();
            if (view.getUrl().equals("http%\"http://tinesandbarbs.com/login/index.php?page=join&type=step3&redirect=3A%2F%2Ftinesandbarbs.com%2Flogin%2Findex.php%3Fpage%3Dstart%26keep_mobile%3D1&keep_mobile=1"))
            {
                alert();
            }
    }

}
public void cookie()
{
    CookieManager cookieManager=CookieManager.getInstance();
    if(Build.VERSION.SDK_INT>=Build.VERSION_CODES.LOLLIPOP)
    {
        cookieManager.acceptCookie();
        cookieManager.setAcceptThirdPartyCookies(site,true);
    }
    else
    {
        cookieManager.acceptCookie();
        cookieManager.setAcceptCookie(true);
    }
}
@Override
public boolean onCreateOptionsMenu(Menu menu)
{
    getMenuInflater().inflate(R.menu.toolbar2,menu);
    return true;
}
@Override
public boolean onOptionsItemSelected(MenuItem item) {
    switch(item.getItemId()) {
        case R.id.apk:
            startActivity(new Intent(this,login.class));
            return(true);
    }
    return(super.onOptionsItemSelected(item));
}

public void onBackPressed()
{
    if (site.canGoBack()) {
              cookie();
              site.setWebViewClient(new browser());
                site.goBack();
            } else {
                startActivity(new Intent(this,login.class));
            }
}

public void start()
{
    Intent i=new Intent(this,network.class);
    i.putExtra("from","sign");
    i.putExtra("from1","sign");
    startActivity(i);
}
public void alert()
{
    AlertDialog.Builder builder1 = new AlertDialog.Builder(getApplicationContext());
    builder1.setMessage("Congratulations!!!You joined the most advanced form of board game. Do You wish to continue with site or go back to the app???");
    builder1.setCancelable(false);
    builder1.setPositiveButton("Continue with site", new DialogInterface.OnClickListener() {
                public void onClick(DialogInterface dialog, int id) {
                    dialog.cancel();
                }
            });

    builder1.setNegativeButton("Go Back To app", new DialogInterface.OnClickListener() {
                public void onClick(DialogInterface dialog, int id) {
                    dialog.cancel();
                    sign.this.finish();
                }
            });
    AlertDialog alert = builder1.create();
    alert.show();
}

}

I have some pairs as following, the type_id is random:

<type_id, value>

<23434, 12>, <53233, 23>, ... <8973, 3>
How to store these pairs?

1) I can think of Dict, in which the type of type_id must be string?

2) Whether there is an better alternative?

I am trying to use the mlr package in R for applying feature selection to a bagged learner, using sequential forward search.

d <- data.frame(a = rnorm(1000, mean = 1),
                    b = rnorm(1000, mean = 2),
                    c = rnorm(1000, mean = 3),
                    target = as.factor(rbinom(1000, 1, prob = 0.5)))

t <- makeClassifTask(data = d,
                     target = 'target',
                     positive = '1')

logreg.lrn <- makeLearner('classif.logreg')
logreg_bagged.lrn <- makeBaggingWrapper(logreg.lrn)

cntrl.sfs <- makeFeatSelControlSequential(method = "sfs",
                                          alpha = 0.01,
                                          max.features = 10,
                                          maxit = 3)

logreg_bagged_featsel.lrn <- makeFeatSelWrapper(logreg_bagged.lrn,
                                                resampling = makeResampleDesc('CV',
                                                                              iters = 3),
                                                measures = mmce,
                                                control = cntrl.sfs)

mlr::train(logreg_bagged_featsel.lrn, classif.task)

Returns the following error:

[FeatSel] Started selecting features for learner 'classif.logreg.bagged'
With control class: FeatSelControlSequential
Imputation value: 1
[FeatSel-x] 1: 000 (0 bits)
Error in mlr::train(logreg_bagged_featsel.lrn, classif.task) : 
  Assertion on '.newdata' failed: Must have at least 1 cols, but has 0 cols.

When I use a sequential backward search instead, the error does not occur:

cntrl.sbs <- makeFeatSelControlSequential(method = "sbs",
                                          alpha = 0.01,
                                          max.features = 10,
                                          maxit = 3)

logreg_bagged_featsel.lrn <- makeFeatSelWrapper(logreg_bagged.lrn,
                                                resampling = makeResampleDesc('CV',
                                                                              iters = 3),
                                                measures = mmce,
                                                control = cntrl.sbs)

mlr::train(logreg_bagged_featsel.lrn, classif.task)

[FeatSel] Started selecting features for learner 'classif.logreg.bagged'
With control class: FeatSelControlSequential
Imputation value: 1
[FeatSel-x] 1: 111 (3 bits)
[FeatSel-y] 1: mmce.test.mean=0.447; time: 0.0 min
[FeatSel-x] 2: 011 (2 bits)
[FeatSel-y] 2: mmce.test.mean=0.509; time: 0.0 min
[FeatSel-x] 2: 101 (2 bits)
[FeatSel-y] 2: mmce.test.mean=0.448; time: 0.0 min
[FeatSel-x] 2: 110 (2 bits)
[FeatSel-y] 2: mmce.test.mean=0.456; time: 0.0 min
[FeatSel-x] 3: 001 (1 bits)
[FeatSel-y] 3: mmce.test.mean=0.51; time: 0.0 min
[FeatSel-x] 3: 100 (1 bits)
[FeatSel-y] 3: mmce.test.mean=0.468; time: 0.0 min
[FeatSel] Result: ac (2 bits)
Model for learner.id=classif.logreg.bagged.featsel; learner.class=FeatSelWrapper
Trained on: task.id = classif.df; obs = 1000; features = 3
Hyperparameters: model=FALSE

How can I make this work for sequential forward search? Thanks.

I'm doing both a hardware and a domain migration, as well as upgrading my TFS instance from 2015.3 to 2017.1. I first discussed this project (and received some VERY helpful suggestions) here.

Here’s the infrastructure I’ve got right now:

Hostname  Operating System
SERVER1   Hyper-V Host 2012 r2
SERVER2   Server Essentials 2012 R2
SERVER3   Server 2012 R2 (TFS 2015.3)
DB        Windows 10 (SQL 2014)

...and here’s what’s planned:

Hostname  Operating System
SERVER1   Hyper-V Host 2016
SERVER2   Server Essentials 2016
SERVER3   Server 2016 (TFS 2017.1 & SQL 2016)

The old and new domains carry the same descriptive name (e.g. DOMAIN). For the purposes of this Q&A, henceforth I'll refer to any VM on the old domain with a leading underbar (e.g. _SERVER3).

My problem is that the guidance for the hardware migration doesn't indicate whether the TFS Restore action can be run on a machine with a different NETBIOS name than the name of the machine on which the backup was taken.

I've set up a temporary _SERVER4 for this project, which I will join to the new domain as SERVER4 as part of the domain migration, but I don't know whether this will work. _SERVER3 has a different machine/domain SID, of course, which may confuse TFS if I restore to _SERVER4.

I'll then build up a new, clean SERVER3 on the new domain and restore from the backup taken on SERVER4. Same issue.

Is this really a problem—restoring a backup to a different machine name, same domain—or am I being too cautious and simply imagining a problem where one doesn't exist?

Here is my Code:

import java.awt.Color;
import java.awt.Dimension;
import java.awt.Graphics;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JOptionPane;
import javax.swing.SwingUtilities;

public class Main {
// code main
public static void main(String[] args) {
    JFrame frame = new JFrame();
    frame.setSize(460, 500);
    frame.setTitle("Circles generator");
    frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);


    SwingUtilities.invokeLater(new Runnable() {
        public void run() {
            frame.setVisible(true);

        }

    });

    String input = JOptionPane.showInputDialog("Enter n:");
    CustomComponents0 component = new CustomComponents0();
    frame.add(component);
    frame.getContentPane().validate();
        System.out.println("work before");
    frame.getContentPane().repaint();
        System.out.println("work");

    frame.getContentPane().repaint();
        System.out.println("work after");

}

// why is not JComponent
static class CustomComponents0 extends JLabel {

    private static final long serialVersionUID = 1L;

    @Override
    public Dimension getMinimumSize() {
        return new Dimension(200, 100);

    }

    @Override
    public Dimension getPreferredSize() {
        return new Dimension(300, 200);

    }

    @Override
    public void paintComponent(Graphics g) {
        System.out.println("paint");
        int margin = 10;
        Dimension dim = getSize();
        super.paintComponent(g);
        g.setColor(Color.red);
        g.fillRect(margin, margin, dim.width - margin * 2, dim.height - margin * 2);

    }

}

here is the code and I want run repaint before work and run repaint after work. When I run it, it should print

work before
paint
work
paint
work after

but there are only one paint and it's after work, Why is that happen? How can I fix that?

Thanks.

I'm trying to understand how to program based on Dcmtk libraries. I'm pretty new and naive in C++ programming(I have learned the basics of C++ and understand them) so it might just be an easy question for you guys. I have found this following code, I understand what it is doing, but I'm unable to link all the libraries required for this code to compile successfully. Please instruct how I can understand how to link all the sources and libraries in order make a Dcmtk program in C++. I'm trying to run this program in Visual Studio and it's dcmtk 3.6.0.

#include "dcmtk/config/osconfig.h"
#include "dcmtk/dcmimgle/dcmimage.h"

int main(int argc, char *argv[])
{
    OFLog::configure(OFLogger::INFO_LOG_LEVEL);

    DicomImage *image = new DicomImage("mf_image.dcm", CIF_UsePartialAccessToPixelData, 0, 10 /* fcount */); 

    if (image->getStatus() == EIS_Normal)
    {
        do {
            DCMIMGLE_INFO("processing frame " << image->getFirstFrame() + 1 << " to "
                                              << image->getFirstFrame() + image->getFrameCount());
        } while (image->processNextFrames());
    }

    delete image;

    return 0;
}

Include directories(I just guessed them):

D:\dcmtk-3.6.0\dcmdata\include;D:\dcmtk-3.6.0\ofstd\include;D:\dcmtk-3.6.0\oflog\include;D:\dcmtk-3.6.0\dcmimgle\include;D:\dcmtk-3.6.0\build\include;$(IncludePath)

Library Diretories(I just guessed them)

D:\dcmtk-3.6.0\build\dcmimgle\libsrc\Debug;D:\dcmtk-3.6.0\build\dcmdata\libsrc\Debug;D:\dcmtk-3.6.0\build\ofstd\libsrc\Debug;D:\dcmtk-3.6.0\build\oflog\libsrc\Debug;D:\dcmtk-3.6.0\build\dcmimage\libsrc\Debug;$(LibraryPath)

Source directories:(I just guessed them)

D:\dcmtk-3.6.0\dcmdata\libsrc;D:\dcmtk-3.6.0\dcmimage\libsrc;D:\dcmtk-3.6.0\dcmimgle\libsrc;D:\dcmtk-3.6.0\ofstd\libsrc;$(SourcePath)

The inputs in the linker are the following:

dcmimage.lib;dcmimgle.lib;dcmdata.lib;oflog.lib;ofstd.lib;netapi32.lib;wsock32.lib;advapi32.lib

Excluded library: msvcrt.lib

Errors(These errors happen when I don't add any Additional Dependencies in the input of the Linker of Visual Studio. When I add some Additional Dependencies, like dcmdata.lib, oflog.lib, ofstd.lib there are plenty of errors, so much that I cannot post them here due to lack of space.):

    Error   34  error LNK2005: "public: void __thiscall std::basic_ostream<char,struct std::char_traits<char> >::_Osfx(void)" (?_Osfx@[email protected][email protected]@std@@@std@@QAEXXZ) already defined in dcmimage.lib(diyp2img.obj)    C:\Users\fibne-mozher\Documents\Visual Studio 2010\Projects\AccessMultipleFile\AccessMultipleFile\msvcprtd.lib(MSVCP100D.dll)
Error   23  error LNK2005: "public: void __thiscall std::basic_ios<char,struct std::char_traits<char> >::setstate(int,bool)" (?setstate@[email protected][email protected]@std@@@std@@[email protected]) already defined in dcmimage.lib(diyp2img.obj)   C:\Users\fibne-mozher\Documents\Visual Studio 2010\Projects\AccessMultipleFile\AccessMultipleFile\msvcprtd.lib(MSVCP100D.dll)
Error   20  error LNK2005: "public: void __thiscall std::_Container_base12::_Orphan_all(void)" (?_Orphan_all@[email protected]@@QAEXXZ) already defined in dcmimage.lib(diyp2img.obj)   C:\Users\fibne-mozher\Documents\Visual Studio 2010\Projects\AccessMultipleFile\AccessMultipleFile\msvcprtd.lib(MSVCP100D.dll)
Error   6   error LNK2005: "public: virtual __thiscall std::basic_streambuf<char,struct std::char_traits<char> >::~basic_streambuf<char,struct std::char_traits<char> >(void)" ([email protected][email protected]@std@@@std@@[email protected]) already defined in dcmimage.lib(diyp2img.obj) C:\Users\fibne-mozher\Documents\Visual Studio 2010\Projects\AccessMultipleFile\AccessMultipleFile\msvcprtd.lib(MSVCP100D.dll)
Error   3   error LNK2005: "public: virtual __thiscall std::basic_ostream<char,struct std::char_traits<char> >::~basic_ostream<char,struct std::char_traits<char> >(void)" ([email protected][email protected]@std@@@std@@[email protected]) already defined in dcmimage.lib(diyp2img.obj)   C:\Users\fibne-mozher\Documents\Visual Studio 2010\Projects\AccessMultipleFile\AccessMultipleFile\msvcprtd.lib(MSVCP100D.dll)
Error   2   error LNK2005: "public: virtual __thiscall std::basic_ios<char,struct std::char_traits<char> >::~basic_ios<char,struct std::char_traits<char> >(void)" ([email protected][email protected]@std@@@std@@[email protected]) already defined in dcmimage.lib(diyp2img.obj)   C:\Users\fibne-mozher\Documents\Visual Studio 2010\Projects\AccessMultipleFile\AccessMultipleFile\msvcprtd.lib(MSVCP100D.dll)
Error   37  error LNK2005: "public: static void __cdecl std::ios_base::_Addstd(class std::ios_base *)" ([email protected][email protected]@@SAXPAV12@@Z) already defined in msvcprtd.lib(MSVCP100D.dll)  C:\Users\fibne-mozher\Documents\Visual Studio 2010\Projects\AccessMultipleFile\AccessMultipleFile\libcpmtd.lib(ios.obj)
Error   42  error LNK2005: "public: static void __cdecl std::_Locinfo::_Locinfo_dtor(class std::_Locinfo *)" (?_Locinfo_dtor@[email protected]@@SAXPAV12@@Z) already defined in msvcprtd.lib(MSVCP100D.dll)  C:\Users\fibne-mozher\Documents\Visual Studio 2010\Projects\AccessMultipleFile\AccessMultipleFile\libcpmtd.lib(locale0.obj)
Error   41  error LNK2005: "public: static void __cdecl std::_Locinfo::_Locinfo_ctor(class std::_Locinfo *,char const *)" (?_Locinfo_ctor@[email protected]@@[email protected]@Z) already defined in msvcprtd.lib(MSVCP100D.dll)  C:\Users\fibne-mozher\Documents\Visual Studio 2010\Projects\AccessMultipleFile\AccessMultipleFile\libcpmtd.lib(locale0.obj)
Error   29  error LNK2005: "public: int __thiscall std::ios_base::flags(void)const " ([email protected][email protected]@@QBEHXZ) already defined in dcmimage.lib(diyp2img.obj)    C:\Users\fibne-mozher\Documents\Visual Studio 2010\Projects\AccessMultipleFile\AccessMultipleFile\msvcprtd.lib(MSVCP100D.dll)
Error   26  error LNK2005: "public: int __thiscall std::basic_streambuf<char,struct std::char_traits<char> >::sputc(char)" (?sputc@[email protected][email protected]@std@@@std@@[email protected]) already defined in dcmimage.lib(diyp2img.obj)    C:\Users\fibne-mozher\Documents\Visual Studio 2010\Projects\AccessMultipleFile\AccessMultipleFile\msvcprtd.lib(MSVCP100D.dll)
Error   35  error LNK2005: "public: class std::locale::facet * __thiscall std::locale::facet::_Decref(void)" ([email protected]@[email protected]@@[email protected]) already defined in dcmimage.lib(diyp2img.obj)    C:\Users\fibne-mozher\Documents\Visual Studio 2010\Projects\AccessMultipleFile\AccessMultipleFile\msvcprtd.lib(MSVCP100D.dll)
Error   27  error LNK2005: "public: class std::basic_streambuf<char,struct std::char_traits<char> > * __thiscall std::basic_ios<char,struct std::char_traits<char> >::rdbuf(void)const " (?rdbuf@[email protected][email protected]@std@@@std@@[email protected][email protected]@std@@@[email protected]) already defined in dcmimage.lib(diyp2img.obj)   C:\Users\fibne-mozher\Documents\Visual Studio 2010\Projects\AccessMultipleFile\AccessMultipleFile\msvcprtd.lib(MSVCP100D.dll)
Error   32  error LNK2005: "public: class std::basic_ostream<char,struct std::char_traits<char> > * __thiscall std::basic_ios<char,struct std::char_traits<char> >::tie(void)const " (?tie@[email protected][email protected]@std@@@std@@[email protected][email protected]@std@@@[email protected]) already defined in dcmimage.lib(diyp2img.obj)   C:\Users\fibne-mozher\Documents\Visual Studio 2010\Projects\AccessMultipleFile\AccessMultipleFile\msvcprtd.lib(MSVCP100D.dll)
Error   1   error LNK2005: "public: class std::basic_ostream<char,struct std::char_traits<char> > & __thiscall std::basic_ostream<char,struct std::char_traits<char> >::operator<<(unsigned long)" ([email protected][email protected]@std@@@std@@[email protected]@Z) already defined in dcmimage.lib(dicoimg.obj)  C:\Users\fibne-mozher\Documents\Visual Studio 2010\Projects\AccessMultipleFile\AccessMultipleFile\msvcprtd.lib(MSVCP100D.dll)
Error   31  error LNK2005: "public: class std::basic_ostream<char,struct std::char_traits<char> > & __thiscall std::basic_ostream<char,struct std::char_traits<char> >::flush(void)" (?flush@[email protected][email protected]@std@@@std@@[email protected]) already defined in dcmimage.lib(diyp2img.obj)    C:\Users\fibne-mozher\Documents\Visual Studio 2010\Projects\AccessMultipleFile\AccessMultipleFile\msvcprtd.lib(MSVCP100D.dll)
Error   28  error LNK2005: "public: char __thiscall std::basic_ios<char,struct std::char_traits<char> >::fill(void)const " (?fill@[email protected][email protected]@std@@@std@@QBEDXZ) already defined in dcmimage.lib(diyp2img.obj)    C:\Users\fibne-mozher\Documents\Visual Studio 2010\Projects\AccessMultipleFile\AccessMultipleFile\msvcprtd.lib(MSVCP100D.dll)
Error   33  error LNK2005: "public: bool __thiscall std::ios_base::good(void)const " ([email protected][email protected]@@QBE_NXZ) already defined in dcmimage.lib(diyp2img.obj)    C:\Users\fibne-mozher\Documents\Visual Studio 2010\Projects\AccessMultipleFile\AccessMultipleFile\msvcprtd.lib(MSVCP100D.dll)
Error   4   error LNK2005: "public: __thiscall std::basic_ostream<char,struct std::char_traits<char> >::basic_ostream<char,struct std::char_traits<char> >(class std::basic_streambuf<char,struct std::char_traits<char> > *,bool)" ([email protected][email protected]@std@@@std@@[email protected][email protected][email protected]@std@@@1@[email protected]) already defined in dcmimage.lib(diyp2img.obj) C:\Users\fibne-mozher\Documents\Visual Studio 2010\Projects\AccessMultipleFile\AccessMultipleFile\msvcprtd.lib(MSVCP100D.dll)
Error   44  error LNK2005: "public: __thiscall std::_Lockit::~_Lockit(void)" ([email protected]@@[email protected]) already defined in msvcprtd.lib(MSVCP100D.dll)    C:\Users\fibne-mozher\Documents\Visual Studio 2010\Projects\AccessMultipleFile\AccessMultipleFile\libcpmtd.lib(xlock.obj)
Error   43  error LNK2005: "public: __thiscall std::_Lockit::_Lockit(int)" ([email protected]@@[email protected]@Z) already defined in msvcprtd.lib(MSVCP100D.dll) C:\Users\fibne-mozher\Documents\Visual Studio 2010\Projects\AccessMultipleFile\AccessMultipleFile\libcpmtd.lib(xlock.obj)
Error   19  error LNK2005: "public: __thiscall std::_Container_base12::~_Container_base12(void)" ([email protected]@@[email protected]) already defined in dcmimage.lib(diyp2img.obj)   C:\Users\fibne-mozher\Documents\Visual Studio 2010\Projects\AccessMultipleFile\AccessMultipleFile\msvcprtd.lib(MSVCP100D.dll)
Error   22  error LNK2005: "public: __thiscall std::_Container_base12::_Container_base12(void)" ([email protected]@@[email protected]) already defined in dcmimage.lib(diyp2img.obj)    C:\Users\fibne-mozher\Documents\Visual Studio 2010\Projects\AccessMultipleFile\AccessMultipleFile\msvcprtd.lib(MSVCP100D.dll)
Error   30  error LNK2005: "public: __int64 __thiscall std::ios_base::width(void)const " ([email protected][email protected]@@QBE_JXZ) already defined in dcmimage.lib(diyp2img.obj)   C:\Users\fibne-mozher\Documents\Visual Studio 2010\Projects\AccessMultipleFile\AccessMultipleFile\msvcprtd.lib(MSVCP100D.dll)
Error   24  error LNK2005: "public: __int64 __thiscall std::ios_base::width(__int64)" ([email protected][email protected]@@[email protected]) already defined in dcmimage.lib(diyp2img.obj)    C:\Users\fibne-mozher\Documents\Visual Studio 2010\Projects\AccessMultipleFile\AccessMultipleFile\msvcprtd.lib(MSVCP100D.dll)
Error   25  error LNK2005: "public: __int64 __thiscall std::basic_streambuf<char,struct std::char_traits<char> >::sputn(char const *,__int64)" (?sputn@[email protected][email protected]@std@@@std@@[email protected]) already defined in dcmimage.lib(diyp2img.obj)   C:\Users\fibne-mozher\Documents\Visual Studio 2010\Projects\AccessMultipleFile\AccessMultipleFile\msvcprtd.lib(MSVCP100D.dll)
Error   12  error LNK2005: "protected: void __thiscall std::basic_streambuf<char,struct std::char_traits<char> >::setp(char *,char *,char *)" (?setp@[email protected][email protected]@std@@@std@@[email protected]) already defined in dcmimage.lib(diyp2img.obj)  C:\Users\fibne-mozher\Documents\Visual Studio 2010\Projects\AccessMultipleFile\AccessMultipleFile\msvcprtd.lib(MSVCP100D.dll)
Error   9   error LNK2005: "protected: void __thiscall std::basic_streambuf<char,struct std::char_traits<char> >::setp(char *,char *)" (?setp@[email protected][email protected]@std@@@std@@[email protected]) already defined in dcmimage.lib(diyp2img.obj)  C:\Users\fibne-mozher\Documents\Visual Studio 2010\Projects\AccessMultipleFile\AccessMultipleFile\msvcprtd.lib(MSVCP100D.dll)
Error   8   error LNK2005: "protected: void __thiscall std::basic_streambuf<char,struct std::char_traits<char> >::setg(char *,char *,char *)" (?setg@[email protected][email protected]@std@@@std@@[email protected]) already defined in dcmimage.lib(diyp2img.obj)  C:\Users\fibne-mozher\Documents\Visual Studio 2010\Projects\AccessMultipleFile\AccessMultipleFile\msvcprtd.lib(MSVCP100D.dll)
Error   18  error LNK2005: "protected: void __thiscall std::basic_streambuf<char,struct std::char_traits<char> >::pbump(int)" (?pbump@[email protected][email protected]@std@@@std@@[email protected]) already defined in dcmimage.lib(diyp2img.obj) C:\Users\fibne-mozher\Documents\Visual Studio 2010\Projects\AccessMultipleFile\AccessMultipleFile\msvcprtd.lib(MSVCP100D.dll)
Error   16  error LNK2005: "protected: void __thiscall std::basic_streambuf<char,struct std::char_traits<char> >::gbump(int)" (?gbump@[email protected][email protected]@std@@@std@@[email protected]) already defined in dcmimage.lib(diyp2img.obj) C:\Users\fibne-mozher\Documents\Visual Studio 2010\Projects\AccessMultipleFile\AccessMultipleFile\msvcprtd.lib(MSVCP100D.dll)
Error   15  error LNK2005: "protected: char * __thiscall std::basic_streambuf<char,struct std::char_traits<char> >::pptr(void)const " (?pptr@[email protected][email protected]@std@@@std@@IBEPADXZ) already defined in dcmimage.lib(diyp2img.obj) C:\Users\fibne-mozher\Documents\Visual Studio 2010\Projects\AccessMultipleFile\AccessMultipleFile\msvcprtd.lib(MSVCP100D.dll)
Error   13  error LNK2005: "protected: char * __thiscall std::basic_streambuf<char,struct std::char_traits<char> >::pbase(void)const " (?pbase@[email protected][email protected]@std@@@std@@IBEPADXZ) already defined in dcmimage.lib(diyp2img.obj)   C:\Users\fibne-mozher\Documents\Visual Studio 2010\Projects\AccessMultipleFile\AccessMultipleFile\msvcprtd.lib(MSVCP100D.dll)
Error   7   error LNK2005: "protected: char * __thiscall std::basic_streambuf<char,struct std::char_traits<char> >::gptr(void)const " (?gptr@[email protected][email protected]@std@@@std@@IBEPADXZ) already defined in dcmimage.lib(diyp2img.obj) C:\Users\fibne-mozher\Documents\Visual Studio 2010\Projects\AccessMultipleFile\AccessMultipleFile\msvcprtd.lib(MSVCP100D.dll)
Error   14  error LNK2005: "protected: char * __thiscall std::basic_streambuf<char,struct std::char_traits<char> >::epptr(void)const " (?epptr@[email protected][email protected]@std@@@std@@IBEPADXZ) already defined in dcmimage.lib(diyp2img.obj)   C:\Users\fibne-mozher\Documents\Visual Studio 2010\Projects\AccessMultipleFile\AccessMultipleFile\msvcprtd.lib(MSVCP100D.dll)
Error   17  error LNK2005: "protected: char * __thiscall std::basic_streambuf<char,struct std::char_traits<char> >::egptr(void)const " (?egptr@[email protected][email protected]@std@@@std@@IBEPADXZ) already defined in dcmimage.lib(diyp2img.obj)   C:\Users\fibne-mozher\Documents\Visual Studio 2010\Projects\AccessMultipleFile\AccessMultipleFile\msvcprtd.lib(MSVCP100D.dll)
Error   10  error LNK2005: "protected: char * __thiscall std::basic_streambuf<char,struct std::char_traits<char> >::eback(void)const " (?eback@[email protected][email protected]@std@@@std@@IBEPADXZ) already defined in dcmimage.lib(diyp2img.obj)   C:\Users\fibne-mozher\Documents\Visual Studio 2010\Projects\AccessMultipleFile\AccessMultipleFile\msvcprtd.lib(MSVCP100D.dll)
Error   11  error LNK2005: "protected: char * __thiscall std::basic_streambuf<char,struct std::char_traits<char> >::_Pninc(void)" (?_Pninc@[email protected][email protected]@std@@@std@@IAEPADXZ) already defined in dcmimage.lib(diyp2img.obj)   C:\Users\fibne-mozher\Documents\Visual Studio 2010\Projects\AccessMultipleFile\AccessMultipleFile\msvcprtd.lib(MSVCP100D.dll)
Error   21  error LNK2005: "protected: __thiscall std::basic_streambuf<char,struct std::char_traits<char> >::basic_streambuf<char,struct std::char_traits<char> >(void)" ([email protected]?$char_traits@D@std@@@std@@IAE@XZ) already defined in dcmimage.lib(diyp2img.obj)   C:\Users\fibne-mozher\Documents\Visual Studio 2010\Projects\AccessMultipleFile\AccessMultipleFile\msvcprtd.lib(MSVCP100D.dll)
Error   5   error LNK2005: "protected: __thiscall std::basic_ios<char,struct std::char_traits<char> >::basic_ios<char,struct std::char_traits<char> >(void)" (??0?$basic_ios@DU?$char_traits@D@std@@@std@@IAE@XZ) already defined in dcmimage.lib(diyp2img.obj) C:\Users\fibne-mozher\Documents\Visual Studio 2010\Projects\AccessMultipleFile\AccessMultipleFile\msvcprtd.lib(MSVCP100D.dll)
Error   38  error LNK2005: "private: static void __cdecl std::locale::facet::_Facet_Register(class std::locale::facet *)" (?_Facet_Register@facet@locale@std@@CAXPAV123@@Z) already defined in msvcprtd.lib(locale0_implib.obj) C:\Users\fibne-mozher\Documents\Visual Studio 2010\Projects\AccessMultipleFile\AccessMultipleFile\libcpmtd.lib(locale0.obj)
Error   36  error LNK2005: "private: static void __cdecl std::ios_base::_Ios_base_dtor(class std::ios_base *)" (?_Ios_base_dtor@ios_base@std@@CAXPAV12@@Z) already defined in msvcprtd.lib(MSVCP100D.dll)   C:\Users\fibne-mozher\Documents\Visual Studio 2010\Projects\AccessMultipleFile\AccessMultipleFile\libcpmtd.lib(ios.obj)
Error   40  error LNK2005: "private: static class std::locale::_Locimp * __cdecl std::locale::_Init(void)" (?_Init@locale@std@@CAPAV_Locimp@12@XZ) already defined in msvcprtd.lib(MSVCP100D.dll)   C:\Users\fibne-mozher\Documents\Visual Studio 2010\Projects\AccessMultipleFile\AccessMultipleFile\libcpmtd.lib(locale0.obj)
Error   39  error LNK2005: "private: static class std::locale::_Locimp * __cdecl std::locale::_Getgloballocale(void)" (?_Getgloballocale@locale@std@@CAPAV_Locimp@12@XZ) already defined in msvcprtd.lib(MSVCP100D.dll) C:\Users\fibne-mozher\Documents\Visual Studio 2010\Projects\AccessMultipleFile\AccessMultipleFile\libcpmtd.lib(locale0.obj)
Error   50  error LNK1169: one or more multiply defined symbols found   C:\Users\fibne-mozher\Documents\Visual Studio 2010\Projects\AccessMultipleFile\Debug\AccessMultipleFile.exe 1

I am having an issue running my unit tests for my node express application. The error is occurring when I try to use "import" to pull in a class to my unit test.

This is my karma.conf.js

module.exports = function(config) {
  config.set({

    basePath: '',

    frameworks: ['browserify', 'jasmine'],

    files: [
      'node_modules/babel-polyfill/dist/polyfill.js',
      'src/**/*.js',
      'test/**/*.spec.js'
    ],

    exclude: [
    ],

    preprocessors: {
      'src/**/*.js': ['browserify'],
      'test/**/*.spec.js': ['browserify'],
    },

    browserify: {
      debug: true,
      transform: [["babelify", { "presets": ["es2015"] }]]
    },

    reporters: ['progress'],

    port: 9876,

    colors: true,

    logLevel: config.LOG_INFO,

    autoWatch: true,

    browsers: ['PhantomJS'],

    singleRun: false,

    concurrency: Infinity
  })
}

This is a picture of the error message when I run "karma start" (Covered file path so ignore that please):

Karma start error

This is my single unit test .spec.js I have:

import { Command } from '../src/command/command';

    describe('Dummy Test', () => {
      it('Lets get this test working.', () => {
        expect(true).toBe(true);
      })
    });

The src folder just contains a server.js that kicks off the Express server and some es6 classes (such as the Command class being pulled into the unit test file)

I am working on a project using Delphi where I am making rows and columns for a GridPanel dynamically. I am also creating a panel (TPanel) that I intend to place in each cell dynamically.

My question is: How do you assign the newly created panel to a particular cell that is in the GridPanel?

I am guessing that I have to assign the panel's "Parent" property so that it is the GridView. However, I have not been able to adjust a "Row" or "Column" property for the TPanel unlike when you able to when you assign a panel to the GridPanel using the design environment.

#include <stdio.h>

main()
{
    char *a = "stack";
    char *b = "cats";
    int l = 0;  // for length of string b 
    clrscr();
    while (*b != NULL) 
        {
            l++;
            b++;
        }
    b--; // now b points to last char of the string 
    // printf("%d\n", l);
    while ((*a - *b == 32) || (*a == *b))
        {
            printf("%c %c\n", *a, *b);
            a++;
            b--;
            l--;
            if (l == 0)
                break;
        }
    l == 0 ? printf("anagrams") : printf("not anagrams");
    getch();
}

I wrote the code to check whether two strings a and b are anagrams.

the code displays a false positive when b is shorter in length than a and is a substring of a.

for eg. b is "cats" which in reverse is "stac" and a is "stack" the code shows a and b as anagrams

Creating pdf file by reading a text file

SampleTextRead2.txt


using apache pdfbox 2.0.6. Text which is being read is not getting displayed and is getting cut.

SamplePDF.pdf

Below is the sample program which I am using:-

public static void main(String[] args) {
        // TODO Auto-generated method stub


        PDDocument doc = null;
        TextToPDF text2pdf = new TextToPDF();

        try {
            doc = text2pdf.createPDFFromText(new FileReader("C:/sampleTextRead2.txt"));

            ByteArrayOutputStream out = new ByteArrayOutputStream();
            OutputStreamWriter writer = new OutputStreamWriter(out);
            PDFTextStripper stripper = new PDFTextStripper();
            stripper.writeText(doc, writer);
            writer.close();
            doc.save("C:/SamplePDF.pdf");
        } catch (FileNotFoundException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        } catch (IOException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        }
}

Why won't the below grammar recognize boolean values?

I've compared this to the grammars for both Java and GraphQL, and cannot see why it doesn't work.

Given the below grammar, parses is as follows:

foo = null // foo = value:nullValue
foo = 123 // foo = value:numberValue
foo = "Hello" // foo = value:stringValue
foo = true // line 1:6 mismatched input 'true' expecting {'null', STRING, BOOLEAN, NUMBER}

What is wrong?

grammar issue;

elementValuePair
    :   Identifier '=' value
    ;

Identifier : [_A-Za-z] [_0-9A-Za-z]* ;

value
   : STRING # stringValue | NUMBER # numberValue | BOOLEAN # booleanValue | 'null' #nullValue
   ;

STRING
   : '"' ( ESC | ~ ["\\] )* '"'
   ;

BOOLEAN
   : 'true' | 'false'
   ;

NUMBER
   : '-'? INT '.' [0-9]+| '-'? INT | '-'? INT
   ;

fragment INT
   : '0' | [1-9] [0-9]*
   ;

fragment ESC
   : '\\' ( ["\\/bfnrt]  )
   ;

fragment HEX
   : [0-9a-fA-F]
   ;

WS
   : [ \t\n\r]+ -> skip
   ;

I have a long .php form (3320 lines). I have many fields. When I click submit, and go through my error check, some fields retain their value and others reset to the first value. All the syntax is consistent. I remove the error checking and no difference. This is an example of a successful snipet:

<select name="Marital"  id="Marital" value="<?=$marital;?>">
	<option value="Single"<?= $_REQUEST["Marital"]== "Single"?" selected='selected'":""?>>Single</option>
	<option value="Married"<?= $_REQUEST["Marital"]== "Married"?" selected='selected'":""?>>Married</option>
	<option value="Divorced"<?= $_REQUEST["Marital"]== "Divorced"?" selected='selected'":""?>>Divorced</option>
	<option value="Widowed"<?= $_REQUEST["Marital"]== "Widowed"?" selected='selected'":""?>>Widowed</option>
</select>

This is an example of an unsuccessful snipet:

<select name="Networth" id="Networth" value="<?=$net_worth;?>">
	<option value="0"<?= $_REQUEST["NetWorth"]== "0"?" selected='selected'":""?>>0</option>
	<option value="1"<?= $_REQUEST["NetWorth"]== "1"?" selected='selected'":""?>>1</option>
	<option value="2"<?= $_REQUEST["NetWorth"]== "2"?" selected='selected'":""?>>2</option>
	<option value="3"<?= $_REQUEST["NetWorth"]== "3"?" selected='selected'":""?>>3</option>
	<option value="4"<?= $_REQUEST["NetWorth"]== "4"?" selected='selected'":""?>>4</option>
	<option value="5"<?= $_REQUEST["NetWorth"]== "5"?" selected='selected'":""?>>5</option>
</select>

We have a reporting web page that displays some filtering inputs and the report data (using DataTables). When user clicks the Search button or sorts the data, DataTables makes Ajax call to the server. While that's in motion we display an overlay over the table that says something like "Processing...", etc.

The question I have is, what is the proper or preferred way to notify the screen reader that the search/sort was initiated, or that the results came back and that the table was refreshed? I've searched for an answer on the web but I wasn't able to find anything definitive.

hi i'm tying to create Editext MultiLine but when i back to line all content of layout Go down Scrennshot

manifast.xml

 <activity
        android:configChanges="keyboardHidden|orientation|screenSize"
        android:name=".MainActivity">
        <intent-filter>
            /...
        </intent-filter>
    </activity>

Activity_main.xml

<EditText
    android:inputType="textMultiLine"
    android:layout_marginTop="25dp"
    android:background="@android:color/transparent"
    android:layout_width="200dp"
    android:maxLength="80"
    android:layout_centerHorizontal="true"
    android:hint="so.not.Vaporwave"
    android:textColor="#FFF"
    android:textColorHint="#a9ffffff"
    android:layout_height="wrap_content"
    android:layout_below="@+id/exmple"
    android:id="@+id/edtietxt" />

I have a user profile controller called "userinfo" and it's corresponding view. The userinfo index is the root path. In the homepage(which is the userinfo index), I have a link that takes you to the user profile page. It is giving me this error when I click on the image on the view page:enter image description here My routes are:enter image description here My userinfos_controller:

class UserinfosController < ApplicationController
    before_action :find_userinfo, only: [:show, :edit, :update, :destroy]
    before_action :authenticate_user!

    def index
        @userinfors = Userinfo.where(:userinfo_id => @userinformation_user_id)
    end

    def show
        @myvideo = Video.last
    end

    def new
        @userinformation = current_user.userinfos.build
    end

    def create
        @userinformation = current_user.userinfos.build(userinfo_params)
        if @userinformation.save
          redirect_to root_path
        else
          render 'new'
        end
    end

    def edit
    end

    def update
    end

    def destroy
        @userinformation.destroy
        redirect_to userinfo_path
    end

    private
        def userinfo_params
            params.require(:userinfo).permit(:name, :email, :college, :gpa, :major)
        end

        def find_userinfo
            @userinformation = Userinfo.find(params[:id])
        end
end

and my view is:

<%= link_to image_tag("student.png", class: 'right'), userinfo_path(@userinfors) %>

I thought maybe I must include ':index' in the 'before_action :find_userinfo' at the top of my controller. If I do that, the homepage doesn't even load and it gives me this error:enter image description here

I am trying to connect to a SFTP server using a 2048 bit RSA key file. It works fine running against version 7r45 of the JRE using JSch but i get the follow exception when running against version 8r31 of the JRE.

com.jcraft.jsch.JSchException: Session.connect: java.security.InvalidAlgorithmParameterException: Prime size must be multiple of 64, and can only range from 512 to 2048 (inclusive).

It's not an issue with limited Java security policy as I have tried it with and without the unlimited strength jars for both versions of java.

I have seen other references to this exception suggesting replacing the default java JCE provider with the BouncyCastle one, but why would there be a difference between java 7 and java 8? I did try this by running Security.addProvider(new BouncyCastleProvider()); at program start up but it doesn't seem to make any difference.

Laravel 5.4 Blade introduced the concept of components & slots - but I can't see what they add over the traditional @include. As I understand, with component/slots, you do:

In template component-tpl.blade.php:

<div class='container'>
  <h1>{{$slot1}}</h1>
  <h2>{{$slot2}}</h2>
</div>

Using slots in page template, you do:

@component('component-tpl')
  @slot('slot1')
    The content of Slot 1
  @endslot
  @slot('slot2')
    The content of Slot 2
  @endslot
@endcomponent

What functionality does that provide over the older:

@include('component-tpl',['slot1'=>'The content of Slot 1',
'slot2'=>"The content of Slot 2"])

using the exact same 'component-tpl.blade.php' Blade template?

What am I missing? Thanks for any insights.

Chris

Hey guys i need to create a function that adds properties from the 2nd object to the 1st object. If the 1st object already has a given key, ignore it (it must not overwrite the property value). It must not modify the 2nd object at all.

Here's my code so far:

function extend(obj1, obj2) {
  if(obj1.keys !== obj2.keys){
    obj1 = {
      obj2.keys;
    }
  }
}

var obj1 = {
  a: 1,
  b: 2
};
var obj2 = {
  b: 4,
  c: 3
};

extend(obj1, obj2);

console.log(obj1); // --> IT MUST RETURN {a: 1, b: 2, c: 3}
console.log(obj2); // --> IT MUST RETURN {b: 4, c: 3}

Any idea what am I doing wrong?

Okay so I'm pretty lost right now, I have to make a vending machine for my assessment task and I don't know how to create an item inventory. I did it in XML which was easy, I will paste it down further.

Basically what I want to do is have a collection of items, each item having a name, price, qtyLeft, and an image. I don't really understand how to properly do this but anyone who can set me on the right track or give an easier way of understanding would be much appreciated. Thanks :)

<items>
  <item>
    <name>Coke</name>
    <price>3.00</price>
    <stock>5</stock>
    <img>images/spritetest.png</img>
  </item>
  <item>
    <name>Pepsi</name>
    <price>2.00</price>
    <stock>5</stock>
    <img>images/spritetest.png</img>
  </item>
  <item>
    <name>Fanta</name>
    <price>3.50</price>
    <stock>5</stock>
    <img>images/spritetest.png</img>
  </item>
</items>

I am trying to create an ec2 volume using tags

        //Create ec2 client using credentials
    AmazonEC2 ec2 = AmazonEC2ClientBuilder.standard().withCredentials(creds).withRegion(region).build();

    List<TagSpecification> ts = new ArrayList<TagSpecification>();
    ts.add(new TagSpecification().withTags(new Tag("Name","HelloWorld")));

    CreateVolumeRequest cvr = new CreateVolumeRequest(10,azone);
    cvr.setVolumeType(VolumeType.Gp2);
    cvr.setTagSpecifications(ts);

    ec2.createVolume(cvr);

But it throws the following error when I try to execute the above code.

Exception in thread "main" com.amazonaws.services.ec2.model.AmazonEC2Exception: 'null' is not a valid taggable resource type for this operation. (Service: AmazonEC2; Status Code: 400; Error Code: InvalidParameterValue)
    at com.amazonaws.http.AmazonHttpClient$RequestExecutor.handleErrorResponse(AmazonHttpClient.java:1588)
    at com.amazonaws.http.AmazonHttpClient$RequestExecutor.executeOneRequest(AmazonHttpClient.java:1258)
    at com.amazonaws.http.AmazonHttpClient$RequestExecutor.executeHelper(AmazonHttpClient.java:1030)
    at com.amazonaws.http.AmazonHttpClient$RequestExecutor.doExecute(AmazonHttpClient.java:742)
    at com.amazonaws.http.AmazonHttpClient$RequestExecutor.executeWithTimer(AmazonHttpClient.java:716)
    at com.amazonaws.http.AmazonHttpClient$RequestExecutor.execute(AmazonHttpClient.java:699)
    at com.amazonaws.http.AmazonHttpClient$RequestExecutor.access$500(AmazonHttpClient.java:667)
    at com.amazonaws.http.AmazonHttpClient$RequestExecutionBuilderImpl.execute(AmazonHttpClient.java:649)
    at com.amazonaws.http.AmazonHttpClient.execute(AmazonHttpClient.java:513)
    at com.amazonaws.services.ec2.AmazonEC2Client.doInvoke(AmazonEC2Client.java:13611)
    at com.amazonaws.services.ec2.AmazonEC2Client.invoke(AmazonEC2Client.java:13587)
    at com.amazonaws.services.ec2.AmazonEC2Client.executeCreateVolume(AmazonEC2Client.java:3453)
    at com.amazonaws.services.ec2.AmazonEC2Client.createVolume(AmazonEC2Client.java:3430)
    at S3Driver.main(S3Driver.java:49)

Process finished with exit code 1

I am new to grunt and I'm having a tough time trying to figure out what I've done wrong.

When I run it I get the error "Unable to compile; no valid source files were found."

If anyone could give me some advice as to how to fix it, I would appreciate it.

Here is my gruntfile:

  module.exports = function(grunt) {

    grunt.initConfig ({
      responsive_images: {
        dev: {
          options: {
            engine: 'im',
            sizes: [{
              width: 1600,
              suffix: '_large_2x',
              quality: 30
            }]
          },
          files: [{
            expand: true,
            src: ['**/*.{gif,jpg,png};'],
            cwd: 'images_src/',
            dest: 'images/'
          }]
        }
      },
    });

    grunt.loadNpmTasks('grunt-responsive-images');
    grunt.loadNpmTasks('grunt-contrib-imagemin')
  grunt.registerTask('default', ['responsive_images']);};

Here is my Package.json

{
  "name": "reponsive-images",
  "version": "0.1.0",
  "repository": {
    "type": "git",
    "url": "https://github.com/udacity/responsive-images.git"
  },
  "devDependencies": {
    "grunt": "~0.4.5",
    "grunt-contrib-clean": "~0.6.0",
    "grunt-contrib-copy": "~0.8.0",
    "grunt-contrib-imagemin": "^1.0.1",
    "grunt-contrib-jshint": "~0.10.0",
    "grunt-contrib-nodeunit": "~0.4.1",
    "grunt-contrib-uglify": "~0.5.0",
    "grunt-mkdir": "~0.1.2"
  },
  "dependencies": {
    "grunt-responsive-images": "^0.1.6"
  }
}

Any advice you guys can provide would be appreciated!