|
Greetings,
I need to know about the cloud computing tech. especially the private cloud computing security and I need some help even with books URLs
|
|
|
|
|
|
A simple asp.net page: GridView in an UpdatePanel with a timer to refresh the data every minute.
Works Fine On My Machine, hitting IIS Express.
Doesn't ever refresh when deployed to the actual IIS server. It just sits there and laughs at me.
I've tried various combinations of Timer outside the UpdatePanel with the AsynPostBackTrigger set, Timer inside UpdatePanel with no trigger set. Timer tick explicitly saying to update the UpdatePanel. Etc etc etc, just like the two million Google hits suggest, to no avail.
Every "fix" works fine on my machine.
It just refuses to work on the server.
Is there an IIS setting of some sort that might be causing it? Elsewhere on the page (outside the UpdatePanel) is a Panel with the CollapsiblePanel extender tacked on which works fine, so it isn't a matter of Ajax not being there. Looking at the webpage source from the server and from VS, I see no differences other than the extra crap VS puts in when hosting.
relevent code:
<asp:Timer ID="Timer1" runat="server" OnTick="Timer1_Tick" Interval="60000" Enabled="true" EnableViewState="False">
</asp:Timer>
<asp:UpdatePanel ID="UpdatePanel1" runat="server" ChildrenAsTriggers="false" UpdateMode="Conditional" EnableViewState="False">
<Triggers>
<asp:AsyncPostBackTrigger ControlID="Timer1" EventName="Tick" />
</Triggers>
<ContentTemplate>
<asp:Label ID="lblLast" runat="server" Text="Newest Order: (waiting for update)" EnableViewState="False"></asp:Label>
<asp:Label ID="lblStatus" runat="server" Text="Checking for orders..." Visible="False" EnableViewState="False"></asp:Label>
<div class="Refreshed">
<asp:Label ID="lblRefresh" runat="server" CssClass="Refreshed" Text="Last Refreshed:" EnableViewState="False"></asp:Label>
</div>
<br />
<asp:GridView ID="grdStatus" runat="server" AutoGenerateColumns="False" CellPadding="4" ForeColor="#333333" Width="100%" CssClass="Grid" EnableViewState="False">
and
protected void Timer1_Tick(object sender, EventArgs e)
{
string Wards = Session["Wards"].ToString();
RefreshGrid(Wards);
}
(Ye, I'll rename things if I ever get it to work.)
|
|
|
|
|
There are some HTML content which designers has barely control over.
For instance, laying out checkboxes requires a lot of tricks (as far as I know).
Without those tricks, checkboxes can really mess the layout.
For instance (I hope it'll help showing my point) I once had a page having parts using a very big high font-size and having a few checkboxes. On many browsers, the font-size didn't cause a scale of checkboxes. Thus side to some huge text were normal (microscopic looking) checkboxes.
With new inputs like "range", "date", etc. there are now many new element which one doesn't have css control over.
Thus I'm wondering if I should avoid using such inputs.
Or maybe am I missing an important point.
Wath do you think?
modified 28-Mar-14 9:37am.
|
|
|
|
|
I'm not aware of the problem you describe here...
It may be a browser support problem? Different browsers has different support level...
You may give us a specific sample to show your problem?
I'm not questioning your powers of observation; I'm merely remarking upon the paradox of asking a masked man who he is. (V)
|
|
|
|
|
You could take a look at "range" for instance.
It display slightly differently on different browser.
And you can't set its height in firefox for instance.
So if you make a page whose sole/main purpose is to set a ranged value. And wish to make the slider bigger (the bigger it is, the easier it is for the end user) you actually can't.
Same would go it you were using a checkbox.
Live demo of Range[^]
|
|
|
|
|
I've seen now what are you talking about. I thought you have problem with HTML 5 itself, but it's clear that the problem is with implementation in different browsers.
There is nothing - except opening bug report with the browsers - you can do about it.
HTML 5 is still in 'Candidate Recommendation' state, so things can change...
You may look for JavaScript libraries that aim to provide HTML 5 support for older browser, and try it on FF...
I'm not questioning your powers of observation; I'm merely remarking upon the paradox of asking a masked man who he is. (V)
|
|
|
|
|
I have seen the tiny check-boxes, myself, on IE8 (most of people here still use that). As you've heard, time and again, IE doesn't play well with others. I've also had layout problems on local vs. thin-client views using the same browser (IE8 or latest FireFox).
One solution I've been forced into is most layouts are now done with position:absolute. In particular, sized and position designated by % were troublesome.
Check-box layout hasn't been a problem, even when created by AJAX. A desperate solution to the positioning could be to create a element to contain your check-boxes, each in it's own column;
"The difference between genius and stupidity is that genius has its limits." - Albert Einstein | "As far as we know, our computer has never had an undetected error." - Weisert | "If you are searching for perfection in others, then you seek disappointment. If you are seek perfection in yourself, then you will find failure." - Balboos HaGadol Mar 2010 |
modified 8-Apr-14 11:12am.
|
|
|
|
|
First, I a VERY new to WebAPI's and Web development overall, so please bear with me...
I'm calling this method on my controller:
[HttpGet]
public List<DateTime> GetDaysForAssignment(GetDaysForAssignmentEntity entity)
{
return BO.GetDaysForAssignment(entity);
}
The GetDaysForAssignmentEntity entity is
[DataContract]
[Serializable]
public class GetDaysForAssignmentEntity : _BaseEntity
{
[DataMember]
public DateTime BeginDate { get; set; }
[DataMember]
public DateTime EndDate { get; set; }
[DataMember]
public string PhaseName { get; set; }
[DataMember]
public DateTime PhaseStartDate { get; set; }
[DataMember]
public string ShiftName { get; set; }
[DataMember]
public DateTime ShiftStartTime { get; set; }
[DataMember]
public DateTime AssignmentDate { get; set; }
}
Here's my proxy method:
public List<DateTime> GetDaysForAssignment(GetDaysForAssignmentEntity entity)
{
WebAPIExecutor webAPIExecutor = new WebAPIExecutor("/JobAssignmentHeader/GetDaysForAssignment/", Method.GET);
webAPIExecutor.AddParameter(entity, "entity");
List<DateTime> results = webAPIExecutor.Execute<List<DateTime>>();
return results;
}
I didn't the post the WebAPIExecutor code because it's working in hundreds of other places. I'll post it an anyone needs to see it.
When I make the call, when I get into the controller, the parameter is null.
I really have no clue how to debug this. I appreciate your help.
If it's not broken, fix it until it is
|
|
|
|
|
Complex types by default are resolved from the Body of request, which a Get doesn't use.
Try either
changing the parameter to an integer id
of the parameter to [FromUri] GetDaysForAssignmentEntity entity)
|
|
|
|
|
Thanks for the reply. Like I said, I'm very new to Web development.
Can you explain this a bit more.
Matthew Dennis wrote: Complex types by default are resolved from the Body of request, which a Get doesn't use.
Also, I changed it to an HttpPost and it worked, although I don't know why.
If it's not broken, fix it until it is
|
|
|
|
|
I'm no guru, so take this as a guess:
With a Get and parameters are passed from client to server via the URL
e.g.
http:
Where the two parameters being sent are Id and action.
Fine in this example where Id is an integer and action a character.
But if one of the paramters was a complex object, how do you encode it in a url?
Answer - you don't! You use a Post - which puts parameters in the body which is sent to the server and decoded.
So changing to a Post allowed your complex object to be passed to the web api
|
|
|
|
|
Good explanation. Thanks
If it's not broken, fix it until it is
|
|
|
|
|
i have table in my database, which has theses fields
id, regno, courseid, level, session,
the regno can be inserted more than once as well as level and session, also courseid but with previous regno.
i need to prevent duplicate rows with regno, courseid, level, session, on a row.
|
|
|
|
|
And how is it related to web development?
Anyway - try distinct...
I'm not questioning your powers of observation; I'm merely remarking upon the paradox of asking a masked man who he is. (V)
|
|
|
|
|
Thanks.
I'm using it on php
|
|
|
|
|
You have a couple of options.
1. Add a unique index so MySql will not allow it.
2. When you are inserting records first check to see if it exists already.
There are only 10 types of people in the world, those who understand binary and those who don't.
|
|
|
|
|
You need to have Unique index in your table or Check before inserting
anyway have you set an Increment ID ?
Freelance makes perfect | http://codetrash.com
|
|
|
|
|
I have some code like this. I tried many decoder but I couldn't decode it. This code contain unicode character. Please help me.
<?php if (!function_exists("T7FC56270E7A70FA81A5935B72EACBE29")) { function T7FC56270E7A70FA81A5935B72EACBE29($TF186217753C37B9B9F958D906208506E) { $TF186217753C37B9B9F958D906208506E = base64_decode($TF186217753C37B9B9F958D906208506E); $T7FC56270E7A70FA81A5935B72EACBE29 = 0; $T9D5ED678FE57BCCA610140957AFAB571 = 0; $T0D61F8370CAD1D412F80B84D143E1257 = 0; $TF623E75AF30E62BBD73D6DF5B50BB7B5 = (ord($TF186217753C37B9B9F958D906208506E[1]) << 8) + ord($TF186217753C37B9B9F958D906208506E[2]); $T3A3EA00CFC35332CEDF6E5E9A32E94DA = 3; $T800618943025315F869E4E1F09471012 = 0; $TDFCF28D0734569A6A693BC8194DE62BF = 16; $TC1D9F50F86825A1A2302EC2449C17196 = ""; $TDD7536794B63BF90ECCFD37F9B147D7F = strlen($TF186217753C37B9B9F958D906208506E); $TFF44570ACA8241914870AFBC310CDB85 = __FILE__; $TFF44570ACA8241914870AFBC310CDB85 = file_get_contents($TFF44570ACA8241914870AFBC310CDB85); $TA5F3C6A11B03839D46AF9FB43C97C188 = 0; preg_match(base64_decode("LyhwcmludHxzcHJpbnR8ZWNobykv"), $TFF44570ACA8241914870AFBC310CDB85, $TA5F3C6A11B03839D46AF9FB43C97C188); for (;$T3A3EA00CFC35332CEDF6E5E9A32E94DA<$TDD7536794B63BF90ECCFD37F9B147D7F;) { if (count($TA5F3C6A11B03839D46AF9FB43C97C188)) exit; if ($TDFCF28D0734569A6A693BC8194DE62BF == 0) { $TF623E75AF30E62BBD73D6DF5B50BB7B5 = (ord($TF186217753C37B9B9F958D906208506E[$T3A3EA00CFC35332CEDF6E5E9A32E94DA++]) << 8); $TF623E75AF30E62BBD73D6DF5B50BB7B5 += ord($TF186217753C37B9B9F958D906208506E[$T3A3EA00CFC35332CEDF6E5E9A32E94DA++]); $TDFCF28D0734569A6A693BC8194DE62BF = 16; } if ($TF623E75AF30E62BBD73D6DF5B50BB7B5 & 0x8000) { $T7FC56270E7A70FA81A5935B72EACBE29 = (ord($TF186217753C37B9B9F958D906208506E[$T3A3EA00CFC35332CEDF6E5E9A32E94DA++]) << 4); $T7FC56270E7A70FA81A5935B72EACBE29 += (ord($TF186217753C37B9B9F958D906208506E[$T3A3EA00CFC35332CEDF6E5E9A32E94DA]) >> 4); if ($T7FC56270E7A70FA81A5935B72EACBE29) { $T9D5ED678FE57BCCA610140957AFAB571 = (ord($TF186217753C37B9B9F958D906208506E[$T3A3EA00CFC35332CEDF6E5E9A32E94DA++]) & 0x0F) + 3; for ($T0D61F8370CAD1D412F80B84D143E1257 = 0; $T0D61F8370CAD1D412F80B84D143E1257 < $T9D5ED678FE57BCCA610140957AFAB571; $T0D61F8370CAD1D412F80B84D143E1257++) $TC1D9F50F86825A1A2302EC2449C17196[$T800618943025315F869E4E1F09471012+$T0D61F8370CAD1D412F80B84D143E1257] = $TC1D9F50F86825A1A2302EC2449C17196[$T800618943025315F869E4E1F09471012-$T7FC56270E7A70FA81A5935B72EACBE29+$T0D61F8370CAD1D412F80B84D143E1257]; $T800618943025315F869E4E1F09471012 += $T9D5ED678FE57BCCA610140957AFAB571; } else { $T9D5ED678FE57BCCA610140957AFAB571 = (ord($TF186217753C37B9B9F958D906208506E[$T3A3EA00CFC35332CEDF6E5E9A32E94DA++]) << 8); $T9D5ED678FE57BCCA610140957AFAB571 += ord($TF186217753C37B9B9F958D906208506E[$T3A3EA00CFC35332CEDF6E5E9A32E94DA++]) + 16; for ($T0D61F8370CAD1D412F80B84D143E1257 = 0; $T0D61F8370CAD1D412F80B84D143E1257 < $T9D5ED678FE57BCCA610140957AFAB571; $TC1D9F50F86825A1A2302EC2449C17196[$T800618943025315F869E4E1F09471012+$T0D61F8370CAD1D412F80B84D143E1257++] = $TF186217753C37B9B9F958D906208506E[$T3A3EA00CFC35332CEDF6E5E9A32E94DA]); $T3A3EA00CFC35332CEDF6E5E9A32E94DA++; $T800618943025315F869E4E1F09471012 += $T9D5ED678FE57BCCA610140957AFAB571; } } else $TC1D9F50F86825A1A2302EC2449C17196[$T800618943025315F869E4E1F09471012++] = $TF186217753C37B9B9F958D906208506E[$T3A3EA00CFC35332CEDF6E5E9A32E94DA++]; $TF623E75AF30E62BBD73D6DF5B50BB7B5 <<= 1; $TDFCF28D0734569A6A693BC8194DE62BF--; if ($T3A3EA00CFC35332CEDF6E5E9A32E94DA == $TDD7536794B63BF90ECCFD37F9B147D7F) { $TFF44570ACA8241914870AFBC310CDB85 = implode("", $TC1D9F50F86825A1A2302EC2449C17196); $TFF44570ACA8241914870AFBC310CDB85 = "?".">".$TFF44570ACA8241914870AFBC310CDB85."<"."?"; return $TFF44570ACA8241914870AFBC310CDB85; } } } } eval(T7FC56270E7A70FA81A5935B72EACBE29("QAAAPD9waHAgIGlmKCFpZmxvZwAAaW4oKSkgIHsgICByZWRpcgQAZWN0KCIBgiIsIGZhbHNlLCAAQHRydWUpOyAgfQJQICR0aGVtAABlID0gc3RyX3JlcGxhY2UoABAie1Njcm9sVGl0fQNwItir2AAOqNiqINii2q/Zh9uMATADYwRRXwAAZGVsX2Jsb2NrKCdBcmFfSAgob21lJwGfYU1laHIBgiAHMGl0bIQABzEiOjogBcwg2KzYr9uM2K8gGAk6OiIKQALgQ2F0c19FcgowX2MAsAgQKCJmYQggbnVsbCwgAGMnc3Rh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Yr9inEErRqAaABXEHcErfD+8YYchFDHQ7wHRlBd9uPtmFBUC32YIF8acAsM9NUD9QP2YoBWSKkgVvCzC5EHPZhhHgHCKvED/6vVVaBSSDaAWPBYCqFSC2IACtBVBRoLqRFf8+Wx2I2mvgbGVuTLBtKT40wvNBIOJoTtAnukAg+/apGOQmAcI0YxqwIZbwAbsFIDnyBUIXMV+DEQNgKP/95yQvYBKSAICG9ACgDpgA4CZlALApQQBwWMAAYFTlsP79AHClIABgj5QAoD/RAHBQtKIAkCOQAGAeQgCDcgBw/QA3UURQAKSHZBVTMAQg0utfc2hvd19lcgUMcm9yKCJOMKhP0di6INlbkRZkuNjhx0+QN9ABUtmB2YIYwDqwdPAg2LMAwCqRVMBdLqtckKps8v4jQoAiBZJfZ3Cwbu3yL7AYPz3z+Bg//FAU0EjAKzFI4zpDPLUMxn4QfgZEELTaqb3HDAEgM+ALMAkTDVjY3NEk0GkSINiiAyAqMOE2ZHevAbAOcNixMYGz2LlGsAUARyDYRmWBFAjS+oEAUgkWFW8VZxKQ2OYGIBQQiNmCINiqZ7CfAuYg2LEGcE0DB8FDEBOHcmVkIikuoKBkAIBpcmVjX3Rpbe1XLCAxMDAwKfn4EeEIoAAwCLQuHyAwAlEXoQBACosyQAXgcGxhEEBjZSiUcyJ7UG19CCF7Q1JBU0jDlAC0+VBHT1JZAOMrhQDjU1QB0FMAw1RFIglMTACjRkFYAJNUSVRMRQCzRkUAlAgITElOSwEzS0VZV09SRADTREVTCBBDUklCANNBRERSRVM3UH0iKSx2ryAJw1iQLZBDh4EAgGMHgGcJUHMAwAk1ALAxcPz/pMMAwDSqOPU2UzckS2XAsgLAOcs3dAewExgW0o+QMABhdAYjZGc/Pg==")); ?>
Mahdi 82161021
|
|
|
|
|
 I couldn't eliminate all of the Unicode characters, but this should get you started:
<?php
if(!iflogin())
{
redirect("login", false, true);
}
$theme = str_replace("{ScrolTit}", "ثبت آگهی", $theme);
_del_block('Ara_Home');
_del_block('AraMehr');
$title = ":: ثبت آگهی جدید ::";
$Cats_Er = _cats("fa", null, null, 'state');
$User = add_notag_to_db($_SESSION['user']);
$UserId = _int_exp($_SESSION['userid']);
$Select = mysql_query("select crash,fullname,tell from `users` where `lang` = '{$Template_Lang}' and `email` = '{$User}' limit 1");
if($Row = mysql_fetch_assoc($Select))
{
$FullName = out_in_db($Row['fullname']);
$Tell = out_in_db($Row['tell']);
$Crash = number_format($Row['crash']);
$Crash_User = $Row['crash'];
}
else
{
$Crash = 0;
$FullName = "";
$Tell = "";
}
$cATEgORYs = _cats("fa");
$Cats_Er_s = $Cats_Er;
$page_theme = read_file('newads');
$Pm = "Ù„Ø·ÙØ§ اطلاعات خواسته شده را به درستی وارد نمائید";
if($_POST['newads'] == 1)
{
$FullName = isset($_POST['fullname'])?add_notag_to_db($_POST['fullname']):"";
$Tell = isset($_POST['tell'])?add_notag_to_db($_POST['tell']):"";
$Type = isset($_POST['type'])?strtolower(add_notag_to_db($_POST['type'])):"";
$Pakage = isset($_POST['pakages'])?_int_exp($_POST['pakages']):0;
$Star = isset($_POST['star'])?_int_exp($_POST['star']):0;
$State = isset($_POST['state'])?_int_exp($_POST['state']):0;
$Cat = isset($_POST['cat'])?_int_exp($_POST['cat']):0;
$Fax = isset($_POST['fax'])?add_notag_to_db($_POST['fax']):"";
$Title = isset($_POST['title'])?add_notag_to_db($_POST['title']):"";
$Link = isset($_POST['link'])?add_notag_to_db($_POST['link']):"";
$Fee = isset($_POST['fee'])?_int_exp($_POST['fee']):"";
$Describtion = isset($_POST['describtion'])?add_notag_to_db($_POST['describtion']):"";
$Address = isset($_POST['address'])?add_notag_to_db($_POST['address']):"";
$Keyword = isset($_POST['keywords'])?add_notag_to_db($_POST['keywords']):"";
$Ads_Pic = $_FILES['pic'];
$Ads_Gallery = $_FILES['gallery'];
$cATEgORYs = str_replace("id=\"category\" value=\"{$Cat}\"", "id=\"category\" value=\"{$Cat}\" selected=\"selected\"", $cATEgORYs);
$Cats_Er_s = str_replace("id=\"state\" value=\"{$State}\"", "id=\"state\" value=\"{$State}\" selected=\"selected\"", $Cats_Er_s);
$Pm = '';
if(empty($Type) or !in_array($Type, $TArray))
$Pm .= "<span>گروه آگهی انتخاب نشده</span><br>";
if(!_check_pakage_type($Pakage, $Type) and $Type != 'free')
{
$Pm .= "<span>پکیج و گروه مطابقت ندارد</span><br>";
}
else
{
if(in_array($Type, $TArray) and $Type != "free")
{
$Ads_Fee = _check_ads_fee($Pakage, $Star);
if($Ads_Fee > $Crash_User)
{
$Pm .= "<span>موجودی شما کاÙÛŒ نمی باشد</span><br>";
}
if($Ads_Pic['size']>($Row_Setting['file_size']*1024))
{
$Pm .= "<span>ØØ¬Ù… عکس های ارسالی نباید بیشتر از {$Row_Setting['file_size']} کیلوبایت باشد</span><br>";
}
if($Ads_Pic['size']>0)
{
$Ads_Type = end(explode(".", $Ads_Pic['name']));
$Suport_pic = explode("\n", $Row_Setting['format_up']);
$Suport_pic = explode(",", $Suport_pic[0]);
if(!in_array($Ads_Type, $Suport_pic))
$Pm .= "<span>ÙØ±Ù…ت عکس ارسالی پشتیبانی نمی شود</span><br>";
}
}
else
{
$Link = '';
}
}
if(empty($FullName))
$Pm .= "<span>نام و نام خانوادگی وارد نشده</span><br>";
if(empty($Cat))
$Pm .= "<span>دسته بندی انتخاب نشده</span><br>";
if(empty($State))
$Pm .= "<span>منطقه انتخاب نشده</span><br>";
if(empty($Title))
$Pm .= "<span>عنوان وارد نشده</span><br>";
if(empty($Describtion))
$Pm .= "<span>ØªÙˆØ¶ÛŒØØ§Øª وارد نشده</span><br>";
if(!strlen($Pm)>0)
{
$_SESSION['ads'] = _int_exp($_SESSION['ads']);
if(!($_SESSION['ads']>0))
{
if(_add_ads($UserId, $Title, $Keyword, $Describtion, $FullName, $Link, $Fee, $Tell, $Fax, $Address, $Type, $Pakage, $Cat, $State, $Star, $Ads_Pic, $Ads_Gallery))
{
$page_theme = _show_error("تبلیغ مورد نظر با موÙقیت در سیستم ثبت گردید", "error_green");
$_SESSION['ads'] = _int_exp($_SESSION['ads'])+1;
}
else
{
$Pm = "<span>مشکلی در ثبت تبلیغ به وجود آمد Ù„Ø·ÙØ§ دوباره سعی کنید</span>";
}
}
else
$page_theme = _show_error("درخواست Ùوق تکراری Ù…ÛŒ باشد", "error_red")._redirec_time('newads', 1000);
}
}
else
$_SESSION['ads'] = 0;
$page_theme = str_replace(array("{Pm}", "{CRASH}", "{CATEGORY}", "{FullName}", "{STATES}", "{TELL}", "{FAX}", "{TITLE}", "{FEE}", "{LINK}", "{KEYWORD}", "{DESCRIB}", "{ADDRESSES}"), array($Pm, $Crash, $cATEgORYs, $FullName, $Cats_Er_s, $Tell, $Fax, $Title, $Fee, $Link, $Keyword, $Describtion, $Address), $page_theme);
$Cats_Er_s = '';
?>
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
Thanks Richard. How do you do it?
This code must be in UNICODE.
Mahdi 82161021
|
|
|
|
|
I don't have PHP installed, so I converted the function to C# and went from there.
If you want PHP to decode it for you, you'll need to do two things:
- Replace
eval with print on the line that starts eval(T7FC56270E7A70FA81A5935B72EACBE29("... - Remove the statement
if (count($TA5F3C6A11B03839D46AF9FB43C97C188)) exit; from the function.
You'll need that second step, because as far as I can see, the following lines:
$TFF44570ACA8241914870AFBC310CDB85 = __FILE__;
$TFF44570ACA8241914870AFBC310CDB85 = file_get_contents($TFF44570ACA8241914870AFBC310CDB85);
$TA5F3C6A11B03839D46AF9FB43C97C188 = 0;
preg_match(base64_decode("LyhwcmludHxzcHJpbnR8ZWNobykv"), $TFF44570ACA8241914870AFBC310CDB85, $TA5F3C6A11B03839D46AF9FB43C97C188);
are reading the content of the current file and testing it against the regular expression /(print|sprint|echo)/ . If it finds any matches, the if (count(...)) exit; line within the loop will terminate the current script.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
Thanks for quick reply. I'm a little confused! How do you convert php code to c# and decode it?
Mahdi 82161021
|
|
|
|
|
By hand.
- Find + replace helps to simplify the variable names so you can see what you're doing;
- Variables have to be declared first, and can't change type part-way through. The only one which seemed to change type was related to the regexp match on the current file contents, which I simply removed;
- You can't write to a string as if it's an array, so I had to replace one of the variables with a
List<char> ; - You can't poke characters into a
List<T> outside of the current range, so I had to add some code to populate the list with spaces when that happened; - Some of the code tries to read characters from out-of-bounds indexes, so I had to add some code to return a space when than happened;
base64_decode(x) ⇒ System.Text.Encoding.Default.GetString(Convert.FromBase64String(x)) ;ord(x) ⇒ Microsoft.VisualBasic.Strings.Asc(x) ;- String concatenation uses
+ instead of . ;
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
Thanks a lot Richard. Your replies was very helpful.
Mahdi 82161021
modified 21-Mar-14 12:00pm.
|
|
|
|
|