[Solved] javascript array text substitution

Okay, so this works: http://jsfiddle.net/4ax7mvL4/5/ var a = []; a[0] = “Hi may name is ‘%s’ and my brother is ‘%d'”; a[1] = “John”; a[2] = “David”; var final = a[0]; for(var i = 1; i < a.length; i++) { final = final.replace(/%[sd]/, a[i]); } alert(final); But I’m sure there are people out there that … Read more

[Solved] User Control Background Hides Children Controls

The Margin properties on the controls set themselves when dropped on the design surface. This feature may be needed if adjusting items on a Canvas but are mostly an annoyance when dealing with most Xaml control placement. Remove the Margin properties to see the controls in their correct location on the grid. solved User Control … Read more

[Solved] My login php script that redirects to each user page [closed]

Sounds like you are wanting to use Query Strings. There are plenty of resources online to help you out. Here are some examples: https://lightignite.com/help-your-customers-fill-out-web-forms-with-url-query-strings/ http://richard.jp.leguen.ca/tutoring/soen287/tutorials/query-strings-and-forms/ 0 solved My login php script that redirects to each user page [closed]

[Solved] METHODS IN JAVASCRIPT [closed]

Like this using inline object var object = { method: function() { console.log(‘this is method’); } }; object.method(); using contructor: function Foo() { this.method = function() { console.log(‘this is method’); }; } var object = new Foo(); object.method(); using prototype: function Foo() {} Foo.prototype.method = function() { console.log(‘this is method’); }; var object = new … Read more

[Solved] Why are images duplicated with append()?

From the source code on your website, it seems that you might be attempting to remove images from the container before appending new images: $(‘#project_images’).html(”); However, that selector uses an underscore while the actual element uses a hyphen: <div id=”project-images”> Also, you are clearing the contents after appending images rather than before. I suggest using … Read more

[Solved] Java (beginner): creating a menu that displays features of a calculator

You can use Scanner class. For example: java.util.Scanner in = new java.util.Scanner(System.in); String input = in.nextLine(); switch (input.toLowerCase()) { case “a”: System.out.println(“Option \”a\” selected;”); break; case “b”: System.out.println(“Option \”b\” selected;”); break; solved Java (beginner): creating a menu that displays features of a calculator

[Solved] how to print all words the end with ed? [closed]

The difference between the arrays: The difference between double[] array = new double[a.Count – 2]; and double[] array = new double[a.Count]; is the length of the array you are declaring. When you are passing a integer value into the constructor of your new array that is the length your array will be initialized with. Notes … Read more

[Solved] Print non repeating combinations [closed]

Interesting task. Try following code: List<string> list = Enumerable.Range(1, 6).Select(e => ((char)(‘A’ + e – 1)).ToString()).ToList(); List<string> temp = new List<string>(); int count = list.Count; int total = 1 << list.Count; for (int i = 0; i < total; i++) { int k = i; temp.Clear(); for (int j = 0; j < count; j++) … Read more