Hi,
1 #!/usr/bin/perl
2 use strict;
3 use warnings;
4
5 my @array = qw[a b c];
6 foreach my($a,$b,$c) (@array) {
7 print "$a , $b , $c\n";
8 }
I receive following error: Missing $ on loop variable
What is wrong?
I am using: perl v5.10.1 (*) built for x86_64-linux-thread-multi
I have a question about using subqueries in an Update statement. My example:
UPDATE TRIPS
SET locations = city + ', ' FROM (select Distinct city
from poi
where poi.trip_guid = trips.guid)
Is it possible to refer to main table value (trips.guid) in subqueries?
When i try to use trips.guid I get the error:
"The multi-part identifier "trips.guid" could not be bound."
I am working on a program that automates tasks in a browser like entering text, clicking, etc and right now everything is working fine when using the Web Browser tool in Visual Studio 2010.
What I'd like to know is how should I approach converting all of this so I can use send requests instead of the browser? I heard its a lot more efficient and a lot better if you are going to be using multi threading but I have so much code that already works now and am not sure how I should do this without scraping quite a bit of it.
Will the following piece of code work as expected in a multi-threaded scenario?
int getUniqueID()
{
static int ID=0;
return ++ID;
}
It's not necessary that the IDs to be contiguous - even if it skips a value, it's fine.
Can it be said that when this function returns, the value returned will be unique across all threads?
Hi guys!
I am developing a multi-thread application and one of my threads is somehow blocked by something and thus it will occupy some resource such as a file forever. Is there a way to find out which thread is being blocked and more important what resouce is being held by that thread?
At last and as usual, thanks for your patience and reply. :)
I've hit a wall. Does anybody know a good text editor that has search and replace like Notepad++ but can also do multi-line regex search and replace? Basically, I am trying to find something that can match a regex like:
search oldlog\(.*\n\s+([\r\n.]*)\);replace newlog\(\1\)
Any ideas?
I need to display the selecteditems in a label
I am using VB 2005
I set the selection mode to multi-extended
It did work selecting only one item with the following code:
me.xresultslabel.text= me.xlisttextbox.text.selectedItem.tostring
But when I tried to display more than one item using the following code:
me.resultlabel.text= me.xlisttextbox.text.selectedItems, I get the following string on the label:
system.windows.forms.listbox+selectedobjetcollections.
any help will be highly appreciate
I'm using an NSTextView to allow multi-line input. However, due to the nature of my app, users will be more comfortable moving to the next input element when they press TAB.
How can I make TAB exit the NSTextView, while keeping the newline behaviour of the Enter key?
I am trying to make a bar chart using tables, which I have almost accomplished to my liking. The last step I want is text over my image which represents the bar. Here is the code I have thus far for building my little bar charts:
$height = 50;
//build length
$width = 450;
$multi = $brewAvg / 5;
$width = $width * $multi;
print " <tr > <td > $count. <a href=\"$breweryURL\"> $brewR</a> </td> <td > <img src=\"blueBar.png\" width=\"$width\" height=\"$height\"> </td> </tr> ";
And this produces something like this:
You can see in the code how I simply calculate the length of the bar based on a breweries rating. What I want to do next is have the rating number show on top of each breweries on the left hand side. How would I go about accomplishing this?
Update:
I tried a tutorial I read here:
http://www.kavoir.com/2009/02/css-text-over-image.html
and I changed my code to this:
print "<div class=\"overlay\"> ";
print " <tr valign=\"middle\" > <td > $count. <a href=\"$breweryURL\"> $brewR</a> </td> <td > <img src=\"blueBar.png\" width=\"$width\" height=\"$height\"> </td> </tr> ";
print"
<div class=\"text\">
<p> $brewAvg </p>
</div>
</div>
";
And my css I added was this:
<style>
.overlay {
position:relative;
float:left; /* optional */
}
.overlay .text {
position:absolute;
top:10px; /* in conjunction with left property, decides the text position */
left:10px;
width:300px; /* optional, though better have one */
}
</style>
And it did put any of the value son top of my images. All the text is in a list above all the bars like this:
Hi
What is the easiest way to have a paragraph with one or with two vertical black lines on its left?
I have something like this so far:
\newcommand{\attention}[1]{\begin{huge}!\end{huge} #1}
But instead of a huge exclamation mark, I want a vertical line, whether the paragraph is one- or multi-line.
i want to write a function that prints multi-dimensional objects which are text (or integers, etc.) into <span></span> tags and arrays into unordered lists.
how do you make the function work recursively so that it prints everything regardless of what level it's at in the object?
thanks!
In VS2005 I have multi-project solution.
Two of the projects use an external set of DLLs to create a report, using
report definition data taken from an SQL Server. One of the projects
creates the report just fine, but the other project results in an Exception.
I have checked that the projects are referencing the same versions of the
all the DLLs and they appear to be identical.
What could the cause of this problem?
Both Page.Cache and Page.Application can store an application's "global" data, shared among requests and threads.
How should one storage area be chosen over the other considering scenarios of data synchronization in the multi-threaded ASP.NET environment?
Looking for best practice and experienced recommendation.
I've been looking for a decent network library for C#.
It is going to be used with XNA 3.1, and .NET Framework 3.5.
The multi-player style is going to be Server and Client.
Currently I have been looking into Lidgren Library Network, but it seems outdated.
Anyone got some good suggestions for a good network library. It should be able to handle easily 30+ client connections at a time.
Hi,
I have Application X with Subform x1, x2, x3.
The Subform has, because its multi-language, not a static text in it, neither a specific window header text or something.
What can I do to find this window in my code an react when its open, e.g. with a messagebox?
I am thinking of buying a new iTouch to try out 4.0 multi-tasking. Can someone provide a link that describes how I get iPhone OS 4.0 on the device? Thanks in advance.
friends,
i am displaying a image on full screen now i want to zoom it in or out.
any one guide me how can i implement multi touch image zooming?
any help would be appreciated.
I've been trying to explain Java threading to a colleague who has never been exposed to multi-threaded applications, but apparently I'm not a very good teacher.
Can anyone recommend a good online or offline resource that can explain threading in a simple, step-by-step manner? I know it's a complex topic, but surely there exists an article, book, or other explanation that can result in an "Aha! I get it, finally!" moment.
I am getting options[text] is null or not an object error. What i am trying to do here is i am checking what all multi select lookup column values are selected , comparing them with the value in an array and then removing them
var responsibleselected = returntags("select","Responsibility selected values");
for(var i=0;i<responsibleselected.options.length;i++)
{
if(responsibleselected.options[i].selected == true)
{
for(var j=0;j< ResponsibleArray.length;j++)
{
if(responsibleselected.options[i].text == ResponsibleArray[j])//throws error here
{
GipRemoveSelectedItems(ctl00_m_g_6ad915a8_68ea_4c76_b67a_ad1215320288_ff391_ctl00_ctl00_MultiLookupPicker_m);
}
}
}
}
We have a Meraki MR16 Cloud Managed AP and it disconnects certain clients. The clients with Intel wireless cards work without any disconnects. The Meraki reports the follow in its event log:
Sep 4 09:55:47 WPA authentication
Sep 4 09:55:47 802.11 association channel: 11, rssi: 64
Sep 4 09:55:38 802.11 disassociation client has left AP
Sep 4 09:55:38 WPA deauthentication vap: 0, radio: 0, aid: 1633956416
An example wireless network card which the Meraki disconnects is Realtek RTL8191SE 802.11b/g/n WiFi Adapter. The realtek laptop is sat 2 meters away from the AP and has a lot of signal and the Meraki reports minimal interference.
Any ideas why it disconnects non-intel wireless network cards?
I try to tunnel SMB and AFP services through SSH to acces my NAS shares on my machine.
I already do it successfully with my ReadyNAS using the following command line (ran as my user on my mac) :
ssh -Nf -p 22 -c 3des-cbc USER@SERVER -L 8888/127.0.0.1/548 -L 9999/127.0.0.1/139
but I cannot reproduce the same with the Synology NAS.
Connecting using this command gives me the following error :
channel 4: open failed: administratively prohibited: open failed
I also tried with a windows client (used bitvise tunneler): it works with the ReadyNAS but not the Synology and get the following error msg :
server denied request for client-side server-2-client forwarding on 127.0.0.1:139
I modified /etc/ssh/sshd_config :
MaxSessions 10
PasswordAuthentication yes
PermitEmptyPasswords no
AllowTcpForwarding yes
GatewayPorts yes
PermitTunnel yes
Is there any way to make it work ? I must add that I can successfully connect via SSH to the NAS so I donnot think this is a firewall issue between the Synology and my computer.
Thanks for you answers