text stringlengths 0 30.5k | title stringclasses 1
value | embeddings listlengths 768 768 |
|---|---|---|
account for unexpected behavior in your other code segment you mentioned in the comments. | [
0.49455827474594116,
0.0801900252699852,
-0.4857105314731598,
0.031281206756830215,
0.028124457225203514,
-0.27323389053344727,
0.20097744464874268,
0.41869568824768066,
0.029838550835847855,
-0.38352110981941223,
0.09485352784395218,
0.25055885314941406,
0.08989258855581284,
-0.3514364063... | |
Consider this (snipped) example
```
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">>
<body>
<table style="background-color: Navy; width:400px">
<tr>
<td style="background-color: Green; widt... | [
0.23208704590797424,
-0.12165012955665588,
0.1593208909034729,
0.18290045857429504,
0.019599420949816704,
0.026506241410970688,
-0.27959275245666504,
-0.497361958026886,
-0.4741213619709015,
-0.6440646052360535,
-0.2945774495601654,
0.417897492647171,
-0.03224651888012886,
-0.2291407734155... | |
<tr>
<td colspan="4">
<img src="http://www.tiepvoud.nl/archief/boris_jeltsin.jpg" alt="Product Mixing Gauges" width="400" />
</td>
</tr>
</table>
</body>
</html>
```
This is working fine in all browsers but IE.
If the image is small enough (say 40) all is well. When... | [
0.4312661588191986,
-0.024206727743148804,
0.6380318999290466,
-0.22960840165615082,
-0.08237813413143158,
-0.03580090031027794,
0.20216704905033112,
-0.6112050414085388,
-0.3975442349910736,
-0.6006597876548767,
-0.2002972513437271,
0.45673108100891113,
-0.15878458321094513,
0.06182498857... | |
happening?
**--SIDENOTE--**
To the people suggesting to use CSS. I know. It's an abstracted example.
Tables are still valid HTML and shouldn't be feared. Tabular data is supposed to be in tables. Re-inventing tables with divs is at least as blasfemous as creating a table based lay-out.
If you hardcode the width of ... | [
0.18106544017791748,
0.045806486159563065,
0.6931123733520508,
-0.14839918911457062,
0.2151547372341156,
-0.3246764540672302,
0.36311736702919006,
0.1776355504989624,
-0.443471223115921,
-0.6305367946624756,
-0.2978421747684479,
0.29944929480552673,
-0.4943312704563141,
0.1876915693283081,... | |
beautiful) might work:
```
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">>
<body>
<table style="background-color: Navy; width:400px">
<tr>
<td>
<table width="100%">
... | [
0.10013008117675781,
-0.4141864478588104,
0.4669583737850189,
0.17523036897182465,
0.32742124795913696,
-0.04292433708906174,
0.28791916370391846,
-0.6701359152793884,
-0.07717347890138626,
-0.6050753593444824,
-0.14199964702129364,
0.5472790598869324,
0.15348820388317108,
0.19119811058044... | |
width:35px">test</td>
<td style="background-color: Green; width:35px">t</td>
<td style="background-color: Green">buffer</td>
</tr>
</table>
</td>
</tr>
<tr>
<td | [
-0.008567355573177338,
-0.45249542593955994,
0.017030155286192894,
0.24764442443847656,
-0.05529185011982918,
0.294123113155365,
-0.10297061502933502,
-0.6388992667198181,
-0.17033155262470245,
-0.4948517084121704,
-0.12032677978277206,
0.4074545204639435,
0.2344370186328888,
-0.1314573138... | |
colspan="4">
<img src="http://www.tiepvoud.nl/archief/boris_jeltsin.jpg" alt="Product Mixing Gauges" width="400" />
</td>
</tr>
</table>
</body>
</html>
```
Reminds me a little of [this](https://stackoverflow.com/questions/469445/last-words-of-a-programmer/470462#470462)
But I reall... | [
0.3225500285625458,
0.14739727973937988,
0.3846266567707062,
-0.12575723230838776,
-0.08328433334827423,
-0.11148173362016678,
-0.08556205779314041,
-0.18981721997261047,
-0.4404181241989136,
-0.3049201965332031,
-0.07217320799827576,
0.24569205939769745,
-0.434486985206604,
0.082242786884... | |
I am trying to use the following query with my table:
```
SELECT ARTICLE_NO, USERNAME, ACCESSSTARTS, ARTICLE_NAME, date_format(str_to_date(ACCESSSTARTS, '%d.%m.%Y %k:%i:%s'), '%d %m %Y' ) AS shortDate FROM AUCTIONS WHERE upper(ARTICLE_NAME) LIKE '%hardy%' and subcat = 'null' ORDER BY str_to_date(ACCESSSTARTS, '%d.%m.%... | [
-0.31111064553260803,
0.3460811376571655,
0.532015860080719,
-0.0020755676086992025,
-0.2863928973674774,
-0.009094229899346828,
0.12817105650901794,
-0.38437509536743164,
-0.3581625819206238,
-0.5645437240600586,
0.15684261918067932,
0.3860216438770294,
-0.20833788812160492,
0.43134820461... | |
a UNIQUE constraint and allow NULLs. You need set a default value of NEWID().
Update the existing values to NEWID() where NULL before creating the UNIQUE constraint. | [
-0.18037977814674377,
-0.21235601603984833,
0.12700815498828888,
0.24656356871128082,
0.13195306062698364,
-0.2162286788225174,
0.29843613505363464,
-0.13751932978630066,
-0.17623847723007202,
-0.709676206111908,
-0.23161627352237701,
0.29068523645401,
-0.4953441917896271,
0.26323202252388... | |
Friends,
I'm new to both Javascript and Regular Expressions and hope you can help!
Within a Javascript function I need to check to see if a comma(,) appears 1 or more times. If it does then there should be one or more numbers either side of it.
e.g.
1,000.00 is ok
1,000,00 is ok
,000.00 is not ok
1,,000.00 i... | [
-0.18415142595767975,
0.2202146351337433,
0.7949298620223999,
-0.09170295298099518,
0.1894512176513672,
0.30369916558265686,
0.34157630801200867,
0.04480978846549988,
-0.20250031352043152,
-0.733822762966156,
0.09138311445713043,
0.6407480835914612,
-0.20321844518184662,
-0.254156351089477... | |
not what I was expecting or want!
Thanks in advance for any help provided.
**strong text**
Edit
**strong text**
Thanks all for the input so far and the 3 answers given. Unfortunately I don't think I explained my question well enough.
What I am trying to achieve is:
If there is a comma in the text and there are on... | [
0.08157219737768173,
0.05152713134884834,
0.22140449285507202,
-0.08635444194078445,
-0.26869064569473267,
0.06432552635669708,
0.6256535053253174,
-0.020639829337596893,
-0.30708378553390503,
-0.803077220916748,
-0.2867978513240814,
0.5693734884262085,
-0.26600944995880127,
0.029288245365... | |
from above:
1,000.00 becomes 1000.00
1,000,00 becomes 100000
,000.00 is left as ,000.00
1,,000.00 is left as 1,,000.00
Apologies for the confusion!
Your regex isn't going to be very flexible with higher orders than 1000 and it has a problem with inputs which don't have the comma. More problematically you're also ... | [
-0.066123828291893,
0.04577828198671341,
0.5989546775817871,
0.04479322209954262,
-0.29256850481033325,
0.5812290906906128,
-0.041405193507671356,
-0.2492370903491974,
-0.07003302872180939,
-0.5165812969207764,
-0.24860820174217224,
0.29589831829071045,
0.13363851606845856,
-0.042171809822... | |
number of non digits.
```
var y = x.replace(/^,|,$|[^0-9]+,|,[^0-9]+/g,'');
```
As an aside, all of this is much easier if you happen to be able to do [lookbehind](http://www.regular-expressions.info/lookaround.html) but almost every JS implementation doesn't.
**Edit based on question update:**
Ok, I won't attemp... | [
0.046548809856176376,
-0.08917508274316788,
0.194769024848938,
-0.13838474452495575,
-0.06995371729135513,
-0.17775990068912506,
0.3951928913593292,
-0.2350008189678192,
-0.30778205394744873,
-0.3419073820114136,
-0.44809821248054504,
0.663604199886322,
-0.5429069399833679,
-0.163056373596... | |
The solution to this [question](https://stackoverflow.com/questions/84716/is-there-a-better-way-to-create-an-object-oriented-class-with-jquery "question") suggested the use of John Resig's class implementation. This solution covers all my needs except:
How to declare a public global variable inside this class that can... | [
-0.20813941955566406,
-0.043961379677057266,
0.10442803800106049,
-0.06856895238161087,
0.21666796505451202,
-0.07311878353357315,
0.10453374683856964,
-0.136050745844841,
-0.2734755575656891,
-0.28111162781715393,
-0.09297643601894379,
0.4654311537742615,
-0.34156277775764465,
0.050692465... | |
can directly read this value without creating the class object
console.log( MyClass.EVENT_NAME );
```
The "only" way to do what you want to do is to use a function as the "class". This way you are declaring a "class" whose public "static" members can be accessed. Something like this:
```
function MyObject() {
// co... | [
-0.12490859627723694,
0.026460561901330948,
0.0033991243690252304,
0.018151262775063515,
0.05072293058037758,
-0.3513585329055786,
0.0744049921631813,
0.028771374374628067,
-0.0954747125506401,
-0.6056820750236511,
-0.23363089561462402,
0.5056794881820679,
-0.3705340623855591,
0.1398557275... | |
If I run a program and an exception is raised I am asked if I want to continue or break.
If I choose break I can see where the exception is coming from but if the break is in a library or system file not one of my source files (Say the exception is in `System.pas` or `Controls.pas`) I need to manually step the executi... | [
0.4562526345252991,
0.03442468121647835,
0.19253061711788177,
-0.0008702269406057894,
0.2648285925388336,
-0.0766126811504364,
0.5876889228820801,
0.009639425203204155,
-0.45409706234931946,
-0.4736531972885132,
-0.45218193531036377,
0.3027195334434509,
-0.17159932851791382,
0.123475573956... | |
in my code but in this instance it's not hitting one of my exception handlers.
Is there a way to say
* run forward with execution until you get to file X or
* until you get back into a project specific file.
I'm also interested out of general curiosity on how other compilers / IDEs handle this.
Apologies if I have... | [
0.31646421551704407,
-0.09097932279109955,
0.16543233394622803,
0.06434256583452225,
0.04148785397410393,
-0.20901064574718475,
0.32871440052986145,
-0.305550754070282,
-0.20401118695735931,
-0.6087902784347534,
-0.1575648933649063,
0.37823906540870667,
-0.2935267388820648,
0.0320691615343... | |
the caller method opens and the cursor is positioned on the caller method.
4. Set your breakpoint. | [
0.02221016399562359,
-0.11039645969867706,
0.7179858088493347,
0.08968359977006912,
0.2493792325258255,
-0.4118819236755371,
0.20737026631832123,
-0.11972019821405411,
0.042130354791879654,
-0.5096822381019592,
-0.48000454902648926,
0.40534448623657227,
-0.452676385641098,
-0.0933491364121... | |
Going from a lambda to an Expression is easy using a method call...
```
public void GimmeExpression(Expression<Func<T>> expression)
{
((MemberExpression)expression.Body).Member.Name; // "DoStuff"
}
public void SomewhereElse()
{
GimmeExpression(() => thing.DoStuff());
}
```
But I would like to turn the Func ... | [
0.3685418665409088,
-0.39804357290267944,
0.19762535393238068,
-0.06211662292480469,
0.23847952485084534,
-0.31589576601982117,
0.3275498151779175,
-0.27382194995880127,
-0.0053610713221132755,
-0.10960833728313446,
-0.23190951347351074,
0.6948842406272888,
-0.49676790833473206,
0.07284708... | |
Expression<Func<T>> DangerousExpression = dangerousCall;
var nameOfDanger =
((MemberExpression)dangerousCall.Body).Member.Name;
throw new DangerContainer(
"Danger manifested while " + nameOfDanger, e);
}
}
public void SomewhereElse()
{
ContainTheDanger(() => thing.Cross... | [
0.16484811902046204,
-0.2620864808559418,
0.31743255257606506,
-0.020690664649009705,
0.1650644838809967,
-0.26500383019447327,
0.6898985505104065,
-0.41741010546684265,
0.007225061766803265,
-0.10006476193666458,
-0.22488000988960266,
0.5102770328521729,
-0.19793787598609924,
-0.096468567... | |
I am overlooking?
Ooh, it's not easy at all. `Func<T>` represents a generic `delegate` and not an expression. If there's any way you could do so (due to optimizations and other things done by the compiler, some data might be thrown away, so it might be impossible to get the original expression back), it'd be disassembl... | [
0.3970645070075989,
0.27110254764556885,
-0.2664181888103485,
0.118303582072258,
-0.2695205807685852,
-0.12992745637893677,
0.29122185707092285,
-0.2803226113319397,
-0.03370260074734688,
-0.41669392585754395,
0.10934967547655106,
0.4239148795604706,
-0.13416409492492676,
0.422466397285461... | |
is why languages that push lambdas to the extreme (like Lisp) are often easier to implement as **interpreters**. In those languages, code and data are essentially the same thing (even at *run time*), but our chip cannot understand that form of code, so we have to emulate such a machine by building an interpreter on top... | [
-0.07212989777326584,
-0.08496397733688354,
-0.07108787447214127,
0.22254207730293274,
-0.21600341796875,
0.12384508550167084,
0.1895073652267456,
-0.05316943675279617,
0.047459814697504044,
-0.36326661705970764,
-0.14266535639762878,
0.6218322515487671,
-0.4631028175354004,
-0.35268476605... | |
data by allowing lambdas to be interpreted as **code** (`Func<T>`) and **data** (`Expression<Func<T>>`) at *compile time*. | [
0.0107843903824687,
-0.1178206354379654,
0.04378974437713623,
0.1739989072084427,
-0.15872466564178467,
0.13630692660808563,
0.07212960720062256,
-0.011786691844463348,
0.04561769962310791,
-0.2617000937461853,
-0.23929132521152496,
0.5336525440216064,
-0.22228561341762543,
-0.271526575088... | |
Why is the following algorithm not halting for me?
(str is the string I am searching in, findStr is the string I am trying to find)
```
String str = "helloslkhellodjladfjhello";
String findStr = "hello";
int lastIndex = 0;
int count = 0;
while (lastIndex != -1) {
lastIndex = str.indexOf(findStr,lastIndex);
i... | [
-0.30659380555152893,
-0.060516465455293655,
0.7056704759597778,
-0.31472015380859375,
0.1603710949420929,
-0.02088196948170662,
0.5343729853630066,
0.020738016813993454,
-0.36641231179237366,
-0.4039801359176636,
-0.4402269124984741,
0.39159443974494934,
-0.295807421207428,
0.273098260164... | |
if block.
```
String str = "helloslkhellodjladfjhello";
String findStr = "hello";
int lastIndex = 0;
int count = 0;
while(lastIndex != -1){
lastIndex = str.indexOf(findStr,lastIndex);
if(lastIndex != -1){
count ++;
lastIndex += findStr.length();
}
}
System.out.println(count);
``` | [
-0.5368428230285645,
-0.20652109384536743,
0.64397132396698,
-0.48048123717308044,
0.25302454829216003,
-0.12203813344240189,
0.4670599400997162,
-0.3930716812610626,
-0.26905348896980286,
-0.48748332262039185,
-0.45045867562294006,
0.31270235776901245,
-0.30980345606803894,
0.310475766658... | |
What is the best way to store XML data used in a program ? Use RESX file or store it as a .xml file and load and unload the files as per requirement
A third option would be to put the XML file as embedded resource in the assembly. In that case, use Assembly.GetManifestResourceStream() to load the XML.
As Cerebrus wrot... | [
0.3264206051826477,
-0.26949363946914673,
0.1782742440700531,
0.11331187188625336,
-0.012814085930585861,
-0.11913242191076279,
-0.11114109307527542,
-0.3551321029663086,
-0.2297164350748062,
-0.671762228012085,
-0.38631755113601685,
0.619547963142395,
-0.24004359543323517,
0.2599062323570... | |
Basically I need to do String.IndexOf() and I need to get array of indexes from the source string.
Is there easy way to get array of indexes?
Before asking this question I have Googled a lot, but have not found easy solution to solve this simple problem.
```
var indexs = "Prashant".MultipleIndex('a');
//Extensio... | [
0.26094505190849304,
-0.0808338150382042,
0.48452189564704895,
-0.01053113304078579,
0.14222976565361023,
0.1305314600467682,
0.20963789522647858,
-0.43701764941215515,
-0.22692663967609406,
-0.4793876111507416,
0.06842127442359924,
0.6385027170181274,
-0.5345587730407715,
0.45922222733497... | |
{
var indexs = from rgChar in StringValue
where rgChar == chChar && i != StringValue.IndexOf(rgChar, i + 1)
select new { Index = StringValue.IndexOf(rgChar, i + 1), Increament = (i = i + StringValue.IndexOf(rgChar)) }; | [
-0.4439096450805664,
0.007173390593379736,
0.6234658360481262,
-0.389595091342926,
0.06720047444105148,
0.3155308961868286,
0.314231276512146,
-0.4886552095413208,
-0.05342411249876022,
-0.3572912812232971,
-0.30397918820381165,
0.5702047348022461,
-0.19668637216091156,
0.5309291481971741,... | |
i = 0;
return indexs.Select(p => p.Index).ToArray<int>();
}
}
``` | [
-0.2030104398727417,
-0.01651928573846817,
0.4521735608577728,
-0.26264604926109314,
0.2504713833332062,
0.19446490705013275,
0.14747853577136993,
-0.4002068042755127,
-0.0696525052189827,
-0.5645301938056946,
-0.23928651213645935,
0.45893222093582153,
-0.36250510811805725,
0.3495002985000... | |
I have a file format I need to be able to show in explorer thumbnails. Since the target system is windows XP, the Vista PreviewHandler API will not be suitable. Ill be using c++.
How would I do it?
You'll need to register a shell extension for your file type. The extension contains code that extracts/generates the thu... | [
0.4947683811187744,
0.24589672684669495,
0.4829151928424835,
-0.08394773304462433,
0.16089783608913422,
-0.16121889650821686,
0.29793867468833923,
-0.14043164253234863,
0.09061632305383682,
-0.6985898017883301,
0.0692770853638649,
0.5554550290107727,
-0.15588857233524323,
0.201344296336174... | |
I want to develop an application that disables the Background Data (new feature in Android 1.5) and Auto Sync and then enables GPRS/EDGE connection and vice versa.
I figured out how to enable/disable GPRS/EDGE by changing the APN settings. (weird solution. However; Android developers couldn't think a user may want to... | [
0.11084482073783875,
0.09578422456979752,
0.3401806652545929,
0.19413478672504425,
0.08149094879627228,
0.09635940939188004,
0.446065217256546,
-0.11380310356616974,
0.06085352599620819,
-0.48719683289527893,
-0.1630113571882248,
0.6685076951980591,
-0.544960618019104,
-0.16313809156417847... | |
keyword. Or maybe I was totally wrong.
What is the right way to solve this?
In my HTC dreams, there is a checkbox to disable the auto sync. I can look for the menu arborescence if you wish so you can find what the callback function is in the Android source code. But I am pretty sure auto sync cannot be completely disa... | [
0.12452316284179688,
-0.0014637382701039314,
0.47489675879478455,
0.2153060883283615,
0.10532251745462418,
0.13447535037994385,
0.8061595559120178,
0.17465680837631226,
0.014584234915673733,
-0.41842058300971985,
-0.21768681704998016,
0.8871499300003052,
-0.38526010513305664,
-0.0506847612... | |
to get the info you desire.
First, I think you can use the code in android-sources/packages/apps/Settings/src/com/android/settings/Utils.java to create an activity that will enlist all the keys of the intent then find the one you want.
The other way is to write a nice mail to the guy who made the Toggle Setting app (... | [
0.47450029850006104,
0.007695752661675215,
0.5033451914787292,
0.17493943870067596,
0.09662487357854843,
0.06281235069036484,
0.15142308175563812,
0.11824207007884979,
-0.08654523640871048,
-0.7169063091278076,
0.2114550918340683,
0.7484573125839233,
-0.33357885479927063,
-0.13619944453239... | |
I have seen that most of the components (VCLs) in Delphi are split in two parts.
1) DesignTime Package
2) RunTime Package
Why all this fuss. What difference does it make if both RunTime and DesignTime packages are united into one single Package?
I have never really been able to understand this separation logi... | [
0.47930005192756653,
-0.047125328332185745,
0.07768175005912781,
-0.03242681547999382,
-0.10343301296234131,
-0.3687856197357178,
-0.17493121325969696,
-0.2696235775947571,
-0.19961054623126984,
-0.38361409306526184,
-0.16396568715572357,
0.5181251168251038,
-0.40645331144332886,
0.4694966... | |
design-time features such as property editors, which you may not want to include in your run-time application.
B. Some component vendors do not want to licence their large and complex design-time features for royalty-free run-time use, but restrict them to use by developers only. | [
0.5097206830978394,
0.21004848182201385,
0.021405134350061417,
0.24126343429088593,
0.14631162583827972,
-0.30655238032341003,
-0.037967436015605927,
-0.2776249647140503,
-0.18408367037773132,
-0.32772716879844666,
-0.5511342883110046,
0.5438950061798096,
-0.18301910161972046,
0.0553942769... | |
i have a table where a Collection has many Entities and an Entity has and belongs to many colections..now for a particular collection there are many entities..how can i paginate those entities belonging to a particular collection..
my find query says..,
$this->Collection->find('first', array('condition'=>array('uid'=>... | [
-0.20272693037986755,
-0.4931391179561615,
0.38760221004486084,
0.33291181921958923,
0.1033179759979248,
-0.0052791740745306015,
-0.1319023221731186,
-0.5409252047538757,
-0.18560490012168884,
-0.5362985730171204,
-0.027525942772626877,
0.4358455240726471,
-0.3950910270214081,
0.2862163782... | |
I am working on database migration tool in java. The tool is copying database tables with their data's to the destination database. But I want it to work on different databases. Copy from mysql and create in derby etc. With JDBC, we can gather enough information about the table and its columns. But I am going to ask th... | [
0.2730332314968109,
0.12232267111539841,
0.06771037727594376,
-0.08092889189720154,
-0.12515373528003693,
-0.007104578893631697,
-0.2919286787509918,
-0.02822863683104515,
-0.37980538606643677,
-0.8517148494720459,
0.2803836166858673,
0.2280500829219818,
-0.38425299525260925,
0.27639570832... | |
an easy and global way?
Apache's [DdlUtils](http://db.apache.org/ddlutils/) is done what I need. When I am searching about crossdb found it, and it is very useful yet powerful. It can generate a database from scratch, just with the parameters. Or it can grab existing database table definitions, also with index definiti... | [
-0.18610833585262299,
-0.1825459748506546,
0.2526875436306,
0.2405092716217041,
-0.361465185880661,
-0.4317888617515564,
0.07266410440206528,
0.34837591648101807,
-0.23401270806789398,
-0.9989347457885742,
0.32481008768081665,
0.44223782420158386,
-0.42523205280303955,
0.13136008381843567,... | |
is there is no good tutorial about how to start using it. I searched through the packages to find a good place to start. Here is what i have achieved, a sample code to generate full database table create sql.
```
DerbyPlatform dp = new DerbyPlatform();
dp.setDelimitedIdentifierModeOn(true);
Database dbs = new Database... | [
-0.19639430940151215,
-0.23307505249977112,
0.8118939399719238,
-0.020768774673342705,
0.04068995639681816,
0.2828226387500763,
0.3659728467464447,
-0.659514307975769,
0.08079135417938232,
-0.6767549514770508,
-0.003432919504120946,
0.7188578844070435,
-0.3971179723739624,
0.02698629349470... | |
Using a XPath query how do you find if a node (tag) exists at all?
For example if I needed to make sure a website page has the correct basic structure like `/html/body` and `/html/head/title`.
```
<xsl:if test="xpath-expression">...</xsl:if>
```
so for example
```
<xsl:if test="/html/body">body node exists</xsl:if>... | [
0.3050730526447296,
0.13509036600589752,
0.33104607462882996,
0.4158157706260681,
-0.0931069552898407,
-0.2776411175727844,
0.05570056289434433,
-0.22251597046852112,
-0.031887348741292953,
-0.644618034362793,
-0.08434560894966125,
0.3228769302368164,
-0.3395616412162781,
-0.19172382354736... | |
I want to create 2 separate pickers in the same view using the same viewController.
But how do I set separate delegates and datasource for them?
Can't seem to get it working. They show up with the same data. If you have any sample code on this it will be much appreciated.
Thanks.
Note that each method of both the dat... | [
0.0592617429792881,
-0.29113084077835083,
0.11023245751857758,
0.15904289484024048,
-0.19958317279815674,
0.17663131654262543,
-0.20704059302806854,
-0.39224591851234436,
-0.2509324848651886,
-0.5465142130851746,
0.3605814278125763,
0.33488914370536804,
-0.10004731267690659,
0.184178695082... | |
of components, for instance
return 3;
}
if([pickerView isEqual: pickerTwo]){
// return the appropriate number of components, for instance
return 4;
}
}
``` | [
0.18333977460861206,
-0.14211803674697876,
0.21512222290039062,
0.019764157012104988,
-0.1759289801120758,
0.22853973507881165,
-0.062112126499414444,
-0.42622897028923035,
-0.21247757971286774,
-0.2606426775455475,
0.07319151610136032,
0.5748148560523987,
-0.2176700383424759,
0.0635562166... | |
Last couple of days, I have refrained myself from master's studies and have been focusing on this (seemingly simple) puzzle:
---
There is this 10\*10 grid which constitutes a square of 100 available places to go. The aim is to start from a corner and traverse through all the places with respect to some simple "trave... | [
-0.028363963589072227,
0.220284104347229,
0.46721217036247253,
0.4059979319572449,
0.037552520632743835,
0.0636669248342514,
0.07847610116004944,
-0.22246503829956055,
-0.36643484234809875,
-0.7620580196380615,
-0.105148546397686,
-0.15785393118858337,
-0.013032285496592522,
-0.08501875400... | |
visit each square only once
To visualise better, here is a valid example traverse (up to the 8th step):
[Example Traverse http://img525.imageshack.us/img525/280/squarepuzzle.png](http://img525.imageshack.us/img525/280/squarepuzzle.png)
---
Manually, I have been working on this puzzle out of boredom. For years, I ... | [
0.15370787680149078,
0.19609835743904114,
0.35051172971725464,
-0.1432381421327591,
-0.411629855632782,
0.2211240977048874,
0.33714914321899414,
-0.3153541386127472,
-0.37291187047958374,
-0.6974813938140869,
0.06771823018789291,
-0.025719331577420235,
-0.1750069260597229,
-0.2421676963567... | |
applies exhaustive try & error solving technique. In other words: brute force depth first search.
My question arises from here on: The program, unfortunately cannot solve the problem because the state space is so big that search never ends withouh ever finding a solution. It can go up to number 98 (and prints that) wi... | [
-0.22271284461021423,
0.07981635630130768,
0.19168955087661743,
0.17800071835517883,
0.01870081014931202,
-0.04365099221467972,
0.39329078793525696,
-0.36868658661842346,
-0.4350409507751465,
-0.5834347605705261,
-0.21604859828948975,
0.29217320680618286,
0.08506251126527786,
0.00595251237... | |
This number decreases in exponentially increasing time periods. I have run the code for quite some time and could not get beyond 50 barrier and now I am convinced.
It seems that this simple approach will not be enough unless I run it for ever. So, how can I improve my code to be faster and more efficient so that it co... | [
0.34153640270233154,
0.27480199933052063,
0.29376280307769775,
0.2815447151660919,
0.1739191859960556,
-0.04250338301062584,
0.5511962175369263,
-0.1218709945678711,
-0.38579943776130676,
-0.8587229251861572,
-0.1461641639471054,
0.695900559425354,
-0.04227088391780853,
0.09938392043113708... | |
Dave Webb for relating the problem to domain it belongs:
> This is very similar to the Knight's
> Tour problem which relates moving a
> knight around a chess board without
> revisiting the same square. Basically
> it's the same problem but with
> different "Traverse Rules".
---
Eventually, I have come up with t... | [
0.05929277092218399,
-0.024649662896990776,
0.026462463662028313,
0.008041161112487316,
-0.2967143654823303,
0.2609967589378357,
0.5980769991874695,
-0.03411932662129402,
-0.1727810949087143,
-0.332686185836792,
-0.011561742052435875,
0.5945796370506287,
-0.21535442769527435,
0.00008024887... | |
the program run until it finishes with all combinations. However, reaching "a" legitimate solution can be reduced to "linear time".
First, things I have learned:
1. Thanks to [Dave Webb's answer](https://stackoverflow.com/questions/767912/riddle-the-square-puzzle/767984#767984) and [ammoQ's answer](https://stackover... | [
-0.02024403214454651,
0.07067836821079254,
0.23514151573181152,
0.14980554580688477,
-0.059163253754377365,
0.002525097457692027,
0.3397679626941681,
-0.26490452885627747,
-0.428499698638916,
-0.4508848190307617,
-0.11521576344966888,
0.4915606379508972,
-0.1211564838886261,
-0.08345931768... | |
The problem can be approached in a bottom-up sense and can be sliced down to solvable sub-problems. Solved sub-problems can be connected in an entry-exit point notion (one's exit point can be connected to one other's entry point) so that the main problem could be solved as a constitution of smaller scale problems. This... | [
-0.5447227954864502,
0.1544162631034851,
0.5161770582199097,
-0.03552667424082756,
-0.10339192301034927,
0.19436638057231903,
0.3207196891307831,
-0.25641801953315735,
-0.48676803708076477,
-0.7855243682861328,
-0.23608151078224182,
0.17870232462882996,
-0.35953909158706665,
0.148575782775... | |
solutions in a
quick way. It simply states that, you
should pick your next move to the
"least accessible" place and populate
your "to go" list with ascending
order or accesibility. Least
accessible place means the place with
least number of possible following
moves.
Below is the pseudocode (from Wikipedia):
---
Some... | [
-1.0972932577133179,
-0.07714709639549255,
0.4783952534198761,
0.27741292119026184,
0.31538522243499756,
0.22240722179412842,
0.14237505197525024,
-0.18309372663497925,
-0.5841404795646667,
-0.889345645904541,
-0.5649527311325073,
-0.1004897728562355,
-0.29624417424201965,
0.14595150947570... | |
with
> the move number "1" for each move
> number from 2 to the number of squares
> on the board, let S be the set of
> positions accessible from the input
> position set P to be the position in
> S with minimum accessibility mark the
> board at P with the current move
> number return the marked board -- each
>... | [
-0.3733692169189453,
-0.1259964108467102,
0.47998130321502686,
0.03241058811545372,
-0.18018628656864166,
-0.26149803400039673,
0.16987411677837372,
-0.5167183876037598,
-0.42602190375328064,
-0.6734083890914917,
-0.41911572217941284,
0.1449545919895172,
-0.24604062736034393,
-0.1229240670... | |
is the last one) would cause *any* of its neighbors to become an island, i.e. not accessible by any other, then that branch is no longer investigated. Saves considerable amount of time (very roughly 25%) combined with Warnsdorff's algorithm.
And here is my code in Python which solves the riddle (to an acceptable degre... | [
-0.32550323009490967,
0.11340278387069702,
0.4954560697078705,
-0.08095668256282806,
-0.15613138675689697,
-0.05071764439344406,
0.18235260248184204,
-0.37195369601249695,
-0.2927730083465576,
-0.8363800048828125,
-0.23784025013446808,
0.3386085331439972,
-0.21851982176303864,
-0.244964480... | |
puzzle
import operator
class Node:
# Here is how the squares are defined
def __init__(self, ID, base):
self.posx = ID % base
self.posy = ID / base
self.base = base
def isValidNode(self, posx, posy):
return (0<=posx<self.base and 0<=posy<self.base)
def getNeighbors(self):
... | [
-0.4508967101573944,
0.03219607472419739,
0.08674880117177963,
-0.007374687120318413,
-0.275033175945282,
0.44106292724609375,
0.23078826069831848,
-0.6775669455528259,
-0.4286378026008606,
-0.6057600975036621,
-0.3065134286880493,
-0.03925815597176552,
-0.525708794593811,
-0.0749491602182... | |
self.posy*self.base)
if self.isValidNode(self.posx + 2, self.posy + 2): neighbors.append(self.posx + 2 + (self.posy+2)*self.base)
if self.isValidNode(self.posx, self.posy + 3): neighbors.append(self.posx + (self.posy+3)*self.base)
if self.isValidNode(self.posx - 2, self.posy + 2): neighbors.appe... | [
-0.6106444597244263,
0.40241819620132446,
0.4995581805706024,
-0.46969878673553467,
-0.058469258248806,
0.5459775924682617,
-0.004665466956794262,
-0.5036529302597046,
-0.23366297781467438,
-1.0430943965911865,
-0.30645230412483215,
0.29814815521240234,
-0.0855577290058136,
-0.090530358254... | |
- 3): neighbors.append(self.posx + (self.posy-3)*self.base)
if self.isValidNode(self.posx + 2, self.posy - 2): neighbors.append(self.posx + 2 + (self.posy-2)*self.base)
return neighbors
# the nodes go like this:
# 0 => bottom left
# (base-1) => bottom right
# base*(base-1) => top left
# base**2 -1 => t... | [
-0.544843316078186,
0.08613535761833191,
0.5969370007514954,
-0.41057315468788147,
-0.004102600738406181,
0.11223097145557404,
0.20657019317150116,
-0.5589488744735718,
-0.33234694600105286,
-0.8150094747543335,
-0.13427473604679108,
0.08741847425699234,
-0.3593984544277191,
0.050972118973... | |
base**2): all_nodes.append(Node(i, base))
togo = dict()
#Togo is a dictionary with (nodeID:[list of neighbors]) tuples
togo[start_nodeID] = all_nodes[start_nodeID].getNeighbors()
solution_count = 0
while(True):
# The search is exhausted
if not traverse_list:
print "Someh... | [
-0.273123562335968,
0.3597550094127655,
0.3352644741535187,
0.038358237594366074,
0.03780006617307663,
0.42659226059913635,
0.5855223536491394,
-0.3658101558685303,
-0.28172168135643005,
-0.7016535997390747,
-0.33440589904785156,
0.12444130331277847,
-0.23231476545333862,
0.092017710208892... | |
str(solution_count)
break
# Get the next node to hop
try:
current_node_ID = togo[traverse_list[-1]].pop(0)
except IndexError:
del togo[traverse_list.pop()]
continue
# end condition check | [
-0.28165897727012634,
-0.12320376932621002,
0.6526674628257751,
0.10882851481437683,
0.4185311794281006,
0.0037264982238411903,
0.6109170317649841,
-0.29384782910346985,
-0.6061241030693054,
-0.5026819705963135,
-0.30277499556541443,
0.3088867962360382,
-0.3810079097747803,
0.1090982854366... | |
traverse_list.append(current_node_ID)
if(len(traverse_list) == base**2):
#OMG, a solution is found
#print traverse_list
solution_count += 1
#Print solution count at a steady rate
if(solution_count%100 == 0): | [
-0.5276480913162231,
0.09662279486656189,
1.0089656114578247,
-0.1043456569314003,
0.3743801414966583,
0.2665734887123108,
0.2624306380748749,
-0.223784402012825,
-0.6086872816085815,
-0.7089323997497559,
-0.23119497299194336,
0.2133021354675293,
-0.46853697299957275,
0.1537782996892929,
... | |
print solution_count
# The solution list can be returned (to visualize the solution in a simple GUI)
#return traverse_list
# get valid neighbors
valid_neighbor_IDs = []
candidate_neighbor_IDs = all_nodes[current_node_ID].getNeighbors()
valid_neighbor_IDs ... | [
-0.3234724700450897,
-0.27982863783836365,
0.7854702472686768,
-0.065421923995018,
0.09069985151290894,
0.14590363204479218,
0.2406485676765442,
-0.4196629822254181,
-0.27270999550819397,
-0.9882595539093018,
-0.3252693712711334,
0.25174081325531006,
-0.5348097681999207,
-0.066953904926776... | |
# if no valid neighbors, take a step back
if not valid_neighbor_IDs:
traverse_list.pop()
continue
# if there exists a neighbor which is accessible only through the current node (island)
# and it is not the last one to go, the situation is not promising; so just eliminate... | [
-0.08491850644350052,
-0.2740752398967743,
0.4406357705593109,
-0.02417689375579357,
0.3998064696788788,
-0.3484717309474945,
0.5779424905776978,
-0.08724556863307953,
-0.5235992670059204,
-0.6793485283851624,
-0.31846094131469727,
0.2721002399921417,
-0.2931000888347626,
0.133681520819664... | |
stuck_check = True
if len(traverse_list) != base**2-1 and any(not filter(lambda id: not id in traverse_list, all_nodes[n].getNeighbors()) for n in valid_neighbor_IDs): stuck_check = False
# if stuck
if not stuck_check:
traverse_list.pop()
continue
# sort the nei... | [
-0.015970760956406593,
-0.14411020278930664,
0.6316177845001221,
0.049798090010881424,
0.04098491743206978,
0.28590843081474304,
0.3644601106643677,
-0.1664460450410843,
-0.6780606508255005,
-0.6747844219207764,
-0.3169788718223572,
0.12743878364562988,
-0.49036556482315063,
0.099346518516... | |
neighbors_ncount = []
for neighbor in valid_neighbor_IDs:
candidate_nn = all_nodes[neighbor].getNeighbors()
valid_nn = [id for id in candidate_nn if not id in traverse_list]
neighbors_ncount.append(len(valid_nn))
n_dic = dict(zip(valid_neighbor_IDs, neighbors_ncount))... | [
-0.5012553334236145,
-0.3097510039806366,
0.4376046359539032,
0.02788498066365719,
0.18913361430168152,
0.1636551469564438,
-0.052481114864349365,
-0.46869155764579773,
-0.5647730231285095,
-0.6503472924232483,
-0.1959754228591919,
0.15974554419517517,
-0.23565910756587982,
0.2775962948799... | |
for (node, ncount) in sorted_ndic: sorted_valid_neighbor_IDs.append(node)
# if current node does have valid neighbors, add them to the front of togo list
# in a sorted way
togo[current_node_ID] = sorted_valid_neighbor_IDs
# To display a solution simply
def drawGUI(size, solution):
# GUI Co... | [
-0.06450148671865463,
-0.44936755299568176,
0.31832191348075867,
0.03068055398762226,
-0.12011219561100006,
0.11291947960853577,
-0.10509970039129257,
-0.4051983654499054,
-0.5625249743461609,
-0.8125535249710083,
-0.1095651239156723,
0.3145682215690613,
-0.24090160429477692,
-0.0574259720... | |
0, size*20, size*20)
canvas.pack()
for x in range(0, size*20, 20):
canvas.create_line(x, 0, x, size*20)
canvas.create_line(0, x, size*20, x)
cnt = 1
for el in solution:
canvas.create_text((el % size)*20 + 4,(el / size)*20 + 4,text=str(cnt), anchor=Tkinter.NW)
cnt += 1
... | [
-0.2880544066429138,
-0.34365054965019226,
1.0469907522201538,
-0.020175011828541756,
0.2107943892478943,
0.07125508785247803,
0.09588099271059036,
-0.2742556631565094,
-0.36513152718544006,
-0.7825956344604492,
-0.25595998764038086,
0.2924906015396118,
0.15446388721466064,
0.0381113626062... | |
everybody sharing their knowledge and ideas. | [
0.4674305319786072,
0.6941564083099365,
0.13640162348747253,
0.03533705323934555,
-0.28025591373443604,
-0.4991709291934967,
0.0638081356883049,
0.3972141444683075,
-0.3592527508735657,
-0.5399830937385559,
-0.17207062244415283,
0.28478917479515076,
0.0779634490609169,
-0.01227418798953294... | |
Is there any way to change the `BackColor` of the border of a panel or similar control?
I am trying to "highlight" the user control when I hover the mouse over the user control.
Here's a simple class that highlights controls on the form with a border:
```
public class Highlighter : Control
{
public vo... | [
0.1630116105079651,
-0.2044043391942978,
0.4982922375202179,
-0.11703640222549438,
0.05643341690301895,
-0.06536635011434555,
-0.15968210995197296,
-0.2691207528114319,
-0.2610284686088562,
-0.5709412097930908,
-0.12588922679424286,
0.31970182061195374,
-0.5011287331581116,
0.0767614394426... | |
r.Inflate(3, 3);
Bounds = r;
}
protected override void OnPaint(PaintEventArgs e)
{
base.OnPaint(e);
e.Graphics.FillRectangle(Brushes.Red, e.ClipRectangle);
}
}
```
Then, in your form, set everything to use it:
```
private void Form1_Load(o... | [
0.20878690481185913,
-0.27024754881858826,
0.7050012350082397,
-0.34830114245414734,
0.151717871427536,
0.18543575704097748,
0.40914657711982727,
-0.630841076374054,
-0.05168470740318298,
-0.5623329281806946,
-0.19547908008098602,
0.8030140399932861,
-0.4006630778312683,
-0.106353171169757... | |
{
foreach (Control c in Controls)
{
c.MouseEnter += mouseEnter;
c.MouseLeave += mouseLeave;
}
}
private void mouseEnter(object sender, EventArgs e)
{
_highlighter.SetTarget(sender as Control);
_highlighter.Visible = true; | [
-0.22485968470573425,
-0.3806123435497284,
0.41331398487091064,
-0.23851685225963593,
0.3725479543209076,
0.10075704753398895,
0.387018620967865,
-0.1349695473909378,
-0.08820320665836334,
-0.4216307997703552,
-0.5145167708396912,
0.6796143054962158,
-0.5309990048408508,
-0.016810946166515... | |
}
private void mouseLeave(object sender, EventArgs e)
{
_highlighter.Visible = false;
}
```
Then, in the constructor, just create the highlighter:
```
public Form1()
{
InitializeComponent();
_highlighter = new Highlighter();
Controls.Add(_highlighter);
}
``` | [
0.0020019016228616238,
-0.3335612416267395,
0.4561896026134491,
-0.4681856036186218,
0.3376823663711548,
-0.09293697774410248,
0.09049921482801437,
-0.08049498498439789,
-0.19301837682724,
-0.554701566696167,
-0.35233980417251587,
0.6431021094322205,
-0.6538822650909424,
-0.147166788578033... | |
Is it possible to create URLs direct to items on the Apple iTunes store programmatically?
I have noticed that [last.fm](http://last.fm) and similar sites have links which take the user directly to a part of the iTunes store, such as an album page.
The URL for the link is created by last.fm. Here's an example of such ... | [
0.12018744647502899,
0.17320920526981354,
0.520471453666687,
0.10406136512756348,
-0.0836038887500763,
-0.15799981355667114,
0.23885580897331238,
0.03145495057106018,
-0.5261446237564087,
-0.43105873465538025,
-0.09183596074581146,
0.3834303319454193,
-0.047753412276506424,
0.2418037205934... | |
[LinkShare API](http://brandontreb.com/money-you-might-be-missing-out-on-linkshare-api-integration/):
```
http://brandontreb.com/money-you-might-be-missing-out-on-linkshare-api-integration/
```
[link text](http://www.onemanclapping.org/2009/01/itms-link-generator-api.html) | [
-0.21519935131072998,
0.046783167868852615,
0.24895136058330536,
0.23936526477336884,
-0.08675685524940491,
-0.12098302692174911,
0.0002492220082785934,
0.06572050601243973,
-0.42612209916114807,
-0.0370645746588707,
0.07773414254188538,
0.4849560558795929,
-0.13264554738998413,
-0.0994339... | |
What are the common things you remove when clearing up your source tree? For instance:
1. Deleting bin/obj/debug/release directories
2. Removing temporary/cache files, such as ReSharper cache files
3. Removing source control files/directories, such as \_svn and .svn
Also, what are the things you commonly do with your... | [
0.5262332558631897,
-0.09658990055322647,
-0.4075552225112915,
-0.035145990550518036,
-0.17120668292045593,
-0.34082287549972534,
0.1954740583896637,
0.08317214995622635,
-0.14688678085803986,
-0.6454847455024719,
-0.21043142676353455,
0.20388421416282654,
-0.5352200269699097,
-0.013832376... | |
I'm being stupid here but I can't get the function signature for the predicate going to find\_if when iterating over a string:
```
bool func( char );
std::string str;
std::find_if( str.begin(), str.end(), func ) )
```
In this instance google has not been my friend :( Is anyone here?
```
#include <iostream>
#include... | [
-0.06340429931879044,
0.08275648206472397,
0.6081293225288391,
-0.249936044216156,
0.3252907991409302,
-0.16295169293880463,
0.7836298942565918,
-0.03424586355686188,
-0.01805495098233223,
-0.38775956630706787,
-0.11216121166944504,
0.6469247937202454,
-0.41555047035217285,
-0.134454652667... | |
}
else {
std::cout << "not found\n";
}
}
``` | [
-0.1143210381269455,
0.1613842397928238,
0.048507239669561386,
-0.3201388120651245,
0.5107939839363098,
-0.2966478765010834,
0.13162733614444733,
0.23235799372196198,
0.05766180530190468,
-0.3766927421092987,
-0.6045254468917847,
0.7964025735855103,
-0.29834115505218506,
0.0636424049735069... | |
I have a web application using the .Net 2.0 framework. The whole website is restricted to authenticated users using Windows authentication. These rules are set in the web.config file the following way :
```
<location path="/">
<system.web>
<authorization>
<allow roles="CustomerAdministrator, Ma... | [
0.45537304878234863,
0.39894402027130127,
0.7032703757286072,
-0.24630723893642426,
0.24449270963668823,
-0.47206583619117737,
0.26191502809524536,
-0.07877569645643234,
0.1595950424671173,
-0.6128615140914917,
-0.13704648613929749,
0.26035645604133606,
-0.18833626806735992,
0.352223008871... | |
<allow users="*"/>
</authorization>
</system.web>
</location>
[...]
```
As shown above, I have one page that I want to be public. Up to this point, everything works fine. We recently added url rewriting for nicer urls, so I set a rewrite rule for the public page :
```
<RewriterConfig>
<Rules>
... | [
0.24877667427062988,
0.04871241748332977,
0.8915172815322876,
-0.1438155323266983,
0.062358297407627106,
-0.1970335990190506,
0.3233570158481598,
-0.08974197506904602,
-0.264483243227005,
-0.8020294308662415,
-0.03221942111849785,
0.465680330991745,
-0.1820312738418579,
0.1427328735589981,... | |
</RewriterRule>
</Rules>
</RewriterConfig>
```
Now, when accessing the public page by its direct url, it works as expected (no authentication required), but when I try to access the page through its rewrited url, it asks for authentication.
Does anyone know where this problem my come from ?
If you have not yet y... | [
0.08949506282806396,
0.2025928944349289,
0.6925709247589111,
-0.06916795670986176,
0.06749056279659271,
-0.3563079237937927,
0.45215094089508057,
-0.25703081488609314,
-0.1044941321015358,
-0.7322497963905334,
-0.14527688920497894,
0.6644364595413208,
-0.320819616317749,
0.1487620770931244... | |
I am trying to statically cross compile Mono for MIPS. I am able to compile Mono, but it is always dynamically linked with it's dependencies, even though I specify static to the compiler.
I wrote a test program and I am able to statically compile it with my toolchain and run it on the target platform. I am not sure if... | [
0.42365556955337524,
0.2712613642215729,
0.07530257850885391,
-0.2232488989830017,
-0.20023538172245026,
-0.019484397023916245,
0.21686629951000214,
0.03317944332957268,
-0.15651275217533112,
-0.29184815287590027,
-0.03331942483782768,
0.579232394695282,
-0.43631938099861145,
0.19934700429... | |
and gettext. I believe GLib is a direct dependency and GLib depends on pkg-config and gettext.
I can post my environment variables and configure command if needed.
Well, it's been a while since I tried this, but I wanted to report what I learned. For one, I found out that the MIPS processor is 64-bit and not 32-bit li... | [
0.1688251793384552,
-0.022241761907935143,
0.15952107310295105,
-0.17068682610988617,
-0.1921142041683197,
-0.15283232927322388,
0.2323632687330246,
0.18719545006752014,
-0.1385633647441864,
-0.8212242722511292,
-0.18560032546520233,
0.7589823603630066,
-0.7809232473373413,
0.0254771839827... | |
MIPS 64-bit architecture based off the 32-bit port that was already done. The 64-bit port was being done for a company called [SiCortex, Inc.](http://sicortex.com) and N-iX was trying to get their patches applied to the main Mono development trunk. You can check this [forum thread](http://www.nabble.com/-PATCH--Mono-po... | [
0.45942947268486023,
0.20299310982227325,
-0.06703147292137146,
-0.05256936699151993,
-0.12075988203287125,
-0.20274552702903748,
0.45377117395401,
0.2177516520023346,
-0.3042200207710266,
-0.39069026708602905,
-0.13850516080856323,
0.40190452337265015,
-0.5529371500015259,
0.4545603096485... | |
didn't support MIPS 64-bit yet. I will also need to see if the 64-bit port patches ever got applied to Mono.
I hope this helps. | [
0.34889549016952515,
0.23024125397205353,
-0.03906024247407913,
0.186289444565773,
0.01879533752799034,
-0.13718700408935547,
0.6801510453224182,
0.4236896336078644,
-0.19022120535373688,
-0.24405184388160706,
0.08084709942340851,
0.7153586149215698,
-0.1530684530735016,
0.1946695297956466... | |
I have a Crystal report with 50 odd subreports, each with loads of parameters. Switching it from one database to another takes ages as the Crystal Reports IDE insists that you enter all the parameters for each sub-report.
I'm wondering if it's possible to write a quick tool in C# to view the current database config of... | [
0.34837454557418823,
0.38420650362968445,
0.213187113404274,
0.3276728689670563,
-0.050020091235637665,
-0.02538113109767437,
0.26998376846313477,
0.13081511855125427,
-0.4308333694934845,
-0.4970511198043823,
0.2507753372192383,
0.372623085975647,
-0.12049244344234467,
0.2388177067041397,... | |
names where neccesary.
```
Private Sub ProcessFile(ByVal FileName As String)
Dim CR As Engine.ReportDocument = Nothing
Try
CR = New Engine.ReportDocument
CR.Load(FileName, CrystalDecisions.Shared.OpenReportMethod.OpenReportByDefault)
'Recurse thru Report
... | [
0.06350371986627579,
0.19473856687545776,
0.41187116503715515,
0.041340991854667664,
0.0470392145216465,
0.12715010344982147,
0.25332188606262207,
-0.4345172941684723,
-0.261661171913147,
-0.4476911425590515,
-0.26128947734832764,
0.5996190905570984,
-0.13532409071922302,
0.683367192745208... | |
CR.SaveAs("OutPutFilePath")
Catch ex As Exception
MessageBox.Show(ex.Message)
Finally
If Not CR Is Nothing Then
CR.Close()
CR.Dispose() | [
0.13918434083461761,
-0.10570799559354782,
0.49086129665374756,
-0.08310949802398682,
0.013059495948255062,
-0.06922830641269684,
0.3104504942893982,
-0.2746730148792267,
-0.34269383549690247,
-0.5538690090179443,
-0.2850496470928192,
0.4888474643230438,
-0.3851812481880188,
0.173582971096... | |
End If
End Try
End Sub
Private Sub RecurseAndRemap(ByVal CR As Engine.ReportDocument)
For Each DSC As CrystalDecisions.Shared.IConnectionInfo In CR.DataSourceConnections
DSC.SetLogon("YourUserName", "YourPassword")
DSC.SetConnection("YouServerName", "YourDatabaseName", F... | [
-0.32581204175949097,
-0.061332959681749344,
0.7711150050163269,
0.2924324572086334,
-0.04773544520139694,
-0.022854940965771675,
0.44206538796424866,
-0.37242963910102844,
-0.012499046511948109,
-0.6027055382728577,
-0.3486884832382202,
0.28233572840690613,
-0.09708613157272339,
0.4581966... | |
Table.LogOnInfo.ConnectionInfo.UserID = "YourUserName"
Table.LogOnInfo.ConnectionInfo.Password = "YourPassword"
Next
If Not CR.IsSubreport Then
For Each SR As Engine.ReportDocument In CR.Subreports
RecurseAndRemap(SR)
Next
End If | [
-0.4837212860584259,
-0.028272809460759163,
0.8586514592170715,
0.06780631095170975,
0.03645044565200806,
-0.06929358839988708,
0.10008365660905838,
-0.3166707754135132,
-0.4030398428440094,
-0.7378097772598267,
-0.4032991826534271,
0.41788578033447266,
0.01609058864414692,
0.3801069855690... | |
End Sub
```
Hope that helps Cheers Ben | [
0.02776598371565342,
0.5834593772888184,
0.8563017845153809,
-0.11171311885118484,
-0.15807153284549713,
-0.46345770359039307,
0.6219483017921448,
0.36713141202926636,
0.1908850222826004,
-0.48063451051712036,
-0.6138765811920166,
0.15643154084682465,
0.13845346868038177,
0.329199939966201... | |
In Perl, it's often nice to be able to assign an object, but specify some fall-back value if the variable being assigned from is 'undef'. For instance:
```
my $x = undef;
my $y = 2;
my $a = $x || $y;
```
After this,
```
$a == 2
```
Is there a concise way to achieve this in Python if the value x is None, or would ... | [
0.045571472495794296,
0.047624677419662476,
0.10864176601171494,
-0.3409518301486969,
-0.26551976799964905,
-0.34682947397232056,
0.21467013657093048,
-0.02017058990895748,
-0.2528778910636902,
0.10806997120380402,
-0.17660994827747345,
0.7218661904335022,
-0.4688941240310669,
-0.106976613... | |
value being undefined, but 'undef' in Perl, which is not really the same thing. But the question as originally worded didn't make this clear.
Since 2.5:
If you want to fall back **only** on None:
```
a = x if x is not None else y
```
If you want to fall back also on empty string, `false`, `0` etc.:
```
a = x if ... | [
-0.07934211939573288,
-0.07311790436506271,
0.3128011226654053,
-0.1774260401725769,
-0.18633043766021729,
-0.15811464190483093,
0.2336161881685257,
-0.16078682243824005,
-0.1189689189195633,
-0.09954355657100677,
-0.16194061934947968,
0.4781586527824402,
-0.19223815202713013,
0.2089351266... | |
Which one to use for process monitoring and why?
Both solutions are good, and there are some pros and cons for both of them.
God config file is written in Ruby, so you can do basically everything Ruby allows you to do, and it's a lot of stuff. Monit has to be configured using its own syntax, it's usually OK but more r... | [
0.29036974906921387,
0.1435743123292923,
0.25656643509864807,
0.0998150110244751,
-0.0434052050113678,
0.15974445641040802,
0.3387677073478699,
0.10587722808122635,
-0.4452863037586212,
-0.6516386866569519,
0.19344758987426758,
0.9404135942459106,
-0.24367190897464752,
-0.21047542989253998... | |
I prefer god, as it's more configurable.
Here's a very good [screencast on god](http://railscasts.com/episodes/130-monitoring-with-god). There's also a lot of feedback in comments to this screencast. | [
0.2894825339317322,
-0.11763729900121689,
0.25322839617729187,
0.035709574818611145,
-0.180413618683815,
-0.059151001274585724,
0.629264771938324,
0.2749335765838623,
-0.31438833475112915,
-0.7204540967941284,
-0.07038531452417374,
0.6986947655677795,
0.1808590292930603,
-0.156383976340293... | |
I am retrieving 3 fields from a database, and by default, only the username field will have content. The other information will be added in from a user application. I want to show the field as "No Info" if there is no entry in the field. I am trying to use both empty() and is\_null() to no avail. A var\_dump of $row['f... | [
-0.051560863852500916,
0.08027605712413788,
0.44203874468803406,
-0.43022722005844116,
0.07582096010446548,
0.00034569704439491034,
0.5302315950393677,
-0.19544246792793274,
-0.10109423846006393,
-0.5375176072120667,
-0.41574203968048096,
0.454033762216568,
-0.516976535320282,
0.2746239602... | |
mysqli_connect_error();
exit;
}
$table = 'USERS';
$brand = '%' . $searchstring . '%';
$rows = getRowsByArticleSearch($brand, $table);
echo "<table border='0' width='100%'><tr>" . "\n";
echo "<td width='15%'>Username</td>" . "\n";
echo "<td width='15%'>Firstname</td>" . "\n";
echo "<td width='15%'>Surname</td>" . "\... | [
-0.3067098557949066,
-0.09029210358858109,
0.5877425670623779,
-0.4703752398490906,
0.2710426151752472,
0.16502869129180908,
0.4636628031730652,
-0.5728272199630737,
-0.020751027390360832,
-0.4360944926738739,
-0.574383556842804,
0.4698069989681244,
-0.3406829833984375,
0.3438432216644287,... | |
echo '<tr>' . "\n";
echo '<td><a href="#" onclick="updateByUser(\''. $row['username'] .'\',\''.$subcat.'\')">'.$row['username'].'</a></td>' . "\n";
echo '<td><a href="#" onclick="updateByUser(\''. $row['username'] .'\', \''.$subcat.'\')">'.$row['firstname'].'</a></td>' . "\n";
echo '<td><a href="#" onclick=... | [
-0.031609222292900085,
-0.20265622437000275,
0.48405900597572327,
-0.31943830847740173,
0.11783380806446075,
0.1120181679725647,
0.5654172897338867,
-0.8656989932060242,
-0.21156588196754456,
-0.38154321908950806,
-0.4464386999607086,
0.39099329710006714,
-0.507084310054779,
0.179264098405... | |
$getRecords->bind_result($username, $firstname, $lastname);
$rows = array();
while ($getRecords->fetch()) {
$row = array(
'username' => $username, | [
-0.3673899173736572,
-0.27693623304367065,
0.8217277526855469,
-0.23378099501132965,
0.038878701627254486,
0.16120044887065887,
0.10398441553115845,
-0.37391504645347595,
-0.21195732057094574,
-0.4751589298248291,
-0.4294922947883606,
0.4257942736148834,
-0.37329667806625366,
0.19378466904... | |
'firstname' => $firstname,
'lastname' => $lastname,
);
$rows[] = $row;
}
return $rows;
} else { | [
-0.6795147061347961,
0.023371480405330658,
0.2531625032424927,
-0.28455114364624023,
0.28537723422050476,
0.20772159099578857,
0.06944095343351364,
-0.20503540337085724,
-0.11579417437314987,
-0.7166609168052673,
-0.5269361138343811,
0.5216094851493835,
-0.38282087445259094,
0.203021079301... | |
print_r($con->error);
}
}
```
Turn on display\_errors and set error\_reporting to E\_ALL (either in php.ini or in a htaccess). This should reveal any non-obvious mistakes.
Try the following for checking if something is empty:
```
<?php
if(!isset($row['...']) || empty($row['...']))
{
$row['firstname'] = 'No I... | [
-0.14229801297187805,
0.19514353573322296,
0.3064223527908325,
-0.16893766820430756,
0.04699260741472244,
-0.06382206082344055,
0.22757108509540558,
-0.05118358135223389,
0.07766322791576385,
-0.5819777846336365,
-0.27578258514404297,
0.6854963302612305,
-0.34263691306114197,
0.13437737524... | |
Suppose i have some tabs (e.g. jquery tab) and I want to dynamically load some page in each tab, I can do that in two ways
1. Use jquery ajax tabs (basically filling div with ajax data)
or
2. Each tab can contain an iframe and page loaded into that.
**Q1**. I see no difference between two approaches to user, is ther... | [
-0.02368207834661007,
-0.17906902730464935,
0.10682987421751022,
0.12206798046827316,
-0.3659913241863251,
0.08828163892030716,
-0.07383760809898376,
0.14500032365322113,
-0.12745597958564758,
-0.9458184242248535,
0.17972774803638458,
0.511056125164032,
-0.2366292029619217,
-0.159203022718... | |
the ajax approach. With iframes you'll just get an ugly 404 or 500 error in the middle of your page. But with ajax you can detect the error and display a more user-friendly error message.
It also depends on what data you're loading into your page. If you control the html being loaded in, you can avoid or fix any displ... | [
-0.0032009687274694443,
-0.044612303376197815,
0.19963526725769043,
0.3340514600276947,
-0.4153962731361389,
-0.27962160110473633,
0.13077831268310547,
0.22108614444732666,
-0.1953245848417282,
-0.976362943649292,
-0.05022648349404335,
0.6493960618972778,
-0.29942265152931213,
-0.385806292... | |
approach works best with screen readers, etc. | [
-0.03807423636317253,
-0.10656702518463135,
0.4025426208972931,
0.06974323838949203,
0.09651042520999908,
-0.23769046366214752,
0.039048291742801666,
-0.0678156241774559,
0.14902633428573608,
-0.9604928493499756,
-0.08047451823949814,
0.6577367186546326,
0.4061204493045807,
-0.458537518978... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.