text stringlengths 0 30.5k | title stringclasses 1
value | embeddings listlengths 768 768 |
|---|---|---|
OnGuiUnhandledException);
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new frmMain());
}
// CLR unhandled exception
private static void OnUnhandledException(Object sender,
UnhandledExceptionEventArgs e)
{
HandleUnhandledException(e.Except... | [
-0.18842676281929016,
0.1012466698884964,
0.7111009955406189,
-0.17496144771575928,
0.18039175868034363,
0.06592840701341629,
0.4129742681980133,
-0.2074090540409088,
-0.14141705632209778,
-0.5052533149719238,
-0.5497769117355347,
0.7874738574028015,
-0.3791883885860443,
0.3180264234542846... | |
**Setup:**
> I have an HTML page with a fieldset
> element. The background color of the
> fieldset element is different from the
> background of the page. The border of
> the fieldset has a slightly darker
> color that the background.
**Problem:**
> In Firefox only the area inside the
> border has the specifie... | [
0.16129224002361298,
-0.041049592196941376,
0.3911493718624115,
-0.23935666680335999,
0.1413046270608902,
-0.34157153964042664,
0.40019896626472473,
-0.16741010546684265,
-0.16281791031360626,
-0.9686228632926941,
-0.2065126895904541,
0.7253322601318359,
-0.49900421500205994,
-0.3762796819... | |
IE7?
see this article for how to fix this problem:
<http://www.communitymx.com/content/article.cfm?cid=DD9F3>
**In summary:**
"
Since IE's problem seems to extend from the fact that the legend is a child of the fieldset, the way to fix the bug is to disassociate the legend with the fieldset. The legend element has to... | [
0.2796943485736847,
0.16824303567409515,
0.39917588233947754,
-0.21993325650691986,
0.2767839729785919,
-0.36576902866363525,
0.6552468538284302,
0.3418866991996765,
0.030969638377428055,
-0.17384856939315796,
-0.3151054382324219,
0.40468829870224,
-0.28532466292381287,
0.11542614549398422... | |
In JUnit 3, I could get the name of the currently running test like this:
```
public class MyTest extends TestCase
{
public void testSomething()
{
System.out.println("Current test is " + getName());
...
}
}
```
which would print "Current test is testSomething".
Is there any out-of-the-b... | [
0.3560972809791565,
0.006885114591568708,
0.147402822971344,
-0.18462331593036652,
-0.23753266036510468,
-0.15447895228862762,
0.29054248332977295,
-0.14590205252170563,
0.305154949426651,
-0.6156058311462402,
0.038607481867074966,
0.5290403366088867,
-0.3208712935447693,
-0.04945291951298... | |
name as the test. You know, [convention over configuration](http://en.wikipedia.org/wiki/Convention_over_Configuration) and all that.
JUnit 4.7 added this feature it seems using [TestName-Rule](https://github.com/junit-team/junit/wiki/Rules#testname-rule). Looks like this will get you the method name:
```
import org.j... | [
0.4234784245491028,
-0.21321234107017517,
-0.048436373472213745,
-0.009514262899756432,
-0.13038374483585358,
-0.3043473958969116,
0.3823018968105316,
-0.5725845098495483,
0.13448677957057953,
-0.7115362882614136,
-0.1055479496717453,
0.5177911520004272,
-0.15589360892772675,
0.30859002470... | |
Is there a quick way to determine whether you are using certain namespaces in your application. I want to remove all the unneccessary using statements like using System.Reflection and so on, but I need a way to determine if I am using those libraries or not. I know that the tool Resharper does this for you, but is ther... | [
0.12411902099847794,
-0.11457790434360504,
-0.1576535999774933,
0.2881351709365845,
-0.240781769156456,
-0.14942342042922974,
-0.0041725048795342445,
-0.03108087182044983,
-0.321201354265213,
-0.6191749572753906,
0.19104604423046112,
0.44099104404449463,
-0.3370935320854187,
-0.19862291216... | |
Does anyone know if there's a way to manage users/roles in the asp.net membership database using a web-based interface you can access remotely?
I need one which doesn't require installation to the Default Website.
Thanks
Well, the asp .net object for managing users and membership information is fairly straightforward... | [
0.4450892508029938,
0.08968459814786911,
0.11127784103155136,
0.3401685059070587,
0.03865954652428627,
-0.31775617599487305,
0.26305925846099854,
0.21709132194519043,
-0.3864753544330597,
-0.39737725257873535,
0.19582408666610718,
0.5562756657600403,
0.15772728621959686,
-0.064526297152042... | |
Using Python's Imaging Library I want to create a PNG file.
I would like it if when printing this image, without any scaling, it would always print at a known and consistent 'size' on the printed page.
Is the resolution encoded in the image?
If so, how do I specify it?
And even if it is, does this have any relev... | [
0.25742024183273315,
-0.10860179364681244,
0.7255268096923828,
-0.06389398127794266,
-0.26294198632240295,
0.1778818815946579,
-0.12938152253627777,
-0.2833475172519684,
-0.2934126555919647,
-0.7702041864395142,
-0.059971075505018234,
0.5146523714065552,
-0.5022710561752319,
-0.11296236515... | |
(x-res, y-res)
im.save("PNG") # uses the new DPI
``` | [
0.09172483533620834,
-0.2868279814720154,
0.39302486181259155,
-0.16537627577781677,
0.22212561964988708,
0.28222349286079407,
0.08069659769535065,
-0.1820583939552307,
-0.2347976565361023,
-0.6497717499732971,
-0.5080732107162476,
0.49591925740242004,
-0.2951628863811493,
0.12861952185630... | |
I am doing a CSV Import tool for the project I'm working on.
The client needs to be able to enter the data in excel, export them as CSV and upload them to the database.
For example I have this CSV record:
```
1, John Doe, ACME Comapny (the typo is on purpose)
```
Of course, the companies are kept in a sep... | [
0.5820813775062561,
0.6608747839927673,
-0.004090641159564257,
0.005355857778340578,
0.2772344648838043,
-0.20346790552139282,
-0.3146872818470001,
0.5186288952827454,
-0.47154203057289124,
-0.29813820123672485,
-0.04018931835889816,
0.24833333492279053,
-0.45396584272384644,
0.33393564820... | |
company names in the CSV.
the comparison should return 0 if the strings are exactly the same, and return some value that gets bigger as the strings get more different, but strcmp doesn't cut it here because:
"Acme Company" and "Acme Comapny" should have a very small difference index, but
"Acme Company" and "Cmea Mpnya... | [
0.1288440078496933,
0.20918124914169312,
0.4585425555706024,
0.04170157387852669,
0.10923615843057632,
0.19353224337100983,
-0.3548254072666168,
0.17775554955005646,
-0.33345526456832886,
-0.32023459672927856,
-0.16794328391551971,
0.22278361022472382,
-0.19146868586540222,
0.4486688077449... | |
choose the name he most probably wanted to insert.
Is there a known algorithm to do this, or maybe we can invent one :)
?
You might want to check out the [Levenshtein Distance](http://en.wikipedia.org/wiki/Levenshtein_distance) algorithm as a starting point. It will rate the "distance" between two words.
[This SO th... | [
0.5907450318336487,
-0.07265540212392807,
0.06615179032087326,
0.13698968291282654,
-0.04417835548520088,
-0.037149615585803986,
0.3810243606567383,
-0.05352118983864784,
0.08255787938833237,
-0.21477320790290833,
0.11466440558433533,
0.056508004665374756,
0.08316624164581299,
0.3179966509... | |
I think this should be easy, but it's evading me. I've got a many-to-many relationship between Accounts and Account Groups. An Account can be in zero or more Groups, so I'm using the standard join table.
```
Accounts
--------
ID
BankName
AcctNumber
Balance
AccountGroups
-------------
ID
GroupName
JoinAccountsGroups... | [
0.0527990497648716,
0.2847900390625,
0.3149721622467041,
-0.11462031304836273,
-0.023534659296274185,
0.23077869415283203,
-0.1844094693660736,
-0.06628576666116714,
-0.2644936740398407,
-0.6959662437438965,
0.3439692258834839,
0.5092004537582397,
-0.23409761488437653,
-0.27347853779792786... | |
AcctNum Balance Groups
--------|--------------|----------|----------------
Citi 930938 400 Payroll
HSBC 8372933 100 Monthly, Payroll
Wells 09837 800 -
Chase 8730923 250 | [
-0.2117188572883606,
-0.14975804090499878,
0.4331849217414856,
0.5237811803817749,
0.33222755789756775,
0.23474618792533875,
-0.24507059156894684,
0.1469196081161499,
-0.5641050338745117,
-0.2031416893005371,
-0.06539233773946762,
0.5834121108055115,
0.10241091996431351,
-0.091082721948623... | |
Monthly
```
The second is a master-detail list:
```
Name AcctNum Balance
------------|----------|----------
Payroll (2) 500
Citi 930938 400
HSBC 8372933 100
..................................
Monthly (2) 350
HSBC | [
-0.3459342122077942,
0.32376280426979065,
0.549366295337677,
0.06858223676681519,
-0.12145040184259415,
0.12305577844381332,
-0.09869331121444702,
0.1309480220079422,
-0.3126375675201416,
-0.19153781235218048,
-0.23733335733413696,
0.45287108421325684,
-0.016508378088474274,
0.065867327153... | |
8372933 100
Chase 8730923 250
..................................
Wells 09837 800
```
For the master-detail, my plan was just to get a big result set from the db, and munge it in php as needed. Since there's going to be some significant post-processing in php anyway, maybe I should ... | [
-0.10771796852350235,
0.45757046341896057,
0.050373297184705734,
-0.08543313294649124,
-0.13388223946094513,
0.11265314370393753,
0.10169520229101181,
-0.27942147850990295,
-0.11464570462703705,
-0.3911946713924408,
-0.0660240426659584,
0.41634461283683777,
-0.1945168375968933,
-0.11904992... | |
(Accounts a
LEFT JOIN JoinAccountsGroups jag
ON a.ID = jag.AID)
LEFT JOIN AccountGroups ag
ON jag.GID = ag.GroupName;
```
Will select the data for the first table, however to concatenate the groups (Monthly, Payroll), you would need a User Defined Function (UDF), wich would not be available... | [
-0.07143308222293854,
0.0777101218700409,
0.4771897792816162,
0.08129583299160004,
-0.24044732749462128,
-0.03832956403493881,
0.20885729789733887,
-0.10657407343387604,
-0.22957491874694824,
-0.40674635767936707,
0.014729097485542297,
0.18302519619464874,
-0.3429630994796753,
0.0032454463... | |
What would be the best way to implement, store, and render spherical worlds, such as the ones in spore or infinity but without the in-between stages of spore, and multiple worlds ala infinity universe. Make no assumptions on how the planet itself is generated or its size/scale.
For rendering, you'll need to use some so... | [
-0.03436287119984627,
-0.3730613589286804,
0.6184757351875305,
0.2730277180671692,
0.06099230423569679,
0.16044048964977264,
-0.30573299527168274,
-0.006139433942735195,
-0.22233837842941284,
-0.8493237495422363,
-0.12545272707939148,
0.2920494079589844,
-0.09874841570854187,
-0.0908839553... | |
more popular algorithm that can be adapted to spherical surfaces [as well](http://www.zib.de/clasen/?page_id=6).
As for storing the data, you may want to look into procedural generation (depending on your needs) for texturing, heightmaps, etc. This is similar to how Infinity and Spore do things. You can read a little ... | [
-0.016644317656755447,
-0.27533596754074097,
0.6475659608840942,
0.2660439908504486,
-0.17227613925933838,
-0.06068126857280731,
-0.010541385971009731,
-0.39861205220222473,
-0.261858195066452,
-0.8508718609809875,
0.12662222981452942,
0.6466290354728699,
0.0753556340932846,
0.011032305657... | |
Is that .NET related?
It appears to be a pointer of some sort, what is the difference?
Edit:
I actually know it is the XOR operator, but look at this example from this page.
```
void objectCollection() {
using namespace System::Collections;
**ArrayList ^as = gcnew ArrayList;**
//... }
```
What is th... | [
0.2110614776611328,
0.17796821892261505,
0.2570827603340149,
-0.08175203949213028,
-0.22536294162273407,
-0.27787667512893677,
-0.006895360536873341,
0.0979701355099678,
-0.24299189448356628,
-0.3914072513580322,
-0.04331066459417343,
0.41747885942459106,
-0.7624435424804688,
0.42784184217... | |
unmanaged C++ object.
As the other poster suggest, outside the .NET world or in a non-object creation context, it is the XOR operator. | [
0.1705361008644104,
-0.0822777971625328,
0.10779344290494919,
0.1154463067650795,
-0.00041460548527538776,
-0.3254738748073578,
-0.12729667127132416,
0.09083665907382965,
-0.25981923937797546,
-0.01171735767275095,
-0.45335543155670166,
0.49743643403053284,
-0.6630057692527771,
0.358248025... | |
I have a quick little application and wanted to give a try to develop using TDD. I've never used TDD and actually didn't even know what it was until I found ASP.NET-MVC. (My first MVC app had unit tests, but they were brittle, way coupled, took too much up keep, and were abandoned -- I've come to learn unit tests != TD... | [
0.45112285017967224,
-0.06015847250819206,
0.3629752993583679,
0.07926135510206223,
0.09449319541454315,
0.1636846959590912,
0.18318293988704681,
-0.12722767889499664,
-0.14462769031524658,
-0.5356830954551697,
0.09319620579481125,
0.5948670506477356,
0.04210158437490463,
0.097864948213100... | |
line number. Pretty simple.
Right now I'm only working on new purchase order details (number/line) and have a model like this:
```
public class PurchaseOrder
{
public string NewNumber {get; private set;}
public string NewLine {get; private set;}
new public PurchaseOrder(string purchaseOrderText)
{
... | [
0.22794686257839203,
-0.34781548380851746,
0.6281343698501587,
-0.18710559606552124,
0.32695987820625305,
0.16327343881130219,
-0.02813776582479477,
-0.38592350482940674,
0.1057707741856575,
-0.6640976667404175,
-0.3256484568119049,
0.7995184063911438,
0.04703918844461441,
0.43749237060546... | |
I want to add a method "IsValid" that should only be true if "NewNumber" and "NewLine" are both non-null. So I want to test it like:
```
public void Purchase_Order_Is_Valid_When_New_Purchase_Order_Number_And_Line_Number_Are_Not_Null()
{
PurchaseOrder order = new PurchaseOrder()
{
NewNumber = "123456",
... | [
0.22333906590938568,
-0.11018655449151993,
0.585837721824646,
-0.191560760140419,
0.3976828157901764,
-0.15289771556854248,
0.03390463441610336,
-0.6277526617050171,
0.08596767485141754,
-0.7487226128578186,
-0.12698043882846832,
0.9650149345397949,
-0.009572279639542103,
0.155660375952720... | |
then I'm testing the code for 'GetNewNumber' and 'GetNewLine' as well.
I'm kind of stumped on how to write this as a testable class while trying to keep it locked up in terms of what makes sense for the model. This seems like it would be a common problem, so I'm thinking I'm just missing an obvious concept.
One soluti... | [
0.4542655944824219,
-0.26988548040390015,
0.4008057415485382,
-0.11943281441926956,
0.5026882290840149,
-0.08449678122997284,
-0.09771078079938889,
-0.35541269183158875,
-0.04245564341545105,
-0.7182490825653076,
-0.17027781903743744,
0.9773865342140198,
0.10080484300851822,
0.421758621931... | |
newLine;
}
// ...
}
```
Then testing is easy and isolated - you're not testing `GetNewNumber` and `GetNewLine` at the same time.
To help using `PurchaseOrder` you can create a factory method that puts it together:
```
public static PurchaseOrder CreatePurchaseOrder(string purchaseOrderText)
{
return new ... | [
0.3061247169971466,
-0.27898743748664856,
0.4130692183971405,
-0.04295527562499046,
0.5128277540206909,
-0.10577857494354248,
0.04746128246188164,
-0.3717622756958008,
0.1267000287771225,
-0.5209099650382996,
-0.2060915231704712,
0.6579605937004089,
-0.11760323494672775,
0.3845249712467193... | |
I can not control the scrolling of a scrollpane from within my actionscript (I am using actionscript 3.0)
**Here is my Definition:**
```
var scrollPane:ScrollPane = new ScrollPane();
scrollPane.verticalScrollPolicy = "false";
scrollPane.move(374, 0);
scrollPane.setSize(476, 370);
```
**When I try to set it - scroll... | [
-0.07977506518363953,
-0.06567922979593277,
0.9197269082069397,
-0.13927175104618073,
0.140071839094162,
0.006449489388614893,
0.6038625836372375,
-0.38608667254447937,
-0.07786373049020767,
-0.6846657991409302,
-0.11277038604021072,
0.4178553819656372,
-0.23313282430171967,
0.081122778356... | |
works just fine.
I have tried hPosition also and it does not work at all. Any clues as to how I can control the scroll position would be greatly appreciated.
Below is the entire code
```
package {
import flash.display.*;
import flash.events.*;
import flash.filters.*;
import fl.transitions.Tween;
... | [
0.023226415738463402,
-0.3794884979724884,
0.8032580614089966,
-0.08384422957897186,
-0.26477956771850586,
0.06399103254079819,
0.10809820145368576,
-0.5341702699661255,
-0.03579607233405113,
-0.6639379858970642,
-0.09073180705308914,
0.8311696648597717,
-0.23330023884773254,
0.03972082957... | |
var startX:Number;
var startY:Number;
var counter:Number = 0;
const LIMIT:Number = 100;
var intMessages:Number = 80;
var intBoardSize:Number = 476*(Math.round(intMessages/15)+1);
var intMessageMinX:Number = 35; | [
-0.21356099843978882,
-0.05344546213746071,
0.43413296341896057,
-0.2660360038280487,
-0.16959919035434723,
0.4758441746234894,
0.4386617839336395,
-0.502115786075592,
-0.28872519731521606,
-0.009709516540169716,
-0.3582327961921692,
0.41182270646095276,
-0.1436072736978531,
-0.16839596629... | |
var intMessageMaxX:Number = intBoardSize-99;
var intMessageMinY:Number = 35;
var intMessageMaxY:Number = 310;
var activeGloveName:String = ""
var intDegreeHigh:Number = 45;
var intDegreeLow:Number = -45;
//create | [
0.1008538007736206,
-0.25741881132125854,
0.4526459276676178,
-0.1798260658979416,
0.1871848702430725,
0.1331128627061844,
0.6155778169631958,
-0.39172178506851196,
-0.15923602879047394,
-0.3137868344783783,
-0.41758689284324646,
0.510296106338501,
-0.3473365306854248,
-0.01290864590555429... | |
objects
var mcglove:mcGlove = new mcGlove();
var mcglovetarget:mcGloveTarget = new mcGloveTarget();
var myDropShadowFilterSmall = new DropShadowFilter (2,45,0x000000,0.65,3,3,2,3,false,false,false);
var myDropShadowFilterDown = new DropShadowFilter (3,45,0x000000,0.65,5,5... | [
-0.029393047094345093,
0.22107772529125214,
0.902989387512207,
0.219851553440094,
-0.14063268899917603,
0.4448261260986328,
0.6127017736434937,
-0.5650327205657959,
-0.5234772562980652,
-0.067380391061306,
-0.3616498112678528,
0.6194815635681152,
-0.13123604655265808,
0.08285896480083466,
... | |
(3,90,0x000000,0.35,8,8,2,3,false,false,false);
var holder:MovieClip = new MovieClip();
var pinkline:Sprite = new Sprite();
var searchBox:Sprite = new Sprite();
var topShadowBox:Sprite = new Sprite();
var aMessages:Array = new Array();
//Create a ... | [
0.11951156705617905,
-0.44789382815361023,
0.8149682283401489,
0.05492231994867325,
-0.00512181269004941,
0.47500571608543396,
0.5701163411140442,
-0.47062361240386963,
-0.36819809675216675,
-0.2672809362411499,
-0.18183353543281555,
0.5062164068222046,
-0.4575607180595398,
0.2244224250316... | |
for (var x = 0; x < intMessages; x++){
aMessages[x] = new mcGlove();
aMessages[x].scaleX = .28;
aMessages[x].scaleY = .28;
counter = 0; | [
-0.1380912959575653,
-0.13953374326229095,
0.8179950714111328,
-0.2839546203613281,
0.07003265619277954,
0.5014978051185608,
0.7848610877990723,
-0.6012254357337952,
-0.3828517496585846,
-0.4580276310443878,
-0.28280511498451233,
0.48216068744659424,
-0.4307647943496704,
0.7081571221351624... | |
position(aMessages[x]);
aMessages[x].rotation = (0, 0, 0, Math.round(Math.random() * (intDegreeHigh - intDegreeLow)) + intDegreeLow);
aMessages[x].filters = [myDropShadowFilterSmall];
holder.addChild(aMessages[x]);
aMessages[x].name = "glove" + x; | [
-0.09911863505840302,
-0.49034765362739563,
0.2950488030910492,
0.11062130331993103,
-0.12591147422790527,
0.2494204193353653,
0.10299906134605408,
-0.4967881143093109,
-0.23536698520183563,
-0.3726491928100586,
-0.1702655851840973,
0.1267651468515396,
-0.13174037635326385,
0.1205164194107... | |
aMessages[x].addEventListener(MouseEvent.MOUSE_DOWN, selectMessage);
aMessages[x].addEventListener(MouseEvent.MOUSE_UP, releaseMessage);
aMessages[x].buttonMode = true;
}
var scrollPane:ScrollPane = new ScrollPane();
scrollPane.verticalScrollPolicy = ... | [
-0.24944709241390228,
-0.11524670571088791,
0.7177398204803467,
-0.18856723606586456,
0.1293799877166748,
0.41368424892425537,
0.5088163018226624,
-0.3656952679157257,
-0.16533327102661133,
-0.4791923761367798,
-0.30414119362831116,
0.450600266456604,
-0.13046564161777496,
0.28017911314964... | |
scrollPane.setSize(476, 370);
scrollPane.horizontalLineScrollSize = 120;
topShadowBox.graphics.beginFill(0x333333);
topShadowBox.graphics.drawRect(0,0,870,5);
topShadowBox.x = -10;
topShadowBox.y = -5;
topShadowBox.filters = [topShadow];
... | [
-0.21660545468330383,
-0.5446690320968628,
1.084271788597107,
0.021220147609710693,
-0.03372214362025261,
0.30013248324394226,
0.22246986627578735,
-0.4763103425502777,
-0.09457910805940628,
-0.7492206692695618,
-0.3304656147956848,
0.5215773582458496,
-0.11035194993019104,
0.0605501271784... | |
pinkline.graphics.drawRect(0,0,476,2);
pinkline.x = 374;
pinkline.y = 353;
searchBox.graphics.beginFill(0xDB9195);
searchBox.graphics.drawRect(0,0,476,25);
searchBox.x = 374;
searchBox.y = 370; | [
-0.48546555638313293,
-0.365431547164917,
0.6430270075798035,
-0.0993027538061142,
-0.12189358472824097,
0.675736129283905,
0.007701301947236061,
0.010665971785783768,
-0.012152031064033508,
-0.4383391737937927,
-0.10459449142217636,
0.330744206905365,
-0.3732524514198303,
-0.0097963558509... | |
//add to frame
sortObjects();
scrollPane.source = holder;
scrollPane.horizontalScrollPosition = 5;
//create instance names for referancing/compairing objects
mcglove.name = "mcglove";
mcglovetarget.name = "mcglovetarget"; | [
-0.053482264280319214,
0.023163791745901108,
0.6802625060081482,
-0.014098127372562885,
0.051593005657196045,
0.34470662474632263,
0.29912781715393066,
-0.48576223850250244,
-0.3829139173030853,
-0.4570852220058441,
-0.14937841892242432,
0.3950599431991577,
-0.3771693706512451,
0.291139006... | |
//position the glove and modify apperiance
mcglove.x = 163;
mcglove.y = 211;
mcglove.filters = [myDropShadowFilterDown];
mcglovetarget.x = 615;
mcglovetarget.y = 211;
mcglovetarget.alpha = 0 | [
0.07305700331926346,
-0.17691318690776825,
0.3486206531524658,
-0.09386450052261353,
0.21289001405239105,
0.2814229726791382,
0.4346226155757904,
-0.538206160068512,
-0.007595408707857132,
-0.3631128966808319,
-0.12561503052711487,
0.4294002950191498,
-0.4057951271533966,
-0.04519079998135... | |
//action listeners
mcglove.addEventListener(MouseEvent.MOUSE_DOWN, selectGlove);
mcglove.addEventListener(MouseEvent.MOUSE_UP, releaseGlove);
function position(target) {
target.x = Math.round(Math.random() * (intMessageMaxX - intMessageMinX)) + intMessageMinX;
... | [
0.011249455623328686,
-0.3185637593269348,
0.5010539889335632,
-0.45584696531295776,
-0.18846634030342102,
0.31028783321380615,
0.6156840324401855,
-0.5442459583282471,
-0.29532116651535034,
-0.3648085594177246,
-0.331552118062973,
0.7660085558891296,
-0.5512069463729858,
-0.28466647863388... | |
for (var i:uint=0; i<aMessages.length -1 ; i++) {
if(target.hitTestObject(aMessages[i]) && counter < LIMIT){
counter++;
position(target); | [
-0.08106675744056702,
-0.45479750633239746,
0.3222300410270691,
-0.22844436764717102,
0.11734608560800552,
0.2669873535633087,
0.4702981114387512,
-0.43974196910858154,
0.2550516426563263,
-0.5644581913948059,
-0.14484229683876038,
0.5248470306396484,
-0.1923677623271942,
0.081735007464885... | |
return false;
};
}
}
function selectGlove(event:MouseEvent):void {
event.target.startDrag(true); | [
-0.22219787538051605,
-0.39589059352874756,
-0.05389176309108734,
-0.49460357427597046,
0.2966881990432739,
0.07403689622879028,
0.4191690683364868,
0.09976082295179367,
0.0568050816655159,
-0.44850867986679077,
-0.05860533192753792,
0.6479081511497498,
-0.3671613335609436,
0.0397417284548... | |
var myTargetName:String = event.target.name + "target";
var myTarget:DisplayObject = getChildByName(myTargetName);
mcglove.filters = [myDropShadowFilterUp];
addChild(myTarget);
event.target.parent.addChild(event.target);
addChild(topShadowB... | [
-0.11848795413970947,
-0.30414167046546936,
0.273702472448349,
-0.3024836778640747,
0.12402109801769257,
0.2792763113975525,
0.5552168488502502,
-0.16579094529151917,
-0.06802333891391754,
-0.6703171133995056,
-0.30426743626594543,
0.6175554394721985,
-0.3752070963382721,
0.003566280705854... | |
myTarget.alpha = .5;
startX = event.target.x;
startY = event.target.y;
}
function releaseGlove(event:MouseEvent):void {
event.target.stopDrag(); | [
-0.04341845214366913,
-0.26187828183174133,
0.2553940713405609,
-0.5536470413208008,
0.27405455708503723,
0.04197363927960396,
0.3952995538711548,
0.20095638930797577,
-0.12485919892787933,
-0.2484579235315323,
-0.295066237449646,
0.5925619602203369,
-0.6198989748954773,
0.1644977182149887... | |
var myTargetName:String = event.target.name + "target";
var myTarget:DisplayObject = getChildByName(myTargetName);
event.target.filters = [myDropShadowFilterDown];
myTarget.alpha = 0;
if (event.target.dropTarget != null && event.target.dropTarget.parent =... | [
-0.16262371838092804,
-0.4255147874355316,
0.24927105009555817,
-0.34548625349998474,
0.2508348226547241,
0.1906815767288208,
0.4237857758998871,
-0.12622486054897308,
-0.08311180025339127,
-0.5463524460792542,
-0.3604021668434143,
0.6064545512199402,
-0.533275306224823,
-0.028062494471669... | |
event.target.removeEventListener(MouseEvent.MOUSE_DOWN, selectGlove);
event.target.removeEventListener(MouseEvent.MOUSE_UP, releaseGlove);
event.target.x = myTarget.x;
event.target.y = myTarget.y;
var myTween:Tween | [
-0.19121912121772766,
-0.336173951625824,
0.10275343805551529,
-0.25389185547828674,
0.08279557526111603,
0.07354513555765152,
0.4321592152118683,
0.3483133614063263,
-0.2524644732475281,
-0.35515251755714417,
-0.28148606419563293,
0.454568475484848,
-0.5093269944190979,
0.2272448986768722... | |
= new Tween(getChildByName(event.target.name), "scaleX",Strong.easeOut,getChildByName(event.target.name).scaleX,.28,2,true);
var myTween2:Tween = new Tween(getChildByName(event.target.name), "scaleY",Strong.easeOut,getChildByName(event.target.name).scaleY,.28,2,true);
holder.addC... | [
0.033939722925424576,
-0.16252335906028748,
0.3690837025642395,
-0.12209036201238632,
-0.20219507813453674,
0.21312269568443298,
0.5070627331733704,
-0.01797502301633358,
-0.12327857315540314,
-0.5525026321411133,
-0.406241238117218,
0.3725746273994446,
-0.09694711863994598,
0.004262309987... | |
holder.getChildByName(event.target.name).y=Math.round(Math.random() * (intMessageMaxY - intMessageMinY)) + intMessageMinY;
holder.getChildByName(event.target.name).addEventListener(MouseEvent.MOUSE_DOWN, selectMessage);
holder.getChildByName(event.target.name).addEventListener(Mo... | [
-0.4118786156177521,
-0.14322742819786072,
0.3977048397064209,
-0.14745087921619415,
0.2388458549976349,
0.20802965760231018,
0.19248251616954803,
-0.3312655985355377,
-0.22873912751674652,
-0.4152211844921112,
-0.260765939950943,
0.5118618011474609,
-0.02419421635568142,
0.080466464161872... | |
event.target.x = startX;
event.target.y = startY;
}
//sortObjects();
addChild(scrollPane);
addChild(pinkline); | [
-0.2259865254163742,
-0.47038835287094116,
0.21197226643562317,
-0.39652687311172485,
0.1861553192138672,
0.23729047179222107,
0.2903549075126648,
-0.14504313468933105,
0.05729682371020317,
-0.6553441286087036,
-0.25895175337791443,
0.4550659656524658,
-0.21264655888080597,
-0.021176153793... | |
addChild(topShadowBox);
}
function selectMessage(event:MouseEvent):void{
if (activeGloveName != ""){
var activeGlove:DisplayObject = holder.getChildByName(activeGloveName);
activeGlove.filters = [myDropShadowFilterSmall]; | [
-0.30947646498680115,
-0.39264971017837524,
0.4939098358154297,
-0.28721919655799866,
0.2171812653541565,
-0.06303885579109192,
0.7048220634460449,
-0.32915198802948,
-0.008960152976214886,
-0.6702829599380493,
-0.40742871165275574,
0.6485643982887268,
-0.45044445991516113,
0.0741556584835... | |
activeGlove.scaleX = .28;
activeGlove.scaleY = .28;
holder.addChild(activeGlove);
}
activeGloveName = event.target.name; | [
-0.23758812248706818,
-0.3545948266983032,
0.4315118193626404,
-0.26936590671539307,
0.010850236751139164,
0.011708716861903667,
0.4119132459163666,
0.08249983191490173,
-0.1943691223859787,
-0.6400583386421204,
-0.3129758834838867,
0.27277272939682007,
-0.49369147419929504,
0.379876732826... | |
//event.target.dragIt();
holder.addChild(holder.getChildByName(event.target.name));
event.target.filters = [new GlowFilter(0xABEEFC, .65, 15, 15, 1, 1, false, false)];
event.target.scaleX = .35;
event.target.scaleY = .35;
} | [
0.0020248929504305124,
-0.4718913435935974,
0.5820037126541138,
-0.3364033102989197,
0.019949357956647873,
0.35156360268592834,
0.2623606324195862,
-0.24322284758090973,
-0.1393977552652359,
-0.7762404084205627,
-0.08099321275949478,
0.23656702041625977,
-0.22492071986198425,
0.04708371683... | |
function releaseMessage(event:MouseEvent):void{
event.target.dropIt();
}
function sortObjects():void{
addChild(mcglovetarget);
addChild(scrollPane);
addChild(pinkline); | [
0.025801928713917732,
-0.4714681804180145,
0.43900299072265625,
-0.4284338355064392,
0.35141634941101074,
0.22918079793453217,
0.3524513244628906,
-0.23570622503757477,
-0.1382080763578415,
-0.4066510796546936,
-0.3876483738422394,
0.6586798429489136,
-0.5061759352684021,
-0.08386677503585... | |
addChild(searchBox);
addChild(mcglove);
addChild(topShadowBox);
}
mcglove.buttonMode = true;
}
}
}
```
If you look at the error trace, the error is occuring inside of
```
fl.containers::ScrollPane/setScrollDrag().
```
If you look [here](http://... | [
-0.16347339749336243,
0.10615027695894241,
0.550758957862854,
-0.3178701102733612,
0.22064514458179474,
0.19308193027973175,
0.7582889199256897,
-0.5821275115013123,
-0.2707907557487488,
-0.5861628651618958,
-0.22938388586044312,
0.788028359413147,
-0.3176743686199188,
-0.10396430641412735... | |
you find out that scrollDrag ...
*Gets or sets a value that indicates whether scrolling occurs when a user drags on content within the scroll pane.*
You never put content into the scroll pane
`scrollPane.source = "...";`
I believe this is why the error is occuring, try putting some content into the scrollpane befor... | [
0.2624165415763855,
0.06527292728424072,
0.6427820324897766,
0.04496404528617859,
0.10550988465547562,
-0.2013438642024994,
0.3592568635940552,
0.09596766531467438,
-0.30799445509910583,
-0.758551836013794,
0.09083781391382217,
0.6124938726425171,
-0.03732962906360626,
0.2076871395111084,
... | |
I have an ASP.NET MVC project containing an AdminController class and giving me URls like these:
> <http://example.com/admin/AddCustomer>
>
>
> <http://examle.com/Admin/ListCustomers>
I want to configure the server/app so that URIs containing **/Admin** are only accessible from the 192.168.0.0/24 network (i.e. our ... | [
0.3551579713821411,
0.13778091967105865,
0.628675639629364,
0.15023371577262878,
-0.27565798163414,
-0.35684242844581604,
0.017949583008885384,
-0.049699582159519196,
-0.23644468188285828,
-0.7488241195678711,
-0.028023865073919296,
0.4619283080101013,
-0.32317593693733215,
0.4239640831947... | |
I needed to have this functionality today so I implemented it and thought about posting it here.
Using the IPList class from here (<http://www.codeproject.com/KB/IP/ipnumbers.aspx>)
**The filter attribute FilterIPAttribute.cs:**
```
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;... | [
-0.045017678290605545,
-0.5016196370124817,
0.4728491008281708,
-0.044721368700265884,
-0.024891145527362823,
-0.31204500794410706,
-0.10508967190980911,
-0.33637484908103943,
-0.3750876784324646,
-0.8803615570068359,
-0.2320708930492401,
0.07055637240409851,
-0.4537150263786316,
0.1214661... | |
/// </summary>
/// <value></value>
public string AllowedSingleIPs { get; set; }
/// <summary>
/// Comma seperated string of allowable IPs with masks. Example "10.2.0.0;255.255.0.0,10.3.0.0;255.255.0.0"
/// </summary>
/// <value>The masked I ps.</value>
public str... | [
0.07366150617599487,
-0.6007997989654541,
0.41207799315452576,
0.2725737988948822,
0.08735636621713638,
-0.10079225897789001,
0.35667848587036133,
-0.1973406821489334,
-0.10759249329566956,
-0.6370263695716858,
-0.27676138281822205,
0.165262833237648,
-0.4748823940753937,
-0.28241392970085... | |
<summary>
/// Gets or sets the configuration key for allowed single IPs
/// </summary>
/// <value>The configuration key single I ps.</value>
public string ConfigurationKeyAllowedSingleIPs { get; set; }
/// <summary>
/// Gets or sets the configuration key allowed mmasked ... | [
-0.10369478166103363,
-0.2597772479057312,
0.09299604594707489,
0.07465452700853348,
0.1690789759159088,
0.18626834452152252,
-0.05471830815076828,
-0.04994293302297592,
-0.27426648139953613,
-0.7015226483345032,
-0.45459645986557007,
0.17276716232299805,
-0.4598018229007721,
0.05280192568... | |
configuration key masked I ps.</value>
public string ConfigurationKeyAllowedMaskedIPs { get; set; }
/// <summary>
/// List of allowed IPs
/// </summary>
IPList allowedIPListToCheck = new IPList();
#endregion
#region Denied
/// <summary>
/// Comma... | [
-0.12105356901884079,
-0.6651408076286316,
0.4036632776260376,
0.3068861663341522,
0.151154026389122,
-0.20632609724998474,
0.09410995244979858,
-0.07446633279323578,
-0.31689849495887756,
-0.7569786310195923,
-0.23277173936367035,
0.16753365099430084,
-0.21799367666244507,
0.5041549205780... | |
IPs. Example "10.2.5.41,192.168.0.22"
/// </summary>
/// <value></value>
public string DeniedSingleIPs { get; set; }
/// <summary>
/// Comma seperated string of denied IPs with masks. Example "10.2.0.0;255.255.0.0,10.3.0.0;255.255.0.0"
/// </summary>
/// <value>T... | [
0.17672625184059143,
-0.12334919720888138,
-0.0007862884667702019,
0.4729452133178711,
-0.07817604392766953,
-0.1338837742805481,
0.44334590435028076,
-0.17420339584350586,
-0.12055224925279617,
-0.6789488196372986,
-0.0706457868218422,
-0.18189896643161774,
-0.35215041041374207,
0.3628290... | |
/// <summary>
/// Gets or sets the configuration key for denied single IPs
/// </summary>
/// <value>The configuration key single I ps.</value>
public string ConfigurationKeyDeniedSingleIPs { get; set; }
/// <summary>
/// Gets or sets the configuration key for denied mas... | [
0.03104291670024395,
-0.3703765571117401,
-0.0029980493709445,
0.41803374886512756,
0.0970681831240654,
0.0990951657295227,
0.07994695752859116,
-0.04914626106619835,
-0.3651266396045685,
-0.6746659874916077,
-0.39026737213134766,
0.11670242249965668,
-0.27634966373443604,
0.27621635794639... | |
/// <value>The configuration key masked I ps.</value>
public string ConfigurationKeyDeniedMaskedIPs { get; set; }
/// <summary>
/// List of denied IPs
/// </summary>
IPList deniedIPListToCheck = new IPList();
#endregion
/// <summary>
/// Determines wheth... | [
-0.021004969254136086,
-0.4852588474750519,
0.34767141938209534,
0.2795880138874054,
0.20850461721420288,
-0.054186731576919556,
0.1992209255695343,
-0.1938873529434204,
-0.2713403105735779,
-0.7802980542182922,
-0.34779033064842224,
0.010481257922947407,
-0.2998344600200653,
0.38970559835... | |
authorized.
/// </summary>
/// <param name="actionContext">The HTTP context, which encapsulates all HTTP-specific information about an individual HTTP request.</param>
/// <returns>
/// true if access is authorized; otherwise, false.
/// </returns>
/// <exception cref="T:... | [
0.06514988839626312,
-0.3172145187854767,
0.43644824624061584,
0.13084204494953156,
-0.04015747830271721,
-0.017554249614477158,
0.3351230323314667,
-0.7151877880096436,
-0.30204278230667114,
-0.19876572489738464,
-0.3862450122833252,
0.46109098196029663,
-0.4364304542541504,
-0.1264484524... | |
if (actionContext == null)
throw new ArgumentNullException("actionContext");
string userIpAddress = ((HttpContextWrapper)actionContext.Request.Properties["MS_HttpContext"]).Request.UserHostName;
try
{
// Check that the IP is allowed to access | [
-0.5066105127334595,
-0.34621208906173706,
0.3489114046096802,
-0.1683281511068344,
0.20846256613731384,
-0.010260428301990032,
0.38191649317741394,
-0.3999921679496765,
-0.18489716947078705,
-0.5789868235588074,
-0.4490693509578705,
0.48192086815834045,
-0.36879146099090576,
0.13560017943... | |
bool ipAllowed = CheckAllowedIPs(userIpAddress);
// Check that the IP is not denied to access
bool ipDenied = CheckDeniedIPs(userIpAddress);
// Only allowed if allowed and not denied | [
-0.04683287814259529,
0.19702672958374023,
0.3057734966278076,
0.01042806264013052,
-0.06626749038696289,
-0.3239898383617401,
0.3850817084312439,
0.09677255153656006,
-0.29011669754981995,
-0.3888497054576874,
-0.07966887205839157,
-0.08473435044288635,
-0.37474220991134644,
0.33355066180... | |
bool finallyAllowed = ipAllowed && !ipDenied;
return finallyAllowed;
}
catch (Exception e)
{
// Log the exception, probably something wrong with the configuration
} | [
-0.12248852103948593,
-0.34364888072013855,
0.3467719256877899,
-0.17991043627262115,
0.2032589614391327,
-0.2219690978527069,
0.41582658886909485,
-0.17667347192764282,
-0.266789972782135,
-0.3384917676448822,
-0.28448089957237244,
0.33676987886428833,
-0.2650986611843109,
-0.038121562451... | |
return true; // if there was an exception, then we return true
}
/// <summary>
/// Checks the allowed IPs.
/// </summary>
/// <param name="userIpAddress">The user ip address.</param>
/// <returns></returns>
private bool CheckAllowedIPs(string userIpAddress) | [
0.17058978974819183,
0.09658239036798477,
0.3217446506023407,
0.012166094034910202,
0.010595698840916157,
-0.02182428166270256,
0.3626456558704376,
-0.6076380610466003,
-0.2258642166852951,
-0.3874932825565338,
-0.11007042974233627,
0.1246868297457695,
-0.3689574599266052,
0.02049974910914... | |
{
// Populate the IPList with the Single IPs
if (!string.IsNullOrEmpty(AllowedSingleIPs))
{
SplitAndAddSingleIPs(AllowedSingleIPs, allowedIPListToCheck);
}
// Populate the IPList with the Masked IPs | [
-0.1768929362297058,
-0.5769931674003601,
0.3947084844112396,
0.323337197303772,
0.3278493583202362,
-0.1659369319677353,
0.21530939638614655,
-0.18509036302566528,
-0.3402474820613861,
-0.5348531007766724,
-0.43015551567077637,
0.23609542846679688,
-0.6110674142837524,
-0.1407840698957443... | |
if (!string.IsNullOrEmpty(AllowedMaskedIPs))
{
SplitAndAddMaskedIPs(AllowedMaskedIPs, allowedIPListToCheck);
}
// Check if there are more settings from the configuration (Web.config)
if (!string.IsNullOrEmpty(ConfigurationKeyAllowedSingleIPs))
... | [
-0.23653969168663025,
-0.6501060128211975,
0.5069506764411926,
0.032532088458538055,
0.7490765452384949,
-0.1938326358795166,
0.3037734627723694,
-0.11055241525173187,
-0.18263401091098785,
-0.7206565737724304,
-0.3606454133987427,
0.7266572713851929,
-0.23295141756534576,
0.05323538184165... | |
string configurationAllowedAdminSingleIPs = ConfigurationManager.AppSettings[ConfigurationKeyAllowedSingleIPs];
if (!string.IsNullOrEmpty(configurationAllowedAdminSingleIPs))
{
SplitAndAddSingleIPs(configurationAllowedAdminSingleIPs, allowedIPListToCheck);
... | [
-0.31104186177253723,
-0.5521454215049744,
0.4179837703704834,
0.027097171172499657,
0.5353037118911743,
0.006996611598879099,
0.3549177050590515,
-0.027423258870840073,
-0.029541047289967537,
-0.8435090780258179,
-0.4020063877105713,
0.6431476473808289,
-0.45880261063575745,
0.10538376867... | |
if (!string.IsNullOrEmpty(ConfigurationKeyAllowedMaskedIPs))
{
string configurationAllowedAdminMaskedIPs = ConfigurationManager.AppSettings[ConfigurationKeyAllowedMaskedIPs];
if (!string.IsNullOrEmpty(configurationAllowedAdminMaskedIPs))
{
... | [
-0.47674107551574707,
-0.5319634079933167,
0.43385666608810425,
-0.11310558021068573,
0.5863018035888672,
0.017998771741986275,
0.34302520751953125,
-0.10665867477655411,
0.13028185069561005,
-0.6798667311668396,
-0.5443685054779053,
0.6942346096038818,
-0.35941454768180847,
0.126840248703... | |
}
}
return allowedIPListToCheck.CheckNumber(userIpAddress);
}
/// <summary>
/// Checks the denied IPs.
/// </summary>
/// <param name="userIpAddress">The user ip address.</param>
/// <returns></returns> | [
0.08238093554973602,
-0.05940869078040123,
0.38880443572998047,
0.08984782546758652,
0.1274518072605133,
0.010619698092341423,
0.24102644622325897,
-0.4875199496746063,
-0.31555089354515076,
-0.5563473105430603,
-0.23993223905563354,
0.15272144973278046,
-0.3000766932964325,
0.144828423857... | |
private bool CheckDeniedIPs(string userIpAddress)
{
// Populate the IPList with the Single IPs
if (!string.IsNullOrEmpty(DeniedSingleIPs))
{
SplitAndAddSingleIPs(DeniedSingleIPs, deniedIPListToCheck);
}
// Populate the | [
-0.13829539716243744,
-0.060252778232097626,
0.2938143014907837,
0.24881768226623535,
0.1484498679637909,
-0.05030076205730438,
0.29836151003837585,
-0.1466957926750183,
-0.10518244653940201,
-0.44913262128829956,
-0.2457747757434845,
-0.1117141917347908,
-0.4871540069580078,
0.42059260606... | |
IPList with the Masked IPs
if (!string.IsNullOrEmpty(DeniedMaskedIPs))
{
SplitAndAddMaskedIPs(DeniedMaskedIPs, deniedIPListToCheck);
}
// Check if there are more settings from the configuration (Web.config)
if (!string.IsNullOrEmpty(Configurat... | [
-0.18929357826709747,
-0.41222643852233887,
0.08258549124002457,
0.3849044740200043,
0.286807656288147,
-0.24188293516635895,
0.3832228481769562,
-0.3359338641166687,
-0.28886085748672485,
-0.5541825294494629,
-0.03069823607802391,
0.43510735034942627,
-0.23158472776412964,
0.3088529407978... | |
{
string configurationDeniedAdminSingleIPs = ConfigurationManager.AppSettings[ConfigurationKeyDeniedSingleIPs];
if (!string.IsNullOrEmpty(configurationDeniedAdminSingleIPs))
{
SplitAndAddSingleIPs(configurationDeniedAdminSingleIPs, deniedIPListToCheck)... | [
-0.22490191459655762,
-0.3402153253555298,
0.24706968665122986,
0.17734777927398682,
0.4907298684120178,
0.13255058228969574,
0.41130244731903076,
-0.09951526671648026,
-0.06330578029155731,
-0.7885788679122925,
-0.37413084506988525,
0.48580092191696167,
-0.42232027649879456,
0.31902238726... | |
}
if (!string.IsNullOrEmpty(ConfigurationKeyDeniedMaskedIPs))
{
string configurationDeniedAdminMaskedIPs = ConfigurationManager.AppSettings[ConfigurationKeyDeniedMaskedIPs];
if (!string.IsNullOrEmpty(configurationDeniedAdminMaskedIPs))
{ | [
-0.6177113056182861,
-0.3334256410598755,
0.4990741014480591,
-0.0457882396876812,
0.7868494987487793,
0.1745871752500534,
0.27647319436073303,
-0.041658662259578705,
-0.06574341654777527,
-0.7757255434989929,
-0.453678697347641,
0.7649505734443665,
-0.4902324378490448,
0.08921229094266891... | |
SplitAndAddMaskedIPs(configurationDeniedAdminMaskedIPs, deniedIPListToCheck);
}
}
return deniedIPListToCheck.CheckNumber(userIpAddress);
}
/// <summary>
/// Splits the incoming ip string of the format "IP,IP" example "10.2.0.0,10.3.0.0" and adds the resu... | [
0.01805603876709938,
-0.2645927965641022,
0.18234479427337646,
0.2226981222629547,
0.12300702184438705,
-0.14074072241783142,
0.18353071808815002,
-0.29656487703323364,
-0.24507683515548706,
-0.6127795577049255,
-0.18651549518108368,
0.21306590735912323,
-0.19517698884010315,
0.59968322515... | |
/// <param name="ips">The ips.</param>
/// <param name="list">The list.</param>
private void SplitAndAddSingleIPs(string ips,IPList list)
{
var splitSingleIPs = ips.Split(',');
foreach (string ip in splitSingleIPs)
list.Add(ip);
} | [
0.18033619225025177,
-0.4099866449832916,
0.12686064839363098,
0.11939164251089096,
-0.2021826058626175,
0.31788066029548645,
0.005518727470189333,
-0.6694096326828003,
-0.7500393390655518,
-0.2621568739414215,
-0.29955801367759705,
0.11619105190038681,
-0.5898677110671997,
0.1600082814693... | |
/// <summary>
/// Splits the incoming ip string of the format "IP;MASK,IP;MASK" example "10.2.0.0;255.255.0.0,10.3.0.0;255.255.0.0" and adds the result to the IPList
/// </summary>
/// <param name="ips">The ips.</param>
/// <param name="list">The list.</param>
private void SplitA... | [
0.17527353763580322,
-0.427717387676239,
0.2808274030685425,
0.035697877407073975,
-0.0623340904712677,
0.2930135428905487,
-0.011515128426253796,
-0.6706413626670837,
-0.6201415061950684,
-0.4506867527961731,
-0.2880259156227112,
0.22559542953968048,
-0.45216721296310425,
0.22069972753524... | |
foreach (string maskedIp in splitMaskedIPs)
{
var ipAndMask = maskedIp.Split(';');
list.Add(ipAndMask[0], ipAndMask[1]); // IP;MASK
}
}
public override void OnAuthorization(AuthorizationContext filterContext) | [
-0.027067577466368675,
-0.5719119906425476,
0.02328779734671116,
-0.11676181852817535,
0.27646303176879883,
-0.016441619023680687,
0.32605576515197754,
-0.3806474506855011,
0.10011126846075058,
-0.4784797430038452,
-0.1807945817708969,
0.5433204174041748,
-0.5778948664665222,
-0.0716489404... | |
{
base.OnAuthorization(filterContext);
}
}
}
```
**Example usage:**
**1. Directly specifying the IPs in the
code**
```
[FilterIP(
AllowedSingleIPs="10.2.5.55,192.168.2.2",
AllowedMaskedIPs="10.2.0.0;255.255.0.0,192.168.2.0;255.255.255.0"
)]
public class HomeCon... | [
0.02809206023812294,
-0.30330371856689453,
0.2590525150299072,
-0.10688398033380508,
0.3199254274368286,
-0.1367121934890747,
0.045918967574834824,
-0.13657580316066742,
-0.35609209537506104,
-1.0601104497909546,
-0.2897797226905823,
0.3990479111671448,
-0.6038955450057983,
0.0207062438130... | |
ConfigurationKeyAllowedSingleIPs="AllowedAdminSingleIPs",
ConfigurationKeyAllowedMaskedIPs="AllowedAdminMaskedIPs",
ConfigurationKeyDeniedSingleIPs="DeniedAdminSingleIPs",
ConfigurationKeyDeniedMaskedIPs="DeniedAdminMaskedIPs"
)]
public class HomeController {
// Some code here
... | [
-0.3948056399822235,
0.12525178492069244,
0.34143829345703125,
0.09980747103691101,
0.3285354971885681,
0.1762702912092209,
0.4581091105937958,
0.0237899050116539,
-0.10961325466632843,
-0.8843958973884583,
-0.24105927348136902,
0.7620678544044495,
-0.18008986115455627,
0.600307047367096,
... | |
The windows terminal (the user-interface around text-applications like cmd.exe) really sucks.
There is so much that the Unix-style terminals do that the windows terminal apparently cannot do, for example what if you want to re-size the window in both dimensions by dragging the border. The Windows terminal only allows ... | [
-0.05414995923638344,
-0.1751217395067215,
0.5042961239814758,
0.23258256912231445,
-0.283356636762619,
0.03007255680859089,
-0.1530856043100357,
0.3958286643028259,
-0.6265730261802673,
-0.5863667726516724,
0.21672239899635315,
0.4631384611129761,
-0.22942478954792023,
0.30460453033447266... | |
copy in notepad!
What about the fact that any time I go into 'edit' mode it blocks the application - I'm sure there are people who want to be able to cut & paste without stopping the business-critical server.
I'm sure we can think of more faults if we put our minds to it - but lets not grumble.. what can we do to mak... | [
0.10607640445232391,
0.2637631297111511,
0.4890995919704437,
0.10446755588054657,
-0.03479272872209549,
-0.2059284895658493,
0.06210772693157196,
0.15420663356781006,
-0.12066933512687683,
-1.0484461784362793,
-0.038799628615379333,
0.6810562014579773,
-0.2238011360168457,
-0.0337003469467... | |
with the Bash shipped with [MYSYS-Git](http://code.google.com/p/msysgit/).
You can also use PuTTY and SSH to a real linux box ;-) | [
0.3887650668621063,
-0.002585811074823141,
0.2788619101047516,
-0.061688583344221115,
-0.2948650121688843,
0.027578553184866905,
0.19941619038581848,
-0.01728847064077854,
-0.477436900138855,
-0.5821360349655151,
-0.14018665254116058,
0.6629911065101624,
-0.19805602729320526,
-0.1026676967... | |
Hopefully someone can shed a little light on an issue that I'm currently having with an Oracle DB - I'm sure it's something simple!!
I've managed to recreate this in a sample, so here is the DB structure:
```
CREATE TABLE MyTable(
ixMyTable NUMBER,
clobData CLOB
)
/
CREATE OR REPLACE PACKAGE PKGTEST
AS
P... | [
0.12485090643167496,
0.4067487120628357,
0.23163536190986633,
-0.27642086148262024,
-0.34654897451400757,
-0.02158270962536335,
0.08104347437620163,
-0.365222305059433,
-0.04471198841929436,
-0.637886643409729,
0.029082367196679115,
0.5771775245666504,
-0.22993206977844238,
0.0766678154468... | |
SELECT ixMyTable, clobData
FROM MyTable;
END;
END PKGTEST;
/
GRANT EXECUTE ON PKGTEST TO TEST_ROLE
/
BEGIN
FOR i IN 1 .. 7000 LOOP
insert into mytable values (i, TO_CLOB('123456'));
END LOOP;
END;
/
```
Extra info:
Schema owner is TEST\_SCHEMA
User is CARL
CARL has the TEST\_ROLE role
G... | [
-0.08989686518907547,
0.19546006619930267,
0.4181177020072937,
0.30281195044517517,
0.10637686401605606,
-0.010870850645005703,
0.1831839382648468,
-0.3455139398574829,
0.021240999922156334,
-0.5139109492301941,
-0.09407113492488861,
0.43867361545562744,
-0.31879696249961853,
0.18873265385... | |
same issue through c++ using the open source OTL (not my department, fortunately).
OK, to the problem....
Time from beginning until the grid is populated is ~35-40s, ouch.
However, if I do the following:
```
GRANT SELECT ON MyTable TO TEST_ROLE
/
```
and then perform the query again, it takes ~5-6s.
It seems to ... | [
-0.19123588502407074,
0.07016574591398239,
0.7246562242507935,
-0.034699469804763794,
0.06876056641340256,
-0.15412001311779022,
0.13280680775642395,
-0.13179107010364532,
-0.187936469912529,
-0.8078649044036865,
-0.058979544788599014,
0.4140409231185913,
0.040338583290576935,
0.1137563958... | |
solutions would be much appreciated!
Edit:
OS is Vista x86 Business
Oracle Server is 10.2.0.1
Oracle Client is 10.2.0.3
Edit:
As suggested, I've tried changing from the MS OracleClient to the ODP.NET and this does speed up as required.
Unfortunately, the C# app that was being affected was just an internal app t... | [
-0.111246757209301,
0.12343662232160568,
0.4766027629375458,
0.0781308189034462,
0.06321392953395844,
0.02929454855620861,
0.30888617038726807,
0.18349982798099518,
-0.25087273120880127,
-0.8339415192604065,
-0.1486947387456894,
0.6440464854240417,
-0.3920300602912903,
-0.05610287562012672... | |
GRANT SELECTs around willy-nilly.
If lack of SELECT privilege caused a complete failure then I could probably live with this, but lack of SELECT appears to be causing some slower route for accessing the CLOB data.
I've marked up the 3 answers - thanks for those - but I could really do with a reason, so I'll add a bou... | [
0.5056161880493164,
-0.21558038890361786,
0.5779188275337219,
0.6362056732177734,
-0.2936245799064636,
-0.11633916944265366,
-0.33808961510658264,
-0.3247111439704895,
-0.03931811824440956,
-0.1749701201915741,
0.2343435436487198,
0.350300133228302,
0.15107116103172302,
0.103388711810112,
... | |
that you are reading the blob from disk each time, and not reading if from disk cache the second and following?
I've seen this problem with performance testing, particularly on Oracle, where the first run of a test is terrible. Then with one minor (and seeming insignificant change) the performance suddenly improves s... | [
0.5368608832359314,
0.3459708094596863,
-0.18072888255119324,
0.08661948144435883,
-0.009930646046996117,
-0.08797255903482437,
-0.013356514275074005,
0.06949998438358307,
-0.317531019449234,
-0.3356873393058777,
0.1262395679950714,
0.700721025466919,
-0.09669466316699982,
0.21251717209815... | |
a copy of Oracle XE on your machine if the DBA won't let you bounce the test-production server for this test.
Edit: Or better: drop and re-create the table every time. You may be doing this, but didn't mention it. | [
0.7057609558105469,
0.12510763108730316,
-0.18037118017673492,
0.38262903690338135,
-0.06281333416700363,
-0.3523990511894226,
0.4234917163848877,
0.2970200181007385,
-0.26317864656448364,
-0.31736186146736145,
0.054019246250391006,
0.3480197489261627,
-0.296231210231781,
-0.20075426995754... | |
I need to find a way to proxy some traffic on port 80 to tinyproxy running on a separate port. We have a client working behind a very strict firewall with only port 80 open (and cannot get to sites like meebo.com, etc). I was hoping I could create a CNAME to our domain and a virtual host on apache, catch the request fo... | [
0.35409876704216003,
0.22407880425453186,
0.5193265080451965,
0.22097685933113098,
0.047012269496917725,
-0.0025923941284418106,
0.18046694993972778,
0.33652061223983765,
-0.1576828956604004,
-0.7965535521507263,
0.31677940487861633,
0.27419430017471313,
-0.25015148520469666,
0.53054481744... | |
even see any traffic.
Does anyone have a proposed solution? Here is my VirtualHost entry:
```
<VirtualHost *:80>
ServerName sub.domain.com
ProxyPass / http://127.0.0.1:50001/
ProxyPassReverse / http://127.0.0.1:50001/
</VirtualHost>
```
where Tinyproxy is running on port 50001.
Are you sure that you ar... | [
0.313080370426178,
0.04784074425697327,
0.6204005479812622,
0.16739089787006378,
0.24374209344387054,
-0.3137211501598358,
0.21174539625644684,
0.5426915884017944,
-0.5243659615516663,
-0.8849388957023621,
0.2675846815109253,
0.5079191327095032,
-0.05238057300448418,
0.226070374250412,
0... | |
that the data you are querying has been loaded into the cache and can be access at 10x or 20x the rate (memory vs. disk).
The proper way to do this test is to bounce the database between query runs. Load a copy of Oracle XE on your machine if the DBA won't let you bounce the test-production server for this test.
Ed... | [
0.6893540620803833,
0.25042861700057983,
-0.05372423306107521,
0.2621573507785797,
0.05005322024226189,
-0.2909531891345978,
0.16174377501010895,
-0.14699232578277588,
-0.05385764315724373,
-0.2773946523666382,
0.18882440030574799,
0.45796990394592285,
-0.09707542508840561,
-0.086860857903... | |
Some context: one of the systems I'm working on is a .net 2.0 web application. VB.net for the front end, and SQL Server 2005 for the backend. For a variety of reasons that have been lost to time, the original designer decided to use the .Net OleDB connection rather than the SQLClient connection.
After a few years of d... | [
0.4619894027709961,
0.16091777384281158,
0.012064537033438683,
-0.16317139565944672,
-0.28746920824050903,
-0.40008649230003357,
-0.05550425127148628,
0.34120023250579834,
-0.08333370089530945,
-0.44839876890182495,
0.1079288050532341,
0.4298398494720459,
-0.6973662376403809,
0.32238206267... | |
using it, and that it's the only way to get at the fancier features in SQL Server 2005 (which we aren't using, obviously) what are the advantages of using the one over the other? Any hidden gotchas I should know about? And can anyone point me at some benchmarks showing relative speeds? (I hear that the SQLClient is sup... | [
0.1755102574825287,
-0.15731900930404663,
0.5303208231925964,
0.5216237902641296,
-0.19951488077640533,
-0.46251773834228516,
0.20426854491233826,
0.32233336567878723,
-0.2929721772670746,
-0.4586639106273651,
0.4173964262008667,
0.7584914565086365,
-0.11898428201675415,
-0.024273831397294... | |
have to change as much code.
On the other hand, the Sql Server native driver is supposed to be faster as you said, and it has nicer parameter support (parameters can use names and don't *have* to be in order).
In my personal experience, I've never noticed the speed difference; I also couldn't find anything to back up... | [
0.26567450165748596,
0.22956746816635132,
0.11500538885593414,
0.25287094712257385,
-0.003505720989778638,
-0.2401808798313141,
0.16782547533512115,
0.14461122453212738,
-0.29651597142219543,
-0.5618368983268738,
0.38928377628326416,
0.6839141845703125,
-0.23935933411121368,
0.290404498577... | |
app, and I switched it to SqlClient out of desperation. Of course, it still didn't work, but the better error messages provided enough new information I was able to fix the problem. | [
-0.24913844466209412,
-0.17636387050151825,
0.28975197672843933,
0.24048039317131042,
-0.17410846054553986,
0.032775845378637314,
0.3148370385169983,
0.23693709075450897,
0.0638466626405716,
-0.4578925371170044,
0.2798742353916168,
0.7569813132286072,
-0.7205293774604797,
0.167449936270713... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.