Rami 的个人资料You must enter a title b...照片日志列表更多 工具 帮助

日志


11月4日

Make your DotNetNuke Module Searchable

Hi,
If you were from those who using DotNetNuke content management system, and you have your own customized module, and wondering how to make these modules searchable, Do the following:

1- Go to your Controller class in your module (or any name you naming the class, the class which handle database requests, usually called [moduleName]Controller), and make it implements ISearchable Interface
VB:
Implements Entities.Modules.ISearchable
C#:
: Entities.Modules.ISearchable

2- Implement GetSearchItems function
VB:
Public Function GetSearchItems(ByVal ModInfo As Entities.Modules.ModuleInfo) _ As Services.Search.SearchItemInfoCollection Implements Entities.Modules.ISearchable.GetSearchItems ' Get the Surveys for this Module instance
Dim colSurveys As List(Of SurveyInfo) = GetSurveys(ModInfo.ModuleID)
Dim SearchItemCollection As New SearchItemInfoCollection
Dim SurveyInfo As SurveyInfo
For Each SurveyInfo In colSurveys
Dim SearchItem As SearchItemInfo SearchItem = New SearchItemInfo _
(ModInfo.ModuleTitle & " - " & SurveyInfo.Question, _ SurveyInfo.Question, _ SurveyInfo.CreatedByUser, _ SurveyInfo.CreatedDate, ModInfo.ModuleID, _ SurveyInfo.SurveyId, _ SurveyInfo.Question) SearchItemCollection.Add(SearchItem) Next
Return SearchItemCollection
End Function

C#:
public SearchItemInfoCollection GetSearchItems(DotNetNuke.Entities.Modules.ModuleInfo ModInfo)
{
// Get the Surveys for this Module instance
List<SurveyInfo> colSurveys = GetSurveys(ModInfo.ModuleID);
SearchItemInfoCollection SearchItemCollection = new SearchItemInfoCollection();
foreach (SurveyInfo SurveyInfo in colSurveys)
{
 SearchItemInfo SearchItem; SearchItem = new SearchItemInfo (ModInfo.ModuleTitle + " - " + SurveyInfo.Question, SurveyInfo.Question, SurveyInfo.CreatedByUser, SurveyInfo.CreatedDate, ModInfo.ModuleID, Convert.ToString(SurveyInfo.SurveyId), SurveyInfo.Question); SearchItemCollection.Add(SearchItem);
}
return SearchItemCollection;
}

Now these search items will be saved in DNN database to perform search operation on them

3- Go to your module definition page and under supported Features you can see 'searchable' is checked, which mean it has been activated

Thank you

11月3日

Unable to start debugging on the web server. The type initializer for 'System.Net.DigestClinet' threw an exception.

If you have troubled with this exception when trying to start debugging your web application that hosted in IIS, try on of the following:

·         Check if there is any DLL in bin directory called Security.dll, and rename it using its own project

·         Check IIS ASP.NET Version, should be 2.0….

·         Check web.config for

o   <configuration>
  <system.net>
    <authenticationModules>
      <add type="System.Net.DigestClient" />
    </authenticationModules>
  </system.net>
</configuration>

