I already know C++ console programming. So shall i learn Qt for c++ or c# first?? I eventually plan to learn both anyways. Also, how long will each one take. The only programming language i know is c++.
Is it possible to run Lua interpreter on the iphone?
If yes, are there any libraries that have bindings to Iphone's SDK?
If its not possible with Lua, what are the other language options?
I have the following questions concerning the differences between the four options:
What is the main difference between the four options?
Which of the above support int64_t or long long without suffix LL. I want a data type of the range 2^63 - 1
If your answer to my second question is not C(gcc 4.3.2) , whether the code I write in C(gcc 4.3.2) for C language will be valid in rest of the three options or do I have to modify something, then what will be those modifications.
I want to copy a large a ram-based file (located at /dev/shm direcotry) to local disk, is there some way for an efficient copy instead of read char one by one or create another piece memory? I can use only C language here. Is there anyway that I can put the memory file directly to disk? Thanks!
This question was inspired by What features would you like to see added to C++? (also see What features do you miss in C++?).
C++ is a great general-purpose language, but perhaps too general and feature-rich: multiple inheritance, operator overloading, manual memory management, templates, smart pointers, virtual destructors, legacy frameworks (think MFC), and I could go on.
Is there any one feature or aspect of C++ that you would like removed to make our lives easier as C++ developers?
One feature per answer, please.
Currently I'm stuck with a problem in jquerymobile: I'm adding items to a list dynamically and use enhanceWithin() in the end (so styling is correct).
After this I like to add click-events for each list item but the problem is, that enhanceWithin runs asynchronous and so I always get the error message "cannot call methods on checkboxradio prior to initialization; attempted to call method 'refresh'"
When I delay the event-adding-code it works perfectly.
Does anyone have an idea if there is a enhanceWithin.done event or anything else I can use?
HTML:
...
<div id="shoppinglist">Loading list...</div>
...
Javascript:
function updateList()
{
var result = "";
$.each(shoppinglistItems, function (index, item) {
result += '<label><input type="checkbox" ' + item.checked + ' id="item_' + item.id + '">' + item.name + '</label>\n';
});
$('#shoppinglist').html(result).enhanceWithin();
// Change-Events an die Checkboxen knoten
$('input[id*=item_]').unbind('change').bind('change', function (event) {
var itemid = $(this).attr('id');
itemid = (itemid.split('_'))[1]; // Nur die Zahl extrahieren
// Passendes Item aus der Liste der Items suchen und checken
$.each(shoppinglistItems, function (index, item) {
if (item.id == itemid)
{
item.checked = "checked";
item.timestamp = moment().format("YYYYMMDDHHmmss");
}
});
updateList();
});
}
As LINQ is a good query language in dot net and everyone should be able to work with it.
What are the necessary abilities which a programmer should have, before start learning LINQ.
And after that, What should he know about LINQ? (important tips)
I have a Thread (let's say T1) which reads data from socket:
public void run() {
while (running) {
try {
BufferedReader reader = new BufferedReader( new InputStreamReader(socket.getInputStream()) );
String input = reader.readLine();
} catch (IOException e) {
e.printStackTrace();
}
}
}
Another Thread (lets say T2) try to finish the program in one of its method. Therefore T2 does the following:
T1.running = false;
socket.close();
Here is this scenario for which i couldn't find a solution:
T1 is active and waiting for some input to read i.e. blocking.
context switching
T2 is active and sets running to false, closes the socket
context switching
because T1 was blocking and T2 closed the socket, T1 throws an Exception. What i want is to catch this SocketException. i can't put a try/catch(SocketException) in T1.run(). So how can i catch it in T1's running-method? If it's not possible to catch it in T1's running, then how can i catch it elsewhere?
PS: "Another question about the Thread Debugging"
Normally when i debug the code step by step, i lose the 'active running line' on a context switch. Let's say i'm in line 20 of T1, context switch happens, let's assume the program continues from the 30.line of T2, but the debugger does not go/show to the 30.line of T2, instead the 'active running line' vanishes. So i lose the control over the code. I use Eclipse for Java and Visual Studio for C#. So what is the best way to track the code while debugging on a context switch ?
Hi,
I have to create a mobile installable/client application...and I dnt know nothing abt this..
what SDK,language should I use?? if this will in .net will be fine(optional)... any Ideas
Will really appreciate this...
Thanks!!!
Is Test Driven Development limited to OO? Or is it possible/useful to use it in conjunction with a procedural language? I have to start a greater project in C the next few weeks and I'm thinking of ways how to the developing.
In Java how can I take the data of my file on my display screen?
I want to use data in my file and also want that data to be displayed on my output screen when I execute my program. Can any body please help by providing me such example in Java language. Thank you!
I am working on localization project and when i change the language the UI gets disturbed because some translations are large. For example say there is button with text "Select All". But when this is localized in french it reads as "Sélectionner tout". That is larger than Select All and hence the gui gets affected. Is there any way to localize the gui as well.
Hi
This is what i have in my view page
<td width=""><input type="text" name="txtUserName" id="txtUserName" /></td>
<td><input type="button" name="CheckUsername" id="CheckUsername" value="Check Availablity"
onclick="Check_User_Name();"/></td>
Onclick of the button the Check_User_Name function in my ajax.js loads
This is the Check_User_Name function
function Check_User_Name(source)
{
var UserName = document.getElementById('txtUserName').value;
if(window.ActiveXObject)
User_Name = new ActiveXObject("Microsoft.XMLHTTP");
else if(window.XMLHttpRequest)
User_Name = new XMLHttpRequest();
var URL = newURL+"ssit/system/application/views/ssitAjax.php";
URL = URL +"?CheckUsername="+UserName;
User_Name.onreadystatechange = User_Name_Fun;
User_Name.open("GET",URL,true);
User_Name.send(null);
}
function User_Name_Fun()
{
document.getElementById('User_div').innerHTML=User_Name.responseText;
}
Then I can have the value in echo username then the $result has all the user name
Hows can i checkIsavailablity of username from here
if(($_GET['CheckUsername']!="") || (isset($_GET['CheckUsername'])))
{
echo $UserName = $_GET['CheckUsername'];//echo username
$_SESSION['state'] = $State;
$queryres = "SELECT dUser_name FROM tbl_login
WHERE dIsDelete='0'";
$result = mysql_query($queryres,$cn) or die("Selection Query Failed !!!");
I'm developing a cms for a company that has multiple regional sites (us, uk, china, russia, etc..). Should I use a separate database for each of these sites or use a single database with a 'site' field in each table? My main concern is the table language encoding (ie, can storing strings in different langauges in the same table cause problems, such as sorting issues).
Hey guys,
I need few good book recommendations for PHP. I am trying to learn to develop webapps. I know there are other (arguably) better language out there that I should start with (ie, python). But I want to start with PHP and go from there.
My programming knowledge is limited to html/css (I know they are not actually programming languages), and I have gone through half of a python book.
Thanks! :)
When searching online for object oriented concepts such as the composite design pattern I often found them represented in the LePUS3 notation. I am not really familiar with this
modeling language.
Is it something I should prefer over UML?
<script ID="clientEventHandlersVBS" LANGUAGE="vbscript">
s=pass()
y=s
</script>
<%
session("password")=y
Response.write(session("password"))
Response.write(y)
%>
i have this code. but nothing is getting stored inside the session variable neither anything is getting printed. cant i access the variables declared outside the asp code or is their any syntax mistake. any help is really appreciated
I have a problem with "pairing" arrays into one (by index). Here is an example:
INPUT:
inputArray = [ [0, 1, 2, 3, 4], [2, 3, 5, 7, 8], [9, 6, 1] ]
OUTPUT:
outputArray = [
[0,2,9],
[1,3,6],
[2,5,1],
[3,7,chooseRandom()],
[4,8,chooseRandom()]]
Questions:
1) How to avoid out of range problem
2) How to write chooseRandom() to choose N neighbour
I'm using python but feel free to share your thoughts in any language.
Hi,
I am using C language and Linux as my programming platform.
I am learning how to create a daemon, and I want to create a log file so that I write a debug message in my daemon. My question is where should I put the log file in my system. Should I put it in the var folder?
Please advice.
Many thanks.
As everyone knows, that default button doesn't work in FF, only IE. I've tried to put in the tag or in the and it's not working. I've found a js script to fix this issue, but for some reason it's not working for me. This script for a submit button, i need to use it for a LinkButton, which is should be the same.
Link:
<div id="pnl">
<a id="ctl00_cphMain_lbLogin" title="Click Here to LogIn" href="javascript:WebForm_DoPostBackWithOptions(new WebForm_PostBackOptions("ctl00$cphMain$lbLogin", "", true, "Login1", "", false, true))">Log In</a>
<input name="ctl00$cphMain$UserName" type="text" id="ctl00_cphMain_UserName" />
<input name="ctl00$cphMain$UserName" type="text" id="ctl00_cphMain_UserName1" />
</div>
<script>
$(document).ready(function() {
$("#pnl").keypress(function(e) {
if ((e.which && e.which == 13) || (e.keyCode && e.keyCode == 13)) {
$("a[id$='_lbLogin']").click();
return true;
}
});
});
I know that i can override original function "*WebForm_FireDefaultButton*"
in This post, but i really wanted to get this one to work.
Thanx in advance!!!
Hi All,
I am using <script> inside the body tag.
<script type="text/javascript" language="javascript">
$('#audioVolume').text($('#audioVolume').text(Math.round((document.mediaPlayer.Volume + 2000) / 10) + "%"));
</script>
Error: Microsoft JScript runtime error: 'undefined' is null or not an object.
Need: I want to access the html elements in <script inside the body tag.
Hi. I'm working on a program idea which needs to respond when a particular Function key is pressed on the keyboard(like F10).
(A) is that possible?
(B) what language should i use (i'll be getting the development outsourced, so its not a problem)
(c) any sample code which shows how it works?
I also want the books to be no older than 1 year old. And by textbook i mean i want the author(s) to go into the syntax,semantix,structure of the programming language as well as provide questions/mini projects to test what you learned after every section/chapter.
Which programming language and tools can i use, to develope a complete stand-alone gui-application? This application will be burned on a cd and should run on every windows-pc without any installations.