text stringlengths 0 30.5k | title stringclasses 1
value | embeddings listlengths 768 768 |
|---|---|---|
I'm now switching to `VIM` from TextMate. I found `^+W` in INSERT mode very useful. However, I'd like to delete not only the word before cursor, but the word after or around cursor as well.
I did some googling, but the only thing I can find was `^+W` to delete word BEFORE cursor.
What you should do is create an imap o... | [
-0.02730780467391014,
-0.2841127812862396,
0.5145860314369202,
-0.14891944825649261,
-0.30439797043800354,
0.0015870819333940744,
0.4631336033344269,
0.1829579919576645,
-0.12092322111129761,
-0.7691777944564819,
-0.4587300419807434,
0.8558686971664429,
-0.3435654640197754,
0.2664690911769... | |
I have the following ant `build.xml`:
```
<path id="antclasspath">
<fileset dir="lib">
<include name="*.jar"/>
</fileset>
</path>
<property name="pathvar" refid="antclasspath" />
<echo message="Classpath is ${pathvar}"/>
<sql
driver="oracle.jdbc.driver.OracleDriver"
url="jdbc:oracle:thin:@mys... | [
-0.03514610603451729,
0.287231981754303,
0.3380056917667389,
-0.300033837556839,
-0.15094411373138428,
0.336839884519577,
0.1934770792722702,
-0.7069417834281921,
0.11213676631450653,
-1.0238311290740967,
0.5028185248374939,
0.28919899463653564,
-0.38993480801582336,
0.19569705426692963,
... | |
is the problem with this build.xml? It is quite strange that it was working few times yesterday, but never again.
Using `classpath="E:\MyDir\lib\ojdbc14-10_2_0_3.jar"` in the task gives the same error message.
I'm using ant 1.7.1 (built in Netbeans 6.5)
The syntax looks correct to me. Try passing the `-v` switch to y... | [
-0.13911278545856476,
-0.002083731349557638,
0.210036501288414,
0.11512341350317001,
-0.39939504861831665,
0.04986047372221947,
0.3787224292755127,
0.028767021372914314,
-0.26336246728897095,
-1.0781997442245483,
0.32621511816978455,
0.3028440773487091,
-0.6459516882896423,
0.1812691539525... | |
1 of 1 SQL statements executed successfully
```
If that doesn't help, you can try passing the `-debug` switch, which will print out reams of information including classloader debugging.
Finally, have you verified that your ojdbc jar is not corrupt and does, in fact, contain the OracleDriver class? | [
0.19738037884235382,
0.2874181270599365,
-0.13307303190231323,
0.16784726083278656,
0.01824878714978695,
-0.27022671699523926,
0.4468320608139038,
0.09033005684614182,
0.14265382289886475,
-0.2634218633174896,
0.07618441432714462,
0.60068678855896,
-0.2861960828304291,
0.10102663934230804,... | |
It's well-known that the order of evaluation of a function's arguments in unspecified and can differ between different compilers.
What doesn't seem so clear is whether function calls can be interleaved, in the following sense:
```
f(g(h()), i(j()))
```
Let's assume the compiler chooses to evaluate f's first paramet... | [
-0.3373189866542816,
0.18765674531459808,
0.01668676733970642,
-0.23282741010189056,
-0.30168798565864563,
0.22297418117523193,
0.20382599532604218,
-0.398488849401474,
0.21765698492527008,
-0.27529168128967285,
-0.20542271435260773,
0.7729909420013428,
-0.43540823459625244,
-0.08135128766... | |
effect before the function is entered. | [
-0.14716263115406036,
0.02288103476166725,
0.3531920611858368,
-0.47958439588546753,
-0.10247355699539185,
-0.1613018810749054,
0.30660364031791687,
0.013341264799237251,
0.0935552641749382,
-0.5509248375892639,
-0.36840394139289856,
0.39613285660743713,
0.1314840018749237,
-0.015109945088... | |
I've set a textbox to read-only. When the user clicks on it, a calendar is displayed and the user selects the date which inputs into the read-only textbox.
But when I try to enter the data into the database, it shows null value. What is wrong?
There is a little bit of strangeness when it comes to the ASP.NET `Readonly... | [
0.4897530972957611,
0.08050531148910522,
0.584044873714447,
-0.05819891020655632,
-0.0032607675530016422,
-0.13606293499469757,
0.06328104436397552,
0.009497923776507378,
-0.18692396581172943,
-0.5910767912864685,
0.01802421174943447,
0.3913496732711792,
-0.3302244246006012,
0.220528602600... | |
still allow you to retrieve the value of the input when it posts back to the server. | [
0.3522751033306122,
0.06904814392328262,
0.23495624959468842,
0.2891172170639038,
0.18637093901634216,
-0.1634806990623474,
0.008231326937675476,
0.42112135887145996,
-0.22637812793254852,
-0.4260281026363373,
0.1992539018392563,
0.34905287623405457,
0.24851420521736145,
0.1230440959334373... | |
My main process calls an external library method. This method sometimes hangs. I can not fix the external library because another company is responsible for it.
I want to use a Thread for the library calls with a defined execution timer. When the method call takes to long, the Thread with the Runnable in which the met... | [
0.499571293592453,
-0.11472412198781967,
0.5174939632415771,
0.02456824481487274,
0.15199841558933258,
-0.2657319903373718,
0.23538830876350403,
0.10513252019882202,
-0.3954930901527405,
-0.30373743176460266,
0.1752958595752716,
0.6693152189254761,
-0.3505786657333374,
0.4009130895137787,
... | |
design pattern i can use or a internet page i can read some informations?
Thanks
Take a look at the `java.lang.concurrent` package in Java 5 and later, in particular the `CompletionService` interface and the classes that implement it.
This interface includes calls that allow you to submit a task and either wait for i... | [
0.5826894640922546,
-0.19951613247394562,
-0.0417875200510025,
0.0769561156630516,
-0.10121826082468033,
-0.11018228530883789,
0.26003342866897583,
-0.20727354288101196,
-0.2719566524028778,
-0.9273427128791809,
0.35039883852005005,
0.2616952359676361,
-0.10745856165885925,
-0.150405511260... | |
Good afternoon,
i am currently wrestling with an old .dll which functionality I have to re-use in a .Net application & I came so far to import the basic/easy functions/methods that return bool etc, but some do in fact also expect (or return) an type that is declared within the .dll.
How would I handle this? How would... | [
0.13720665872097015,
0.29731282591819763,
0.5967380404472351,
0.1563255488872528,
-0.16514424979686737,
-0.2509106397628784,
0.41437676548957825,
0.009585058316588402,
-0.17443223297595978,
-0.8354859352111816,
-0.07957499474287033,
0.36757349967956543,
0.4019657373428345,
-0.0656550154089... | |
your .NET application, and mark it with the `StructLayout` attribute (`LayoutKind.Sequential` is the most common). Then you should be able to pass a reference to the struct.
The [Platform Invoke Tutorial on MSDN](http://msdn.microsoft.com/en-us/library/aa288468.aspx#pinvoke_custommarshaling) is also quite helpful. | [
0.15105819702148438,
-0.15583950281143188,
0.3867802321910858,
0.2678700089454651,
0.01424059271812439,
-0.15749327838420868,
0.2909480035305023,
0.3330824375152588,
-0.3271101415157318,
-0.5718303918838501,
-0.04683094099164009,
0.4764593243598938,
0.05220592021942139,
0.08365572988986969... | |
Let me frame it this way..
"Say I have an application server running on a single core Intel processor & serving 200 concurrent users. Will moving the hardware to a dual core system enable my application server to now serve say 350 concurrent users" ?
The base question I'm hoping to address is - "Can addition of extr... | [
0.3308413326740265,
0.1976713389158249,
0.28087884187698364,
0.256479412317276,
0.2707221210002899,
0.21780791878700256,
-0.12258993089199066,
-0.046809617429971695,
-0.442865788936615,
-0.5757421851158142,
-0.040589939802885056,
0.4333440661430359,
0.021358106285333633,
0.2513307929039001... | |
buy a computer with faster memory.
If you are disk bound, and doing lots of serving static content, consider an SSD drive.
If its your database bound, consider that.
But usually you're "configuration bound", and tweaking your configuration e.g. changing the number of threads in a pool, or such, will give you immedia... | [
0.6597973108291626,
-0.2801472246646881,
-0.09201207011938095,
0.6187708377838135,
0.38450315594673157,
-0.24104128777980804,
-0.2547907531261444,
0.21932898461818695,
-0.2810673713684082,
-0.711258590221405,
-0.16835393011569977,
0.6447151303291321,
0.05113692209124565,
0.1377018243074417... | |
How can I put some text into a `TextBox` which will be removed automatically when the user types something in it?
This is a sample which demonstrates how to create a watermark textbox in WPF:
```
<Window x:Class="WaterMarkTextBoxDemo.Window1"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xm... | [
-0.05458720028400421,
-0.1616024523973465,
0.578951358795166,
-0.027467111125588417,
-0.11144548654556274,
0.1147189810872078,
0.059889499098062515,
-0.6806039810180664,
-0.023575933650135994,
-0.576579213142395,
0.3935439884662628,
0.2529153823852539,
-0.14658455550670624,
0.0158840324729... | |
<local:TextInputToVisibilityConverter x:Key="TextInputToVisibilityConverter" />
<Style x:Key="EntryFieldStyle" TargetType="Grid" >
<Setter Property="HorizontalAlignment" Value="Stretch" />
<Setter Property="VerticalAlignment" Value="Center" />
<Setter Property="Margin" Value... | [
-0.33927032351493835,
-0.49581632018089294,
0.5919032096862793,
-0.17032472789287567,
-0.05634114518761635,
0.15174438059329987,
-0.1860257089138031,
-0.35901975631713867,
-0.1554037481546402,
-1.0013630390167236,
-0.18855591118335724,
0.5635220408439636,
-0.04161970689892769,
0.1023691371... | |
<RowDefinition />
<RowDefinition />
<RowDefinition />
</Grid.RowDefinitions>
<Grid Grid.Row="0" Background="{StaticResource brushWatermarkBackground}" Style="{StaticResource EntryFieldStyle}" >
<TextBlock Margin="5,2" Text="This prompt dissappears as you type..." For... | [
-0.18676020205020905,
-0.5076179504394531,
0.7383239269256592,
-0.10976817458868027,
0.03363129496574402,
0.16899125277996063,
0.12094371765851974,
-0.5325391292572021,
-0.007899081334471703,
-0.7424941062927246,
-0.01574830524623394,
0.6910903453826904,
-0.2696417570114136,
0.025919888168... | |
<TextBox Name="txtUserEntry" Background="Transparent" BorderBrush="{StaticResource brushWatermarkBorder}" />
</Grid>
<Grid Grid.Row="1" Background="{StaticResource brushWatermarkBackground}" Style="{StaticResource EntryFieldStyle}" >
<TextBlock Margin="5,2" Text="This dissappears as the con... | [
-0.11139427125453949,
-0.41344666481018066,
0.6663934588432312,
-0.08664698898792267,
-0.10966752469539642,
0.09632919728755951,
0.1500757932662964,
-0.6476404666900635,
-0.10259589552879333,
-0.6315715312957764,
0.17584708333015442,
0.7017532587051392,
-0.2471838742494583,
0.1858459115028... | |
<Binding ElementName="txtUserEntry2" Path="Text.IsEmpty" />
<Binding ElementName="txtUserEntry2" Path="IsFocused" />
</MultiBinding>
</TextBlock.Visibility> | [
-0.4186657965183258,
-0.1333337426185608,
0.4812479317188263,
-0.15988093614578247,
-0.0640106126666069,
-0.07017121464014053,
0.2739396095275879,
-0.3623381555080414,
-0.3608354330062866,
-0.7778164148330688,
-0.3035387396812439,
0.2603696584701538,
-0.6244381070137024,
0.0571380481123924... | |
</TextBlock>
<TextBox Name="txtUserEntry2" Background="Transparent" BorderBrush="{StaticResource brushWatermarkBorder}" />
</Grid>
</Grid>
</Window>
```
TextInputToVisibilityConverter is defined as:
```
using System;
using System.Windows.Data;
using System.Windows;
namespace WaterMarkTextB... | [
-0.06279108673334122,
-0.1528366208076477,
0.710433304309845,
0.022972777485847473,
-0.045288097113370895,
0.24300245940685272,
0.16315309703350067,
-0.3985883891582489,
-0.039552684873342514,
-0.6270145177841187,
-0.06479918956756592,
0.6005022525787354,
-0.292721152305603,
0.173441112041... | |
// (to avoid crash bugs for views in the designer)
if (values[0] is bool && values[1] is bool)
{
bool hasText = !(bool)values[0];
bool hasFocus = (bool)values[1]; | [
0.1401282250881195,
-0.09547001868486404,
0.4035724699497223,
-0.3938198387622833,
0.44714388251304626,
-0.25857850909233093,
0.35423704981803894,
-0.27445751428604126,
-0.03911018371582031,
-0.4976102113723755,
-0.659538209438324,
0.685923159122467,
-0.2807336151599884,
-0.202101290225982... | |
if (hasFocus || hasText)
return Visibility.Collapsed;
}
return Visibility.Visible;
}
public object[] ConvertBack( object value, Type[] targetTypes, object parameter, System.Globalization.CultureInfo culture )
{
throw new NotImplementedExc... | [
-0.037613194435834885,
-0.26033756136894226,
0.34827566146850586,
-0.24527332186698914,
0.17418496310710907,
-0.20709048211574554,
0.33281126618385315,
-0.05863379314541817,
0.06918216496706009,
-0.7183247804641724,
-0.5341311097145081,
0.4317275285720825,
-0.42264994978904724,
0.200918287... | |
}
}
}
```
**Note:** This is not my code. I found it [here](http://www.codeproject.com/Articles/26977/A-WatermarkTextBox-in-lines-of-XAML), but I think this is the best approach. | [
0.14871923625469208,
0.37783610820770264,
0.16439877450466156,
-0.3939012587070465,
0.2532675862312317,
-0.3582848608493805,
0.1743154078722,
0.22260645031929016,
0.09058185666799545,
-0.5936640501022339,
-0.175661101937294,
0.3502817153930664,
-0.1540379524230957,
0.03677745163440704,
0... | |
Is it any possible to get my listbox to be shown outside of the form's bounds?
One of the solutions is to make the form itself transparent, and add the panel instead of the form for the background.
But is there any other, more delightful way to do that?
UPD:
i need to make a custom autocomplete for textbox, to suppo... | [
0.49404293298721313,
-0.2642205059528351,
0.7778813242912292,
0.01665637083351612,
0.029600845649838448,
-0.14213542640209198,
0.03896990790963173,
-0.12408990412950516,
-0.35670456290245056,
-0.68639075756073,
-0.06562058627605438,
0.3384546637535095,
-0.2273060381412506,
-0.1270789951086... | |
private System.Windows.Forms.Control _content;
private System.Windows.Forms.ToolStripControlHost _host;
public PopupWindow(System.Windows.Forms.Control content)
{
//Basic setup...
this.AutoSize = false;
this.DoubleBuffered = true;
this.ResizeRedraw = true;
this._con... | [
0.34782519936561584,
-0.3231647312641144,
0.5853641033172607,
0.2336442768573761,
0.2661299407482147,
-0.07556413859128952,
0.20444230735301971,
-0.335362046957016,
-0.22400063276290894,
-0.5997432470321655,
-0.48398858308792114,
0.5635449886322021,
-0.4991165101528168,
0.01249517686665058... | |
content.MinimumSize;
this.MaximumSize = content.Size;
this.Size = content.Size;
content.Location = Point.Empty;
//Add the host to the list
this.Items.Add(this._host);
}
}
popup = new PopupWindow(listbox1);
PopupWindow.show();
``` | [
0.05833584442734718,
-0.1654062718153,
0.881182074546814,
-0.133964404463768,
0.0409492664039135,
-0.013741284608840942,
0.03784950450062752,
-0.02567281946539879,
-0.6123934984207153,
-0.6472117900848389,
-0.6398616433143616,
0.2262895703315735,
-0.5941095352172852,
0.5224088430404663,
... | |
I just did a fresh install of lamp stack on ubuntu and enabled the mod\_rewrite module for my default website. What I want is something similar to the drupal's queries, when the whole query string is kept in one variable. For this purposes the following mod\_rewrite code may be used:
```
RewriteRule ^(.*)$ home.php?q=... | [
0.2733246982097626,
0.3043116629123688,
0.7394660115242004,
-0.5844940543174744,
0.05495181307196617,
-0.017956530675292015,
0.50565505027771,
-0.14632557332515717,
-0.1434861123561859,
-0.8275809288024902,
0.0977930948138237,
0.6427893042564392,
-0.30952996015548706,
0.2578960061073303,
... | |
home/blablabla )
```
I think it's something with default website or mod\_rewrite configuration, but I just couldn't figure it out...
You have to exclude the `home.php`:
```
RewriteCond %{REQUEST_URI} !^/home\.php$
RewriteRule ^(.*)$ home.php?q=$1 [L,QSA]
```
Or you exclude every existing file:
```
RewriteCond %{... | [
-0.04284489154815674,
0.4811837375164032,
0.6011161208152771,
-0.5135926604270935,
0.44005832076072693,
0.1607155054807663,
0.2217661440372467,
-0.14375053346157074,
0.07022809982299805,
-0.6758118271827698,
-0.22924478352069855,
0.35740214586257935,
-0.34285780787467957,
0.554172515869140... | |
I've got a table which has a repeating background image on the header:
```
thead tr
{
border-collapse:collapse;
background: #D3D2D2 url(images/background-table-header.gif) repeat-x top;
}
```
And this works across in both Firefox and Internet explorer, but if we want certain column headers to show the sorting ... | [
-0.17476288974285126,
0.32606104016304016,
0.9175291061401367,
-0.024649260565638542,
0.15829773247241974,
0.1685323566198349,
0.18699057400226593,
-0.03347615525126457,
-0.2592984139919281,
-0.7058761119842529,
-0.007390267681330442,
0.25447869300842285,
-0.22670261561870575,
0.1766002327... | |
{
background-image: url(images/background-table-sorted-column-ascending.gif);
}
thead th.Sorted.Descending
{
background-image: url(images/background-table-sorted-column-descending.gif);
}
```
The problem is that in Internet Explorer 6 and 7 the background-color from the tr is inherited (found out us... | [
-0.03581319376826286,
0.02584953047335148,
0.6657917499542236,
-0.0932958796620369,
0.25465548038482666,
-0.0046409303322434425,
0.2253265082836151,
0.11555712670087814,
-0.17133867740631104,
-0.7864152193069458,
-0.3067420423030853,
0.978224515914917,
-0.4321158826351166,
0.13973438739776... | |
the other layers between the body and the th).
This is how it should look like:
[](https://i.stack.imgur.com/9Be7R.png)
And this is how it looks like in IE6 and IE7:
[](h... | [
0.2664113938808441,
-0.11529513448476791,
0.7896543741226196,
0.0063706496730446815,
-0.2643117606639862,
0.34909453988075256,
0.21363648772239685,
-0.4417172968387604,
0.023676620796322823,
-0.7984778881072998,
-0.20884545147418976,
0.6199943423271179,
0.07021456956863403,
-0.218094497919... | |
</thead>
<tbody>
<tr>
<td>Data</td>
<td>Data</td>
<td>Data</td>
<td>Data</td>
</tr>
</tbody>
</table>
```
How could I solve this?
It seems IE has a bug - it renders the `tr`'s background image as the cell's background image, so the cell's image overrides the row's... | [
0.05119085684418678,
0.324862003326416,
0.19091328978538513,
-0.11062193661928177,
0.25863155722618103,
0.06718964874744415,
0.09006452560424805,
-0.40377917885780334,
0.0728023499250412,
-0.7434040904045105,
-0.052045341581106186,
0.3110107183456421,
-0.606438159942627,
0.1613173037767410... | |
well with the table element.
So, you can apply your background image to the table instead of the header row:
```
table
{
background: #D3D2D2 url(images/background-table-header.gif) repeat-x top;
}
```
Because the background image is on the table it may extend beyond the header row, so you may also want to set ... | [
0.15450608730316162,
0.1831512153148651,
0.8473275303840637,
-0.37390246987342834,
0.3889632821083069,
-0.08758961409330368,
0.17616528272628784,
-0.33039164543151855,
-0.2954811751842499,
-0.6057723164558411,
-0.12021061778068542,
0.7824121713638306,
-0.20590840280056,
-0.2016054540872573... | |
I have a table with several fields and one field having 3 Comma Separated Values
```
Column 1 Column 2
1 1,2,3
2 2,3,4
3 6,7,8
```
Now i want to run an SQL query which fetches me the rows which have the value i send as an input.
Like in the above example, if i send a value 2 as a... | [
-0.06879714876413345,
0.32693442702293396,
0.4330492615699768,
-0.20002447068691254,
-0.14029662311077118,
0.2725283205509186,
0.03175177797675133,
-0.4378017485141754,
-0.16618722677230835,
-0.49904119968414307,
-0.055211082100868225,
0.3197292685508728,
-0.4069473147392273,
0.18797878921... | |
tried using the IN operator but failed as it does not fetch the rows which have the input i send as the 2nd or 3rd value of the CSV. In this example, it does not return the 1st row.
Can someone please help me out with this?
Thanks in Advance,
Akash
You can use `FIND_IN_SET()`:
```
SELECT column1 FROM table WHERE FIN... | [
-0.3017585575580597,
0.058623865246772766,
0.10650886595249176,
-0.056776709854602814,
-0.03452424705028534,
0.05959026888012886,
0.07658214867115021,
-0.1409209668636322,
-0.15723979473114014,
-0.46809935569763184,
0.01748707704246044,
0.1706332266330719,
-0.2874472439289093,
-0.074070863... | |
Apparently `libigraph` and `python-igraph` are the only packages on earth that can't be installed via `apt-get` or `easy_install` under Ubuntu 8.04 LTS 64-bit.
Installing both from source from source on seems to go smoothly...until I try to use them.
When I run python I get:
```
>>> import igraph
Traceback (most rec... | [
0.08978209644556046,
0.10335074365139008,
0.387139230966568,
-0.2514251470565796,
0.0023034827318042517,
-0.13476726412773132,
0.1509534865617752,
-0.10033170878887177,
0.04405537247657776,
-0.9978295564651489,
-0.18971942365169525,
0.4820181727409363,
-0.4728364944458008,
0.04845304787158... | |
line 30, in <module>
File "build/bdist.linux-x86_64/egg/igraph/core.py", line 7, in <module>
File "build/bdist.linux-x86_64/egg/igraph/core.py", line 6, in __bootstrap__
ImportError: libigraph.so.0: cannot open shared object file: No such file or directory
```
I grabbed the source from here
igraph 0.5.2 = <http:... | [
0.13520307838916779,
0.1489439457654953,
0.38800278306007385,
0.05580374598503113,
0.19155895709991455,
0.03162764385342598,
0.30324414372444153,
-0.12337872385978699,
0.00402898108586669,
-0.7554382681846619,
-0.058716364204883575,
0.3791961371898651,
-0.3726522624492645,
-0.0259858537465... | |
have went to /usr/local/lib ... or is it in the python lib dir?)
3. Find out if the directory where this file is in is missing from your current LD\_LIBRARY\_PATH ('`echo $LD_LIBRARY_PATH`').
4. If this directory is not in here, add it try '`export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/yourdirhere`' (make it permanent by a... | [
0.5427136421203613,
-0.2385464310646057,
0.7592260241508484,
-0.4935898184776306,
0.18931381404399872,
-0.5235673189163208,
0.19638805091381073,
-0.20866702497005463,
-0.1448255479335785,
-0.6785165667533875,
-0.18532317876815796,
0.6547510027885437,
-0.4873121380805969,
0.3110099136829376... | |
i am using script manager to call a web method on client side but as you know web methods cant work from user control, so you have to create a web service to do that.
this is going fine with me but i am having the following concerns
* if you use web method in ASPX page the code is invisible to the user so how can i p... | [
0.5400570034980774,
0.07755142450332642,
0.10191644728183746,
-0.03246903419494629,
-0.15089893341064453,
-0.3423791229724884,
0.508051872253418,
0.04665543511509895,
-0.2427133172750473,
-0.7514387369155884,
0.3645052909851074,
0.4276341199874878,
-0.13824047148227692,
0.30391332507133484... | |
Site Scripting, Pinging, Etc... with this approach.
* what is exactly visible to the client with this approach, the java script code block that i used to call the service or everything ?
* any extra Advice would be totally appreciated.
The WPF TreeView class does not have an ExpandAll method. Thus you'd have to loop th... | [
0.47563299536705017,
-0.2871816158294678,
0.28687742352485657,
0.047768447548151016,
-0.2316965013742447,
-0.44158506393432617,
0.6201587915420532,
-0.0008502899436280131,
-0.21777798235416412,
-0.6622776389122009,
0.17744457721710205,
0.5846201181411743,
-0.14161720871925354,
-0.084982961... | |
I'm doing maintenance of a few branches of middle-size C++ project (~15k files for each branch). Very often I have to search all project files for given string or regex. Currently I'm using Total Commander which has all features I want (case-sensitive, regexes, filename masks) but this tool scans all files every time, ... | [
0.27496767044067383,
-0.13558202981948853,
0.27260780334472656,
0.14571109414100647,
-0.23547601699829102,
-0.3187243938446045,
0.5260133743286133,
-0.026327241212129593,
-0.2054750621318817,
-0.761854887008667,
0.017540428787469864,
0.6388832926750183,
-0.06727545708417892,
0.159247562289... | |
when something changes.
Visual Studio search is not enough, it only scans source files (not metadata nor custom resources).
Does such tool exists? I'm using Windows XP.
**EDIT**: I've found very usable tool, see my own answer
I found very usable tool here: <http://code.google.com/p/ndexer/>
I recommend it to everyo... | [
0.48478445410728455,
0.015311875380575657,
0.24194549024105072,
-0.0754527822136879,
0.042217884212732315,
-0.1677931696176529,
0.2478409856557846,
-0.040307000279426575,
-0.19936811923980713,
-0.9933391809463501,
0.06489145755767822,
0.5306177735328674,
-0.022806189954280853,
-0.064641997... | |
I would like to support Fast Infoset in some enterprise applications to reduce network traffic for XML and SOAP exchanges.
As documented on Wikipedia, there are [Fast Infoset](http://en.wikipedia.org/wiki/Fast_Infoset) implementations for C# and Java.
According to [OSS Fast Infoset Tools](http://www.oss.com/xml/prod... | [
0.18579889833927155,
-0.300103098154068,
0.19289778172969818,
0.29009461402893066,
0.040504422038793564,
-0.20355308055877686,
-0.16933804750442505,
0.08024536818265915,
-0.18906286358833313,
-0.7806040644645691,
-0.0799572691321373,
0.5195584893226624,
-0.421068012714386,
-0.1978888511657... | |
the project) you could try porting it to Delphi yourself. If Java and C# can handle this library, Delphi can almost certainly make it into an "Even Faster Infoset". | [
0.162001833319664,
-0.20838844776153564,
0.25997862219810486,
0.3834376335144043,
0.011417188681662083,
-0.35910969972610474,
0.09086715430021286,
0.05013670027256012,
-0.23340147733688354,
-0.6480734348297119,
-0.24174895882606506,
0.4164658188819885,
-0.18167133629322052,
0.0507412515580... | |
I have a T-SQL stored procedure with the signature
```
CREATE PROCEDURE MyProc
@recordCount INT OUTPUT
@param1 INT
...
```
When executed directly in Sql Server the procedure runs in under 5 seconds, returning a few result sets amounting to about 100 rows in total.
Calling this procedure using the ADO.NET `SqlDataAd... | [
0.4871789216995239,
0.11597772687673569,
0.5241691470146179,
-0.17238955199718475,
0.0016109382268041372,
0.04936159774661064,
0.4698823392391205,
-0.18972325325012207,
0.0919136181473732,
-0.6205213069915771,
-0.012784212827682495,
0.3363916575908661,
-0.14588846266269684,
0.2263228148221... | |
expected.
But why?
I don't want to go through my code base and modify all instances of this type of behaviour without understanding if I have really solved the problem.
Another thing to note is this is only apparent on one particular server, which admittedly has a larger dataset than other similar databases we run. ... | [
0.5236189961433411,
-0.06401247531175613,
0.3691144287586212,
0.1626974493265152,
-0.05135482922196388,
-0.43581509590148926,
0.31740641593933105,
-0.09419406950473785,
-0.3252144753932953,
-0.4112343192100525,
0.19300441443920135,
0.7500424981117249,
-0.09453748166561127,
0.24522955715656... | |
called though ADO.NET... Great.
**UPDATE II**
Have confirmed the issue still occurs if I change the code to use the `OleDbDataAdapter` with the SQLOLEDB or SQLNCLI provider types. Definitely to do with the connection.
Once I determined that it is the ADO.NET connection at the root of the problem, this [thread](https:... | [
-0.03888186067342758,
-0.024969248101115227,
0.41692957282066345,
-0.14874255657196045,
-0.26643338799476624,
0.025997232645750046,
0.567258894443512,
-0.1591842770576477,
-0.07375162094831467,
-0.5281316637992859,
0.09364134818315506,
0.5209322571754456,
-0.4694969356060028,
0.65599578619... | |
is created for the two calls. When `ARITHABORT` was `OFF`, the SSMS command would use the pre-compiled cached query plan that the ADO.NET connection was using, and therefore timeout.
By running the following commands as administrator on the database all queries run as expected regardless of the `ARITHABORT` setting.
... | [
0.14498676359653473,
0.037940192967653275,
0.3145701587200165,
0.27417707443237305,
-0.1720552295446396,
-0.22148361802101135,
0.396359920501709,
-0.1516624242067337,
0.012439392507076263,
-0.5462908744812012,
-0.1581055223941803,
0.5042917132377625,
-0.5068362355232239,
0.2265367358922958... | |
I have this code. It's from the [Zend Reading Mail](http://framework.zend.com/manual/en/zend.mail.read.html) example.
```
$message = $mail->getMessage(1);
// output first text/plain part
$foundPart = null;
foreach (new RecursiveIteratorIterator($mail->getMessage(1)) as $part) {
try {
if (strtok($part->con... | [
-0.05236086621880531,
-0.0503232516348362,
0.6791669726371765,
-0.2860046327114105,
-0.07393428683280945,
-0.031638868153095245,
0.4349142909049988,
-0.4296191930770874,
0.17486248910427094,
-0.4865487217903137,
-0.30831530690193176,
0.17996948957443237,
-0.22011737525463104,
0.18245436251... | |
echo 'no plain text part found';
} else {
echo $foundPart->getContent();
}
```
What I can get is the message, that works fine. But trying to decode the message into something readable does not work. I have tried Zend\_Mime, imap\_mime and iconv with no luck.
This is an example of what I get with `$foundPart->get... | [
0.30585038661956787,
0.3120690882205963,
0.3599454164505005,
-0.07742737978696823,
-0.11021661013364792,
-0.10332159698009491,
0.327787309885025,
-0.4837740659713745,
-0.1739688515663147,
-0.28120213747024536,
-0.11098535358905792,
0.38553348183631897,
-0.1811736524105072,
-0.0397356227040... | |
(without any encoding issues) and the attachments.
`imap_mime_header_decode()` Gives me an array with the same data.
`iconv_ mime_ decode()` Does the same
Does anyone have any idea why this is happening or some library where I can just abstract this away (PHP/Python or Perl)
This could be because of base64 encodin... | [
0.23116591572761536,
-0.010932592675089836,
0.29222288727760315,
-0.046244826167821884,
-0.15623575448989868,
-0.052398134022951126,
0.22560545802116394,
-0.23478592932224274,
-0.15692217648029327,
-0.7733671069145203,
-0.12278712540864944,
0.5624440312385559,
-0.32300642132759094,
0.10962... | |
I downloaded [Chromium](https://github.com/chromium/chromium)'s code base and ran across the [WTF namespace](https://github.com/chromium/chromium/tree/master/third_party/blink/renderer/platform/wtf).
```
namespace WTF {
/*
* C++'s idea of a reinterpret_cast lacks sufficient cojones.
*/
template<typen... | [
0.20740821957588196,
-0.02504807710647583,
0.6201355457305908,
-0.13806317746639252,
-0.20184418559074402,
0.14946365356445312,
0.2329724282026291,
-0.47116026282310486,
0.1320199966430664,
-0.4534991681575775,
-0.07459302991628647,
0.5549507737159729,
-0.39031752943992615,
0.0937029197812... | |
} u;
u.from = in;
return u.to;
}
} // namespace WTF
```
Does this mean what I think it means? Could be so, the `bitwise_cast` implementation specified here will not compile if either `TO` or `FROM` is not a [POD](http://en.wikipedia.org/wiki/Plain_Old_Data_Structures) and is not (AFAIK) more power... | [
0.40611231327056885,
0.04586237668991089,
0.14602026343345642,
-0.20600666105747223,
0.02598428912460804,
-0.17803767323493958,
0.05017665773630142,
-0.13965123891830444,
-0.008352450095117092,
-0.5623310804367065,
-0.08810088783502579,
0.4860359728336334,
-0.33997175097465515,
0.295901089... | |
all over the WebKit codebase. | [
0.3711424767971039,
0.40311160683631897,
-0.036058664321899414,
0.08698432147502899,
-0.11974907666444778,
-0.24210703372955322,
0.0943804532289505,
0.31721124053001404,
-0.14123840630054474,
-0.49869006872177124,
-0.11859974265098572,
0.1193915605545044,
-0.15843984484672546,
0.3048894703... | |
I can't seem to set regex correctly for the directive.
The syntax is:
```
<LocationMatch regex> ... </LocationMatch>
```
I've tried many of the following to no avail:
```
<LocationMatch "^/(admin-media|connect|css|downloads|images|images-web|js)/.+$">
<LocationMatch "^/(admin-media|connect|css|downloads|images|ima... | [
0.12125568091869354,
0.2110850065946579,
0.40312814712524414,
-0.2268860638141632,
0.0657394751906395,
-0.33016863465309143,
0.24540817737579346,
0.03706451505422592,
0.15539821982383728,
-0.576997697353363,
-0.27467453479766846,
0.7427580952644348,
-0.29045233130455017,
0.1601913869380951... | |
I'm looking for a RegEx to return either the first [n] words in a paragraph or, if the paragraph contains less than [n] words, the complete paragraph is returned.
For example, assuming I need, at most, the first 7 words:
```
<p>one two <tag>three</tag> four five, six seven eight nine ten.</p><p>ignore</p>
```
I'd g... | [
-0.16083747148513794,
0.23628093302249908,
0.3578861951828003,
-0.13362224400043488,
-0.15179553627967834,
0.5322408676147461,
0.38785576820373535,
-0.18337120115756989,
-0.28432098031044006,
-0.5400318503379822,
-0.32726314663887024,
0.7007046341896057,
-0.3377114534378052,
-0.04888439923... | |
think the .\*? (after the \w+\b) is causing problems.
Where am I going wrong? Can anyone present a RegEx that will work?
FYI, I'm using .Net 3.5's RegEX engine (via C#)
Many thanks
OK, complete re-edit to acknowledge the new "spec" :)
I'm pretty sure you can't do that with one regex. The best tool definitely is an ... | [
0.09027452021837234,
0.002420953009277582,
0.45847052335739136,
0.006151047069579363,
-0.12937307357788086,
-0.13995768129825592,
0.3806614577770233,
-0.19533729553222656,
0.14399389922618866,
-0.880490779876709,
0.045739732682704926,
0.832022488117218,
-0.42034971714019775,
-0.15708924829... | |
match the first seven items separated by spaces/tabs/newlines, ignoring any trailing punctuation or non-word characters.
BUT it will treat a tag separated by spaces as one of those items, i. e. in
```
One, two three <br\> four five six seven
```
it will only match up until `six`. I guess that regex-wise, there's n... | [
0.14849503338336945,
0.08900926262140274,
0.5731979012489319,
0.019095178693532944,
-0.0803682953119278,
-0.004307442810386419,
-0.026165565475821495,
-0.07562556117773056,
0.018500760197639465,
-0.45292913913726807,
-0.31858766078948975,
0.4431522786617279,
-0.08317422866821289,
-0.085675... | |
I'm dabbling with a linguistics Javascript project. I'd like to build it using objects to represent Nouns and functions to store Verbs as this makes conceptualizing my project less difficult. I'm using functions as keys to an object (I've written an example below). Will it be possible to serialize this with JSON when i... | [
-0.1486114114522934,
0.14811354875564575,
0.1865992248058319,
-0.09976891428232193,
-0.27356594800949097,
0.0895361676812172,
0.535855233669281,
-0.02384771592915058,
-0.3427197337150574,
-0.4558587074279785,
-0.317050963640213,
0.43003496527671814,
-0.2892721891403198,
-0.0476408973336219... | |
do things this way is just very wrong and silly.
No, [JSON](http://json.org/) can't do this.
The keys have to be double-quoted strings.
Also it looks like you're not actually using the function as a key - it's being converted to a string:
```
<script>
var x = {};
x[window.open] = true;
for (var i in x)
alert(ty... | [
0.5903470516204834,
-0.12255559861660004,
0.2419646978378296,
-0.02160973660647869,
0.03796086460351944,
-0.28439560532569885,
0.4225849509239197,
-0.11362386494874954,
-0.2960512340068817,
-0.33691656589508057,
-0.25249183177948,
0.46574339270591736,
-0.4818897247314453,
0.052016299217939... | |
I want to add some new functions to the core `string` helper, which is found in `system/helpers` folder. I think there was a 'right' way to do this using `MY_String_helper`, or something of that sort. I can't remember exactly how it was done though. Any thoughts on this issue?
I found it. Make a file with a name such a... | [
0.15099431574344635,
0.12459977716207504,
0.35577693581581116,
-0.06831014156341553,
0.15827502310276031,
0.05015794560313225,
0.05390274152159691,
0.24483078718185425,
-0.16917625069618225,
-0.6342151165008545,
-0.13201871514320374,
0.631000816822052,
-0.3778020143508911,
0.08625847846269... | |
I need to find some good tools for designing UI. I need only the design part, I don't need any code generation or anything like that... It would be nice to find some freeware ;)
tia
It depends what you mean exactly by 'design'.
If you mean graphic design, as in you want to produce nice fancy graphics for your UI that... | [
1.0386595726013184,
-0.12070731818675995,
0.05915065482258797,
0.33094656467437744,
-0.22463391721248627,
-0.12003195285797119,
-0.16403408348560333,
-0.3418571650981903,
-0.09652215242385864,
-0.39883431792259216,
0.2123449295759201,
0.8481920957565308,
-0.1785295307636261,
-0.06741990894... | |
design as in laying out UI elements and experimenting with different ideas, e.g. for prototyping, then pen and paper is the best tool there is! Use sticky notes or a whiteboard to simulate changes in state, it's very easy to iterate and to prototype with users. There's even a [book](http://www.paperprototyping.com/) be... | [
0.8054330945014954,
-0.2497636079788208,
0.19339093565940857,
0.18959768116474152,
0.0016730952775105834,
0.39146628975868225,
0.17463460564613342,
-0.2758408784866333,
-0.26494354009628296,
-0.9756612181663513,
0.03440665081143379,
0.13297908008098602,
-0.30113306641578674,
0.116878636181... | |
I trying to put my Mac's data in order.
I have many rc-files at my root such as .vimrc, .srceenrc and .bashrc.
I would like to put these files to the specific folders such as .vimrc and .screenrc to ~/bin/coding and .bashrc then again to ~/bin/shells.
**How can you determine where these rc-files must be?**
Seriously,... | [
0.5417105555534363,
0.28597816824913025,
0.2960748076438904,
0.08528542518615723,
0.027324892580509186,
-0.1689641773700714,
0.28765493631362915,
0.05311933904886246,
-0.37194713950157166,
-0.7346352934837341,
-0.033300139009952545,
0.8086172342300415,
-0.260059654712677,
0.172041922807693... | |
the consequences.
Not meaning to sound condescending but your error in naming your home directory as your root directory seems to indicate your knowledge level of how it all works is less than it should be to understand those consequences (apologies if that offends you, I agonized over the best way to say it - what I ... | [
0.7054988145828247,
0.16868643462657928,
0.17410214245319366,
0.13496112823486328,
0.30694788694381714,
-0.2953483760356903,
0.3754154145717621,
-0.06803756207227707,
-0.43538984656333923,
-0.19329948723316193,
-0.1355924755334854,
0.4303749203681946,
-0.25633496046066284,
0.12426928430795... | |
to the normal `ls` commands and, if you're using a graphical file browser, there should be a way to hide them there as well (such as the Gnome File Manager `CTRL-H`). | [
0.009528539143502712,
-0.12487011402845383,
0.15502560138702393,
0.03589683398604393,
-0.1518561989068985,
-0.3361831605434418,
0.11355206370353699,
0.29944440722465515,
-0.22440600395202637,
-0.5252308249473572,
-0.5135059356689453,
0.4931086599826813,
-0.43486928939819336,
-0.08121949434... | |
I need to convert large UTF-8 strings into ASCII. It should be reversible, and ideally a quick/lightweight algorithm.
How can I do this? I need the **source** code (using loops) or the **JavaScript** code. (should not be dependent on any platform/framework/library)
**Edit:** I understand that the ASCII representatio... | [
0.16578993201255798,
0.19396603107452393,
0.1410776972770691,
0.0680389478802681,
-0.11210170388221741,
-0.040878091007471085,
0.08510690927505493,
-0.24443410336971283,
-0.060172975063323975,
-0.6866602897644043,
-0.23292112350463867,
0.26643607020378113,
-0.6176056265830994,
0.2537582516... | |
meta = { // table of character substitutions
'\b': '\\b',
'\t': '\\t',
'\n': '\\n',
'\f': '\\f',
'\r': '\\r',
'"' : '\\"', | [
-0.22824516892433167,
0.014662491157650948,
0.1420600563287735,
-0.2982344627380371,
0.29386910796165466,
0.642490565776825,
0.21803180873394012,
-0.43087121844291687,
0.49402058124542236,
-0.45213836431503296,
-0.13591432571411133,
0.6907687783241272,
-0.6711207032203674,
-0.0913002192974... | |
'\\': '\\\\'
};
function quote(string) {
// If the string contains no control characters, no quote characters, and no
// backslash characters, then we can safely slap some quotes around it.
// Otherwise we must also replace the offending characters with safe escape
// sequences.
escapable.lastInd... | [
0.24255377054214478,
-0.041524581611156464,
0.3815560042858124,
-0.14605507254600525,
0.4611484408378601,
0.09844694286584854,
0.3889186978340149,
-0.20973710715770721,
0.09708800166845322,
-0.10769479721784592,
-0.215659037232399,
0.546279788017273,
-0.4474014639854431,
0.2223708629608154... | |
var c = meta[a];
return typeof c === 'string' ? c :
'\\u' + ('0000' + a.charCodeAt(0).toString(16)).slice(-4);
}) + '"' :
'"' + string + '"';
}
```
This will produce a valid ASCII-only, javascript-quoted of the | [
0.04863830283284187,
0.09978453069925308,
0.37530407309532166,
-0.33703911304473877,
-0.0331721156835556,
0.3063085079193115,
0.30443617701530457,
-0.5651714205741882,
0.09732315689325333,
-0.03648986294865608,
-0.27320438623428345,
0.5228597521781921,
-0.621864914894104,
0.139376178383827... | |
input string
e.g. `quote("Doppelgänger!")` will be "Doppelg\u00e4nger!"
To revert the encoding you can just eval the result
```
var encoded = quote("Doppelgänger!");
var back = JSON.parse(encoded); // eval(encoded);
``` | [
-0.16025036573410034,
0.09406892955303192,
0.3517315983772278,
-0.236283540725708,
-0.0738295167684555,
0.28090769052505493,
0.36716699600219727,
-0.19341914355754852,
0.0585046261548996,
-0.36584436893463135,
-0.524707555770874,
0.20743943750858307,
-0.39365434646606445,
0.120264999568462... | |
I have a button on an MFC dialog. How can I make the text bold?
You can create a new CFont and call WM\_SETFONT on the button. Something like this:
```
// note: m_font is a class variable of type CFont
m_font.CreateFont(10, 0, 0, 0, FW_BOLD, 0, 0, 0, 0, 0, 0, 0, 0, "Arial")
GetDlgItem(IDC_BUTTON1)->SendMessage(WM_SETF... | [
0.1126428097486496,
0.04690980166196823,
0.9431360363960266,
-0.4577903747558594,
0.12589192390441895,
0.14068467915058136,
0.34306859970092773,
-0.4379331171512604,
-0.1539154350757599,
-0.7362045049667358,
-0.14843562245368958,
0.4300665855407715,
-0.45050275325775146,
0.0512757860124111... | |
1. I have a listbox with runat=server
2. Items are added to this listbox on the client side, using javascript
3. I would want to retrieve the items on the server side on the click of a button
The problem is in the Buttons's server side click handler, I cannot see the new items added to the listbox. Only the items th... | [
-0.04553680121898651,
-0.19222089648246765,
0.3797602951526642,
-0.22441363334655762,
-0.15832853317260742,
-0.25132694840431213,
0.23094989359378815,
-0.5073385238647461,
-0.15911179780960083,
-0.9030684232711792,
0.12296952307224274,
0.4586745500564575,
-0.6713762283325195,
0.00753679079... | |
{
if (ViewState["gameID"] == null)
{
//Populate Listbox
//Set gameid in viewstate
}
//Add javascript handlers to buttons | [
-0.13969403505325317,
-0.365677148103714,
0.2834605276584625,
-0.2588833272457123,
0.16422191262245178,
0.38543573021888733,
-0.14904801547527313,
-0.2816240191459656,
-0.19426490366458893,
-0.6127948760986328,
0.008095486089587212,
0.5447571873664856,
-0.43207553029060364,
-0.184829801321... | |
btnSomeButton.Attributes.Add("onclick", "aJavaScriptFunction");
}
}
protected void btnSave_Click(object sender, EventArgs e)
{
ListItemCollection x = ListBoxRanks.Items;
//Here items is has just those items that are added to the listbox on page load
}
```
Ah when abstractions... | [
0.17931236326694489,
-0.22713513672351837,
0.5080721974372864,
-0.08822428435087204,
0.011692657135426998,
0.3340396285057068,
0.5569385290145874,
-0.33373165130615234,
-0.3227342367172241,
-0.6147015690803528,
-0.4001329243183136,
0.49528852105140686,
-0.44161298871040344,
0.2980849146842... | |
put back from view state.
When you add option items client side they are not added to viewstate. The only way is to use your own hidden field to serialise client side additions and read them on postback or ajax the additions serverside. | [
0.21013237535953522,
-0.4848366379737854,
0.560878336429596,
0.14049531519412994,
-0.022853104397654533,
0.025478988885879517,
-0.020657872781157494,
-0.08773597329854965,
-0.43193677067756653,
-0.8603261113166809,
-0.16278281807899475,
0.4471401274204254,
-0.04493081197142601,
0.163589701... | |
Recently I started reading (just a bit) the [current draft](http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2009/n2857.pdf) for the future C++11 standard.
There are lots of new features, some of them already available via Boost Libs. Of course, I'm pretty happy with this new standard and I'd like to play with all ... | [
0.48789992928504944,
0.2097952514886856,
0.26922106742858887,
-0.19656279683113098,
-0.13192899525165558,
-0.25283393263816833,
0.124662384390831,
0.12694531679153442,
-0.3716127574443817,
-0.37925320863723755,
-0.16873480379581451,
0.6131921410560608,
-0.12917852401733398,
-0.215626299381... | |
some features) but also for the end-users.
In particular, a friend of mine told me "*this is a sort of new language*".
* Can we consider it a brand new language after this update?
* Do you plan to switch to the new standard or keep up with the "old" standard(s)?
**2) Knowledge of the language**
* How the learning ... | [
0.4020490050315857,
0.2359522432088852,
0.047628067433834076,
0.08626771718263626,
0.16667553782463074,
0.016071943566203117,
0.7818861603736877,
0.30592596530914307,
-0.2699335217475891,
-0.7285521030426025,
-0.21100091934204102,
0.6645795106887817,
0.3440728783607483,
-0.1873171329498291... | |
it?
In short, no, we can't consider this a new language. It's the same language, new features. But instead of being bolted on by using the Boost libs, they're now going to be standard inclusions if you're using a compiler that supports the 0x standard.
One doesn't *have* to use the new standard while using a compiler ... | [
0.5303158760070801,
-0.05541267991065979,
0.039441004395484924,
0.22468441724777222,
0.07935355603694916,
-0.16258123517036438,
0.01221243292093277,
0.2492906004190445,
-0.06477460265159607,
-0.26703399419784546,
-0.35183778405189514,
0.870905339717865,
-0.33298224210739136,
-0.14998231828... | |
make doing certain things easier and less error prone, so it's to one's advantage to learn what the new features are, and how they will improve their design strategy for future work. One will also have to learn it so that when working on software developed with it, they will understand what's going on and not make larg... | [
0.8949101567268372,
0.19981135427951813,
0.21338996291160583,
0.07367964833974838,
0.08089474588632584,
-0.3107907474040985,
0.27531108260154724,
-0.0642981082201004,
-0.29648634791374207,
-0.63071209192276,
-0.11116857826709747,
0.8293098211288452,
0.1546369194984436,
-0.27942514419555664... | |
that I will *limit* myself to only working with the new features of the 0x standard, then no, since much of my work involves code written before the standard and it would be a colossal undertaking to redesign everything to use the new features. Not only that, but it may introduce new bugs and performance issues that I'... | [
0.48182669281959534,
0.38084274530410767,
-0.21750473976135254,
0.022252708673477173,
0.05724668875336647,
-0.11083824932575226,
0.33409053087234497,
-0.05262543633580208,
-0.2749098539352417,
-0.1931009143590927,
-0.1786217987537384,
0.8705894947052002,
0.01568860188126564,
0.091543532907... | |
approach will change. People will still learn about pointers and how they work, but they'll also learn about smart pointers and how they're managed. In some cases, people will learn things differently than before. For example, people will still need to learn how to initialize things, but now they'll learn about Uniform... | [
0.29981011152267456,
-0.06905816495418549,
0.3128643333911896,
0.2334686517715454,
-0.17767633497714996,
-0.05270878225564957,
0.13105206191539764,
-0.1967107355594635,
-0.25252917408943176,
-0.722179114818573,
-0.23898299038410187,
0.7621635794639587,
-0.13498400151729584,
-0.352199345827... | |
and use while at the same time becoming easier to teach.
Mastering a language is a long-term goal, it can not be done over night. It's silly to think that one can have mastery over something as complex as C++ quickly. It takes practice, experience and debugging code to really hammer something in. Academically learning... | [
0.3340580463409424,
0.2693878710269928,
-0.10457601398229599,
0.3206978142261505,
0.07262340188026428,
-0.2866465151309967,
0.6050053834915161,
0.13755561411380768,
-0.20631849765777588,
-0.6996936202049255,
0.018289711326360703,
0.700019359588623,
0.4417394995689392,
0.05688352882862091,
... | |
that they won't bother learning some of the more obsolete ways of doing things. | [
0.6045928597450256,
0.3710102140903473,
-0.2881946563720703,
0.2215883880853653,
0.029106194153428078,
-0.0036061524879187346,
0.11966169625520706,
0.22091814875602722,
0.024503149092197418,
-0.23920488357543945,
-0.3067178726196289,
0.2856541574001312,
-0.19044360518455505,
0.258332759141... | |
I'm using Jbos AS 5 and the DatabaseServerLoginModule for the authorization. I've my application policy defined as (for example only, not the actual code):
```
<application-policy name = "jbossmq">
<authentication>
<login-module code = "org.jboss.security.auth.spi.DatabaseServerLoginModule"
flag = "requir... | [
-0.2529650330543518,
-0.10723896324634552,
0.7542464733123779,
-0.11794773489236832,
-0.0022451544646173716,
-0.22507750988006592,
0.3417641818523407,
-0.6795674562454224,
-0.23594146966934204,
-0.700042188167572,
-0.27880117297172546,
0.6418493986129761,
0.15318790078163147,
0.15178216993... | |
</authentication>
</application-policy>
```
Once the user is successfully authorized, how can I retrieve the user roles from my servlet? In the above code snippet, the roles are selected from the database, but where are they being stored? In session !? If yes, under which session variables?
Also, is it possible to u... | [
0.07436922937631607,
0.005333815235644579,
0.4926735758781433,
-0.11129742860794067,
0.2905604839324951,
-0.2463596910238266,
0.23819023370742798,
-0.47134748101234436,
0.23307451605796814,
-0.6236289739608765,
-0.1851918250322342,
1.0759135484695435,
-0.0052178893238306046,
-0.40232390165... | |
packaing an AS-specific descriptor within your EAR file, you need to specify mapping of the application server's user roles (these you set to principals in your login module) to the J2EE app. roles. | [
0.44555822014808655,
-0.11482097953557968,
0.27324679493904114,
-0.21260084211826324,
0.09340236335992813,
-0.021833553910255432,
0.19964401423931122,
-0.5033698678016663,
0.06848005950450897,
-0.565429151058197,
-0.03949550911784172,
0.6563899517059326,
-0.40035367012023926,
-0.4587984681... | |
The following is the script for finding consecutive substrings in strings.
```
use strict;
use warnings;
my $file="Sample.txt";
open(DAT, $file) || die("Could not open file!");
#worry about these later
#my $regexp1 = "motif1";
#my $regexp2 = "motif2";
#my $regexp3 = "motif3";
#my $regexp4 = "motif4";
my $sequence;... | [
-0.055373989045619965,
-0.44179120659828186,
0.23886238038539886,
-0.2784871459007263,
0.3226011395454407,
-0.07675081491470337,
0.4198734760284424,
-0.5459010004997253,
-0.143301323056221,
-0.4649040997028351,
-0.4249526560306549,
0.28041863441467285,
-0.45722484588623047,
0.3887297511100... | |
if ($line=~ /(HD)/g){
print "motif found and its locations is: \n";
pos($line), "-", pos($line)+length($1), "\n\n";
}
if ($line=~ /(K)/g){ | [
-0.12018272280693054,
-0.3682798445224762,
0.5420107245445251,
-0.17697271704673767,
0.4326106309890747,
-0.008044767193496227,
0.020998192951083183,
-0.3494473397731781,
0.1203359067440033,
-0.6076022386550903,
-0.5515646934509277,
0.27216026186943054,
-0.3595907986164093,
0.3559424877166... | |
print "motif found and its location is: \n";
pos($line), "-",pos($line)+length($1), "\n\n";
}
if ($line=~ /(DD)/g){ | [
-0.22576339542865753,
-0.37665316462516785,
0.5233504772186279,
-0.21197453141212463,
0.4344959557056427,
-0.05822266638278961,
0.11759934574365616,
-0.2962665557861328,
0.06571565568447113,
-0.48895832896232605,
-0.5490012168884277,
0.3496525287628174,
-0.45998844504356384,
0.368327081203... | |
print "motif found and its location is: \n";
pos($line), "-", pos($line)+length($1), "\n\n";
}
}else { | [
-0.20132847130298615,
-0.27798742055892944,
0.3502330482006073,
-0.150629922747612,
0.5520257353782654,
-0.14427362382411957,
0.05919412896037102,
-0.19558779895305634,
-0.10102323442697525,
-0.3660869002342224,
-0.4975701570510864,
0.39998817443847656,
-0.4931034445762634,
0.2234686017036... | |
$sequence .= $line;
print "came in else\n";
}
}
```
It matches substring1 with string and prints out position where substring1 matched. The problem lies in finding the rest of the substrings. For substrings2 it starts again from the beginning of the string (instead of starting from the position where subs... | [
-0.45202139019966125,
-0.1526326984167099,
0.45287609100341797,
-0.5838006734848022,
0.11445560306310654,
0.13995982706546783,
0.30097517371177673,
-0.4795364439487457,
0.02450290322303772,
-0.5529032945632935,
-0.1667577475309372,
0.337983101606369,
-0.3798433542251587,
0.1293352246284485... | |
positions have to occur after the previous respectively.
I'm not a perl expert but you can use $- and $+ to track index location for last regex match found.
Below is code built on top of your code that explains this.
```
use strict;
use warnings;
my $file="sample.txt";
open(DAT, $file) || die("Could not open file... | [
0.045723870396614075,
-0.14021125435829163,
0.4731336534023285,
-0.2694987952709198,
0.1151294931769371,
-0.059407759457826614,
0.23650935292243958,
-0.48771142959594727,
0.12492161989212036,
-0.47319862246513367,
-0.1646995097398758,
0.22239580750465393,
-0.27488449215888977,
0.5951433777... | |
if ($line=~ /$motif1/g)
{
&printStuff($sequenceNums, "motif1", $motif1, "$-[0]-$+[0]");
$someVar = 1;
}
if ($line=~ /$motif2/g and $someVar == 1)
{
&printStuff($sequenceNums, "motif2", | [
-0.16903449594974518,
-0.330925852060318,
0.6592544317245483,
-0.3805646002292633,
0.21676750481128693,
0.17591693997383118,
0.1994762420654297,
-0.5582737922668457,
0.03750240430235863,
-0.30884769558906555,
-0.5770635604858398,
0.46127843856811523,
-0.37587156891822815,
0.077555462718009... | |
$motif2, "$-[0]-$+[0]");
$someVar = 2;
}
if ($line=~ /$motif3/g and $someVar == 2)
{
&printStuff($sequenceNums, "motif3", $motif4, "$-[0]-$+[0]");
$someVar = 3;
} | [
-0.010916369967162609,
-0.4593900442123413,
0.544959545135498,
-0.3566673994064331,
0.1637534350156784,
-0.10835854709148407,
0.431130588054657,
-0.6690633296966553,
-0.19174224138259888,
-0.2284928411245346,
-0.43817394971847534,
0.32231661677360535,
-0.49720168113708496,
0.25393283367156... | |
if ($line=~ /$motif4/g and $someVar == 3)
{
&printStuff($sequenceNums, "motif4", $motif4, "$-[0]-$+[0]");
}
else
{
$sequence .= $line;
if ($someVar == 0) | [
0.0027880738489329815,
-0.32509323954582214,
0.5965151190757751,
-0.44870254397392273,
0.232638418674469,
0.0845903605222702,
0.29814958572387695,
-0.4885064363479614,
-0.04104560241103172,
-0.3273552656173706,
-0.44477730989456177,
0.45541226863861084,
-0.44922494888305664,
0.235178172588... | |
{
&printWrongStuff($sequenceNums, "motif1", $motif1);
}
elsif ($someVar == 1)
{
&printWrongStuff($sequenceNums, "motif2", $motif2);
}
elsif ($someVar == 2) | [
-0.11916415393352509,
-0.10078071057796478,
0.3216142952442169,
-0.2909170687198639,
0.30453070998191833,
0.12805968523025513,
0.1911308765411377,
-0.5968879461288452,
-0.20113545656204224,
-0.44534000754356384,
-0.3095191419124603,
0.5269340872764587,
-0.4687817692756653,
0.10022156685590... | |
{
&printWrongStuff($sequenceNums, "motif3", $motif3);
}
elsif ($someVar == 3)
{
&printWrongStuff($sequenceNums, "motif4", $motif4);
}
} | [
-0.043119657784700394,
-0.05501173064112663,
0.4489224851131439,
-0.353609561920166,
0.31872448325157166,
0.15784046053886414,
0.3562268614768982,
-0.5804944634437561,
-0.2247702032327652,
-0.4269097149372101,
-0.21482640504837036,
0.584577739238739,
-0.47374433279037476,
0.201743140816688... | |
$sequenceNums++;
}
sub printStuff
{
print "Sequence: $_[0] $_[1]: $_[2] index location: $_[3] \n";
print OUTPUTFILE "Sequence: $_[0] $_[1]: $_[2] index location: $_[3]\n";
}
sub printWrongStuff
{
print "Sequence: $_[0] $_[1]: $_[2] was not found\n";
print OUTPUTFILE "S... | [
-0.24869127571582794,
0.13871794939041138,
0.5263953804969788,
-0.29024797677993774,
0.1554040163755417,
0.14690032601356506,
0.2524053454399109,
-0.686433732509613,
-0.06792101263999939,
-0.3589320480823517,
-0.46274539828300476,
0.5910495519638062,
-0.46796199679374695,
0.055127497762441... | |
Duplicate:
> [website screenshots using php](https://stackoverflow.com/questions/757675/website-screenshots-using-php/757721)
Is it possible to take a screenshot of the current page using PHP?
If you're on windows. There's [imagegrabscreen()](http://is.php.net/manual/en/function.imagegrabscreen.php) | [
0.25371578335762024,
0.07903376966714859,
0.3033068776130676,
0.28624773025512695,
0.24785715341567993,
0.06344986706972122,
0.18740727007389069,
0.16124874353408813,
-0.8357377052307129,
-0.6046658158302307,
0.28532418608665466,
0.21455955505371094,
-0.38642165064811707,
-0.05990273132920... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.