text stringlengths 0 30.5k | title stringclasses 1
value | embeddings listlengths 768 768 |
|---|---|---|
<a href = "#" id = "CopyBtn" style = "display: block; color : blue; text-decoration: none;">Copy</a>
<a href = "#" id = "PasteBtn" style = "display: block; color : blue; text-decoration: none;">Paste</a>
</div>
sadgjghdskjghksghkds
<input type = "text" onfocus = "lastForm = this;" />... | [
0.017465749755501747,
0.37384021282196045,
0.5438742637634277,
-0.1749913990497589,
-0.03759396821260452,
0.16353175044059753,
0.3113004267215729,
-0.4112204313278198,
-0.23425328731536865,
-0.5700599551200867,
-0.6895318031311035,
0.3054344058036804,
-0.08150170743465424,
0.13548630475997... | |
I am currently writing a little bootstrap code for a service that can be run in the console. It essentially boils down to calling the OnStart() method instead of using the ServiceBase to start and stop the service (because it doesn't run the application if it isn't installed as a service and makes debugging a nightmare... | [
0.317441463470459,
0.1784588098526001,
0.20905567705631256,
-0.0384712778031826,
0.25662675499916077,
-0.27907270193099976,
0.44981494545936584,
0.08457301557064056,
0.06610996276140213,
-0.6645346283912659,
0.1001836359500885,
0.8529319167137146,
-0.3156350255012512,
0.38258612155914307,
... | |
I could determine if the Windows service controller started 'me', or if the user started 'me' in the console? Apparantly [Environment.IsUserInteractive](http://social.msdn.microsoft.com/Forums/en-US/csharpgeneral/thread/99c4594b-e6c9-424f-bfe1-c7261bba24d3/ "forum thread") is not the answer. I thought about using comma... | [
0.11939626932144165,
0.07526566088199615,
0.2376609444618225,
-0.12793630361557007,
-0.02454567328095436,
0.005953438114374876,
0.4545527994632721,
0.14978663623332977,
-0.1499047577381134,
-0.5600771903991699,
-0.1465184986591339,
0.40706244111061096,
-0.29633238911628723,
0.3387787342071... | |
RunAllServices();
}
else
{
try
{
string temp = Console.Title;
ServiceBase.Run((ServiceBase[])ComponentsToRun); | [
0.22476479411125183,
-0.38522425293922424,
0.408344030380249,
-0.28642091155052185,
0.29265618324279785,
0.12544065713882446,
0.5726688504219055,
-0.2513211667537689,
0.20790527760982513,
-0.4414384067058563,
-0.5161831378936768,
0.5625982284545898,
-0.4230092167854309,
0.36746224761009216... | |
}
catch
{
RunAllServices();
}
}
} // void Run
private void RunAllServices()
{
foreach (ConsoleService component in ComponentsToRun) | [
0.18527795374393463,
-0.4227440357208252,
0.37014931440353394,
0.17492187023162842,
0.28306281566619873,
0.19538503885269165,
0.2879566550254822,
-0.0818110853433609,
0.17881855368614197,
-0.2451200783252716,
-0.2901143729686737,
0.6646997928619385,
-0.3268721103668213,
0.4005095362663269,... | |
{
component.Start();
}
WaitForCTRLC();
foreach (ConsoleService component in ComponentsToRun)
{
component.Stop();
}
}
```
EDIT: There was another question on StackOverflow where the guy had problems with the Environment.CurrentDirectory being "C:\Wind... | [
0.0015015051467344165,
-0.05563661456108093,
0.5835771560668945,
0.08586481213569641,
0.1740545630455017,
-0.2767738401889801,
0.45742282271385193,
-0.16279566287994385,
-0.012419882230460644,
-0.27486589550971985,
-0.11255655437707901,
0.9454236030578613,
-0.21637855470180511,
0.309080421... | |
Ash, I write all actual processing code in a separate class library assembly, which was then referenced by the windows service executable, as well as a console app.
However, there are occasions when it is useful to know if the class library is running in the context of the service executable or the console app. The wa... | [
0.36456015706062317,
0.43859416246414185,
0.1041850671172142,
-0.03796105831861496,
-0.4099920392036438,
-0.22871503233909607,
0.34055471420288086,
0.033975522965192795,
0.09197694808244705,
-0.29660603404045105,
-0.0356626994907856,
0.650762677192688,
-0.19389817118644714,
0.0292617306113... | |
whether the application is a windows service.
''' </summary>
''' <value>
''' <c>true</c> if this instance is service; otherwise, <c>false</c>.
''' </value>
Public Shared ReadOnly Property IsService() As Boolean
Get
' Determining whether or not the host application is a service is... | [
0.09130028635263443,
0.11562536656856537,
-0.003061362775042653,
0.2992895245552063,
0.014609983190894127,
-0.12787504494190216,
0.4399789571762085,
-0.15684281289577484,
-0.026952488347887993,
-0.516625165939331,
-0.41734620928764343,
0.34816139936447144,
0.009648827835917473,
0.207007393... | |
' result of the first call to this method so that we don't have to
' recalculate it every call.
' If we have not already determined whether or not the application
' is running as a service...
If IsNothing(_isService) Then | [
0.11541427671909332,
0.09207876026630402,
0.6482344269752502,
-0.09653256833553314,
0.14811798930168152,
-0.10932077467441559,
0.393777072429657,
-0.21132458746433258,
-0.09261813014745712,
-0.31980055570602417,
-0.33788496255874634,
0.3677842617034912,
-0.1942247897386551,
0.1519785970449... | |
' Get details of the host assembly.
Dim entryAssembly As Reflection.Assembly = Reflection.Assembly.GetEntryAssembly
' Get the method that was called to enter the host assembly.
Dim entryPoint As System.Reflection.MethodInfo = entryAssembly.EntryPoint
' | [
0.043511420488357544,
-0.005647180136293173,
0.6857123970985413,
-0.07998606562614441,
-0.0342765636742115,
0.20213672518730164,
0.3147311806678772,
-0.29223841428756714,
-0.15046745538711548,
-0.39824607968330383,
-0.390805184841156,
0.32951387763023376,
-0.28070956468582153,
0.1778326332... | |
If the base type of the host assembly inherits from the
' "ServiceBase" class, it must be a windows service. We store
' the result ready for the next caller of this method.
_isService = (entryPoint.ReflectedType.BaseType.FullName = "System.ServiceProcess.ServiceBase")
... | [
0.04145308956503868,
0.0013693320797756314,
0.69415283203125,
-0.4109768867492676,
0.13567978143692017,
-0.030355922877788544,
0.4325016736984253,
-0.027307918295264244,
-0.023567136377096176,
-0.5657163262367249,
-0.6858612895011902,
0.24223288893699646,
-0.15929168462753296,
0.4602154791... | |
' Return the cached result.
Return CBool(_isService)
End Get
End Property
Private Shared _isService As Nullable(Of Boolean) = Nothing
#End Region
End Class
``` | [
0.2271861732006073,
0.24714763462543488,
0.24779805541038513,
0.047336477786302567,
0.21852552890777588,
-0.26063066720962524,
0.4983358085155487,
0.12131431698799133,
-0.06079264357686043,
-0.301381915807724,
-0.37439021468162537,
-0.06314922124147415,
-0.20926734805107117,
1.023518085479... | |
I would like to develop Adobe Flex applications using Linux and a free environment. I'd prefer a free as in freedom alternative, but as in beer would work as well. ;-)
Are any of you developing Adobe Flex rich internet applications using such an environment? Or should I face the "facts" that Flex Builder is an essenti... | [
0.6222918629646301,
0.32773447036743164,
-0.1791553497314453,
0.1497664898633957,
-0.061985671520233154,
-0.34621790051460266,
0.0694614052772522,
0.15342609584331512,
-0.2037646770477295,
-0.7353057265281677,
0.021215621381998062,
1.039430856704712,
-0.0269328560680151,
-0.190327778458595... | |
used to IDE support that you cannot live without it. I like code completion, project management and the debugger in Flex Builder but I can live without it. TextMate isn't free but any text editor that had code coloring for ActionScript would do for me.
I usually use ant to manage my builds and that is free. The [Flex ... | [
0.6492960453033447,
-0.18041105568408966,
0.15700659155845642,
0.003778273705393076,
-0.2596759498119354,
-0.349853515625,
0.26135995984077454,
-0.1067248210310936,
-0.2939946949481964,
-0.7507415413856506,
0.07435065507888794,
0.7777987718582153,
-0.10803139954805374,
-0.22236140072345734... | |
I don't understand it.
The ids of html elements in the master page are changed by the same id but with a prefix and it's breaking the css design.
In the master page I have:
```
<div id="container" runat="server">
<asp:ContentPlaceHolder ...
...
```
The above code is rendered
```
<div id="ctl00_ctloo_contai... | [
0.3033372163772583,
0.3158731162548065,
0.3933725655078888,
0.1514137089252472,
-0.1748500019311905,
-0.302409291267395,
0.20687180757522583,
0.042944107204675674,
-0.19849827885627747,
-0.8627303838729858,
-0.04202086478471756,
0.3163018524646759,
-0.24657107889652252,
0.6512932777404785,... | |
I'm producing a hex file to run on an ARM processor which I want to keep below 32K. It's currently a lot larger than that and I wondered if someone might have some advice on what's the best approach to slim it down?
Here's what I've done so far
1. So I've run 'size' on it to determine how big the hex file is.
2. Then... | [
0.47284820675849915,
0.008007275871932507,
0.3784627616405487,
-0.057493533939123154,
-0.15468555688858032,
0.1096816435456276,
-0.1464434564113617,
-0.17769402265548706,
-0.5202656388282776,
-0.6715463399887085,
0.1825435310602188,
0.28924211859703064,
-0.07171991467475891,
0.281454235315... | |
functions take up the most memory.
4. I searched through the code to see if I could eliminate calls to those functions.
Here's where I get stuck, there's some functions which I don't call directly (e.g. \_vfprintf) and I can't find what calls it so I can remove the call (as I think I don't need it).
So what are the n... | [
-0.12134693562984467,
0.027347449213266373,
0.20781919360160828,
0.016702380031347275,
-0.1058434471487999,
0.10295241326093674,
0.26783066987991333,
-0.030067062005400658,
-0.32643771171569824,
-0.38993293046951294,
-0.3779802620410919,
0.6959068775177002,
-0.4614535868167877,
-0.00151653... | |
them! Could be called from any number of library functions I guess.
* The linker is working as desired, I think, it only includes the relevant library files. How do you know if only the relevant functions are being included? Can you set a flag or something for that?
* I'm using GCC
General list:
* Make sure that you h... | [
0.41024500131607056,
0.07863280922174454,
0.5035236477851868,
0.3381245732307434,
-0.1496792584657669,
0.034072376787662506,
0.08732517063617706,
-0.029179872944951057,
-0.5866217613220215,
-0.8454028964042664,
-0.3047627806663513,
0.6482660174369812,
-0.17537225782871246,
0.19005151093006... | |
file (`-M` when using ld), or you can use objdump on the final executable (note that this will only work on an unstripped executable!) This won't actually fix the problem, but it will let you know of the worst offenders.
* Use `nm` to investigate the symbols that are called from each of your object files. This should h... | [
0.05158787593245506,
-0.1452699601650238,
0.3704105317592621,
0.19487886130809784,
-0.005300347227603197,
-0.3067410886287689,
0.4257369935512543,
-0.062334317713975906,
-0.15480506420135498,
-0.5409063696861267,
-0.3326869308948517,
0.5353681445121765,
-0.5224395394325256,
0.0410341322422... | |
object file that contains 10 functions, all 10 functions are included in your executable even if one 1 is actually called.
The standard libraries (eg. libc) will split functions into many separate object files, which are then archived. The executable is then linked against the archive.
By splitting into many object fi... | [
0.06561701744794846,
-0.016906077042222023,
0.2304709553718567,
0.4623473286628723,
0.0453309640288353,
-0.06143902987241745,
0.058173272758722305,
0.028218060731887817,
-0.39897528290748596,
-0.5243975520133972,
-0.30525335669517517,
0.44712212681770325,
-0.5559585094451904,
0.16438353061... | |
against other libraries you can run the tools listed above over them too to make sure that they're following similar rules. | [
0.6985613107681274,
0.085923932492733,
-0.1013726070523262,
0.33475857973098755,
0.1120820865035057,
-0.3933005928993225,
0.27533581852912903,
0.1616760492324829,
-0.386018306016922,
-0.40119534730911255,
0.3034413158893585,
0.5133268237113953,
-0.011800182983279228,
-0.04529466852545738,
... | |
How to create a table with a timestamp column that defaults to `DATETIME('now')`?
Like this:
```
CREATE TABLE test (
id INTEGER PRIMARY KEY AUTOINCREMENT,
t TIMESTAMP DEFAULT DATETIME('now')
);
```
This gives an error.
As of [version 3.1.0](https://www.sqlite.org/releaselog/3_1_0.html) you can use `CURRENT... | [
0.12702707946300507,
0.0705389529466629,
0.5169801115989685,
-0.02095317654311657,
0.3735467195510864,
-0.09766372293233871,
0.05791029334068298,
-0.17074808478355408,
-0.13311059772968292,
-0.8263936638832092,
-0.26489952206611633,
0.19461216032505035,
-0.1382354199886322,
0.2710144221782... | |
id INTEGER PRIMARY KEY AUTOINCREMENT,
t TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);
``` | [
-0.20336391031742096,
-0.17778097093105316,
0.32353538274765015,
-0.3211236298084259,
0.5478699207305908,
0.17215503752231598,
0.05766751244664192,
-0.0678531751036644,
0.06744161248207092,
-0.2189299464225769,
-0.1882026642560959,
0.7601451277732849,
-0.4012150168418884,
0.357373327016830... | |
I've never learnt JavaScript, but I imagine this is quite a simple problem. Just wanted to know which method is most advised these days.
```
// use this to avoid redirects when a user clicks "back" in their browser
window.location.replace('http://somewhereelse.com');
// use this to redirect, a back button call will tr... | [
0.2598845362663269,
-0.04137236624956131,
0.25937727093696594,
0.024854881688952446,
0.19725532829761505,
0.008882920257747173,
0.03262145817279816,
0.35415852069854736,
-0.17764240503311157,
-0.5511704683303833,
-0.33714759349823,
0.17669853568077087,
0.10063784569501877,
0.06368494033813... | |
We are currently thinking of building a cache-system to hold data pulled out of an SQL database and make it available to a couple of other applications (website, webservice, etc). We imagine the cache to be running as a windows service and basically consist of a smart dictionary which holds the cache entries. My questi... | [
-0.18547455966472626,
0.2365213930606842,
0.4748919606208801,
0.18719707429409027,
0.12071553617715836,
-0.005217728205025196,
-0.07518405467271805,
-0.11108093708753586,
-0.37261685729026794,
-0.47350555658340454,
-0.10343200713396072,
0.5787363648414612,
-0.2420906126499176,
0.0864743664... | |
the maximum size of a CLR Object is 2gb](http://blogs.msdn.com/joshwil/archive/2005/08/10/450202.aspx) even on 64bit.
**Update:** the information above was correct in 2008. See [Ohad's answer](https://stackoverflow.com/a/3739143/21574) for more recent information. Windows 2016 server can have a maximum of [24TB](https... | [
-0.5863693356513977,
0.2782919108867645,
0.9608961343765259,
-0.04545683041214943,
-0.14212027192115784,
0.1404699981212616,
-0.13907212018966675,
-0.3299633860588074,
-0.647618293762207,
-0.02327016182243824,
-0.3474918603897095,
0.32222336530685425,
-0.09806609153747559,
0.22095568478107... | |
I need to call a [VBScript](http://en.wikipedia.org/wiki/VBScript) file (.vbs file extension) in my C# Windows application.
How can I do this?
There is an add-in to access a VBScript file
in Visual Studio.
But I need to access the script in code behind. How to do this?
The following code will execute a VBScript scr... | [
0.2495129108428955,
0.14822952449321747,
0.4816148281097412,
-0.22434909641742706,
0.13690927624702454,
0.003112019272521138,
0.3476394712924957,
-0.2977744936943054,
-0.26852795481681824,
-0.7685344815254211,
-0.2448643445968628,
0.49988889694213867,
-0.19228623807430267,
0.11284351348876... | |
program running until your script exit
scriptProc.Close();
```
Using the `StartInfo` properties will give you quite granular access to the process settings.
You need to use [Windows Script Host](http://en.wikipedia.org/wiki/Windows_Script_Host) if you want windows, etc. to be displayed by the script program. You cou... | [
0.10829892009496689,
-0.04040885716676712,
0.5183627009391785,
-0.15820477902889252,
0.023173557594418526,
-0.3724583685398102,
0.05497506633400917,
0.28370699286460876,
-0.19638529419898987,
-0.7266257405281067,
-0.16817276179790497,
0.4276471436023712,
-0.06971732527017593,
0.29853579401... | |
I am trying to setup tracd for the project I am currently working on.
After creating a password file with the python script given in the [site](http://trac.edgewall.org/wiki/TracStandalone) I am trying to start the server with authentication on. But it throws up warning saying No users found in the realm. What actually... | [
0.14882725477218628,
0.047247614711523056,
0.7812190055847168,
0.24887607991695404,
-0.18395712971687317,
-0.22592876851558685,
0.7918902635574341,
0.12375791370868683,
-0.09921037405729294,
-0.7022443413734436,
-0.012381047941744328,
0.33008238673210144,
-0.1393473893404007,
0.13384287059... | |
said command line with the one bellow helps.
tracd --port 8000 --auth=Trac,D:\My\_Test\_Project\Documents\Trac\digest.txt,Trac D:\My\_Test\_Project\Documents\Trac
The string after --auth= should be the environment name and not the project name. | [
-0.16058678925037384,
0.10190670192241669,
0.35732898116111755,
-0.18823762238025665,
0.10166077315807343,
-0.0008501956472173333,
0.40521302819252014,
0.001091462909244001,
0.1896229088306427,
-0.5488954186439514,
-0.3769938349723816,
0.7449879050254822,
-0.30073192715644836,
0.2535551786... | |
What is the technical difference between a process and a thread?
I get the feeling a word like 'process' is overused and there are also hardware and software threads. How about light-weight processes in languages like [Erlang](http://en.wikipedia.org/wiki/Erlang_%28programming_language%29)? Is there a definitive reaso... | [
0.40555599331855774,
0.13383199274539948,
-0.07960008084774017,
0.23276802897453308,
0.11705639213323593,
0.23882633447647095,
-0.21262764930725098,
0.05530427023768425,
-0.6290531754493713,
-0.537851870059967,
0.16260366141796112,
0.16426561772823334,
-0.09145008027553558,
0.5263994932174... | |
CPU feature (though the CPU typically has operations that make threads efficient).
Erlang uses the term "process" because it does not expose a shared-memory multiprogramming model. Calling them "threads" would imply that they have shared memory. | [
-0.07280322164297104,
0.03287613391876221,
0.17831122875213623,
0.07697122544050217,
0.08887229859828949,
0.08500369638204575,
0.0005849741864949465,
0.12233638018369675,
-0.6371275782585144,
-0.6348812580108643,
-0.02594093419611454,
0.1608729213476181,
-0.2682320773601532,
0.183378860354... | |
I'm trying to create a use-once HTTP server to handle a single callback and need help with finding a free TCP port in Ruby.
This is the skeleton of what I'm doing:
```
require 'socket'
t = STDIN.read
port = 8081
while s = TCPServer.new('127.0.0.1', port).accept
puts s.gets
s.print "HTTP/1.1 200/OK\rContent-type: ... | [
0.31366440653800964,
0.2939896285533905,
0.3662910461425781,
-0.24025468528270721,
-0.08807004988193512,
-0.15839821100234985,
0.5308423042297363,
-0.19795243442058563,
-0.07087887078523636,
-0.7665570378303528,
0.061026934534311295,
0.6395028233528137,
-0.29616856575012207,
0.452329009771... | |
ID can then be queried for status info. Why the original designers couldn't just return the job ID when scheduling the job I'll never know. A single port cannot be used because conflicts with multiple callbacks may occur; in this way the ports are only used for +- 5 seconds.
I guess you could try all ports > 5000 (for ... | [
0.20120204985141754,
-0.02736881747841835,
0.34384915232658386,
0.07369224727153778,
0.05488833039999008,
0.05770866945385933,
0.3637470304965973,
-0.3461853265762329,
-0.07153093814849854,
-0.8547408580780029,
0.26347681879997253,
1.055607795715332,
-0.03617961332201958,
0.026038425043225... | |
enviroments.
For HTTP, the standard port is 80. Alternative ports i've seen used are 8080, 880 and 8000. | [
0.31921154260635376,
-0.19785885512828827,
0.7070735692977905,
0.22582212090492249,
0.08902525156736374,
0.029857685789465904,
0.1603616178035736,
0.22732426226139069,
-0.39691343903541565,
-1.1088511943817139,
-0.1886056661605835,
0.3436177670955658,
-0.3723233640193939,
-0.17637020349502... | |
Here is the input (html, not xml):
```
... html content ...
<tag1> content for tag 1 </tag1>
<tag2> content for tag 2 </tag2>
<tag3> content for tag 3 </tag3>
... html content ...
```
I would like to get 3 matches, each with two groups. First group would contain the name of the tag and the second group would contain... | [
-0.002530772937461734,
0.12703880667686462,
0.45803630352020264,
0.008594722487032413,
-0.17603784799575806,
-0.11266251653432846,
-0.09608271718025208,
-0.4166993200778961,
0.11737321317195892,
-0.6614965796470642,
-0.05560583993792534,
0.370589017868042,
-0.521434485912323,
-0.3469882607... | |
expression that would match tag name and tag content into numbered sub matches.
```
<(tag1|tag2|tag3)>(.*?)</$1>
```
Here is a variant with .NET style group names
```
<(?'name'tag1|tag2|tag3)>(?'value'.*?)</\k'name'>.
```
EDIT
RegEx adapted as per question author's clarification. | [
-0.29514527320861816,
-0.3523455262184143,
0.25899142026901245,
0.08850681036710739,
-0.20669956505298615,
-0.19302146136760712,
0.13325370848178864,
-0.2328323870897293,
0.10294603556394577,
-0.581607460975647,
-0.19673816859722137,
0.46571865677833557,
-0.6306159496307373,
-0.28146526217... | |
Functional programming seems to be a paradigm in computer science which has more and more echo.
I wonder which kind of problems are better solved with a functional programming approach rather than with a more traditional object oriented approach.
Thank you.
Functional programming is best suited for most kinds of prob... | [
-0.0744248777627945,
0.1231289803981781,
-0.04744473472237587,
0.18006467819213867,
-0.29444876313209534,
0.04976613447070122,
-0.023444177582859993,
0.13724328577518463,
-0.20536264777183533,
-0.47875142097473145,
-0.32766854763031006,
0.6615039110183716,
-0.368456095457077,
-0.4963220953... | |
calculus). You have much more flexibility as far as abstraction and composition go. An object-oriented program with a lot of design patterns could be refactored using more functional constructs which will allow you to do the same thing without the boilerplate structures that design patterns make you write. In addition ... | [
-0.057042255997657776,
-0.21889449656009674,
0.036005064845085144,
0.34329766035079956,
-0.2751590311527252,
0.07697408646345139,
-0.32264840602874756,
0.07100563496351242,
-0.10908439010381699,
-0.3541952967643738,
-0.4047246277332306,
0.6347379684448242,
-0.7300765514373779,
-0.781835138... | |
I was just wondering what (if any) the difference was between the following two message traps in MFC for the function, OnSize(..).
1 - Via Message map:
====================
```
BEGIN_MESSAGE_MAP(CClassWnd, CBaseClassWnd)
...
ON_WM_SIZE()
..
END_MESSAGE_MAP()
```
2 - Via afx\_message:
=====================
```
... | [
0.20637910068035126,
0.09849675744771957,
0.35101330280303955,
-0.47490739822387695,
0.11117798089981079,
-0.11608145385980606,
0.0640161857008934,
-0.35635462403297424,
-0.3236984610557556,
-0.5921570062637329,
-0.2593251168727875,
0.37784385681152344,
-0.851279616355896,
0.16713824868202... | |
cx, int cy);
DECLARE_MESSAGE_MAP
};
```
`afx_msg` is just an empty placeholder macro - it doesn't actually do anything, but is always included by convention.
The message map is then defined in the class's .cpp file:
```
BEGIN_MESSAGE_MAP(CClassWnd, CBaseClassWnd)
ON_WM_SIZE()
END_MESSAGE_MAP()
```
These m... | [
0.041613027453422546,
-0.11769984662532806,
0.4226672649383545,
-0.27550002932548523,
0.10540784895420074,
0.15902894735336304,
-0.3220509886741638,
-0.14051133394241333,
-0.4054986834526062,
-0.6552530527114868,
-0.32829365134239197,
0.38421431183815,
-0.47620418667793274,
0.0621179528534... | |
most window messages (`WM_LBUTTONDOWN`, `WM_DESTROY`, etc).
You can find more information on how message maps work in MFC [here](http://msdn.microsoft.com/en-us/library/0x0cx6b1.aspx) on MSDN. | [
-0.23511247336864471,
-0.1286131888628006,
0.24713638424873352,
0.0012753034243360162,
-0.21526458859443665,
-0.17146164178848267,
0.31722158193588257,
0.5095090270042419,
-0.32676994800567627,
-1.0196398496627808,
-0.4132356643676758,
0.2707875370979309,
-0.24814660847187042,
0.1489722132... | |
Can you recommend a Java library for reading, parsing, validating and mapping rows in a comma separated value (CSV) file to Java value objects (JavaBeans)?
We have used
<http://opencsv.sourceforge.net/>
with good success
I also came across another question with good links:
[Java lib or app to convert CSV to XML file?]... | [
0.2848627269268036,
-0.002464300487190485,
0.05106264352798462,
0.1701485514640808,
-0.1482614278793335,
-0.19917084276676178,
-0.14015217125415802,
-0.34237581491470337,
-0.35938704013824463,
-0.6097533702850342,
0.06562881171703339,
0.3945980668067932,
-0.3132164180278778,
-0.10248233377... | |
Is there a way to change name of company to which the Visual Studio 2008 is registered without reinstalling it?
This should have the answer you are looking for : <http://bytes.com/forum/thread635503.html>
> For the CompanyName in AssemblyInfo, it's $registeredorganization$ which
> uses value from registry key value f... | [
0.38911521434783936,
0.21997566521167755,
0.3710695803165436,
-0.10003280639648438,
-0.1846032291650772,
-0.1647426337003708,
-0.20813539624214172,
0.019531920552253723,
-0.4492870271205902,
-0.1529064029455185,
-0.13948777318000793,
0.33333662152290344,
-0.19760838150978088,
0.20336370170... | |
Here's the information [according to the official documentation](http://www.php.net/manual/en/language.basic-syntax.php):
> There are four different pairs of
> opening and closing tags which can be
> used in PHP. Two of those, `<?php ?>`
> and `<script language="php"> </script>`,
> are always available. The other ... | [
0.3470288813114166,
-0.03356633335351944,
0.4889633357524872,
0.026461418718099594,
0.018939465284347534,
-0.03272668644785881,
0.10120950639247894,
-0.21330945193767548,
-0.13463528454303741,
-0.7232227325439453,
-0.357153058052063,
0.5380105376243591,
-0.18862353265285492,
-0.14635270833... | |
far more convenient than typing
```
<?php echo
```
The programmers convenience is an important factor, so **why** are they not recommended?
There must be a clear distinction between the PHP short tag (`<?`) and shorthand echo tag (`<?=`)
The former is prohibited by the [PHP Coding standard](https://www.php-fig.org... | [
0.3988490402698517,
0.14714939892292023,
-0.06023075431585312,
-0.0929507464170456,
-0.15874649584293365,
-0.3803568184375763,
0.39944174885749817,
-0.016751710325479507,
-0.23622630536556244,
-0.41890203952789307,
-0.20172415673732758,
0.36710694432258606,
-0.42809346318244934,
-0.0327682... | |
full syntax.
Whereas the shorthand echo tag `<?=` cannot be disabled and therefore is fully acceptable to use.
I agree that `<?` is easier on programmers than `<?php` but it is possible to do a bulk find-and-replace as long as you use the same form each time.
I don't buy readability as a reason at all. Most serious ... | [
0.10807304084300995,
0.016785165295004845,
0.39189431071281433,
-0.14002221822738647,
-0.275499552488327,
-0.38071754574775696,
0.7948508262634277,
0.16799582540988922,
-0.3310001492500305,
-0.4804452359676361,
-0.42387351393699646,
0.7064218521118164,
-0.4662252366542816,
-0.2985100150108... | |
then a dependency on PHP 5.4+. If you want to support pre-5.4 and can't guarantee shorttags, you'll still need to use `<?php echo ... ?>`.
Also, you need to know that **[ASP tags <% , %> , <%= , and script tag are removed from PHP 7](https://www.php.net/manual/en/language.basic-syntax.phptags.php)**. So if you would l... | [
0.19378770887851715,
-0.05200833082199097,
0.21601511538028717,
-0.0398164838552475,
-0.019602056592702866,
-0.2596815526485443,
0.45437315106391907,
0.03955267369747162,
-0.313124418258667,
-0.4800383150577545,
-0.16811785101890564,
0.6834267973899841,
-0.42157039046287537,
-0.00447894353... | |
I'm having a quite complex model with many fields, `has_many` associations, images added by `image_column` etc...
The New object will be added by a multi page form (8 steps) - How should I accomplish validation and propagation between those steps?
I think `validation_group` could be useful for defining validations fo... | [
0.2175258845090866,
-0.11018963158130646,
0.5326814651489258,
0.028081601485610008,
-0.16181206703186035,
-0.1946881115436554,
-0.03277634084224701,
-0.32719317078590393,
-0.4148768484592438,
-0.3818926215171814,
0.3123778998851776,
0.1622207909822464,
-0.20699156820774078,
0.0412998571991... | |
An initial draft of requirements specification has been completed and now it is time to take stock of requirements, [review the specification](https://stackoverflow.com/questions/186716/when-reviewing-requirements-specification-what-deadly-sins-need-to-be-addressed). Part of this process is to make sure that there are ... | [
0.641111433506012,
0.3842634856700897,
0.1896321177482605,
0.009140457026660442,
0.19485434889793396,
0.06224146857857704,
0.48906949162483215,
-0.356027752161026,
-0.3041081428527832,
-0.6951882839202881,
-0.10409355908632278,
0.5900171995162964,
0.2783605754375458,
-0.087139792740345,
... | |
thought of or forgotten about,
* Implicit requirements are something that users or customers naturally assume is going to be a standard part of the software without having to be explicitly asked for.
I am happy to re-visit accepted answer, as long as someone submits better, more comprehensive solution.
evaluate the li... | [
0.5198007225990295,
0.10787779092788696,
0.2357734590768814,
0.13813668489456177,
0.46019265055656433,
-0.0327046662569046,
0.1978949010372162,
0.07957542687654495,
-0.20812702178955078,
-0.6319350004196167,
-0.23592562973499298,
0.4912600815296173,
0.0722942128777504,
0.1743222028017044,
... | |
you know what to do with each entity when it is no longer needed?
for a more fine-grained analysis of the lifecycle of the entities in the spec, make a CRUDE matrix for the major entities in the requirements; this is a matrix with the operations/applications as the rows and the entities as the columns. In each cell, p... | [
0.563986599445343,
0.20902568101882935,
0.7904462218284607,
0.4101390242576599,
0.5531062483787537,
0.1905430555343628,
-0.1949760764837265,
-0.3779153823852539,
-0.10000897943973541,
-0.5686541795730591,
-0.11969423294067383,
0.5675351619720459,
-0.22819983959197998,
-0.023101551458239555... | |
(or E); if one is missing (except E), figure out if it is needed. The rows and columns of the matrix can be rearranged (manually or using affinity analysis) to form cohesive groups of entities and applications which generally correspond to subsystems; this may assist with physical system distribution later.
It is also... | [
0.3824860751628876,
0.1432517021894455,
0.37481823563575745,
0.23591098189353943,
0.30209800601005554,
0.3105890452861786,
-0.12839266657829285,
-0.3045963943004608,
-0.07524318248033524,
-0.8055623173713684,
-0.21407176554203033,
0.35108619928359985,
-0.3052688241004944,
0.015263298526406... | |
the user (I use I, O, and N for this, and always make the User the first column). This helps identify where user-interfaces for data-entry and reports will be required.
the goal is to check the completeness of the specification; the techniques above are useful to check to see if the life-cycle of the entities are 'clo... | [
0.08126843720674515,
0.42330852150917053,
0.5814728140830994,
0.30405983328819275,
0.1447347104549408,
-0.04138658568263054,
-0.026789052411913872,
-0.07116702198982239,
-0.036143556237220764,
-0.7054911851882935,
-0.4240477383136749,
0.5757867693901062,
0.08661384880542755,
0.097824573516... | |
Using the PHP [pack()](http://www.php.net/pack) function, I have converted a string into a binary hex representation:
```
$string = md5(time); // 32 character length
$packed = pack('H*', $string);
```
The H\* formatting means "Hex string, high nibble first".
To unpack this in PHP, I would simply use the [unpack()](... | [
0.133209228515625,
-0.06360428780317307,
0.12102163583040237,
-0.3305685818195343,
-0.21489734947681427,
-0.26134446263313293,
0.195100799202919,
-0.5471681356430054,
-0.21949388086795807,
-0.4545164406299591,
-0.1550595611333847,
0.4676116108894348,
-0.6439321637153625,
-0.090841680765151... | |
automatically convert the MD5 digest to an ASCII hex string, so that this method isn't even necessary for MD5 digests. Hope that helps. | [
0.14182764291763306,
-0.1465066522359848,
0.10394983738660812,
0.019516844302415848,
0.11593826115131378,
-0.40483948588371277,
0.26367896795272827,
0.058340057730674744,
-0.13427571952342987,
-0.6830379366874695,
-0.2717381715774536,
0.31188637018203735,
-0.33790698647499084,
-0.145944193... | |
I have a problem with a memory leak in a .NET CF application.
Using [RPM](http://blogs.msdn.com/stevenpr/archive/2006/04/17/577636.aspx) I identified that dynamically creating controls are not garbage collected as expected. Running the same piece of code in .NET Window Forms behave differently and disposes the contro... | [
0.24088764190673828,
0.06368411332368851,
0.0050098649226129055,
0.2036670744419098,
-0.12183438986539841,
-0.14895880222320557,
0.2497282326221466,
-0.4862402379512787,
-0.43932658433914185,
-0.3613390624523163,
0.03583163768053055,
0.6356236338615417,
-0.32437530159950256,
0.138380333781... | |
I can't easily incorporate it into the existing application as it is not as clear cut to determine when the object is no longer in use.
I have included a simplified version of the source to illustrate the problem:
```
using System;
using System.Windows.Forms;
namespace CFMemTest
{
public partial class Form1 : Fo... | [
0.3166094422340393,
-0.05877988785505295,
0.599048376083374,
-0.3893365263938904,
0.3982962965965271,
-0.273527592420578,
0.2523307800292969,
-0.22099773585796356,
0.14160475134849548,
-0.6756256222724915,
-0.3290236294269562,
0.5633470416069031,
-0.16748659312725067,
0.24461285769939423,
... | |
this event handler multiple times causes the memory leak
private void Button1_Click(object sender, EventArgs e)
{
Panel uc = new Panel();
// Calling uc.Dispose() cleans up the object
}
}
}
```
**Update:**
1. Calling GC.Collect() also doesn't result in the panel... | [
0.10181770473718643,
-0.2698575258255005,
0.3949732780456543,
-0.12250656634569168,
-0.22846728563308716,
-0.35052070021629333,
0.19067412614822388,
-0.3299708664417267,
-0.47576552629470825,
-0.7622718811035156,
-0.26167747378349304,
0.7726629972457886,
-0.44690656661987305,
0.11465211957... | |
a Windows CE 4.2 device.
Some additional information here that explains this behaviour.
[According to Ilya Tumanov](http://forums.microsoft.com/msdn/ShowPost.aspx?PostID=4002811&SiteID=1&mode=1):
> **Everything UI related on NETCF is
> intentionally removed from GC scope so
> it is never collected**. This behavior
... | [
0.047564052045345306,
0.12475971132516861,
0.4333359897136688,
-0.13036690652370453,
-0.09347355365753174,
-0.2264748066663742,
0.3289065361022949,
-0.14799731969833374,
-0.21995726227760315,
-0.6962615847587585,
-0.46576496958732605,
0.2276814877986908,
-0.6979176998138428,
0.336375802755... | |
But really, all you need to know is:
> it’s never collected, must call
> dispose. You actually should do that
> on desktop as well but if you don’t
> its way more forgiving. Not so on
> NETCF. | [
0.448097825050354,
-0.22086390852928162,
0.09289825707674026,
0.2844226062297821,
-0.13631129264831543,
-0.5054285526275635,
0.02600168250501156,
-0.055412571877241135,
-0.22387957572937012,
-0.5240023136138916,
0.18034633994102478,
0.4897454082965851,
-0.05692325904965401,
-0.044253069907... | |
Large datasets, millions of records, need special programming to maintain speed in DBGrids.
I want to know if there are any ready-made components for Delphi (DBGrids) that do this automatically?
EDIT For Example: Some databases have features such as fetch 1st X records (eg 100 records). When I reach the bottom with ... | [
0.054221928119659424,
-0.16426077485084534,
0.5705607533454895,
0.22915583848953247,
-0.01798909902572632,
-0.2942201495170593,
0.26129400730133057,
-0.011896547861397266,
-0.20992688834667206,
-0.7984780669212341,
0.028107549995183945,
0.67000412940979,
-0.25261813402175903,
-0.0957036018... | |
save quite a bit of programming - you simply have to set the "buffer size" so to speak.
I would have a look at [Developer Express QuantumGrid Suite](http://www.devexpress.com/Products/VCL/ExQuantumGrid/key_datacontroller.xml). (@birger: you just were a tick faster ;-) ) So I'm not just duplicating the answer, some elab... | [
0.21523821353912354,
-0.30850091576576233,
0.20053166151046753,
0.3379724323749542,
-0.1657796949148178,
-0.2627495229244232,
0.2692192494869232,
-0.16670314967632294,
-0.2540799379348755,
-0.6196184754371643,
0.3313709795475006,
0.4268570840358734,
-0.16792763769626617,
0.0861169025301933... | |
of records are retrieved from the
> dataset, automatic sorting, filtering
> and summary calculations are disabled
> in Grid Mode (must be controlled
> manually instead). By default, this
> mode is disabled and the
> ExpressDataController loads all
> records in a dataset.
It does have some drawbacks, which seem ... | [
-0.4097089469432831,
-0.08324890583753586,
0.1261168271303177,
0.24037277698516846,
-0.1997317671775818,
-0.3738947808742523,
0.5319623351097107,
-0.0106989536434412,
-0.34527871012687683,
-0.8339190483093262,
-0.2813189923763275,
0.24908293783664703,
-0.5875105261802673,
0.146961152553558... | |
I'm trying to create an access control system.
Here's a stripped down example of what the table I'm trying to control access to looks like:
```
things table:
id group_id name
1 1 thing 1
2 1 thing 2
3 1 thing 3
4 1 thing 4
5 2 | [
0.28343668580055237,
0.263899028301239,
0.3333262503147125,
0.13563306629657745,
0.14404916763305664,
-0.26875612139701843,
-0.16708077490329742,
-0.2752268612384796,
-0.35627442598342896,
-0.5662838220596313,
-0.043075356632471085,
0.3743651807308197,
-0.2961251139640808,
0.41915228962898... | |
thing 5
```
And the access control table looks like this:
```
access table:
user_id type object_id access
1 group 1 50
1 thing 1 10
1 thing 2 100
```
Access can be granted either by specifying the id of the 'thing' directly, or granted for an entire group | [
0.3236744701862335,
0.10563676059246063,
0.5752508640289307,
0.135654017329216,
0.09501897543668747,
-0.2696421444416046,
-0.016386352479457855,
-0.40814000368118286,
-0.09277359396219254,
-0.3620940148830414,
-0.4506246745586395,
0.23548291623592377,
0.0047125061973929405,
0.1540594398975... | |
of things by specifying a group id. In the above example, user 1 has been granted an access level of 50 to group 1, which should apply unless there are any other rules granting more specific access to an individual thing.
I need a query that returns a list of things (ids only is okay) along with the access level for a... | [
0.13611996173858643,
0.0018411013297736645,
0.41529902815818787,
0.02465810999274254,
-0.014595059677958488,
-0.1729840338230133,
0.09454633295536041,
-0.4399089217185974,
-0.46032634377479553,
-0.39680445194244385,
-0.25529325008392334,
0.38073641061782837,
-0.4331691861152649,
0.01075009... | |
100
3 50 (things 3 and 4 have no specific access rule,
4 50 so this '50' is from the group rule)
5 (thing 5 has no rules at all, so although I
still want it in the output, there's no access
level for | [
0.3265123665332794,
-0.0763915479183197,
0.48169592022895813,
0.03442341089248657,
0.06881139427423477,
-0.0186445489525795,
0.1232333555817604,
-0.7444140315055847,
0.06275472044944763,
-0.38865748047828674,
-0.003190593561157584,
0.4671422839164734,
0.048666298389434814,
-0.0298894569277... | |
it)
```
The closest I can come up with is this:
```
SELECT *
FROM things
LEFT JOIN access ON
user_id = 1
AND (
(access.type = 'group' AND access.object_id = things.group_id)
OR (access.type = 'thing' AND access.object_id = things.id)
)
```
But that returns multiple rows, when I only ... | [
-0.3255385458469391,
0.08081308752298355,
0.3980332314968109,
-0.0727066695690155,
0.13496893644332886,
0.044297635555267334,
-0.03588886559009552,
-0.3915192782878876,
-0.28704094886779785,
-0.6753960251808167,
-0.1657833307981491,
0.20941530168056488,
-0.2805004417896271,
0.2843046784400... | |
it helps, the database I'm using is PostgreSQL.
Please feel free to leave a comment if there's any information I've missed out.
Thanks in advance!
I don't know the Postgres SQL dialect, but maybe something like:
```
select thing.*, coalesce ( ( select access
from access | [
0.18167465925216675,
0.007460089400410652,
0.005379305221140385,
0.3941552937030792,
0.2590448558330536,
-0.4204026162624359,
0.4257084131240845,
0.7092603445053101,
0.08820044249296188,
-0.775959312915802,
-0.07404313236474991,
0.3401969075202942,
-0.037986189126968384,
0.2469613850116729... | |
where userid = 1
and type = 'thing'
and object_id = thing.id | [
-0.2638768255710602,
-0.08018392324447632,
0.10804706811904907,
0.11075834184885025,
0.20022016763687134,
-0.07121525704860687,
-0.13797937333583832,
0.09539581090211868,
-0.07894119620323181,
-0.5337522029876709,
-0.04441302269697189,
0.30648255348205566,
-0.11094028502702713,
0.215643480... | |
),
( select access
from access
where userid = 1 | [
-0.5282172560691833,
-0.154720738530159,
0.07411175966262817,
0.11639571934938431,
0.4910281002521515,
0.11713510006666183,
0.09522408246994019,
-0.055256444960832596,
0.015338681638240814,
-0.8116400241851807,
-0.3119298219680786,
0.452562153339386,
-0.1183788850903511,
0.5369590520858765... | |
and type = 'group'
and object_id = thing.group_id
) | [
-0.15228722989559174,
0.1266602724790573,
-0.02737146057188511,
-0.02560582384467125,
0.06303247809410095,
-0.13906897604465485,
-0.04397112503647804,
-0.29283180832862854,
-0.1950518786907196,
-0.2915162146091461,
-0.45265063643455505,
0.1394869089126587,
-0.4188579022884369,
0.1194511577... | |
)
from things
```
Incidentally, I don't like the design. I would prefer the access table to be split into two:
```
thing_access (user_id, thing_id, access)
group_access (user_id, group_id, access)
```
My query then becomes:
```
select thing.*, coalesce ( ( select access
from thing_a... | [
-0.17337702214717865,
0.06604382395744324,
0.3792724907398224,
-0.038659680634737015,
0.3034619390964508,
-0.10684776306152344,
-0.16251477599143982,
-0.3804102838039398,
-0.06019197776913643,
-0.6725242733955383,
-0.29668426513671875,
0.4187619984149933,
-0.2072003036737442,
0.39215335249... | |
where userid = 1
and thing_id = thing.id
), | [
-0.34864771366119385,
-0.3141123056411743,
0.2130681276321411,
-0.047350626438856125,
0.26015451550483704,
-0.023250699043273926,
0.08513193577528,
-0.1481514722108841,
-0.03568030893802643,
-0.6131511330604553,
-0.03792480751872063,
0.26619550585746765,
-0.1967509388923645,
0.230357304215... | |
( select access
from group_access
where userid = 1
and | [
-0.4482153058052063,
-0.04768428951501846,
-0.07417827844619751,
-0.1186358779668808,
0.45826002955436707,
-0.3253836929798126,
0.30105793476104736,
-0.23311342298984528,
-0.12426650524139404,
-0.6293231248855591,
-0.2209896296262741,
0.2590898275375366,
-0.21194221079349518,
0.29246383905... | |
group_id = thing.group_id
)
)
from things
```
I prefer this because foreign keys can now be used in the access tables. | [
-0.09045454859733582,
0.2731066346168518,
0.3762778341770172,
-0.2211713194847107,
0.12633772194385529,
-0.4921059310436249,
0.02802208811044693,
-0.24154680967330933,
-0.24640552699565887,
-0.4274701178073883,
-0.4831502139568329,
0.5520307421684265,
-0.2576257288455963,
0.249625042080879... | |
I'm creating a bunch of migrations, some of which are standard "create table" or "modify table" migrations, and some of which modify data. I'm using my actual ActiveRecord models to modify the data, a la:
```
Blog.all.each do |blog|
update_some_blog_attributes_to_match_new_schema
end
```
The problem is that if I l... | [
0.2086704820394516,
0.21053780615329742,
0.5375332832336426,
-0.024556798860430717,
0.14329427480697632,
-0.05117685720324516,
0.142417311668396,
-0.16760756075382233,
-0.37828928232192993,
-0.8472813963890076,
0.004986021667718887,
0.4511910378932953,
-0.4573175013065338,
0.34600687026977... | |
Has anyone had luck with removing large amount of issues from a jira database instead of using the frontend? Deleting 60000 issues with the bulktools is not really feasible.
Last time I tried it, the jira went nuts because of its own way of doing indexes.
We got gutsy and did a truncate on the jiraissues table and the... | [
0.2173193097114563,
0.22983312606811523,
0.17042933404445648,
0.25574299693107605,
0.024674976244568825,
-0.19485077261924744,
0.5218885540962219,
-0.07752040028572083,
-0.41594964265823364,
-0.40167421102523804,
0.18028198182582855,
0.721796989440918,
-0.09907064586877823,
0.1020572036504... | |
I'm working on a system were a user can edit existing objects ("Filter" domain objects to be exact) through a GUI. As a UI hint, we only want to enable the save button if the user really modified something to the object. I was wondering if anyone had any experience with this problem and what the best way would be to ap... | [
0.719183087348938,
-0.0539541058242321,
0.26631030440330505,
0.017488189041614532,
0.06612794101238251,
-0.17155390977859497,
-0.13033872842788696,
0.12733320891857147,
-0.07361560314893723,
-0.8979289531707764,
0.15492790937423706,
0.3236745297908783,
-0.3500581979751587,
0.12327301502227... | |
copy. A binding on the isDirty() flag would then enabled/disable the save button. On saving, the differences would then be merged into the original object and persisted.
Additionaly, I was thinking what would happen if a user undos the changes he made to an object. The isDirty() flag should then return false. So I gue... | [
0.5884425044059753,
0.13821741938591003,
0.4949685335159302,
0.1199684590101242,
0.30204829573631287,
-0.28806281089782715,
0.4460122585296631,
-0.24534007906913757,
-0.1686094105243683,
-0.561897873878479,
-0.011423809453845024,
0.6768729090690613,
-0.30248838663101196,
0.3782674670219421... | |
about to make modifications
CancelEdit - In this method, reset the IsDirty Flag to False. Meaning you have arborted the edit process and reverted back to the original state. Call this method when cancelling any modifications made.
And once any modifications are persisted, you also reset the IsDirty Flag to False.
I ... | [
0.4336564838886261,
0.13139669597148895,
0.7394016981124878,
-0.008516943082213402,
0.31503063440322876,
-0.1923525631427765,
0.6352097988128662,
0.18634377419948578,
-0.2125038504600525,
-0.7093920707702637,
-0.1425512284040451,
0.5778287053108215,
-0.20444776117801666,
0.3299848437309265... | |
I need to access some members marked internal that are declared in a third party assembly.
I would like to return a value from a particular internal property in a class. Then I'd like to retrieve a value from a property on that returned value. However, these properties return types that are also internal and declared ... | [
0.0974847674369812,
0.07677951455116272,
-0.27388694882392883,
0.08102376013994217,
-0.12108779698610306,
-0.15387719869613647,
0.40294119715690613,
0.11411520838737488,
-0.1873502880334854,
-0.5889180898666382,
0.025470569729804993,
0.4458663761615753,
-0.12906529009342194,
0.182049080729... | |
PropertyInfo):
u
```
sing System;
using System.Reflection;
public class Foo
{
public Foo() {Bar = new Bar { Name = "abc"};}
internal Bar Bar {get;set;}
}
public class Bar
{
internal string Name {get;set;}
}
static class Program
{
static void Main()
{
object foo = new Foo();
Propert... | [
0.3510821461677551,
-0.07948366552591324,
0.6212165355682373,
-0.3211795389652252,
-0.07449070364236832,
-0.05249843746423721,
0.2623526453971863,
-0.5639564990997314,
-0.017704956233501434,
-0.4559048116207123,
-0.5218015313148499,
0.8468454480171204,
-0.4356222152709961,
0.47400370240211... | |
prop = bar.GetType().GetProperty(
"Name", BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance);
object name = prop.GetValue(bar, null);
Console.WriteLine(name);
}
}
``` | [
0.03600754588842392,
0.03420020639896393,
0.7940516471862793,
-0.23338346183300018,
0.14967617392539978,
0.15262000262737274,
0.6924915313720703,
-0.30734384059906006,
-0.013340207748115063,
-0.4312785267829895,
-0.5456480383872986,
0.5717213749885559,
-0.5511876344680786,
0.49015119671821... | |
Is the WriteFile call properly synchronous, and can I delete the file written immediately after the call?
It is fully synchronous, as you can see by looking at the implementation of `HttpResponse.WriteFile` with Lutz Reflector. You can delete the file immediately after the call to `Response.WriteFile`.
You don't have ... | [
0.010279874317348003,
-0.07915142923593521,
0.5533561706542969,
0.029907776042819023,
-0.0535767637193203,
-0.16138766705989838,
0.49589622020721436,
0.033244505524635315,
-0.04872369393706322,
-0.5937035083770752,
-0.11532700806856155,
0.8772774338722229,
-0.3430933952331543,
-0.001607111... | |
especially for large files. | [
-0.11480475962162018,
0.2031276971101761,
-0.15015383064746857,
0.08340954780578613,
0.3162170648574829,
-0.3213396966457367,
-0.08111190795898438,
-0.2162923663854599,
-0.24687768518924713,
-0.12198203802108765,
-0.2807707190513611,
0.27646076679229736,
-0.06005389988422394,
-0.2123136371... | |
Often multiple applications share a large codebase of libraries that change often in development. In these cases, I prefer to create a solution named after the suite, and include separate projects for each application and the shared libraries.
Is this a good approach? How do others structure their code bases for thing... | [
0.04560317099094391,
0.139617457985878,
0.2491588443517685,
0.21263565123081207,
0.19926193356513977,
-0.046141814440488815,
0.06768012046813965,
-0.22909483313560486,
-0.53547602891922,
-0.7745334506034851,
-0.22956307232379913,
0.23186816275119781,
-0.22915402054786682,
0.083183698356151... | |
and cons of each model in more detail so you can decide which one makes sense for you. :)
In general, for an application suite such as you describe, I would consider the partitioned, single solution model. There's a single master solution that builds everything, and a number of separate solutions for each individual a... | [
0.38247281312942505,
0.1039813831448555,
-0.025438722223043442,
0.284341424703598,
0.19246737658977509,
0.22267939150333405,
-0.04032478109002113,
-0.3385094404220581,
-0.3639569878578186,
-0.5906482934951782,
-0.19157058000564575,
0.4450380802154541,
-0.21620461344718933,
0.30285125970840... | |
you. :) | [
0.2473684400320053,
0.2191639244556427,
0.40157079696655273,
0.19689001142978668,
0.12640373408794403,
0.16895072162151337,
0.1373385190963745,
-0.03228552266955376,
-0.16148631274700165,
-0.33884307742118835,
-0.12149155884981155,
0.6218289732933044,
-0.2009907364845276,
0.190787389874458... | |
I have these two pieces of code, wich one is more readable?
1. foreach
```
decimal technicalPremium = 0;
foreach (Risk risk in risks)
{
technicalPremium = technicalPremium + risk.TechnicalPremium;
}
return technicalPremium;
```
2. linq
```
return risks.Sum(risk => risk.TechnicalPremium);
```
If the team that ... | [
0.49818000197410583,
0.3597390949726105,
0.27028772234916687,
0.05068476125597954,
0.3310045897960663,
-0.24070768058300018,
-0.07754287868738174,
-0.28314006328582764,
0.1838264912366867,
-0.35538098216056824,
-0.2173651158809662,
0.7060471773147583,
0.1300453394651413,
-0.037445172667503... | |
I have a WCF service running on the IIS with a ServiceHostFactory. It's running fine with the WSHttpBinding but because of the speed and everything being on the same network (no firewalls) i want to speed up things a bit using the NetTcpBinding instead.
When i try to do that i get this error:
> Could not connect to n... | [
0.14871910214424133,
-0.08557870239019394,
0.5956962704658508,
-0.008756224997341633,
-0.26482871174812317,
-0.3897773027420044,
0.6390094757080078,
-0.026917675510048866,
-0.18773601949214935,
-0.8671144247055054,
0.16523709893226624,
0.49479570984840393,
-0.39160043001174927,
0.416771441... | |
of these on two different tries:
```
binding.Security.Message.ClientCredentialType = MessageCredentialType.None;
binding.Security.Message.ClientCredentialType = TcpClientCredentialType.Windows;,
```
Also i should point out, that i'm pulling quite a lof of data from one of the service calls, so i also put these (both... | [
0.060453251004219055,
-0.12122847884893417,
0.8443601727485657,
0.08255252242088318,
-0.027238423004746437,
-0.21646195650100708,
0.5466041564941406,
-0.34077250957489014,
-0.36057400703430176,
-0.6660518646240234,
-0.02398938685655594,
0.5243686437606812,
-0.43963494896888733,
0.050832163... | |
that you are encountering an HTTP endpoint.
Check out [this post](https://web.archive.org/web/20160611103146/http://marc.bloggingabout.net/2007/10/23/wcf-hosting-non-http-protocols-in-iis-7-0/) on enabling non-HTTP bindings in IIS 7.0. By default, you have to explicitly enable net.tcp in IIS 7.0.
Hope this helps.
UPD... | [
0.26265624165534973,
-0.0056169284507632256,
0.5302412509918213,
-0.028763003647327423,
-0.163138285279274,
-0.3901519179344177,
0.2599511742591858,
0.21685504913330078,
-0.2680342197418213,
-0.6646578907966614,
-0.2651374936103821,
0.39565280079841614,
-0.3603082299232483,
0.3848868012428... | |
its out of question that a dao will not hold any state.
however, for easiest access to the class, is it better to use prototype( = new every time) or singleton?
simple object creation is cheap for dao's.. it typically only holds a sessionfactory,
accessing the object from a list of singletons may be equally expensive... | [
-0.16319380700588226,
-0.1062781885266304,
-0.0041670300997793674,
0.29062265157699585,
-0.19352930784225464,
0.08227521926164627,
0.055090270936489105,
-0.25770655274391174,
-0.13989339768886566,
-0.6543311476707458,
-0.26081031560897827,
0.09680524468421936,
-0.10447627305984497,
0.02215... | |
your question is about **performance**, then the answer lies within a **profiler**, which gives you **accurate** numbers for your particular **workload**. | [
0.6108831167221069,
0.029886100441217422,
0.12458571791648865,
0.3632301688194275,
-0.11124290525913239,
0.19565987586975098,
0.11307601630687714,
-0.04174488037824631,
-0.0741046592593193,
-0.4806559383869171,
0.11756328493356705,
0.3651755154132843,
0.13779255747795105,
-0.20320805907249... | |
I have deployed ASP.NET web site and ASP.NET web service on the same web server. Both of them require access to shared file.
How to implement/share lock that supports single writers and multiple readers? If somebody reads, nobody can write, but all still can read. If somebody writes, nobody can read/write.
to open fi... | [
0.2566623389720917,
0.23659130930900574,
0.45253685116767883,
0.08715467154979706,
-0.051600370556116104,
-0.06615450978279114,
0.19658543169498444,
-0.368297278881073,
-0.2781011164188385,
-0.9508801102638245,
-0.10610455274581909,
0.39868253469467163,
-0.2391716092824936,
0.3764268457889... | |
reserve file writing. Ie.:
```
Mutex mut = new Mutex("filename as mutex name");
mut.WaitOne();
//open file for write,
//write to file
//close file
mut.ReleaseMutex();
```
Hope it helps. | [
0.42856159806251526,
0.07622718811035156,
0.050217680633068085,
-0.2472814917564392,
0.274583637714386,
0.10648899525403976,
0.4818103313446045,
-0.4633609652519226,
-0.3072698414325714,
-0.65693598985672,
-0.2356039583683014,
0.6985871195793152,
-0.2574007213115692,
0.20265920460224152,
... | |
I ran accross a CSR file (Certificate Signing Request) and I need to extract some information from it.
There's a way to decode it using .NET Framework?
Decoding a CSR is easy if you employ the [OpenSSL.NET](http://openssl-net.sourceforge.net) library:
```
// Load the CSR file
var csr = new X509Request(BIO.File("C:/te... | [
0.05059001222252846,
0.22295057773590088,
0.6590920090675354,
-0.14443941414356232,
-0.3467022478580475,
-0.15503571927547455,
0.3474458158016205,
-0.38774433732032776,
-0.1559756100177765,
-0.5148600339889526,
-0.03074067085981369,
0.5526548624038696,
-0.3882434666156769,
0.13413396477699... | |
I have a list of changes to a list - Adds and Deletes. The list could be huge - say 10'000 items.
**I want to know the state of the list after change 9'000.**
I could walk the list from the start all the way to change 9'000. That seems a bit long-winded to me.
I could keep a list of items and record when they're add... | [
0.460636168718338,
0.049122486263513565,
0.621076762676239,
-0.08802729845046997,
-0.07460888475179672,
0.47449055314064026,
0.15540878474712372,
-0.17940469086170197,
-0.6550033092498779,
-0.7078464031219482,
0.2758296728134155,
0.2948475778102875,
0.12742570042610168,
0.22219039499759674... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.