text stringlengths 0 30.5k | title stringclasses 1
value | embeddings listlengths 768 768 |
|---|---|---|
HTTP/1.1" 302 223 "http://staging.server.com/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:11.0) Gecko/20100101 Firefox/11.0"
staging.server.com:80 41.133.194.248 - - [05/Apr/2012:14:03:42 +0200] "GET /user/signup HTTP/1.1" 302 223 "http://staging.server.com/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:11.0)... | [
0.06507761031389236,
0.19588474929332733,
0.37837132811546326,
-0.005245637614279985,
-0.6246075630187988,
-0.03954469785094261,
0.5663784146308899,
-0.3094263970851898,
-0.37093305587768555,
0.0940038412809372,
-0.0757727175951004,
0.6150577068328857,
-0.17399157583713531,
-0.014295528642... | |
described, the configuration could be as follows:
SSL is offloaded to apache httpd. Hence only the ajp connector needs to be configured in Tomcat, or perhaps with an additional http connector for testing purpose only.
Configuring enable SSL for apache httpd by following <http://httpd.apache.org/docs/2.0/ssl/ssl_howto.... | [
-0.12141260504722595,
-0.3090847134590149,
0.8277561068534851,
0.07413773238658905,
0.026626894250512123,
-0.15036830306053162,
0.2579309344291687,
-0.3305984139442444,
-0.10359617322683334,
-0.7992550134658813,
-0.4388657212257385,
0.4216519594192505,
-0.23205776512622833,
0.1180825233459... | |
/ ajp://localhost:8009/
</VirtualHost>
```
should work.
Another benefit is that you may see performance improvement when SSL is offloaded to apache httpd.
In addition, why not force SSL for everything:
```
<VirtualHost _default_:80>
RedirectPermanent / https://www.example.com/
</VirtualHost>
<VirtualHost _defaul... | [
0.04396138712763786,
-0.5504202842712402,
0.31753379106521606,
0.21297647058963776,
-0.20844009518623352,
-0.159945547580719,
0.4585963487625122,
-0.05509260669350624,
-0.2239065021276474,
-0.5573977828025818,
-0.25630709528923035,
0.5231727957725525,
-0.18690739572048187,
0.16750144958496... | |
i want to ask question about weekly. How to calculate weekly permonth.For example
one month have 30 day and 4 week permonth. if i select the second week in january. it will show the number of weekly permonth and name of month. i want the result show the number of weekly(not all the total weekly peryear) in month and na... | [
0.24296049773693085,
0.4391864836215973,
0.7837905287742615,
-0.19070965051651,
-0.45918184518814087,
0.24470800161361694,
0.12647585570812225,
0.1343657672405243,
-0.597502589225769,
-0.1405712515115738,
0.11170852929353714,
0.6903813481330872,
0.002337028505280614,
0.36299702525138855,
... | |
week
8-14 days------------ 2 week
15-21 days------------ 3 week
22-28 days------------ 4 week
```
and so on.
Your question is rather unclear (what does "weekly" mean? weekly what?) and I'm not sure I really understand it. But I'm guessing that for a given date, you want to know what week in the month it is?
If so, ... | [
0.12891998887062073,
0.01752420887351036,
0.558311402797699,
-0.047809749841690063,
-0.11026480048894882,
0.3765030801296234,
-0.04027531296014786,
0.4353770911693573,
-0.7738166451454163,
0.02040250226855278,
-0.09852137416601181,
0.31108421087265015,
-0.3149452209472656,
0.40806129574775... | |
dbo.Calendar
where BaseDate = @SomeDate
```
If this doesn't help, you will need to show exactly what input parameters and output data you expect to see.
By the way, I assume you're working with Aqua Data Studio as your database client, but it has nothing to do with this question so you may want to edit the title. | [
0.7305951714515686,
0.023255424574017525,
-0.17197203636169434,
-0.03258251026272774,
-0.16854389011859894,
-0.5712154507637024,
0.10853032022714615,
0.09242496639490128,
0.008330529555678368,
-0.5317805409431458,
0.24504734575748444,
0.27463802695274353,
-0.052519913762807846,
0.249389365... | |
Is a good thing use methods that receive an object and set the attributes of that object inside the method instead of returning the result?
There are situations where returning the results will need two similar methods with a few differences.
Technically, on way will don't need "code duplication" and will do the thin... | [
0.11994621902704239,
0.14728471636772156,
0.6490899920463562,
-0.26966509222984314,
0.1224672794342041,
-0.3329043984413147,
0.5392008423805237,
-0.1292402446269989,
-0.08829879015684128,
-0.42605653405189514,
-0.047226015478372574,
0.4194362461566925,
-0.30376961827278137,
-0.205635219812... | |
parameter){
//same processing
return emails;
}
page.setLinks(getLinks(parameter));
page.setEmails(getEmails(parameter));
//page.set...
```
The good practice is to clearly separate methods modifying domain objects somehow and methods which do not modify them in any way. It's easier to work within complex syste... | [
0.1761360615491867,
0.1044171079993248,
0.4550882577896118,
0.1410636156797409,
-0.17734651267528534,
0.020525947213172913,
0.4268190562725067,
-0.6995084285736084,
-0.04675528407096863,
-0.4891444742679596,
-0.2564927339553833,
0.6947450041770935,
-0.4074324667453766,
0.2940472662448883,
... | |
into very simple operations that do not return
> domain information. Further control side effects by moving complex
> logic into VALUE OBJECTS when a concept fitting the responsibility
> presents itself.
>
>
> (Domain-Driven Design: Tackling Complexity in the Heart of Software, Eric Evans) | [
-0.11654142290353775,
-0.05440515652298927,
-0.309619277715683,
0.23820684850215912,
-0.039544254541397095,
-0.11877497285604477,
0.27586546540260315,
-0.4064754545688629,
-0.2552778422832489,
-0.5478347539901733,
-0.3266282379627228,
0.6747862696647644,
-0.45620545744895935,
0.04523104801... | |
I have some uploaded files it will be .docx or .xl or .Png or .PDF and so on... some of the file types like PDF and .GIF are opening Inline of the aspx pages and if it is document file it is opening in word document..if it is exel file it is opening in exel ..i want do display all the types in line
Use the following `c... | [
0.045109204947948456,
-0.10467270016670227,
0.9606835842132568,
0.0036313494201749563,
-0.08661065995693207,
-0.09197293967008591,
0.184836283326149,
-0.2908863425254822,
-0.07312018424272537,
-1.135894775390625,
-0.17641659080982208,
0.4378108084201813,
-0.06681551039218903,
0.02855324000... | |
alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:MyIdentifier] autorelease];
}
UILabel *bookName = (UILabel*)[cell.contentView viewWithTag:1001];
if( !bookName )
{
bookName = [[UILabel alloc]initWithFrame:CGRectMake(100, 3, 180, 25)];
[cell.contentView addSubview:bookNam... | [
-0.2190672904253006,
0.026503121480345726,
0.9230883121490479,
-0.0692083016037941,
-0.019232291728258133,
0.11139415204524994,
0.44354307651519775,
-0.4897559583187103,
-0.0020327838137745857,
-0.7378737330436707,
-0.594394326210022,
0.3001951277256012,
-0.23422393202781677,
0.12288168817... | |
}
NSString *text = [NSString stringWithFormat:@"%@",[[stories objectAtIndex:indexPath.row] objectForKey: @"product_name"]];
bookName.text = text;
CGSize expectedLabelSize = [text sizeWithFont:bookName.font constrainedToSize:bookName.frame.size lineBreakMode:UILineBreakModeWordWrap];
CGRect newFrame... | [
-0.22197365760803223,
-0.24232889711856842,
0.5673927068710327,
-0.318489670753479,
0.27130839228630066,
0.26577964425086975,
0.3227839767932892,
-0.35333311557769775,
-0.16497544944286346,
-0.6754336953163147,
-0.37055909633636475,
0.7577500939369202,
-0.08533719182014465,
-0.001613108674... | |
When using ARC with iOS 5, a weak IBOutlet creates a zeroing reference, avoiding the need to
```
self.< IBOutlet property > = nil;
```
in *-(void)viewDidUnload*
If I'm using iOS 4 (**and using ARC**) and forced to use ***unsafe\_unretained*** instead, does it mean I have to override *viewDidUnload* and set the prop... | [
-0.3649970591068268,
0.011882035993039608,
0.215603306889534,
-0.21324963867664337,
-0.12434852868318558,
-0.03226714953780174,
0.45790815353393555,
-0.012394764460623264,
0.04752079024910927,
-0.37048155069351196,
-0.1767367273569107,
0.6712637543678284,
-0.33604443073272705,
-0.285319149... | |
that coin would be to use unsafe\_unretained. Weak attributes will automatically set your properties to nil. Unsafe\_retained (aka "assign" in pre-iOS 5), will not, and you need to do this yourself. | [
-0.08672585338354111,
-0.013236729428172112,
-0.001402419526129961,
0.15558801591396332,
0.27386245131492615,
-0.092959925532341,
0.1208420991897583,
-0.01033344492316246,
-0.1011231392621994,
-0.16156889498233795,
0.067391537129879,
0.5112487077713013,
-0.044442083686590195,
0.13795362412... | |
I use Emacs for years, and nowadays, I write a lot of files in org mode, such as notes, plans/conclusions or something else. However but most website support markdown-style instead of org-style. StackOverflow is an example. :)
Can someone tell me the exact difference between these two? Pros and cons?
And which did you... | [
0.3863050043582916,
0.14293713867664337,
0.3604293465614319,
0.13762032985687256,
-0.36938947439193726,
-0.348202109336853,
0.32632434368133545,
-0.11185367405414581,
0.07676456868648529,
-0.6317490339279175,
0.15671007335186005,
0.5277491211891174,
-0.0181267112493515,
-0.4004040360450744... | |
feasible.
However, org is more complicated and it also has more features. You can use org for [GTD](https://en.wikipedia.org/wiki/Getting_Things_Done), maintaining TODO lists, project plans etc. And the markup syntax seems just one accessory in the whole org system.
In my options, if only write some plain documents, ... | [
0.18771810829639435,
-0.023003369569778442,
0.48705345392227173,
0.40035030245780945,
0.04650900885462761,
-0.24256470799446106,
0.032013751566410065,
0.05196060612797737,
-0.26243582367897034,
-1.0499815940856934,
-0.2852054536342621,
0.6579548716545105,
-0.13812977075576782,
-0.159898668... | |
What is the ToString format needed to produce this
```
> 5 to 00000500
> 10 to 00001000
> 15 to 00001500
> 20 to 00002000
```
Thanks.
If you want do this purely with a `ToString` format string, rather than involving a multiplication too, then you could use something like this:
```
string yourString... | [
-0.2886131703853607,
-0.15150514245033264,
0.46621522307395935,
-0.005755703430622816,
0.29341310262680054,
-0.02381308190524578,
-0.057552095502614975,
-0.28158697485923767,
-0.1913255751132965,
-0.3078748285770416,
0.19492356479167938,
0.7430203557014465,
-0.08039956539869308,
-0.3114755... | |
In my servlet I have the following code:
```
response.setContentType("application/json");//set json content type
PrintWriter out = response.getWriter();
EntityManagerFactory emf=Persistence.createEntityManagerFactory("webPU");
GpsJpaController gjc=new GpsJpaController(emf);
java.util.List<Gps> li... | [
-0.1605224609375,
0.06811204552650452,
1.0834616422653198,
-0.14027658104896545,
-0.13112805783748627,
0.20864419639110565,
0.5269632339477539,
-0.649770975112915,
-0.09112917631864548,
-0.6869065761566162,
-0.16985562443733215,
0.4892367124557495,
-0.3179912269115448,
0.06584303081035614,... | |
dataType: 'json',
error: function(xhr, ajaxOptions, thrownError){ $("#content").empty().append("* Error from server cause: "+thrownError).addClass("error"); } ,
success:function(data){$("#content").empty().append(data);}
});
```
when I run the code I still receive the following erro... | [
-0.2337561845779419,
0.21617579460144043,
0.2795097827911377,
-0.2863686978816986,
-0.011199012398719788,
0.19371682405471802,
0.7148080468177795,
-0.5716326832771301,
0.05548363924026489,
-0.7670750617980957,
-0.3031144142150879,
0.7335979342460632,
-0.4001975655555725,
-0.074998646974563... | |
java.util.List<Gps> listGps=gjc.findGpsEntities();
Gson gson=new Gson();
String json=gson.toJson(listGps);
System.out.println(json);
```
I get this Error:
```
Exception in thread "main" java.lang.StackOverflowError
at java.lang.StrictMath.floorOrCeil(StrictMath.java:355)
at java.lan... | [
-0.5823364853858948,
0.191606342792511,
0.5792430639266968,
-0.1497379094362259,
0.10689309984445572,
0.017210522666573524,
0.4679087996482849,
-0.5602997541427612,
-0.38990169763565063,
-0.3549392819404602,
-0.35751819610595703,
0.4529256522655487,
-0.35710471868515015,
-0.096625737845897... | |
to infinite recursion. You may need to check the code thoroughly for any unintended recursion. | [
-0.13428176939487457,
-0.19433166086673737,
0.17796587944030762,
0.01759418658912182,
0.21051038801670074,
-0.11509618163108826,
0.49108487367630005,
0.17266345024108887,
-0.39913347363471985,
-0.3886946737766266,
-0.3588879406452179,
0.617976188659668,
-0.4104764461517334,
0.0151740126311... | |
In a newer OpenGL there is no matrix stack. I am working on a simple display engine, and I am going to implement the transformation stack.
What is a common strategy here? Should I build a push/pop stack, and use it with a tree representing my model? I suppose this is the "old" approach, that was deprecated in the new... | [
0.1612643301486969,
0.0986161008477211,
0.6956111788749695,
-0.0551585927605629,
-0.27973586320877075,
-0.21891316771507263,
-0.14078998565673828,
-0.3208681643009186,
-0.34465840458869934,
-0.640250027179718,
0.28231269121170044,
0.6785004138946533,
-0.560570478439331,
0.01894932240247726... | |
redundant. Any modern 3D application needs to deal with matrices anyway, and since OpenGL is not a proper matrix math library you'd use something like Eigen oder GSL or something homebrewn anyway.
A stack is still a very viable structure. | [
0.1631726324558258,
0.24961704015731812,
0.34628668427467346,
0.2897624373435974,
-0.3071621358394623,
-0.1947026401758194,
-0.2110304981470108,
-0.21037714183330536,
-0.3194751739501953,
-0.41913363337516785,
-0.05434099957346916,
0.46454352140426636,
-0.287826806306839,
0.041081879287958... | |
I made up a template to show all the fields and values from a model, it looks like this:
```
## detail_template.html ##
{% for name, value in object.get_fields %}
<p>
<label>{% trans name %}:</label>
<span>{{ value|default:"Not available" }}</span>
</p>
{% endfor %}
```
In the class you can s... | [
-0.04265647381544113,
-0.1513408124446869,
0.5414716005325317,
-0.053260739892721176,
0.11084091663360596,
0.13984385132789612,
0.022382715716958046,
-0.33209896087646484,
-0.3454098105430603,
-0.5675636529922485,
0.15486963093280792,
0.7606478929519653,
-0.2661600708961487,
0.455971688032... | |
for example, a CharField with choices, like:
```
## models.py ##
GENDER_CHOICES = (
('M', 'Male'),
('F', 'Female'),
)
...all other fields ...
sex = models.CharField(verbose_name=u"Sex", max_length=1, choices=GENDER_CHOICES)
```
It displays M or F, what I want to do is load the get\_NAMEFIELD\_d... | [
-0.09921743720769882,
0.22135604918003082,
0.09820692986249924,
-0.15756723284721375,
0.019924288615584373,
0.47469624876976013,
-0.12321354448795319,
0.06217584013938904,
-0.1641717404127121,
-0.48354068398475647,
-0.24813500046730042,
0.45365434885025024,
-0.30581948161125183,
0.05346360... | |
I also appreciate any help.
I think you should add another method:
```
def get_field_value(self, field):
try:
return self._get_FIELD_display(field)
except something:
return field._get_val_from_obj(self)
```
And use it in your generator. | [
0.157014399766922,
-0.20344983041286469,
0.2932337522506714,
-0.02850198559463024,
0.07102734595537186,
-0.09872162342071533,
0.1294056922197342,
-0.12949183583259583,
-0.06327371299266815,
-0.8768895864486694,
-0.11939632147550583,
0.9208141565322876,
-0.07350844889879227,
-0.250034987926... | |
I've created a performancecounter that can check the total memory usage in %, but the problem is that it doesn't give me the same value as in task manager shows me. for example: my program says 34% but task manager says 40%.
Any ideas?
**NOTE**
I try to get the available RAM of the system, not the used RAM by a pr... | [
0.037722598761320114,
0.057369664311409,
0.5375990271568298,
-0.10099904239177704,
0.1768825650215149,
0.2596702575683594,
0.29067862033843994,
-0.32104966044425964,
-0.30661454796791077,
-0.7349773049354553,
-0.008781853131949902,
0.6458287239074707,
0.11466280370950699,
0.148271381855011... | |
progressbar and the label every second with a timer.
You could use GetPerformanceInfo windows API, it shows exactly the same values as Windows Task Manager on Windows 7, here is the console application that get's available physical memory, you could easily get other information that GetPerformanceInfo returns, consult ... | [
0.008137397468090057,
-0.030303331092000008,
0.8424318432807922,
0.05029148980975151,
-0.12518048286437988,
-0.06755802035331726,
0.3650290071964264,
-0.23178502917289734,
-0.2467576116323471,
-0.814898669719696,
-0.1381513625383377,
0.4824161231517792,
-0.002866654423996806,
0.10258776694... | |
System.Text;
using System.Runtime.InteropServices;
namespace ConsoleApplicationPlayground
{
class Program
{
static void Main(string[] args)
{
while (true)
{
Int64 phav = PerformanceInfo.GetPhysicalAvailableMemoryInMiB();
Int64 tot = PerformanceInfo.GetTotalMemoryInMiB();
... | [
-0.2396397888660431,
-0.14352744817733765,
0.6342216730117798,
0.029874909669160843,
0.5345405340194702,
0.2750887870788574,
0.33990415930747986,
-0.18172362446784973,
-0.10290805250406265,
-0.5361161231994629,
-0.4703415036201477,
0.6012371778488159,
0.016406770795583725,
0.21353673934936... | |
Console.WriteLine("Total Memory (MiB) " + tot.ToString());
Console.WriteLine("Free (%) " + percentFree.ToString());
Console.WriteLine("Occupied (%) " + percentOccupied.ToString());
Console.ReadLine();
}
}
}
public static class PerformanceInfo
{
[DllImport("psapi.dll", SetLas... | [
-0.0011901353718712926,
-0.2216128259897232,
0.33419156074523926,
0.10672368854284286,
0.2117714285850525,
0.05982218310236931,
0.28846585750579834,
-0.5858299732208252,
-0.0031384581234306097,
-0.5163758397102356,
-0.3660791218280792,
0.761553168296814,
-0.011556431651115417,
0.3211734890... | |
public int Size;
public IntPtr CommitTotal;
public IntPtr CommitLimit;
public IntPtr CommitPeak;
public IntPtr PhysicalTotal;
public IntPtr PhysicalAvailable;
public IntPtr SystemCache;
public IntPtr KernelTotal;
public IntPtr KernelPaged;
public IntPtr KernelNonPag... | [
-0.3235964775085449,
-0.05377605929970741,
0.4112226665019989,
0.25990813970565796,
-0.08212225139141083,
0.5415159463882446,
0.31345677375793457,
0.22340203821659088,
-0.23604077100753784,
-0.8197398781776428,
-0.7741058468818665,
0.695366621017456,
-0.06218956783413887,
0.132035091519355... | |
public int ProcessCount;
public int ThreadCount;
}
public static Int64 GetPhysicalAvailableMemoryInMiB()
{
PerformanceInformation pi = new PerformanceInformation();
if (GetPerformanceInfo(out pi, Marshal.SizeOf(pi)))
{
return Convert.ToInt64((pi.PhysicalAvailable.ToI... | [
0.10881857573986053,
-0.22134876251220703,
0.7840253710746765,
-0.05429314076900482,
0.2232600450515747,
0.2808822691440582,
0.5509193539619446,
-0.6124638915061951,
-0.09431183338165283,
-0.5886736512184143,
-0.26778945326805115,
0.5337550044059753,
-0.10366104543209076,
0.450400501489639... | |
return -1;
}
}
public static Int64 GetTotalMemoryInMiB()
{
PerformanceInformation pi = new PerformanceInformation();
if (GetPerformanceInfo(out pi, Marshal.SizeOf(pi)))
{
return Convert.ToInt64((pi.PhysicalTotal.ToInt64() * pi.PageSize.ToInt64() / 1048576));
}
... | [
0.020162789151072502,
-0.28562501072883606,
0.7120552062988281,
-0.04466024413704872,
0.020422473549842834,
0.1550455391407013,
0.4460419714450836,
-0.6185900568962097,
0.024440856650471687,
-0.6325392127037048,
-0.3578987121582031,
0.5397646427154541,
-0.24704870581626892,
0.2527074813842... | |
}
}
}
}
``` | [
-0.016344990581274033,
0.4495171308517456,
0.23163163661956787,
-0.18499617278575897,
0.39558660984039307,
-0.21481190621852875,
0.08800963312387466,
0.4133334159851074,
0.23730628192424774,
-0.5074179768562317,
-0.3644443452358246,
0.5587084293365479,
-0.3209930658340454,
0.33781036734580... | |
Im a new user in stackoverflow and this is my first question hope i wont be breaking any rules :)...
In my MVC3 project with EF4 and UnitOfWork Pattern,
When adding a new entity i have to check freshly added entities and the ones already stored in the database and calculate a column in new entity.
The problem is if ... | [
0.11600581556558609,
0.1214689090847969,
0.42860206961631775,
-0.06047150120139122,
-0.05617392063140869,
0.05814003944396973,
0.2839151918888092,
-0.3866977095603943,
-0.32767772674560547,
-0.6556339263916016,
0.27848225831985474,
0.5068376660346985,
-0.41100427508354187,
0.16179943084716... | |
like to know if this will bring some performance issues in the future. if so is there any other way to solve the issue?
Here is the relative code about the issue (simplified)
Model :
```
public class Group
{
public Guid GroupId { get; set; }
public int Code { get; set; }
}
```
Controller ... | [
-0.1780967265367508,
-0.2656364440917969,
0.3523608148097992,
0.19974331557750702,
0.17635583877563477,
-0.17026348412036896,
-0.11906564980745316,
-0.28868961334228516,
-0.2079300582408905,
-0.6707304120063782,
-0.031191401183605194,
0.7702120542526245,
-0.5449271202087402,
0.150798574090... | |
UserGroupId = Guid.NewGuid(),
Code = (int)Math.Pow(2, (unitOfWork.GroupRepository.Get().Count()));
};
unitOfWork.GroupRepository.Insert(Group1);
UserGroup Group2 = new Group()
{
UserGroupId = Guid.NewGuid(),
Code = (int)Math.Pow(2, (unitOfWork.GroupRe... | [
-0.5154023766517639,
-0.09141802042722702,
0.29872798919677734,
-0.3784235119819641,
-0.011026245541870594,
0.1584620624780655,
0.30674242973327637,
-0.36481693387031555,
-0.08255001157522202,
-0.556296706199646,
-0.37470149993896484,
0.6261023879051208,
-0.3773156404495239,
-0.18116708099... | |
unitOfWork.GroupRepository.Insert(Group2);
```
Insert Method : (derived from generic repository not to send all the repository pattern)
```
public virtual void Insert(Group grouptoadd)
{
UnitOfWork unitOfWork = new UnitOfWork(Context);
dbSet.Add(grouptoadd);
unitOfWork.Save();
}
... | [
-0.07311399281024933,
-0.04996827244758606,
0.25604134798049927,
-0.3185938596725464,
0.37512969970703125,
0.10036607086658478,
0.3045344650745392,
-0.5084959864616394,
0.0044781179167330265,
-0.5283260345458984,
-0.19183209538459778,
0.6818522810935974,
-0.3057405948638916,
0.106855779886... | |
Context
```
(int)Math.Pow(2, (Context.Groups.Count()));
```
this code always returns 1. I could see the Entities inside the Context in debug mode but Count returns 0.
In the end i need : (newly added entities + entities stored in the database).Count()
You might want to use DbSet's `Local` property. Refer the artic... | [
-0.12223801761865616,
0.252135306596756,
0.2414570152759552,
-0.05814508721232414,
-0.0540468767285347,
-0.205201655626297,
0.5431933403015137,
-0.2643868625164032,
-0.2028326690196991,
-0.45174020528793335,
-0.21530838310718536,
0.748185396194458,
-0.23040375113487244,
0.06026041507720947... | |
I'm having some issues in doing a simple regex using sed.
I've to do some replacement in a sql file and I'm trying to use sed.
I should replace the url of some links. The links are in the following format:
*www.**site1**.com/blog/2012/12/12*
I would like to replace **site1** with **site2** in all links.
To find t... | [
0.21100927889347076,
0.325832724571228,
0.4953975975513458,
-0.07270608097314835,
-0.09257419407367706,
-0.2696336805820465,
0.3229888379573822,
0.1611398607492447,
-0.2526194751262665,
-0.7664417624473572,
-0.09372656792402267,
0.31523051857948303,
-0.26151010394096375,
0.2328612059354782... | |
regular expressions.
```
sed -r 's:site1.com(/blog/[0-9]{4}/[0-9]{2}/[0-9]{2}):site2.com/\1:'
```
as a basic regular expression (requires lots of escaping):
```
sed 's:site1.com\(/blog/[0-9]\{4\}/[0-9]\{2\}/[0-9]\{2\}\):site2.com/\1:'
```
ps. you don't need to escape slashes if you use different delemiters (`:`) | [
-0.458280086517334,
-0.03653861954808235,
0.35857170820236206,
0.06810155510902405,
-0.2146851271390915,
0.1701730489730835,
0.706543505191803,
0.036437999457120895,
-0.4658135175704956,
-0.5729602575302124,
-0.7023277878761292,
0.3927536606788635,
-0.4863830804824829,
-0.3215399384498596,... | |
<http://jsfiddle.net/pC6fC/1/>
I have two divs, one above the other. When the first animates, which it does, it slides below the other. How can I make sure that when the first animates it pushes the second downwards without having to animate both DIVs.
You could use margin, instead of top. As both of your divs are rel... | [
-0.2755897641181946,
-0.3828177750110626,
0.5479370951652527,
-0.1973738968372345,
-0.34173479676246643,
0.38373246788978577,
-0.1876010298728943,
-0.3503366708755493,
-0.14155647158622742,
-0.7988569736480713,
0.2120181918144226,
0.487832248210907,
0.005219894461333752,
-0.125764966011047... | |
I am trying to add the Javadoc location in Eclipse Helios on OSX Lion 10.7.3. I just installed the Java for Developers 2012-01 from Apple.
I have the following problem: There is no src.jar/docs.jar file in my Java install folder (/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home).
Did they remove it fr... | [
0.04672393575310707,
0.4325723350048065,
0.41096463799476624,
-0.5329030752182007,
-0.08100371807813644,
-0.04816654697060585,
0.4461327791213989,
0.032261282205581665,
-0.20296289026737213,
-1.0475351810455322,
-0.12338253855705261,
0.6163011193275452,
-0.2663428783416748,
0.1198120191693... | |
I want to create new area in WordPress administration with a button in the menu area. And to have there news feeds in widgets.
Or maybe create new widgets in the dashboard with custom rss feeds, like a "wordpress.org news" and others.
Just add this to stop click event propagation on all hyperlinks inside #ablock
```
... | [
0.15890729427337646,
-0.025448419153690338,
0.5055792927742004,
0.004529330413788557,
0.16575218737125397,
0.007402327377349138,
0.27085715532302856,
0.11912314593791962,
-0.14880260825157166,
-0.631026566028595,
-0.1862475872039795,
0.7297540903091431,
-0.41260826587677,
-0.06633114069700... | |
I need help understanding how to demonize a process in Go.
```
package main
import (
"fmt"
"os"
)
func start() {
var procAttr os.ProcAttr
procAttr.Files = []*os.File{nil, nil, nil}
_, err := os.StartProcess("/Path/prog", nil, &procAttr)
if err != nil {
fmt.Printf("%v", err)
}
}
func mai... | [
-0.13419148325920105,
0.10003726929426193,
0.7066125273704529,
-0.2583927810192108,
0.16860412061214447,
0.021610530093312263,
0.5894011855125427,
-0.14740388095378876,
0.018969189375638962,
-0.4043830335140228,
-0.5390453338623047,
0.8534970283508301,
-0.43588361144065857,
0.1410761177539... | |
true
```
Results in this error: "panic" to wrong memory pointer
I asked in 'golang-nuts', and found out that Go has a link option:
```
go tool 8l -o output.exe -Hwindowsgui input.8
``` | [
-0.24561060965061188,
0.02584729716181755,
0.22393962740898132,
-0.1592385172843933,
0.21479836106300354,
-0.16616475582122803,
0.5002543926239014,
0.2542836368083954,
-0.1710887849330902,
-0.43195563554763794,
-0.04102398455142975,
0.764199435710907,
-0.3848859667778015,
-0.12570911645889... | |
I am trying to update an entity with a FK relationship in EntityFramework 4.3 Code First.
I try to attach to the related entites by calling: Entry(item).State = EntityState.Unchanged
I get the following exception: *An object with the same key already exists in the ObjectStateManager. The ObjectStateManager cannot trac... | [
-0.06994970142841339,
0.13843129575252533,
0.430711030960083,
-0.04846564307808876,
-0.07557026296854019,
0.02365698665380478,
0.3059197962284088,
-0.11083079129457474,
-0.32754775881767273,
-0.5047428607940674,
0.05878777056932449,
0.38773104548454285,
-0.3245578408241272,
0.5295369029045... | |
e == entity);
}
```
Place that code into your context or you can turn it into an extension like so.
```
public static bool Exists<TContext, TEntity>(this TContext context, TEntity entity)
where TContext : DbContext
where TEntity : class
{
return context.Set<TEntity>().Local.Any(e => e == entity);
}
``` | [
0.10954488068819046,
0.023806791752576828,
0.3939599096775055,
-0.0656229630112648,
-0.05449436604976654,
-0.08432371914386749,
0.20331670343875885,
-0.23038171231746674,
0.04218732938170433,
-0.6781624555587769,
-0.44849511981010437,
0.37784016132354736,
-0.48115772008895874,
0.2845002114... | |
In my previous question I had a problem with sending parameters over the command line to an PHP file. The PHP is sending an json back, but I only receive true or false.
Previous question:
[Rails, PHP and parameters](https://stackoverflow.com/questions/10026109/rails-php-and-parameters/10026237#10026237)
New problem:
... | [
0.037888143211603165,
0.09804268926382065,
0.35626840591430664,
-0.1664993315935135,
-0.4295180141925812,
0.3152390122413635,
0.5173516869544983,
-0.6176205277442932,
-0.27048906683921814,
-0.2862264811992645,
0.060794610530138016,
0.5368140935897827,
-0.20732976496219635,
0.13756492733955... | |
next_ uninitialized here
}
```
Some members (`const` members or user-defined class members with no default constructors) can't be initialized outside the initializer list:
```
class A
{
const int x;
A() { x = 0; } //illegal
};
class A
{
const int x;
A() : x(0) { } //legal
};
```
It's also worth ... | [
-0.44675955176353455,
-0.41566604375839233,
0.17880234122276306,
-0.2029752880334854,
0.49445411562919617,
-0.11326219141483307,
0.0492527037858963,
-0.2796022295951843,
-0.21341288089752197,
-0.5750489830970764,
-0.5527621507644653,
0.18267108500003815,
-0.4936973452568054,
0.139117091894... | |
// b is initialized twice - output "default b"
A() : b(1) { } // b initialized only once - output "b"
};
```
It's the preffered way of initializing members. | [
-0.1878521740436554,
0.08578408509492874,
-0.16713380813598633,
-0.47823888063430786,
-0.041742049157619476,
0.12787169218063354,
0.11455181241035461,
-0.42035794258117676,
-0.1391109973192215,
-0.10237408429384232,
-0.4697694480419159,
0.3450929522514343,
-0.45868170261383057,
-0.05400829... | |
I have a problem, and I made this test code to show you my problem.
* HTML code: <http://i.stack.imgur.com/7qlZx.png>
* Javascript code: <http://i.stack.imgur.com/DYvuq.png>
What I want to do is to change the styles of the id. But for some reason it doesn't work.
I don't know what’s happening and I really need your... | [
0.10337524116039276,
0.32366201281547546,
0.26048097014427185,
0.1571124792098999,
-0.1117478758096695,
0.10810685902833939,
0.6882636547088623,
-0.6170793771743774,
-0.147747203707695,
-0.5745712518692017,
0.009835523553192616,
0.44078072905540466,
-0.44386211037635803,
0.0786963477730751... | |
I have the following global in variable in file\_1.pl, in package main:
```
package main;
my $var = -1;
```
If I need to update this variable from another perl file, what is the way of doing it? I tried:
```
$main::var = 1
```
But it did not work.
What is the correct way of doing it?
Thank You!
you have to dec... | [
-0.20133095979690552,
0.12206690013408661,
0.5308133363723755,
-0.0905618891119957,
-0.01983809284865856,
0.0039200559258461,
0.4155873954296112,
0.3882308006286621,
-0.3023119866847992,
-0.5235283374786377,
-0.023701034486293793,
0.6025861501693726,
-0.4209136366844177,
0.2431547790765762... | |
I want to use show a "Loading Image" on the click of server side button, that should be unloaded after the button event completes.
<http://ajax.net-tutorials.com/controls/updateprogress-control/>
have to use Javascript in this.
```
$('#btnChange').click(function (event) {
if (event.preventDefault) event.preventD... | [
0.14437171816825867,
-0.0437765046954155,
0.5642237663269043,
-0.2201070487499237,
-0.003155347891151905,
-0.01790108159184456,
0.3750740885734558,
-0.21908622980117798,
-0.00864117406308651,
-0.8953692317008972,
0.0058378963731229305,
0.5716869831085205,
-0.15519191324710846,
-0.016174575... | |
for JSON.stringify() method
contentType: "application/json; charset=utf-8",
dataType: "json",
beforeSend: function () {
$('#imageid').attr('src', '../images/load.gif');
//Show Loading Image which will show the progress
},
success: function (msg) {
... | [
-0.04469050094485283,
-0.28746214509010315,
0.6654365658760071,
-0.2898131310939789,
0.07827620953321457,
0.1288520246744156,
0.41017481684684753,
-0.4590854346752167,
-0.3693024218082428,
-0.5118633508682251,
-0.5685123801231384,
0.5970070362091064,
-0.21537482738494873,
-0.13989849388599... | |
},
error: function (xhr, status) {
//when error occurs
}
});
});
``` | [
-0.09857111424207687,
0.11559705436229706,
0.27103161811828613,
-0.249899759888649,
0.46957987546920776,
0.14419996738433838,
0.28587210178375244,
-0.15239576995372772,
0.06257189810276031,
-0.3413844704627991,
-0.5446082949638367,
0.8116199970245361,
-0.4650629460811615,
0.322113662958145... | |
In my model I have three complex scopes returning the Discount object arrays. Each of these can overlap, and I want to do some Ruby array union/intersection/substraction operations.
I guess these operations depend on the object id. I am wondering if Discount queries will return the same record as the same object when ... | [
0.1209191307425499,
-0.08048499375581741,
0.3050882816314697,
0.0753435418009758,
-0.18762119114398956,
0.24007903039455414,
-0.0003830438945442438,
-0.3524842858314514,
-0.3451443314552307,
-0.7485718131065369,
0.3370060622692108,
0.5303880572319031,
-0.15561985969543457,
0.11251302063465... | |
row. Check the `object_id` if you need convincing.
In Rails 3.1 and above you can turn on the [identity map](http://api.rubyonrails.org/classes/ActiveRecord/IdentityMap.html). This ensures that inside a given request a single row in the database will always be represented by a single ruby object. There are still some ... | [
0.07919654250144958,
-0.07558277994394302,
0.5070159435272217,
-0.07514868676662445,
-0.1658448427915573,
0.17366299033164978,
0.18878671526908875,
-0.190673828125,
-0.22313904762268066,
-0.7279360294342041,
0.1386197805404663,
0.381537526845932,
-0.6466503143310547,
0.14616313576698303,
... | |
I'm just finishing a relatively big project in scala and will start another related one soon.
I haven't chosen the language yet and would like my decision to be based more on features of the language or available libraries than interoperability concerns.
And this is the reason to ask this.
My requirements are (top i... | [
0.1990242451429367,
0.1114697977900505,
0.10306541621685028,
-0.01877746917307377,
-0.08486358076334,
-0.21434377133846283,
0.26834970712661743,
-0.014888657256960869,
-0.23880541324615479,
-0.622629702091217,
-0.1629885733127594,
0.45697852969169617,
-0.23635239899158478,
-0.2477477192878... | |
across various platforms is to use a [message passing](http://en.wikipedia.org/wiki/Message_passing) library.
ZeroMQ is one of my favourite due to its simplicity, speed, and the availability of bindings for a significant number of languages: <http://www.zeromq.org/bindings:_start>
You could also use ActiveMQ, RabbitM... | [
0.33237725496292114,
-0.1454468071460724,
-0.028402291238307953,
0.19810888171195984,
-0.4972391426563263,
-0.26941126585006714,
-0.14538580179214478,
0.13376440107822418,
-0.3704379200935364,
-0.5918387174606323,
0.19434985518455505,
-0.029276791960000992,
-0.5078290700912476,
0.124014683... | |
I want to achieve the following hierarchical navigation model in a WPF MVVM application:
```
ShellView
Page1View
Subpage1View
Subpage2View
Subpage3View
Page2View
...
```
Meaning that on Shellview, I have buttons to activate/deactivate Page1View and Page2View. On Page1View has... | [
0.10612771660089493,
0.01978554017841816,
0.6506826281547546,
-0.3819337487220764,
-0.17943204939365387,
0.009915049187839031,
0.48280447721481323,
-0.3999723494052887,
-0.13952623307704926,
-0.7119103670120239,
-0.1930900514125824,
0.7388861179351807,
-0.2689334750175476,
0.07188570499420... | |
I mean, I have a ContentControl (named ActiveItem) on ShellView, where Page1View and Page2View is displayed when activated. Should the Subpage1View be displayed on Shell's ActiveItem ContentControl or on the parent view (Page1View) ?
1. If I should display a subpage on ShellView, then how to activate it properly ? Bec... | [
0.1132134422659874,
-0.22416116297245026,
0.5605599880218506,
-0.051312074065208435,
-0.1598900854587555,
-0.4750039279460907,
0.44421645998954773,
-0.168765127658844,
-0.14920398592948914,
-0.8612509369850159,
-0.34105247259140015,
0.8806847333908081,
-0.3438805639743805,
0.00098760414402... | |
Caliburn.Micro 1.3, .NET 4, WPF.
Thanks!
I threw a demo together. I'm not sure if it's exactly what you're looking for. The thing to remember is `Screens` and `Conductors` can contain `Screens` and/or `Conductors`. So nesting or doing complex screen composition is pretty straight forward.
This example has a `ShellVie... | [
0.22361686825752258,
0.03893817961215973,
0.24661895632743835,
-0.0005471419426612556,
-0.1092967689037323,
-0.171529158949852,
0.056282561272382736,
-0.17533710598945618,
0.159562885761261,
-0.8785447478294373,
0.03748702257871628,
0.8848149180412292,
-0.19394704699516296,
0.0201055034995... | |
I've developed a windows form application. However,I want to upload data from that application into a cloud server and then develop a web application to retrieve that data. Is it possible to accomplish that using windows azure?
If not, is there any way to accomplish that?Any help is appreciated! Thanks!
Regards
I thr... | [
0.6111257672309875,
-0.1373681277036667,
0.3712952733039856,
0.23746460676193237,
0.07429138571023941,
-0.21940705180168152,
-0.21816948056221008,
-0.005085119977593422,
-0.13405194878578186,
-1.1232142448425293,
0.40852758288383484,
0.41611334681510925,
-0.13471285998821259,
0.05218282714... | |
2 buttons and a `ContentControl`.
Clicking `Page1` or the `Page2` button on the `ShellView` activates the appropriate `Page`. The same is true once a `Page` is activated, clicking on `SubPage1` or `SubPage2` activates the appropriate `SubPage`.
<https://bitbucket.org/dbeattie/cmwpfnavsample/src> | [
-0.10066260397434235,
-0.23303008079528809,
0.4906744658946991,
0.009115966968238354,
0.01494579017162323,
-0.1641589105129242,
0.22837482392787933,
-0.021344635635614395,
-0.11547626554965973,
-0.4412377178668976,
-0.6392422318458557,
0.6541004776954651,
-0.26165276765823364,
-0.140356793... | |
I have a file that contains around thousands of lines. Format of every line is as below:
```
02:17:15.204 1.217 890 322 GET 200 text/html http://stage.youbeauty.com/body-fitness/galleries/gluten-free-bodycare
02:17:16.530 0.304 313 (7592) GET (Cache) text/javascript http://use.typekit.com/lqi6pyj.js
02:17... | [
0.5989612936973572,
0.11624424159526825,
0.6807188987731934,
-0.08572694659233093,
0.0023507135920226574,
0.6075238585472107,
0.46315714716911316,
-0.5011287927627563,
-0.2032843679189682,
-0.5862641930580139,
0.07004747539758682,
0.2082207202911377,
-0.004293645732104778,
-0.2890083491802... | |
script like java script )
I threw a demo together. I'm not sure if it's exactly what you're looking for. The thing to remember is `Screens` and `Conductors` can contain `Screens` and/or `Conductors`. So nesting or doing complex screen composition is pretty straight forward.
This example has a `ShellView` with 2 button... | [
0.09928324818611145,
-0.20344612002372742,
0.11576864868402481,
0.10786771029233932,
-0.1640714406967163,
-0.3836934268474579,
0.23996612429618835,
0.05545557290315628,
-0.018662407994270325,
-1.0325578451156616,
-0.0923515260219574,
0.5088943839073181,
-0.19945766031742096,
-0.25460782647... | |
When I declare a property without a storage specification + instance variable, everything works happily:
```
@interface Foo : NSObject {
NSSomething* mySomething;
}
@property (readonly) NSSomething* mySomething;
```
Yet, when I delete the instance variable declaration, I get a compilation error stating that I mu... | [
0.26249241828918457,
0.22288702428340912,
0.5344031453132629,
-0.06547441333532333,
0.10535850375890732,
-0.3443721830844879,
0.45728588104248047,
-0.366010844707489,
-0.3414757549762726,
-0.5630311965942383,
-0.19068105518817902,
0.792474091053009,
0.05829675495624542,
0.23854705691337585... | |
readonly in there for sure.
If you want the ivar to be synthesised for you, though, the compiler needs to know whether to make it strong, weak, or unsafe untrained. The default is assign which translates to unsafe unretained (which probably isn't what you want). Others are reporting that the compiler handles the defau... | [
0.093473881483078,
0.021113401278853416,
0.04441489651799202,
0.00919970590621233,
-0.11356427520513535,
-0.19187870621681213,
0.32112985849380493,
-0.3180887699127197,
-0.21612891554832458,
-0.34324055910110474,
-0.1918015033006668,
0.754048228263855,
-0.20895184576511383,
0.0682929754257... | |
I'm currently trying to post a JSON object from my view to my controller in an MVC 3 app and I'm expecting the data from the request to bind to the model parameter of my controller action. However, when I inspect the HTTP POST request, it looks like the data is being passed as a query string and I'm unsure why (pretty ... | [
0.17038632929325104,
-0.10470262169837952,
0.47232845425605774,
-0.0007925036479718983,
-0.19774436950683594,
0.08065973967313766,
0.25481706857681274,
0.05138877034187317,
-0.10276550054550171,
-0.7695907950401306,
-0.024000724777579308,
0.20871692895889282,
-0.36362507939338684,
0.217168... | |
Name: name, Age: age },
success: function (data) {
console.log("success");
},
error: function (xhr, data, message) {
console.log(data + ": " + message);
},
dataType: "json"
});
```
Here's the code from my Controller followed by the code for the model... | [
-0.14010295271873474,
0.02614593505859375,
0.6841181516647339,
0.11197814345359802,
0.5198289752006531,
0.32484665513038635,
0.1039850264787674,
-0.17268013954162598,
-0.03436601534485817,
-0.550530195236206,
-0.12351341545581818,
0.4081759750843048,
-0.04373033344745636,
0.537819445133209... | |
trying to bind to:
```
[HttpPost]
public ActionResult Add(PersonModel person)
{
System.Threading.Thread.Sleep(1000);
return View();
}
// person model:
public class Person {
public string Name {get;set;}
public int Age {get;set;}
}
```
This is the reques... | [
-0.19998197257518768,
0.021833576261997223,
0.33123835921287537,
-0.13348941504955292,
0.05228402465581894,
0.3330176770687103,
0.4780210852622986,
-0.34572750329971313,
-0.26900914311408997,
-0.4516671299934387,
-0.2696535289287567,
0.4027831554412842,
-0.08420845866203308,
0.090116165578... | |
"application/json" and that the data wouldn't look like a query string - I thought it would look something like this:
```
{
Name: "James",
Age: 13
}
```
Ultimately the problem is that if I stick a breakpoint in my controller action I expect to see a populated Person object but it's always null. If I replace ... | [
0.1382351815700531,
0.2503349483013153,
0.4051484167575836,
0.0015885982429608703,
0.6005784273147583,
-0.037723980844020844,
0.2652423083782196,
0.09955335408449173,
-0.5661905407905579,
-0.43272921442985535,
-0.02399083971977234,
-0.06390135735273361,
-0.2668858766555786,
0.3871514797210... | |
and just FYI, I'm not actually 13! Those were the first numbers I mashed.
Thanks!
James
@David is correct in that you need to set the contentType to 'application/json'. But you also need to send JSON. You are sending an object over. To convert it to JSON use JSON.stringify. I tried sending it over as an object with t... | [
0.28311964869499207,
0.1951119303703308,
0.4338729977607727,
-0.07729361206293106,
-0.06833074241876602,
0.02299613319337368,
0.5968969464302063,
-0.056149788200855255,
-0.5003517866134644,
-0.9054009914398193,
-0.18030695617198944,
-0.0880889967083931,
-0.1331927478313446,
0.1651216447353... | |
as JSON and display them.
Here is the modified Controller
```
[HttpPost]
public string Add(PersonModel person)
{
JavaScriptSerializer serializer = new JavaScriptSerializer();
string result = serializer.Serialize(person);
return result;
}
// person model:
public cl... | [
-0.29491451382637024,
-0.46314969658851624,
0.32054558396339417,
-0.13437260687351227,
-0.042016949504613876,
0.3155747950077057,
0.06493354588747025,
-0.3318747878074646,
-0.37042152881622314,
-0.626484215259552,
-0.3576376438140869,
0.49724456667900085,
-0.2786730229854584,
0.03571291640... | |
public int Age { get; set; }
}
```
The modified Javascript and HTML looks like this:
```
<input id="doAjax" type="button" value="Send Json..."/>
<br />
Results:<br />
<textarea id="results" cols="30" rows="3"></textarea>
<script type="text/javascript">
$( document ).ready( function () {
$( "#doAjax" ).cl... | [
0.11517173051834106,
0.004935785662382841,
0.43373167514801025,
-0.5465506911277771,
0.20493492484092712,
0.24703559279441833,
0.48160097002983093,
-0.3901839852333069,
-0.16100622713565826,
-0.4816417694091797,
-0.4011666774749756,
0.16915516555309296,
-0.26544317603111267,
0.117936722934... | |
url: "Test/Add",
data: personJson,
contentType: 'application/json',
success: function ( data ) {
var jsonStr = JSON.stringify( data );
$( "#results" ).val( jsonStr );
},
error: function ( xhr, data, message ) { | [
0.030263246968388557,
-0.15823763608932495,
0.28002190589904785,
0.011414485052227974,
-0.15852035582065582,
0.4212818443775177,
0.7002434730529785,
-0.1439344733953476,
-0.042185161262750626,
-0.2775503098964691,
-0.5082749724388123,
0.4941296875476837,
-0.0691070482134819,
0.135014832019... | |
var jsonStr = JSON.stringify( data );
$( "#results" ).val( jsonStr + ": " + message );
},
dataType: "json"
} );
}
```
Here are the results of some tests:
data = person; contentType = not set; request = "Name=James&Age=13"; response = "{"Name":"James","Age":13}"
data = personJson; con... | [
-0.17404627799987793,
-0.12088052928447723,
0.4079305827617645,
-0.25828927755355835,
0.21485759317874908,
0.5982204079627991,
0.8288535475730896,
-0.5399335026741028,
-0.31595665216445923,
-0.3123268783092499,
-0.5384912490844727,
0.06682863086462021,
0.013620072044432163,
0.1217437759041... | |
= 'application/json'; request = "{"Name":"James","Age":"13"}"; response = "{"Name":"James","Age":"13"}"
Note that when the contentType is not set it defaults to 'application/x-www-form-urlencoded' | [
0.3189261555671692,
0.10009648650884628,
0.7229456305503845,
-0.2760423719882965,
0.22195306420326233,
-0.0312414038926363,
0.38159874081611633,
-0.05765458941459656,
-0.06479494273662567,
-0.3109323978424072,
-0.8521427512168884,
-0.14162465929985046,
-0.10818835347890854,
0.5578519105911... | |
I'm usually not someone who posts in a forum, since I was always able to find something without bothering anyone. Anyway, this time I had no luck.
I have programmed a DB-Communications-System for my website, where you can leave messages for the rest of the family from a Java application, an Android app and the website... | [
0.922599732875824,
0.2560012638568878,
0.2890964150428772,
-0.17728875577449799,
-0.017819419503211975,
0.07314416021108627,
0.446908175945282,
0.016678357496857643,
-0.16210156679153442,
-0.45640185475349426,
-0.207372784614563,
-0.1556873321533203,
-0.24462862312793732,
0.507861614227294... | |
the page to read the currently logged in user and automatically set the 'From' Variable according to this user.
On many pages I have found
```
$GLOBALS['TSFE']->fe_user->user
```
and the accordig variations of it, but no matter how I tried to get something out of it,
`strleng()` is always 0,
`print_r($_GLOBA... | [
0.31870439648628235,
0.12553821504116058,
0.7643073201179504,
0.003823176259174943,
-0.1533636599779129,
-0.17777834832668304,
0.4429384171962738,
0.05110800266265869,
-0.020459389314055443,
-0.721085250377655,
-0.11965642869472504,
0.5294798612594604,
-0.2548200786113739,
0.17675562202930... | |
print\_r($\_GLOBALS['TSFE']) is always empty
you should try `$GLOBALS['TSFE']` and *not* `$_GLOBALS['TSFE']`
so `$GLOBALS['TSFE']->fe_user->user` is absolutely correct to check for a logged in user
---
Addendum 2019-08-15:
Depending on what your are trying to achieve or what exact information you are looking for an... | [
0.13157805800437927,
0.11795288324356079,
0.9148015379905701,
0.04371189698576927,
0.3035212457180023,
-0.5035239458084106,
0.331166535615921,
-0.36062091588974,
-0.3392550051212311,
-0.6232604384422302,
-0.34941184520721436,
0.6967834234237671,
-0.4486714005470276,
0.019515275955200195,
... | |
what will be the regular expression for a table with class name `tn_result`?
I have tried two expressions given below but neither is working. What is wrong with them? How can I make this work?
```
string TableExpression = "<TTable class=\"tn_results\">(.*?)</table>";
```
> print\_r($\_GLOBALS['TSFE']) is always emp... | [
0.10693983733654022,
-0.1685471534729004,
0.8144184350967407,
0.04931877180933952,
0.26343998312950134,
-0.41022440791130066,
0.2717680037021637,
-0.13484562933444977,
-0.6026487946510315,
-0.8287186622619629,
-0.19658999145030975,
0.8555347919464111,
-0.42783209681510925,
0.07278671115636... | |
with your TYPO3 you can retrieve his ID by
```
$GLOBALS['TSFE']->fe_user->user['uid'];
``` | [
0.08130275458097458,
0.18159441649913788,
0.5340130925178528,
0.0716777965426445,
0.19719314575195312,
-0.04030786454677582,
0.2755066156387329,
-0.15782427787780762,
-0.09154736995697021,
-0.7394372224807739,
-0.3812149465084076,
0.23664461076259613,
-0.5563194155693054,
-0.10461800545454... | |
a short question: is it possible to assign the result of a calculation within a generator expression to a referrer?
Let's assume I have an expression like this:
`m = (float(i.dist) - float(base) for i in met_obj if str(i.code) != '90')`
`i.dist` is an attribute of an object which I want to chance. I tried:
`m = (f... | [
0.08207228034734726,
0.1300511211156845,
0.11629339307546616,
0.020413177087903023,
-0.3646165728569031,
0.15999279916286469,
0.31649863719940186,
-0.37513256072998047,
0.027126727625727654,
-0.47200700640678406,
0.20143550634384155,
0.30456283688545227,
-0.18011943995952606,
-0.1010073944... | |
I want something to put in my `.htaccess` file that will hide the `.php` file extension for my php files, so going to www.example.com/dir/somepage would show them www.example.com/dir/somepage.php.
Is there any working solution for this? My site uses HTTPS, if that matters at all.
This is my .htaccess at the moment:
... | [
-0.0011126142926514149,
0.3455614149570465,
0.8734006881713867,
-0.2568381726741791,
0.2132023721933365,
0.05656113848090172,
0.3836095631122589,
-0.3743733763694763,
-0.04538683965802193,
-0.7131296396255493,
0.025901110842823982,
0.7669290900230408,
-0.22680702805519104,
0.20304597914218... | |
[NC]
RewriteRule ^ %{REQUEST_URI}.php [L]
```
It should be noted that this will also effect all HTTP requests, including POST, which will subsequently effect all requests of this kind to fall under this redirection and may potentially cause such requests to stop working.
To resolve this, you can add an exception int... | [
-0.259869247674942,
-0.065613754093647,
1.1107264757156372,
-0.12010744959115982,
0.12042068690061569,
0.10050242394208908,
0.32923227548599243,
-0.40015795826911926,
-0.3034759759902954,
-0.21297965943813324,
-0.10267254710197449,
0.5063300728797913,
-0.3349830210208893,
0.435200631618499... | |
Now this is example list :
```
List<List<KeyValuePair<string, double>>> dblWordFreqByCluster =
new List<List<KeyValuePair<string, double>>>();
```
What i want is getting the list count at this main list (dblWordFreqByCluster). Which means getting count of `List<KeyValuePair<string, double>>` lists.
I can coun... | [
0.018304431810975075,
0.07433193922042847,
0.3646661937236786,
-0.43922021985054016,
-0.10684846341609955,
-0.14931926131248474,
0.41555097699165344,
-0.5706642866134644,
-0.20626430213451385,
-0.7362512946128845,
-0.027131859213113785,
0.6471021175384521,
-0.43940144777297974,
-0.00818015... | |
I have an array on javascript and i insert the elements on it like this:
```
var parentRow = $(button).parent().parent();
list.push({ parent: parentRow, detailRow: newRow });
```
On the click of another button i do the following:
```
var parentRow = $(button).parent().parent();
var detailRow = null;
... | [
-0.025250684469938278,
-0.07462843507528305,
0.18392860889434814,
-0.2944817841053009,
0.08204065263271332,
0.22770950198173523,
0.2144860029220581,
-0.500043511390686,
0.11638327687978745,
-0.703037440776825,
-0.08108417689800262,
0.3047071397304535,
-0.13769452273845673,
0.33797845244407... | |
}
```
The point is: The if comparing to two elements should return TRUE, because they are the same DOM element....the same i added before, but it return FALSE.
I would like to know how i compare this two elements to get TRUE there.
You need to compare the native elements, not the jQuery-wrapped elements. jQuery's DO... | [
0.004904531873762608,
0.029788509011268616,
0.08392363041639328,
-0.06546714156866074,
0.0034579853527247906,
-0.08973275870084763,
0.3214932084083557,
-0.42070624232292175,
0.13622193038463593,
-0.5335750579833984,
0.030097445473074913,
0.8250012993812561,
-0.24046826362609863,
0.13266181... | |
I'm in a worker thread and want to sleep for a specified period of time (usually a few hundreds milliseconds), but the sleep should be interruptible. Here is what I have come up with
```
void DummyScope::sleepForSamples() {
if(m_sampleSleep < 100) {
MySleeper::sleep(m_sampleSleep);
return;
}
// s... | [
0.5330012440681458,
-0.16079887747764587,
0.5434432625770569,
-0.30269744992256165,
0.4086498022079468,
0.021209970116615295,
0.4124411344528198,
-0.21429245173931122,
-0.144272580742836,
-0.5875834226608276,
-0.19003155827522278,
0.3963676989078522,
-0.04812515154480934,
0.189983174204826... | |
MySleeper::sleep(100);
t = QDateTime::currentMSecsSinceEpoch();
// TODO: check here whether we are interrupted
}
if(end > t) {
MySleeper::sleep(end - t);
}
}
```
However that looks a bit convoluted and I wonder whether there's a better way to do this. Is using a `QWaitCondition` with a ti... | [
0.19188520312309265,
-0.13593944907188416,
0.5128291845321655,
-0.10325191915035248,
0.2556108832359314,
-0.028087398037314415,
0.666109561920166,
0.05752161517739296,
-0.1894686371088028,
-0.773360013961792,
-0.24144047498703003,
0.4711955189704895,
-0.16122141480445862,
0.215425848960876... | |
The title is not very clear, so I'll try to explain better.
I have a RelativeLayout with an editable text box at its bottom. Before this editable textfield I have a ListView. Right now, if the list contains many elements, the last list rows are not shown because they are "under" the editable text field.
How can I avo... | [
0.176744744181633,
-0.011689846403896809,
0.6198887825012207,
-0.09036924690008163,
-0.01252832729369402,
-0.13170912861824036,
0.06410041451454163,
-0.19171501696109772,
0.05480770766735077,
-0.7222163081169128,
0.021229809150099754,
0.7631827592849731,
-0.1661316454410553,
0.273231893777... | |
How can I create a pie chart with CSS like the one below?

Oh my! Have you seen Google Chart Tools?
<https://google-developers.appspot.com/chart/interactive/docs/gallery/piechart>
This is stupid easy to implement, but my problem with it is the "exte... | [
0.38559582829475403,
0.2344888299703598,
0.14557646214962006,
0.292301207780838,
-0.04823131486773491,
0.05380455031991005,
0.4021468460559845,
0.12509669363498688,
-0.10761991888284683,
-0.7547140717506409,
0.2080203890800476,
0.5739989280700684,
0.19607362151145935,
-0.000686076353304088... | |
Is there a platform function that will do the following?
```
convertBase :: (Num a, Num b) => Int -> Int -> [a] -> [b]
```
Convert a number from base 'a' to base 'b' where each list item is a digit in the number.
for example:
```
convertBase 2 10 [1,1,0,1] = [1, 3]
```
*I hope that makes sense, let me know if i ... | [
0.053737375885248184,
-0.02159412018954754,
0.2725648581981659,
0.04534601792693138,
-0.04826933145523071,
-0.015064351260662079,
-0.029306326061487198,
-0.43876802921295166,
-0.17570407688617706,
-0.4780735373497009,
-0.1641833484172821,
0.4932229220867157,
-0.226266548037529,
-0.02395117... | |
and output types to be different. Also, the `Integral` constraint makes more sense than `Num`, since you probably don't want to deal with complex or floating-point digits. | [
-0.3745259940624237,
-0.015806423500180244,
-0.1013796254992485,
0.18211470544338226,
-0.05939336121082306,
-0.00861209537833929,
-0.2879917621612549,
-0.24505221843719482,
-0.14572015404701233,
-0.2853390574455261,
0.0463809110224247,
0.4259810745716095,
-0.11242824047803879,
0.0066453823... | |
There is a new style of implemention menues which I see around stylish web sites: an expandable menu items. You can see a demo at [g4interactive.com](http://g4interactive.com/)
A stable menu looks like a vertical list of images:

When you mouse over any of them, the... | [
0.16396334767341614,
-0.35581791400909424,
0.5019325017929077,
0.06718767434358597,
-0.10551013052463531,
-0.000802116293925792,
0.23035185039043427,
-0.2306179255247116,
-0.561477780342102,
-0.7132906913757324,
-0.1501428633928299,
0.7258376479148865,
-0.1534052938222885,
-0.0916614159941... | |
animate the elements to show and hide well. This is the CSS I used:
```
a span {
display: inline-block;
overflow: hidden;
width: 0;
white-space: nowrap;
transition: width 1s ease-in;
-webkit-transition: width 1s ease-in;
}
a img {
height: 16px;
width: 16px;
}
a:hover span {
width: 7... | [
-0.39885738492012024,
-0.30159682035446167,
0.6033923625946045,
-0.3650969862937927,
-0.35817670822143555,
0.405329167842865,
-0.02020001783967018,
-0.5352552533149719,
-0.2084706425666809,
-0.7040177583694458,
-0.09749183058738708,
0.28272148966789246,
-0.4090040922164917,
-0.267901659011... | |
3 text</span></a></li>
</ul>
```
To take it further and get the angles you require, you would need to take a look at CSS's transform property that allows you to rotate elements too.
Hope that's enough to get you started! | [
0.3498062193393707,
-0.11201728880405426,
0.6057627201080322,
-0.06861042976379395,
-0.4593377113342285,
-0.2741002142429352,
-0.05396811291575432,
-0.47940465807914734,
-0.0629073902964592,
-0.6281876564025879,
-0.03014025092124939,
0.6740903258323669,
-0.3137972354888916,
-0.340632110834... | |
I have created menu with tabs and under tabs I use `<button>`s. Normally `<button>` has `border:none;` attribute. When a user hovers `<button>` the class below is added to it.
```
.hover {
border-style:solid
border-width:2px;
border-color:rgb(160,36,67);
};
```
Unhove... | [
0.06057808920741081,
0.11506117880344391,
0.9311158061027527,
-0.01002885028719902,
-0.1149945929646492,
0.21249358355998993,
0.13630861043930054,
-0.00878511369228363,
-0.391414999961853,
-0.7977514266967773,
-0.10054280608892441,
0.22795042395591736,
-0.014835389330983162,
0.343703567981... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.