o   and see if something looks odd (like some incorrect values for Version for the System.Net.DigestClient authentication module.

References:

http://social.msdn.microsoft.com/forums/en-US/vsdebug/thread/9d30fcfd-c872-478c-817e-52e184eb5e55/

http://social.msdn.microsoft.com/forums/en-US/vsdebug/thread/a79fb2ce-8ac6-4092-831b-9858aef72102/

9月11日

JavaScript Debugger

Recently at work, I asked to build a web-based report designer, and this must be all at client side, so I turned to play around with JavaScript, it sounds pretty until I reach the point where I have to debug dozen lines of code, classes, functions…. Especially when I have to debug mouseMove event, watching width, height, left, top properties.

Window.alert() does not serve me, so I workaround this and try to make my debugging more dynamic, writing specific value, watching variables …

Div element was the hero in this battle, I put div and dynamically I started to write my individual values and properties to it using .innerHTML property, and everything seems to be okay.

After debugging and writing 10 values, I want to change the values I debugged and watching new values, so I started to comment all last wrote values , It starts to bother me,  type comment operator then remove it, type remove type remove….

So I decided to build a small javaScript debugger using div element as a primary element

I wrote I jsDebugger class and start to put methods support our goals

·         Write(string) //to write to debugging board(div)

·         WriteLine(string)//to write on debugging board with new line

·         Clear()//clears debugging board

·         stopDebugging()//stop writing values on debugging board so you don't have to go an comments all wrote values : )

 

One last thing, you can configure jsDebugger using a config object in constructor (it's optional)

 

Configuration contains

writingColor // the color of write

height//the height of debugging board (div)

bgColor// div background color

borderWidth// div border width

borderStyle// div border style

borderColor// div border color

fontFamily// writing font type

fontSize// writing font size

enabled:true// enable or disable jsDebugger

 

Like this

d = new jsDebugger( {

        writingColor:"black",

        height:"auto",

        bgColor:"#D0CFCC",

        borderWidth:"3px",

        borderStyle:"solid",

        borderColor:"gray",

        fontFamily:"Calibri",

        fontSize:"15px",

        enabled:true}

    );


Downloads:

7月3日

Environment Variables Editor - Path Edition

Environment Variables Editor - Path Edition  C#.NET based code tool

(Environment Variables) simply are variables, that store information about your computer, these variables created by windows operating system.
Environment Variables contains part called user variables, and one of (User variables) variables called (path), this variable store paths separated by ( ; ) each variable refer to a path in your hard disk, this stored paths used for fast access.
fast access can be done by using run program (win + r ) or (start --> Run...), and typing the name of the file or folder that you want access (open)

Image

e.g. let's assume that we have the following directory (folder)
D:\pics\friends\summerParty
and you want access to summerParty folder.
all you have to do is add D:\pics\friends\summerParty to (path) environment variables mentioned before (only once)
and then use Run... program (win + r ) and type (summerParty) and the folder will open for you

you can save a lot of time be using something like this

This tool allow users to modify (path) variable to meet their needs.
All questions, suggestion, bugs are welcome

Note: by adding (D:\pics\friends\summerParty ) you can only fast accessing the folders and files stored inside summerParty folder
Need .Net Framework 2.0 or higher

Downloads:
Envaironment Variable Editor - Path Edition

6月14日

Gradient Brush Tool

Gradient Brush tool (another generation code)
In these days as we know, Visualization takes an Important part in software manufacture, there for companies of programming languages (who creates and improve the PL) goes to take care of visualization issues, and starts to create and support things like ( classes, method) to implement visualization issues.

http://lastown.com/files/dl.php/download/307/0121618209022e3bc701ef1e581679d1/GBGenerator.JPG 

Gradient Brush tool: is a small tool, allows developers to generate a block of code,which can easily set a [b]Gradient color[/b] for form's background.
how can I use this ?:
This tool oriented to developers, programmers who use C# as programming language, all you have to do is to set "Blend factors "using track bars and see if the corresponding gradient are good for you, after that you have to get the responsible code which can create the selected gradient, Click "Generate Code" and copy generated code "Copy all code" then paste it inside the "paint" Event for your form.... and enjoy watching your gradient  :) 
to create paint event, go to properties window, then to Events tab (his icon like lightening) and search for paint, then double click it !

have a good try !
all suggestions, bugs  are welcome

GradientBrushTool.exe

Note: it needs .NET Frame Work 2.0 or higher

9月23日

DotA

AnyThing you want about DotA



As far as im addicting  to DotA... here is most famous related things to DotA

Maps:

DotA Allstars v6.48b
DotA Allstars v6.48
DotA Allstars v6.46b
DotA Allstars v6.46
DotA Allstars v6.45

More Maps 
here>>


DotA AllStars Game Modes

Primary game modes
Only useable by the game host.
-allpick
-ap
Everyone may pick heroes from any tavern.
Incompatible with allrandom, teamrandom, leaguemode, moderandom, voterandom, and reverse.

-allrandom
-ar
Every player gets a random hero from any tavern.
Incompatible with allpick, teamrandom, leaguemode, voterandom, moderandom, and reverse.

-moderandom
-mr
Randomly picks a mode from ar, ap, tr and normal pick.
Incompatible with allrandom, allpick, teamrandom, leaguemode, voterandom, reverse, and deathmatch.

-leaguemode
-lm
All forms of random are disabled. 10 players required. The teams will pick in alternating orders, one team picking one hero, the other team picks two heroes, the first team picks two heroes, the other team picks two heroes, the first team picks their two last heroes, the other team picks their last hero. (1-2-2-2-2-1). The team which has the first pick is random.
Incompatible with allrandom, allpick, mirrormatch, teamrandom, deathmatch, moderandom, allagility, allintelligence, allstrength, itemdrop, nopowerups, supercreeps, easymode, duplicatemode, voterandom, samehero, and reverse.

-voterandom
-vr
Three random matchups will be chosen, and each players gets to cast a vote on which of the three matchups they want, using "-option #" where # is 1, 2 or 3.
Needs an even amount of players on each team to be activated.
Incompatible with leaguemode, allrandom, mirrormode, teamrandom, deathmatch, moderandom, allagility, allintelligence, allstrength, samehero, and reverse.

-reverse The Sentinel's players pick the Scourge's team and the Scourge's players pick the Sentinel's team.
Needs an even amount of players on each team to be activated.
Incompatible with allpick, allrandom, teamrandom, moderandom, leaguemode, voterandom, deathmatch, and samehero.
Secondary game modes
Only useable by the game host.
-deathmatch
-dm
If you die, you will have to pick a new hero once you can respawn. Deathmatch must be selected before any primary game mode to work. If a random primary mode was selected, you will recieve a hero according to that random mode. A team loses if it has 36 deaths, or if its ancient is destroyed.
Incompatible with allintelligence, allagility, allstrength, teamrandom, leaguemode, moderandom, voterandom and samehero.

-itemdrop
-id
When you die, a random slot in your inventory will drop whatever it holds. You no longer lose money when dieing.
Incompatible with leaguemode.

-supercreeps
-sc
Every now and then, a super creep may spawn for each side and follow the creeps in either lane. The weakest supercreep is the siege golem, a bit stronger is the scary fish, and the ancient hydra is the strongest one.
Incompatible with leaguemode.

-easymode
-em
Towers are weaker, experience is gained faster, and you get more periodic gold.
Incompatible with leaguemode.

-nopowerups
-np
No runes will spawn.
Incompatible with leaguemode.

-allagi
-aa
Only agility heroes may be chosen.
Incompatible with allstrength, allintelligence, deathmatch, voterandom and leaguemode.

-allint
-ai
Only intelligence heroes may be chosen.
Incompatible with allstrength, allagility, deathmatch, voterandom and leaguemode.

-allstr
-as
Only strength heroes may be chosen.
Incompatible with allagility, allintelligence, deathmatch, voterandom and leaguemode.

-shuffleplayers
-sp
The teams will be randomly shuffled. This includes which colour you have and which side you are on.
Compatible with all other modes.

-mirrormatch
-mm
mirrormatch: Requires that both teams have the same number of players. After one minute, each player pair (blue - pink, teal - gray, purple - light blue, yellow - dark green, orange - brown) will have their heroes replaced with either one of the two they had. In the end, each player pair has the same hero, and both teams have the same matchup.
Incompatible with samehero, voterandom and leaguemode.

-duplicatemode
-du
The same hero can be picked, or randomed, by multiple players.
Incompatible with leaguemode.

-samehero
-sh
All players will have the hero that blue picks.
Incompatible with mirrormatch, voterandom and leaguemode.
Fun modes
Have to be entered in the first 15 seconds, seperately.
-wtf When an ability is used, all cooldowns are reset and your mana is set to full. Certain triggered abilities will seem as if they have no cooldown, but will not have any effect until the time which it would normally be cooled down has passed. (One example is Borrowed Time)

9月19日

Frozen Smoke

"Scientists hail ‘frozen smoke’ as material that will change world"




A MIRACLE material for the 21st century could protect your home against bomb blasts, mop up oil spillages and even help man to fly to Mars.
Aerogel, one of the world’s lightest solids, can withstand a direct blast of 1kg of dynamite and protect against heat from a blowtorch at more than 1,300C.
Scientists are working to discover new applications for the substance, ranging from the next generation of tennis rackets to super-insulated space suits for a manned mission to Mars.
It is expected to rank alongside wonder products from previous generations such as Bakelite in the 1930s, carbon fibre in the 1980s and silicone in the 1990s. Mercouri Kanatzidis, a chemistry professor at Northwestern University in Evanston, Illinois, said: “It is an amazing material. It has the lowest density of any product known to man, yet at the same time it can do so much. I can see aerogel being used for everything from filtering polluted water to insulating against extreme temperatures and even for jewellery.

ReadMore>>

Watch Videos>>

9月18日

هل يحق لنا ؟؟

هل يحق لنا
الأمر مابخفى على حدا... صرنا بعصر صار فيه الكمبيوتر شي أساسي بالحياة......
فشو رأيكون بناس إختصاصون وشغلون ودراستون هي بهاد المجال!!!!
فكرة الأساسيه  هون هو أنو نحنا وبمجال الكمبيوتر منستخدم برامج كتيره... وكلها من شركات أجنبية مرخصتها وآخده عليها حقوق و إمتيازات وقصص تانيه....ومعروف ببلاد برا وخاصة عند الشركات أنو لما بدون يستخدموا برنامج معين فإنون بيشتروه..من الشركة المصنعه له..
بس عنا هون بالبلد مامنجيب والحمد لله غير شي مسروق ومهكر Disappointed...هلق السؤال الذي يطرح نفسه....هل يجوز لنا (يلي عم يستخدموا البرامج من دون مايشتروها من الشركات الأم المصنعه) أنو نستخدمها ...هل هذا حلال .. هل يجوز أنو ناخد جهد الآخرين بدون شي ..أم لا ؟؟
فلا ننسا أننا كما ندين ندان !!!!!!!!Open-mouthed

شكراً
...
9月16日

الميكروباص ...ماهو أكبر عدد يحويه

خمسة على الواقف ... ركبنا يابي
اليوم وككل يوم بدري اركب ميكرو من شان ررح على الشغل
وأنا واقف عم استنى، إجى ميكرو ...كان في
3 أشخاص على الواقف "يعني مو قاعدين على الكراس" ...كنت بلحظتها متأكد أنو مالح يوقفلي ..
بس تفاجئت بأنو ابن حلال كتيير..... وقف!!! وركبت ...طبعا على الواقف... لحد الآن صرنا 4 أشخاص على الواقف !!
وبعد شوي ..وقف من شان يطلع راكب 5!!!! خمسه على الواقف.... حدا بصدقها ياعالم !!!!! أنا ما صدقت ... والله أعلم شلون دبرنا راسنا
المهم السؤال الذي يطرح نفسه...
لو أعدت فكرة ولو لمده 10 دقائق بأنك تلاقي شي تبرير لهالتصرف هاد شو بيطلع معك أجوبه
أنا طلع معي مايلي:
إنسان أخلاقو عاليه كتيير لدرجه أنو ما بحب يشوف حدا ملطوع بالشارع عم يستنى مكرو...فمهما كانت النتائج ....بدو يركبو
إنسان طماع كتيير لدرجه لو انو في راكب 6 على الطريق ياسيدي كان طلعو معنا
بيضرب بالمندل وبيعرف أيمتى لح ينزلو الركاب ...فحسب أنو حدا من الواقفين نزلتو قريبه

وأنا برجح التانيه...فشوفو الإنسان لما بفضّل مصلحتو على مصلحة غيرو مع ضرر.... هي يلي تسمى بالسلبية
بقا شو رأيكون !!!!!!!!!
هههه