I had statically set my ip in Linux using:
sudo ifconfig eth0 192.168.blah.blah
Now I want it to go back to using DHCP to assign the IP. How do I do that?
Hi, I have a question regarding GridView windows forms control. As a datasource, I am using a DataTable object. When the grid view is sorted, the DataTable's row indices are not sorted. In this way, when accessing the DataTable using indices from GridView, I get the unexpected rows. How can this situation be handled?
Hi, I'm new to wicket and stuck with the following problem:
I have a table with 5 rows. Each row contains 7 cells. Each cell has a unique value. Once a cell is clicked, its unqiue value should be posted to the server.
I would like to register only one ajaxfallbacklink (or similar) on the table and adjust the value of the model to the unique value…
Given a class like this:
class B
class << self
attr_accessor :var
end
end
Suppose I can't modify the original source code of class B. How might I go about removing the setter on the class variable var? I've tried using something like B.send("unset_method", "var="), but that doesn't work (nor does remove_method, or…
On a machine with multiple network cards I need to bind a WCF webservice to a specific network interface. It seems that the default is to bind on all network interfaces.
The machine has two network adapters with the IPs 192.168.0.10 and 192.168.0.11. I have an Apache running that binds on 192.168.0.10:80 and need to run the webservice on…
Posting a video on tumblr.com allows you to just paste the URL of the video on youtube, vimeo, whatever and tumblr automatically does the embedding for you.
I assume that this would be nothing more than a mapping between an URL-regex and the belonging HTML construct for embedding the video. Or it is just parsing the response of the URL…
In a plugin, I am generating a paginated link to a category,
i.e. http://localhost/?cat=17&paged=5. The category is known by slug and id.
Is there a way to have this URL converted to the user defined "nice permalink" format,
i.e. http://localhost/category/foo/page/5?
(Assuming we're running Wordpress 2.8/2.9+)
I have an IIS web site. This web site contains other web sites so the structure is like this.
\
MainWebSite\
App1\
App2\
All sites are Asp.net MVC Webapplications.
In the MasterPage of App1, I reference the script files like this:
<script type="text/javascript" src="../../Scripts/jquery-ui-1.8.custom.min.js">…
What tool can I use to displays a picture of a desgin with transparency right over my website?
I need to check that my design fits, pixel by pixel, to the wishes of the designer.
Hi. I have a question regarding locking in TSQL. Suppose I have a the following table: A(int id, varchar name), where id is the primary key, but is NOT an identity column.
I want to use the following pseudocode to insert a value into this table:
lock (A)
uniqueID = GenerateUniqueID()
insert into A values (uniqueID, somename)…
Hi all,
I wrote an iPhone app which uses a third party library. I crosscompiled this library successfully and everything works smoothly. But when I want to debug the application, it would make sense to also be able to debug the library.
So I compiled also the external library with debuging information (usign the gcc option -ggdb).…
I'm trying to create an object oriented model to wrap OpenAL and have a little problem understanding the devices, buffers and contexts.
From what I can see in the Programmer's Guide, there are multiple devices, each of which can have multiple contexts as well as multiple buffers. Each context has a listener, and the alListener*()…
I have an IIS web site. This web site contains other web sites so the structure is like that.
\
MainWebSite\
App1\
App2\
All sites are Asp.net MVC Webapplications.
In the MasterPage of App1 i reference the Script-files like that
<script type="text/javascript"…
I created an array of labels on runtime. Now i have a problem to access these labels from other functions.
Dynamic creation:
private void Form1_Shown(object sender, EventArgs e)
{
Label[] Calendar_Weekday_Day = new Label[7];
for (int i = 0; i < 7; i++)
{
…
I tripped across a really strange NullPointerException the other day caused by an unexpected type-cast in the ternary operator. Given this (useless exemplary) function:
Integer getNumber() {
return null;
}
I was expecting the following two code segments to be exactly…
I have setup a catchall router on exim (used as last router):
catchall:
driver = redirect
domains = +local_domains
data = ${lookup{*@$domain}lsearch{/etc/aliases}}
retry_use_local_part
This works perfectly when sending emails locally. However, if I login to my…
I am connecting to MySQL database on my webpage and have this copy-pasted code for errors:
if(DB::isError($db)) die($db->getMessage());
I have the connection code in an outside file called connection.inc that I include at the beginning of my page before the DOCTYPE…
Hi. Is there a way to convert '@my_variable' string into a value of @my_variable?
I have a table which stores names of variables. I need to get the value of this variable. Something like this:
DECLARE @second_variable AS NVARCHAR(20);
DECLARE @first_variable AS…
When Windows Server 2008 R2 was launched, the "server core" edition started to become useful to me, because it lets me deploy .NET background applications isolated on their own virtual machine instance with only a small fraction of all the disk space overhead of…
I just finished my first PHP site and now I have a security-related question. I used PEAR:DB for the database connection and made a separate parameter file for it. How should I hide this parameter file?
I found a guide…
Hi everyone,
I'm trying to build a 4 player multiplayer game using GameKit. I tried many things and I'm currently using client/server mode, meaning that I have 1 session in GKSessionModeServer and 3 other sessions…
I have a ScrollView with a Custom View. Now i have the problem with the rotation, the view has after the rotation not the correct frame pos / size.
How can i call the CustomView after rotation for a reposition and…
I am trying to find some example code or best practices about making CMS-type categories with PHP.
This is a problem that has for sure been solved gazillion times but for some reason I am unable to find any…