|
|
its hard these days to say there's a 'best language' for anything - most languages can be bent into doing things they aren't 100% suited for - it all comes down to requirements
|
|
|
|
|
For this specific task... I'd suggest Python.
beMember wrote: 1) A flexible programming language that isn't rocket science to learn from scratch and is ideal for small stand-alone programs
Python was made to be a rapid prototyping language. It's also fast... and you can optimize certain things to be VERY fast with a little practice. Typically with most scripted languages, looping is slow... but Python allows you to import C/C++ functions/classes so that the typically slow portions are handed off to compiled code so that it runs fast.
beMember wrote: 2) The ability to create a GUI. I'd be happy to read any good reference you have about the language/design knowledge needed for GUI's.
Again, there's Python libraries for quick GUI development.
|
|
|
|
|
|
If you want help with code attached to a CodeProject article, then please use the forum at the end of the article. However, it is unlikely that even the author will be prepared to do your work for you.
|
|
|
|
|
Unit test for project with this template is totally mess.
Expecting some intelligent reply from you .
|
|
|
|
|
upkaar wrote: Expecting some intelligent reply from you . I already gave you one.
|
|
|
|
|
For me personally this is where I'd prefer to learn how to do it rather than get someone to do it for me..
have a look at this tutorial and it will explain how you create unit tests in angularjs
Introduction to unit tests: controllers[^]
Every day, thousands of innocent plants are killed by vegetarians.
Help end the violence EAT BACON
|
|
|
|
|
This is my second and last assignment, any help is appreciated
PART 2
FUNCTION NAME
bonus
LANGUAGE
JavaScript
PARAMETERS
2 PARAMETERS
FUNCTION HEADER
function bonus (parameter1,parameter2) {
OBJECTIVE OF FUNCTION
Compute and return the total of all bonuses.
PARAMETERS
parameter1 = the minimum amount of sales for an employee to receive a bonus.
parameter2 = a percent used to calculate the bonus if employee gets a bonus.
Use both parameter values as is. Do not change them.
ARRAYS
There is an array named sales. It is the amount of sales each employee produced.
The array exists - do not create it.
WHAT TO DO
Examine each value in sales[]. You need a for(...) loop for this.
For each sales[] value that is at least the minimum amount of sales to get a bonus (parameter1) compute the bonus as: sales[] * percent used to calculate the bonus (parameter2).
Add each bonus to the total.
Return the total.
This is what I have so far,
function bonus(parameter1,parameter2) {
total = 0;
for(i = 0; i <= parameter1; i++) {
if (sales[i]=parameter1) {
total = parameter2 + sales[i];
};
};
return total;
};
|
|
|
|
|
Read carefully the assignment - it is not about total (sum) but more about percentage (multiply)...
Also consider the mathematical meaning of 'at least'!
I'm not questioning your powers of observation; I'm merely remarking upon the paradox of asking a masked man who he is. (V)
תפסיק לספר לה' כמה הצרות שלך גדולות, תספר לצרות שלך כמה ה' גדול!
|
|
|
|
|
Where are you stuck?
There are only 10 types of people in the world, those who understand binary and those who don't.
|
|
|
|
|
I think right since the beginning he is stuck.
You only get one shot, do not miss your chance to blow
This opportunity comes once in a lifetime, yo - Eminem
~! Firewall !~
|
|
|
|
|
I'm having a lot of trouble with this assignment for my class. I'm in desperate need of help because this is due Friday at midnight. Any help would be greatly appreciated!
PART 1
FUNCTION NAME
product
LANGUAGE
JavaScript
PARAMETERS
1 PARAMETERS
FUNCTION HEADER
function product (parameter1) {
OBJECTIVE OF FUNCTION
Multiply two values and return the result.
HTML OBJECT
There is a form named "myForm" with a textbox named "myTextbox". They exist. Just use them.
PARAMETER
The is a parameter with a numeric value.
WHAT TO DO
Return the parameter times myTextbox's value.
This is what I have so far,
function product(parameter1) {
value1 = myForm.myNumber; // this is value 1 right here.
value2 = document.getElementById('myTextbox').value;
total = parameter1 * value2; // The total is the text box value.
return total; // I just returned the total of the function.
};
|
|
|
|
|
Nice one...But shouldn't you use parameter1 and not that myNumber?
I'm not questioning your powers of observation; I'm merely remarking upon the paradox of asking a masked man who he is. (V)
תפסיק לספר לה' כמה הצרות שלך גדולות, תספר לצרות שלך כמה ה' גדול!
|
|
|
|
|
What is your question?
There are only 10 types of people in the world, those who understand binary and those who don't.
|
|
|
|
|
my controller code:-
public class HomeController : Controller
{
erpEntities db = new erpEntities();
public ActionResult Index()
{
string mysql = "select * from modules where parentid=3";
IEnumerable<Module> results = db.ExecuteStoreQuery<Module>(mysql);
string itemString = "<table width='100px'><tr>";
string itemString1 = "";
Int32 ParentID = 0;
Int32 ParentValue = 0;
Int32 LevelID = 0;
Int32 Mcounter = 0;
Int32 LastValue = 0;
foreach (var itemMain in results)
{
LevelID += 1;
itemString1 += "<input type='hidden' id='LastValue" + LevelID + "' value=0>\n";
itemString += "<td valign='top'><table width='200px'>";
itemString += "<tr><td><b>" + itemMain.Title + "<b><td></tr>";
mysql = "select Id,title from t" + itemMain.ID;
IEnumerable<ChildData> results1 = db.ExecuteStoreQuery<ChildData>(mysql);
Mcounter = 0;
foreach (var item in results1)
{
Mcounter += 1;
string tt1 = item.ID.ToString();
string tt2 = item.ID.ToString();
string HidVar = Mcounter + "$" + LevelID;
itemString += "<tr><td>";
itemString += "<input type='hidden' id='Child$" + HidVar + "' Value='" + item.ID + "'>";
itemString += "<input type='checkbox' id='chk$" + HidVar + "' value='' onclick='javascript:clickme(\"" + HidVar + "\"," + tt1 + "," + tt2 + "," + Mcounter + "," + LevelID + ");'><a href='#' onclick='javascript:clickme(\"" + HidVar + "\"," + tt1 + "," + tt2 + "," + Mcounter + "," + LevelID + ");'>" + item.Title + "</a>";
//itemString += "<input type='checkbox' id='chk$" + ParentID + "$" + itemMain.ID + "$" + item.ID + "$" + LevelID + "' value=''><a href='#' onclick='javascript:clickme(\"" + HidVar + "\"," + tt1 + "," + tt2 + "," + LevelID + ");'>" + item.Title + "</a>";
itemString += "</td></tr>";
}
ParentID = itemMain.ID;
itemString += "</td></table>";
}
itemString += "</tr></table>";
//var ttp = db.t787.ToList();
//itemString += "<table>";
//foreach (var item in ttp)
//{
// string tt1 = item.ID.ToString();
// string tt2 = item.ID.ToString();
// itemString += "<tr><td>";
// itemString += "<input type='hidden' id='modChild$786' value=1>";
// itemString += "<input type='checkbox' id='child$1$t7862" + item.ID + "'><a href='#' onclick='javascript:clickme(" + tt1 + "," + tt2 + ");'>" + item.Title + "</a>";
// itemString += "</td></tr>";
//}
//itemString += "</table>";
ViewData["mystring"] = (itemString + itemString1);
return View();
}
My index.cshtml code:=
@{
ViewBag.Title = "Home Page";
// Response.Write(""" + "Hello"+""");
}
<script language="javascript" type="text/javascript">
var results = new Array();
function clickme(HidVar, txt, txt1,Mcounter, LevelID, ignore,rb)
{
//var input = document.createElement("input");
//input.setAttribute("type", "hidden");
//input.setAttribute("name", "name_you_want");
//input.setAttribute("value", "value_you_want");
var ChildValue = document.getElementById("Child$" + HidVar).value;
var chk = document.getElementById("chk$" + HidVar).checked;
//alert(chk);
// var chk1 = document.getElementById("chk$" + HidVar).checked = true;
if (LevelID > 1) {
for (index = 1; index < 4; ++index) {
if (Mcounter != index && document.getElementById("chk$" + HidVar).checked) {
document.getElementById("chk$" + index + "$" + LevelID).disabled = true;
}
if (document.getElementById("chk$" + HidVar).checked == false) {
document.getElementById("chk$" + index + "$" + LevelID).disabled = false;
}
}
}
document.getElementById("LastValue" + LevelID).value = ChildValue;
var ParentValue = 0;
if (LevelID > 1) {
ParentValue = document.getElementById("LastValue" + (LevelID - 1)).value;
}
else {
ParentValue = document.getElementById("LastValue" + (LevelID)).value;
}
// function checkbox(me, group) {
//load History
//alert("Level ID: " + LevelID);
//Remove Status - Unchecked all the value for a child Level
var OneToOne = 1;
for (index = 0; index < results.length; ++index) {
if (results[index][2] >= (LevelID + 1)) {
document.getElementById("chk$" + results[index][4] + "$" + results[index][2]).checked = false;
//document.getElementById("chk$" + results[index][4] + "$" + results[index][2]).disabled = true;
}
}
//One to One Checking
var OneToNE = 0;
var ChildStatus = 0;
//Setting Status - checked all the value for a child Level
for (index = 0; index < results.length; ++index) {
if (results[index][0] == ChildValue && results[index][2] >= (LevelID + 1)) {
document.getElementById("chk$" + results[index][4] + "$" + results[index][2]).checked = true;
if (OneToNE == 0) {
//document.getElementById("chk$" + results[index][4] + "$" + results[index][2]).disabled = false;
}
ChildStatus = 1
}
}
//Checking if exist
var exist = 0;
for (index = 0; index < results.length; ++index) {
if (results[index][0] == ParentValue && results[index][1] == ChildValue && results[index][2] == LevelID && results[index][4] == Mcounter) {
exist = 1;
if (chk == false && ChildStatus == 0) {
removeByIndex(results, index);
}
else {
document.getElementById("chk$" + results[index][4] + "$" + results[index][2]).checked = true;
}
}
}
//IF not exist then storing in the array
if (exist == 0) {
results.push([ParentValue, ChildValue, LevelID, HidVar, Mcounter, " "]);
}
document.getElementById("demo").innerHTML = results;
}
function removeByIndex(arr, index) {
arr.splice(index, 1);
}
</script>
<form name="addForm">
<input id="Button1" type="button" value="value" />
@Html.Raw(ViewData["mystring"]);
</form>
|
|
|
|
|
That's way too much code for me to go through, would it be possible to just narrow down your code to a few lines, and rephrase your question, like which array in which code?
|
|
|
|
|
Hello,
When an item is selected it's automatically stretches the textbox with an extra line instead of stay on the same height, when the size is fixed specified, see example: http://jsfiddle.net/g332c2ru/9/
is this a issue? because when an item is selected and it's to long we don't want a new line is created. I tried with css to create an solution but nothing worked.
greetings,
Sander
|
|
|
|
|
Hi
I have same image in my page with same class $(.'cross') several times. When I click to get the ID of the clicked one, it does not work for the first time but it works one the second click.
I am using Gridster and my html is built dynamically on DOM Load like this with local variables.
gridster.add_widget.apply(gridster, ['<li id="li' + Grid.GridID + '" itemid="' + Grid.GridID + '" class="gs-w" data-row="' + Grid.GriddataRow + '" data-col="' + Grid.GriddataCol + '">Report id :' + Grid.GridItemid + '<table data-role="table" id="table' + Grid.GridID + '" class="icon"><tr><td><img id="cross' + Grid.GridID + '" class="cross" height="10" width="10" src="../images/Icones/cross.gif" alt="cross' + Grid.GridID + '" onclick="CloseGrid();" /></td><td><;img id="icon' + Grid.GridID + '" class="menu" height="10" width="10" src="../images/tbordmenuicon.png" alt="icon' + Grid.GridID + '" onclick="showMenu(event);GetClickedIcon();" /></td></tr></table><div id="container' + Grid.GridID + '" style="width:100%;height:100%;margin: 0 auto"></div></li>', Grid.GriddataX, Grid.GriddataY]);
And my closeGrid () function looks like this:
function CloseGrid() {
$('.cross').click(function() {
var id = $(this).attr('id').replace('cross', '');
alert(id);
if (confirm("Voulez-vous définitivement supprimer ce graphique?")) {
gridster.remove_widget($('#li' + id), false);
DeleteChart(id);
}
else {
return false;
}
});
}
Could you please check and tell me what I am doing wrong?
I checked same forums about it but I could not find the problem.
Thanks in advance.
|
|
|
|
|
Guys,
It always happens to me that I start something with the zeal but soon I found lack of motivation continuing it.
Imagining myself a javascript expert turned me on and I decided to get certification in JS. Read few chapters and as usual just put it aside.
So trying new way of achieving the goal I am in the search of a study pal.
I wonder if anyone of you would be interested getting javascript certificate and would like to become a study pal to keep the motivation up till the end.
Some code of conduct: No personal information exchange except your name. No other conversation apart from the topic.
|
|
|
|
|
I am in a situation to use http://www.trirand.net/demo/aspnet/mvc/jqgrid/[^] in my project. So i just want to know whether it has MIT license or not? Is there anyone who already uses it in his/her project. Please help me through this.
So much complexity in software comes from trying to make one thing do two things.
Sibeesh
|
|
|
|
|
Is Google[^] not available in your company?
The first result for "jqgrid license" is:
The jqGrid is dual licensed and is released under GPL or MIT licenses.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
Thank you . i will check it out.
So much complexity in software comes from trying to make one thing do two things.
Sibeesh
|
|
|
|
|
|
Thank you . i will check it out.
So much complexity in software comes from trying to make one thing do two things.
Sibeesh
|
|
|
|