hi guys i am converting java code to use sentiwordnet
that line in java how we can write in C#.
i triedlike tthat tempdict[synterm].Add(syntermrank, sysnsetscore);
This is not a proper question for this site (hence the responses you already got), I would encourage you to either make a specific question or google for what you are looking for. Or just navigate through sourceforge or github.
If you think you can do a thing or think you can't do a thing, you're right - Henry Ford
I'm working with a special type of "offline files"/"File sync"-system, and need to compare a users files on his/her computer en on the file server. The place I'm working at, was tricked by a Microsoft rep back in 2011, to use a system that works kind of like OneDrive. The user have their files on their laptop, and when connected to the organization's network, the files are synched with the file server
Now that they are migrating to Windows 10, and actual OneDrive, I've discovered a problem: the files aren't always synched. The process is now to run a set of tools on the users' computers,to check for errors, and if there is, (and there's plenty of errors), the user need to confirm which file is the correct one.
I've been testing WinMerge, and similar programs, but they are mostly garbage for the use I need them for. I need flexibility, meaning that i need complex filtering options, (e.g. folder names to increase processing speed), but also the options to look at files in different manners, (hashes of files, metadata, or byte-for-byte). THis could actually be done in powershell pretty "easily", however, the user will have to interact with this in a meaningfull and friendly way, so an interface is therefore needed, which allows for sorting, opening selected files, copying, copy to third party location, copy to same location with a pre/su-fix. Options to reduce timeconsumption, (quick mode which only checks metadata, or hashmode, which is in the middle, or slow mode byte-for-byte)
My solution (thus far)
Create this as a C# program, with a nice interface, (I've made the interface, and it's actually very nice), I've tested some simple file comparisons, but I need you guys' input. Am I doing this right or is there a piece of software that I haven't found yet??
I wrote some software that did this back about 2010 and originally used the Sync Framework to do the work, but ended up hand rolling so much of my own code that there's very little original SF left in there. The approach I took was more than you'll need to do because you're looking at, effectively, a one time operation but my solution took care of client/server/server syncing - anyway, the crux of the checks - you check the file lengths first - if they are different, you don't need to do any further checking as you have a potential problem file; then you create a hash of both files, if they don't match, you have files that need checking. The vast majority of cases are caught by the file length as it's comparatively rare that you'll end up with different files that are the same size.
Why don't you use the aforementioned Powershell to run a scan/replace script and toss that into NETLOGON. Seems like that would be easier and more sensible, as it sounds like you're using organizational shares.
"There are three kinds of lies: lies, damned lies and statistics."
- Benjamin Disraeli
What is described here applies to both VS 2013 and VS 2015
Consider the case when one wants to make a sub-classed Control (using one of the standard MS provided WinForm Controls) as a separate Project: so that you can end-up with a nice .dll that you can then mount on Visual Studio's ToolBox for handy re-use.
The only relevant new Project Type available is Windows Forms Control Library which when selected gives you an initial Class definition like this:
publicpartialclass UserControl1: UserControl
And you, foolish mortal, think you could easily rename the Project and change the Class code to something like this:
while still leaving the Project Output Type as it is (Class Library).
That won't compile because the call to 'AutoScaleMode in the Designer.cs file will fail because you have stumbled across the assumption VS makes that you are building a ContainerControl, while a sub-classed TextBox does not expose that Type.
Okay, so you take out the call to 'AutoScaleMode, and now your design view switches to no-view ... just the type of screen that you see when you a new Component to a WinForm project. But, you do have, indeed, a sub-classed Control to work with, compile, and then mount in the ToolBox as you wish.
Now, maybe (?) the designers of VS did not assume someone would want to start designing a custom Control by first defining the Control, and then adding another Project to the Solution of Type Windows Form in order to test the Control as it is developed.
If you start a Project of Type WinForms, you can then add a "Custom Control" to it, but then that Control will be embedded in a WinForms Project.
Do you see what I am getting at ? Have I missed something obvious ... again ?
Since you can stick a Control of whatever Type in the ContainerControl Prototype that a Project of Type WinForms Control Library builds-out for you ... is this a non-issue for most mortals ?
Why do I quibble as the executioner asks if I will have the blindfold: usually, if I am going to do this ... and I do ... do this ... I am going to override methods of the sub-classed Control for various reasons.
Could CodeProject not groan under the weight of one more article or tip-trick describing all ... this ?
morituri te salutamus, Bill
«There is a spectrum, from "clearly desirable behaviour," to "possibly dodgy behavior that still makes some sense," to "clearly undesirable behavior." We try to make the latter into warnings or, better, errors. But stuff that is in the middle category you don’t want to restrict unless there is a clear way to work around it.» Eric Lippert, May 14, 2008
we're loading all partials views to a common div.
on clicking a row in a table or clicking on an icon,or clicking on link, view changes. my requirement is, in a partial view, we have two text boxes which are free type. before this view clears, i need to save these data to db. what appropriate event is to be used before this view goes? i tried $(document).unload,$(document).unbind,$(div).change,$(div).unload etc. nothing worked. please help me to resolve this issue
I don't understand the classification part. So there are nodes with features, there are threshold on the stage and on the features. Where these thresholds comes?
Why on the tree there are a right or left part?
Of what I thought for the haar classification there are stages which are kernels to apply on the image and that all I don't understand why there is features and threshold.
Where could I get more information to understand these parts of the program?
If you have a question about the code in an article, post it in the forum at the bottom of the article. That way, the person who wrote the article will be notified that you've posted a question, and you won't be waiting for them to stumble across your post in a random forum.
"These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer
As Richard has mentioned, you should always consider adding the comment to the article itself, it not only helps you but the future readers also.
Secondly, all of these things are covered in the theoretical teaching of these subjects. No author would likely start explaining these things in a single article, that would require a book to cover these algorithms, their descriptions and the methods used in their classification.
Ask the question at the end of the article to see if author has interest in explaining those parts, otherwise, consider getting yourself a good book or learn these online at Wikipedia or so.
The sh*t I complain about
It's like there ain't a cloud in the sky and it's raining out - Eminem
~! Firewall !~
I have wrote a simple library, in C# (visual studio 2010), to access ini files for different applications.
The code at the end.
When used in windows application wrote in C# (x86,x64) (visual studio 2010) function properly.
Now I want to use it in a new library (mylib)(x64) where all methods are declared static, running indicates no errors but does not report the values that should have read from ini file.
I tried to add to the new library (mylib)a standard class, where methods aren't static, thinking that the problem was linked to the declaration of the static method of "mylib.getinipara()" , but without results.
Where am I wrong;
ps.: all library and programs are compliled using Visual Studio 2010 Ultimate.
This is the code of library for accessing ini files.
Thanks for the reply,
I was on the indicated site, I modified the statements as reported, but the result is unchanged.
When I call "myfileini.GetProfileString(lpsection, lpkey, lpdefvalue, sb_retvalue, ui_lenretvalue, lpfile)" its return alwais the default value.
As if it does not find the file, yet it is in a specific directory, which I value by the method "myfileini.IniFile(lpPtah_File)"
Also the same .ini file is used by another application that uses the same library (FileIniAccess.IniAccess) to access and function properly,