Hi,
I believe that some one is running shell commands to my server via my site, Could any one offer any help on how the user could be doing this ?
also how could I stop this?
Hi,
Can anybody help me writting a regular expression to replace these characters with a empty string. Character list is given below.
public static char[] delimiters = { ' ', '\r', '\n', '?', '!', ';', '.', ',', '`', ':', '(', ')', '{', '}', '[', ']', '|', '\'', '\\', '~', '=', '@', '>', '<', '&', '%', '-', '/', '#' };
Thanks.
Subrat.
I'm having a great deal of difficulty trying to figure out the logic behind this problem. I have developed everything else, but I really could use some help, any sort of help, on the part I'm stuck on.
Back story:
*A group of actors waits in a circle. They "count
off" by various amounts. The last few to audition
are thought to have the best chance of getting the
parts and becoming stars.
Instead of actors having names, they are identified
by numbers. The "Audition Order" in the table tells,
reading left-to-right, the "names" of the actors who
will be auditioned in the order they will perform.*
Sample output:
etc, all the way up to 10.
What I have so far:
using System;
using System.Collections;
using System.Text;
namespace The_Last_Survivor
{
class Program
{
static void Main(string[] args)
{
//Declare Variables
int NumOfActors = 0;
System.DateTime dt = System.DateTime.Now;
int interval = 3;
ArrayList Ring = new ArrayList(10);
//Header
Console.Out.WriteLine("Actors\tNumber\tOrder");
//Add Actors
for (int x = 1; x < 11; x++)
{
NumOfActors++;
Ring.Insert((x - 1), new Actor(x));
foreach (Actor i in Ring)
{
Console.Out.WriteLine("{0}\t{1}\t{2}", NumOfActors, i, i.Order(interval, x));
}
Console.Out.WriteLine("\n");
}
Console.In.Read();
}
public class Actor
{
//Variables
protected int Number;
//Constructor
public Actor(int num)
{
Number = num;
}
//Order in circle
public string Order(int inter, int num)
{
//Variable
string result = "";
ArrayList myArray = new ArrayList(num);
//Filling Array
for (int i = 0; i < num; i++)
myArray.Add(i + 1);
//Formula
foreach (int element in myArray)
{
if (element == inter)
{
result += String.Format(" {0}", element);
myArray.RemoveAt(element);
}
}
return result;
}
//String override
public override string ToString()
{
return String.Format("{0}", Number);
}
}
}
}
The part I'm stuck on is getting some math going that does this:
Can anyone offer some guidance and/or sample code?
i cant seem to get my avd built and i dont understand why i got all the tools i even have GIT but when i try to do the command avd devices it will say no such command can any on help me please and thank you
I want to do this:
foo.com/xxx= foo.com/somepage.php?id=xxx
This is how I do it:
Options +FollowSymLinks
RewriteEngine On
RewriteCond %{QUERY_STRING} ^$
RewriteRule ^([^/]+)$ http://foo.com/somepage.php?id=$1 [L]
the problem now, is that foo.com doesn't work any more.
I can't see foo.com neither foo.com/index.php
help me! :)
I'm trying to create this script that will check the computer host name then search a master list for the value to return a corresponding value in the csv file. Then open another file and do a find an replace. I know this should be easy but haven't done so much in python before. Here is what I have so far...
masterlist.txt (tab delimited)
Name UID
Bob-Smith.local bobs
Carmen-Jackson.local carmenj
David-Kathman.local davidk
Jenn-Roberts.local jennr
Here is the script that I have created thus far
#GET CLIENT HOST NAME
import socket
host = socket.gethostname()
print host
#IMPORT MASTER DATA
import csv, sys
filename = "masterlist.txt"
reader = csv.reader(open(filename, "rU"))
#PRINT MASTER DATA
for row in reader:
print row
#SEARCH ON HOSTNAME AND RETURN UID
#REPLACE VALUE IN FILE WITH UID
#import fileinput
#for line in fileinput.FileInput("filetoreplace",inplace=1):
# line = line.replace("replacethistext","UID")
# print line
Right now, it's just set to print the master list. I'm not sure if the list needs to be parsed and placed into a dictionary or what. I really need to figure out how to search the first field for the hostname and then return the field in the second column.
Thanks in advance for your help,
Aaron
I'm using the masonry jquery plugin on a project:
(http://desandro.com/resources/jquery-masonry)
Basically I have a set of boxes (thumbnails) in a grid. When one is clicked, I want it to expand to a larger size to show more content (additional images and text). I'm struggling with how to make the thumbnail dissappear and then have new content appear in the expanded box. I don't know how to make the new content appear or where to store it on my page--and it needs to have a close button? The creator of the plugin gave me a quick tip for the expanding part, but the code I'm using has a set height and width and I want them to be variable depending on how much content is in the expanded state.
Here's my jquery code so far:
http://pastie.org/1002101
This is a similar example of the behaviour I want to achieve (except my boxes will have have varying expanded sizes):
(http://www.learnsomethingeveryday.co.uk)
You'll also notice from that example that it only allows 1 box to be expanded at a time--I would also like to have that functionality.
Sorry for all the questions--I'm pretty new to jquery, any help would be amazing!
As a self-taught programmer I find myself sometimes thinking how to improve my learning skills.
Are there any books out there that you recommend, that help a self-taught learning aproach?
When I ask about books here, please I`m not reffering about programming books, but something more like metacognition and the process of learning.
Please help me to prevent my data from SQL injection.
I have replaced ' with '' (single quote with 2 quote) while doing any operation on sql server.
Please tell me what all i need to do , to prevent my application from SQL injection. my application is in asp.net 2.0
I want calling actionScript 2.0 function from c# , I using ExternalInterface.addCallback;
In flash:
ExternalInterface.addCallback("test", function (text : String) : Void
{
//code
});
in C#: I using shockwave flash object
player.CallFunction("" + "myString" + "");
but error: Error HRESULT E_FAIL has been returned from a call to a COM component. in C#
I using cs4 and VS2008, please help me!
I know a little bit of regex, but not mutch. What is the best way to get just the number out of the following html. (I want to have 32 returned). the values of width,row span, and size are all different in this horrible html page. Any help?
<td width=14 rowspan=2 align=right><font size=2 face="helvetica">32</font></td>
I have to tables as follows;
Employees: Name nvarchar(50), Job Title nvarchar(50) and Salary int.
Employers: Name nvarchar(50), Job Title nvarchar(50)
I would like to select every item from the 'Employers' table where 'Job Title' does NOT show up in the 'Employees' table.
I know this is a simple query but it has me stumped.
I'd be grateful for any help. Thanks.
Hi,
I was reading somewhere that with MEF I can simply drop a dll into a directory and my application (with some MEF magic) will be able to read it and execute the code in it?
Hopefully only classes that implement an interface that I define??
Can someone help me to get going, with some links maybe for my problem.
I've looked through some of the docs, but nothing seems to be what I'm after and its tricky when I don't know exactly what to search on...
Thx
S
I am new to programming PHP and am trying to validate a field in a form.
The field if for a RAL color code and so would look something like : RAL 1001.
so the letters RAL and then 4 numbers.
Can someone help me set them into a regular expression to validate them.
i have tried this with no success:
$string_exp = "/^[RAL][0-9 .-]+$/i";
What can I say but sorry for being a complete NOOB at PHP.
Cheers
Ben
Hi all,
I am using a following query in MySQl for fetching data from a table. Its taking too long because the conditional check within the aggregate function.Please help how to make it faster
SELECT
testcharfield
,SUM(IF (Type = 'pi',quantity, 0)) AS OB
,SUM(IF (Type = 'pe',quantity, 0)) AS CB
FROM Table1
WHERE
sequenceID = 6107
GROUP BY testcharfield
Hi All,
I am trying to compare to textbox values on an aspx form. Both the values represent dates. The are formatted like "dd/MMM/yyyy". How can I compare them in javascript to see if they are not equal and which one is greater etc... Does javascript have a date constructor for strings like this? Any tips would be appreciated. Thanks for the help.
Cheers,
~ck in San Diego
hi all,
I want to implement Dicom using JAVA.
And also i should not use any existing API and i have to develop from the scratch.
I spent almost 10 days in understanding DICOM itself,i got some vague idea
so kindly help how implement it in java , where to start,architechture etc...
Regards,
Sam
hey all,
I'm creating an FWT application in FAN (http://www.fandev.org/) and every time I run my application, the ms-dos command prompt window appears (as well as my main application form). I don't want this ms-dos window to be shown, but i also don't know how to get rid of it, please help somebody :( it's giving me nightmares
Hi,
I am Rashmi.I have two forms in a single JSP page which are developed using JSF.Each form has one required field input and a submit button.On click of any of the button from any form,both forms should get validated and display required message.Please need help..........
sample code:
in advance
Thanks.
I'm in need of some basic TSQL help. Here's my table layout:
Orders Table
SSN
ZipCode
ZipLookup Table
ZipCode
State
All columns are varchars.
How would I get a list of States with the number of distinct SSN's in each state? Preferably, if a particular SSN has orders from multiple states only the state with the most orders would be counted for that SSN.
Thank you for any tips you can give me.
I am working on improving website performance. Here are the list of key performance indicators I am looking at for each page
Total Bytes downloaded
Number of requests
DNS look up time
FirstByte Download time
DOM content load time
Total load time
Is there any optimum value for each KPI to indicate website performance? Please help me in this regard.
hi. plz tel me to how to collect data for my project. as my projct relate to "sustainable urban infrastructure" so help me that what what data should i put to my project.i dont had any idea that how to do vit data analysis .so please direct me .
Hey im a noob in flash cs3 and i want to create a jeopardy game where when a button is pressed we go in to the main question scene and when we come back the button the we pressed is now disabled via 'button._visible=flase'...pls any help...any suggestions or links to tutorials or tutorials from you guys or girls will grateful thanx...
Hello, I have a os commerce site with a ssl installed but when you go to it does not redirect you to https://www.microcomputerctr.com
Please help.
I am trying to get my products listed with Google products but it keeps disapproving me