Pretend you're at an interview. The interviewer asks:
What is the decimal value of this binary number?
10110101
What is the first thing you responsed with?
I have an application which runs another application (mine) using the WinAPI "ShellExecuteEx" with the verb "RunAs" so that the other application should start with "Administrator" credentials.
My OS is Windows XP. (Do not bother about other operating system, as I have specific code in place)
The only problem with this thing is that the "Current User" comes preselected. I want it to be the "Following User" with Administrator selected.
How to do this?
Hi,
I am changing our build system in order to handle cross-compiling and packaging.
It is a common thing to ship dependencies' DLLs but CMake's FindXXX modules(./configure checks) don't provide the path to these DLLs but only to .a files. I quickly looked inside the .a libs and they all seem to contain the DLL's name.
What would be a proper way of extracting them from the .a file on a Linux build machine?
Ok, this is another one in the theory realm for the CS guys around.
In the 90's I did fairly well in implementing BST's. The only thing I could bever get my head around was the intricacy of the algorithm to balance a Binary Tree (AVL).
Can you guys help me on this?
Hi,
I want to do this thing in C# (or any other .NET language), not sure how:
I have an image I captured from webcam and I want to find a specific simple object in it (let's say a red circle with a black square in it). The red circle can be a bit different from time to time (because of shadows) and the square might be also a bit brighter sometimes and even rotated a bit.
Please help me!
I'd like to provide a browser page to help non-techies run the various tests I've created using the standard django test framework.
The ideal would be for a way to display all the tests found for an application with tick boxes against each one, so the user could choose to run all tests or just a selection.
Output would be displayed in a window/frame for review.
Anyone know of such a thing?
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<script type="text/javascript">
function load(thediv, thefile)
{
if (window.XMLHttpRequest)
{
xmlhttp = new XMLHttpRequest();
}
else
{
xmlhttp = new ActiveXObject('Microsoft.XMLHTTP)');
}
xmlhttp.onreadystatechange = function()
{
if (xmlhttp.readyState==4 && xmlhttp.status==200)
{
document.getElementById(thediv) .innerHTML = xmlhttp.responseText;
}
}
xmlhttp.open('GET', thefile, true);
xmlhttp.send();
}
</script>
</head>
<body>
<?php
//connection to db and mysql query
$result = mysql_query($query) or die(mysql_error());
$options="";
while ($row=mysql_fetch_array($result)) {
$id=$row["idProducts"];
$thing=$row["country"];
$options.="<OPTION VALUE=\"$id\">".$thing.'</option>';
}
mysql_close();
?>
<SELECT id="countrySearch" NAME=countrySearch onchange="load('divtest', 'step2.search.php')";>
<OPTION VALUE=0>Choose
<?=$options?>
</SELECT>
<div id="divtest">
test
</div>
</body>
step2.search.php consists of:
<?php
echo "I want it to store the users selection as a variable for php to use";
?>
The problem I have is I want to store what the user selects from the drop down box and use it in php to do a mysql query using the variable from the user select form to form the WHERE part of the mysql statement. Then use ajax to put new data in "divtest".
How can I store the user selection into a variable then send it to be used in step2.search.php?
Is there a way i could run a job only once using Quartz (java). I understand it does not make sense to use Quartz in this case but the thing is i have multiple jobs and they are run multiple times so i am using Quartz.
Is this even possible.
Asking the same of Java yielded some very interesting responses, so I thought it would be only fair to ask the same thing of C#, probably Java's closest rival.
I actually like this sort of question because it's a lot less subjective than "why should I choose this language" or "why is this language so great."
So.. what's wrong with C#?
I've got the value of a radio button (r1) and I'm trying to use:
$("input:radio[val=r1]").attr('checked', true);
to check it.
The thing is that I've got three radio buttons in a div,
when I check one, the value of the checked button gets stored.
When I reload the page I want the page to check the radio button that was chosen last.
Thanks!
I am not able to connecting to the sqlserver 2008 from my sqlserver 2005....Is it really not possible to connect or there is some way..
please suggest me..if there is some thing..
Thanks.
The UINavigationBar and UISearchBar both have a tintColor property that allows you to change the tint color (surprising, I know) of both of those items. I want to do the same thing to the UITabBar in my application, but have found now way to change it from the default black color. Any ideas?
Hello. How could I make an image graph from values in a database? The idea came from "Steam", which uses a graph to show how many users are online. How could I do the same thing? It seems like the graph is one whole image; not made up of parts. Here's an image of the graph from Steam:
Thanks.
I found that when I ask something more to Python, python doesn't use my machine resource at 100% and it's not really fast, it's fast if compared to many other interpreted languages, but when compared to compiled languages i think that the difference is really remarkable.
It's possible to speedup things with a JIT compiler in Python 3 ?
Usually a JIT compiler is the only thing that can improve performances in interpreted languages, so i'm referring to this one, if other solutions are available i would love to accept new answers.
Take the following code in C/C++, for example:
int foo[] = {0, 0, 0, 0};
No magic numbers, right?
Now, the Python "equivalent" of that would be:
foo = [0, 0, 0, 0]
Still no magic numbers.
However, in Python, that same thing can be written like this:
foo = [0] * 4
And now we DO have a magic number. Or do we?
I'm guessing this and other similar things are present on these and other languages.
I have these long statements that I will refer to as x,y etc. here.
My conditional statements' structure goes like this:
if(x || y || z || q){
if(x)
do someth
else if (y)
do something
if(z)
do something
else if(q)
do something
}
else
do smthing
Is there a better, shorter way to write this thing? Thanks
I have a detail view in a table view.
Every thing working ok, and I can go to the detail view and back to the table view.
The problem is that the Back button on the navbar is working but i cant see it..
I cant figure why, and what to do..
I need it there.
Thanks.
Hello,
i am using the Eclipse RCP trayitem, which is described in Vogellas tutorials here:
http://www.vogella.de/articles/RichClientPlatform/article.html#systemtray
The requirement now is not only to show the name of the app in the tooltip but also a percentage while doing lengthy operations.
I understand that the trayitem attribute is a private from ApplicationWorkbenchWindowAdvisor, so I added a getter and setter method.
The only thing missing is a possibility to access the trayitem instance from my ProgressMonitorDialog instance.
Can you tell me, how you would solve this puzzle?
Thanks
So I created images generator (quite simple onewhich generates RGBs) I want to be able to turn some amount of images into H264 KeyFrame+dependent frames (lats say 100) So on each 100 frames generated I need to encode them into H264. How to do such thing?
It is a common thing to add a color name and a color RGB value in a config xml file for developing an Android application. It is boring sometimes for example, when I want to add color pink, I had to find some tool to show me what the exact RGB value for it and then fill it in that xml file.
I am wondering is there any predefined color file?
Quick question.
I have a js function which gets called on the page every few seconds. It's an ajax update thing.
Being a function, I declare local variables. I don't want to use closures or global variables for various reasons.
I'd never considered this, but do I need to release/clear the variables at the end of the function to release memory or will js do this for me automatically ?
Thanks
I was wondering if anyone knows of a jQuery or MooTools script that will do the exact same thing as YOOcarousel (http://tools.yootheme.com/extensions/yoocarousel).
I'm looking to emulate the 'List Styling' setup they have where on the left you have the tabbed navigation and on the right it fades in/out thru each of the tabbed items as they are clicked.
Thanks,
Ryan
I'm curious if there's a way to search for files in the iPhone's directory ( the location is irrelevant).
I am wanting to load in addresses from text files. The thing is additional files may be added and I want to dynamically be able to find the files and load in the data without hardcoding the file names to load in.
Thanks a bunch!
Hi every body I am uploading file with php
every thing is fine but move_uploded_file is not working
every variable displayed record and all permission for file is set
function uploadfile($filename)
{
$filetype=$filename["type"];
$filename=$filename['name'];
$filetempname=$filename['tmp_name'];
if($filetype=="application/msword")
{
move_uploaded_file($filetempname,"resume/".$filename);
}
}
I think I'm going mad - this seemed like an easy thing to do but I can't find any info on it at all.
I have created a Custom List and added 4 columns to it. Created By and Modified By are already in the list but hidden from the view.
I want to add a Date Modified column (which is a built in field) to this Custom List. How do I do this programmatically?